Abstract
Digital-analog quantum computing (DAQC) is an alternative paradigm for universal quantum computation combining digital single-qubit gates with global analog operations acting on a register of interacting qubits. Currently, no available open-source software is tailored to express, differentiate, and execute programs within the DAQC paradigm. In this work, we address this shortfall by presenting Qadence, a high-level programming interface for building complex digital-analog quantum programs developed at Pasqal. Thanks to its flexible interface, native differentiability, and focus on real-device execution, Qadence aims at advancing research on variational quantum algorithms built for native DAQC platforms such as Rydberg atom arrays.
Introduction
The landscape of quantum software development is largely dominated by the digital gate-based model, exemplified by tools like Qiskit and Cirq. While effective for discrete operations, these frameworks often struggle to capture the nuances of near-term quantum devices, such as neutral-atom processors, which naturally operate in an "analog" mode. In this mode, a global Hamiltonian governs the entire qubit register simultaneously.
Digital-Analog Quantum Computing (DAQC) seeks to bridge this divide by interleaving global analog pulses with local digital gates. However, the lack of high-level software supporting automatic differentiation for this paradigm has hindered the application of modern gradient-based optimization techniques—essential for Variational Quantum Algorithms (VQAs). Qadence addresses this gap as a native, differentiable interface designed for building and training digital-analog programs.
Architectural Framework
Qadence is built on several core architectural pillars that facilitate the transition from high-level abstractions to hardware execution.
Block-based Composition
Central to Qadence is a functional-programming-inspired "block" interface. This allows users to compose complex quantum operations using modular units like chains, Kronecker products, or additions. This hierarchical structure simplifies the design of intricate circuits by providing a clear mapping between the logical structure and the physical operations.
Symbolic Parameters and Differentiability
The library integrates with Sympy, enabling the use of symbolic expressions for trainable parameters. This flexibility is crucial for complex variational ansätze. Furthermore, Qadence is designed for seamless integration with the PyTorch and JAX ecosystems. By making the QuantumModel class inherit from torch.nn.Module, quantum circuits can be treated as standard layers within a neural network, facilitating hybrid classical-quantum training.
Qadence supports three primary differentiation modes:
- Automatic Differentiation (AD): Standard for statevector simulators.
- Adjoint Differentiation: Optimized for memory efficiency in large-scale simulations.
- Generalized Parameter-Shift Rule (GPSR): Tailored for execution on physical hardware.
Applications and Benchmarks
The utility of Qadence was demonstrated through several benchmark applications targeting scientific computing and optimization:
- Differential Equations: The library was used to solve non-linear Ordinary Differential Equations (ODEs) and the 2D Laplace equation. Using a Differentiable Quantum Circuit (DQC) model, the system successfully converged to analytical solutions within 1000 training epochs using the Adam optimizer.
- Combinatorial Optimization: Qadence implemented a fully analog version of the Quantum Approximate Optimization Algorithm (QAOA) to solve Quadratic Unconstrained Binary Optimization (QUBO) problems. The results showed that a purely analog ansatz, utilizing global rotations, could effectively identify optimal bitstrings.
- Hardware Mapping: Through the
daqc_transformfunction, Qadence can automatically map target Hamiltonians onto hardware-supported "build" Hamiltonians, inserting necessary local rotations to maintain mathematical equivalence.
Conclusion and Future Outlook
Qadence provides a much-needed interface for the DAQC paradigm, treating the global interaction Hamiltonian as a primary computational resource rather than a constraint. While currently focused on "stepwise" DAQC strategies, future development aims to support "banged" strategies where interactions remain active during local gates.
Ongoing efforts also include improving noise modeling for more realistic simulations and developing domain-specific libraries for fields like Quantum Chemistry and Finance. By lowering the barrier to entry for digital-analog programming, Qadence serves as a foundational tool for the next generation of variational quantum research.
Summary updated