Research
eigenkit: A Provider-Neutral Quantum Computing Library
A single circuit representation across 12 simulators and hardware backends, with backend-independent gradients for NumPy, PyTorch and scikit-learn workflows.

- arXiv
- 2611.02979
- Published
- 2026-11-02
- Authors
- Laia Domingo, Daniil Tarpanov, Arsenii Senokosov, Asel Sagingalieva
AI summary
Overview
Research area: Quantum software engineering — cross-platform abstraction layers for quantum circuit definition and execution across simulators and quantum processing units (QPUs).
Technical level: Intermediate. Readers should be comfortable with gate-based quantum circuits, variational algorithms (VQE, QAOA, quantum neural networks), and basic transpilation concepts such as coupling maps and routing.
Scope: The paper presents eigenkit, an open-source provider-neutral library (version 1.0.0, Apache License 2.0) that separates algorithm definition from backend execution, and empirically measures both the overhead of that abstraction and the practical benefit of moving the same circuit across simulators and QPUs.
What This Paper Is About
Quantum software frameworks differ in programming models, supported features, and backend capabilities, so moving the same algorithm between execution environments typically requires rewriting circuit definitions, provider-specific code, or differentiation strategies — which makes systematic comparison across backends cumbersome just when backend choice matters most. The authors introduce eigenkit, a library that defines circuits once in a backend-independent intermediate representation and executes them through a common provider protocol, with gradient computation handled uniformly regardless of whether the underlying SDK offers differentiation. The paper's central claim is that backend portability is not merely a software-design convenience: they show that the best simulator depends heavily on workload, and that the best QPU depends on how well a circuit's interaction topology matches the processor's physical connectivity.
Key Contributions
-
Provider-neutral execution. A circuit is defined once and run, with minimal changes to user code, across an in-house NumPy simulator, PennyLane, Qiskit Aer, CUDA-Q, TensorCircuit, Qulacs, and qsim, as well as QPUs accessed through Qiskit Runtime, IQM Resonance, Quandela's Perceval, and Amazon Braket — reported as 12 execution providers in total.
-
Backend-independent differentiation. A single gradient interface spans all backends, using native differentiation when a provider supplies it (for example the built-in simulator's adjoint method or PennyLane's own differentiation) and falling back to an in-house parameter-shift rule otherwise, so simulators whose SDKs would require hand-written gradients still support gradient-based training.
-
Integration with the classical scientific stack. Circuits interoperate with NumPy and PyTorch (including
nn.Modulelayers for standard angle encoding, data re-uploading, chunked input encoding, ensembles over feature subsets, and parallel quantum–classical branches), plus scikit-learn-stylefit/predictestimators for quantum kernels and support-vector classifiers and regressors. -
High-level algorithmic modules. The library ships modules for quantum machine learning, optimization (QUBO/Ising formulations, Max-Cut, QAOA), chemistry (Jordan–Wigner and Bravyi–Kitaev mappings, Hartree–Fock and UCCSD ansätze, VQE, built through OpenFermion and PySCF), quantum reservoir computing, general algorithms (HHL and iterative quantum amplitude estimation), plus benchmarking and dataset utilities.
Main Findings
-
Dispatch overhead is small; compilation overhead is paid once. Against hand-written code calling the same SDK, per-call ratios were 1.01×–1.81× at n=4, 1.02×–1.30× at n=8, and 1.02×–1.05× at n=12 for PennyLane, Qiskit, and qulacs. Compile ratios were larger — from 2.5× to 18× the original SDK (10.32×, 4.73×, 17.31× at n=4; 11.81×, 3.10×, 9.79× at n=8; 11.25×, 2.66×, 7.42× at n=12) — but in absolute terms compilation took 1.3–4.3 ms and is paid once per circuit creation, not per call. The measurement was run on 3 different hosts with run-times varying up to 2×, while dispatch overhead kept the same absolute values.
-
No single simulator is consistently preferable. Across 7 circuit families varying in parameter count, entanglement, and closeness of the unitary to diagonal, simulators that excel at low qubit counts fall behind as qubit count grows and vice versa; tensor-network simulators can be fastest, slowest, or fail to run at all depending on circuit structure; and simulators bundled with hardware SDKs were among the slowest measured.
-
Workload type reverses the simulator ranking. qulacs was the fastest for variational optimization at 9.2× the NumPy baseline but dropped to 0.49× on HQNN training, a change of almost 20×. Conversely, TensorCircuit was fastest for HQNN training at 2.6× but ran at only 0.04× on variational optimization.
-
Topology matching drives QPU execution quality. For the 20-qubit heavy-hex circuit, both processors executed with the same 38 two-qubit gates and no routing overhead, with similar slopes (IBM α = 0.9192, IQM α = 0.9005).
-
For grid-2D circuits, IQM Emerald wins on both sizes. Degree-4 grid interactions map naturally onto IQM's square lattice but cannot embed directly in IBM's degree-3 heavy-hex topology: two-qubit gates rose from 60 on IQM to 107 on IBM at 20 qubits, and from 170 to 427 at 54 qubits. IQM achieved better agreement at both sizes (20 qubits: α = 0.8509, RMSE = 0.0329 on IQM vs α = 0.7952, RMSE = 0.0457 on IBM; 54 qubits: α = 0.8482, RMSE = 0.0660 on IQM vs α = 0.7646, RMSE = 0.0955 on IBM).
-
For the 54-qubit heavy-hex circuit, the preference reverses. IBM executed natively with 118 two-qubit gates, while at n=54 all IQM physical qubits are occupied, leaving no freedom to choose a better subgraph, so the full coupling map required routing that raised the count to 206. IBM achieved the larger slope at this size (α = 0.7923 vs α = 0.7427 on IQM), though IQM's RMSE was lower (0.1355 vs 0.1716).
Methodology in Plain English
The library stores each circuit as data: an ordered list of gates, the qubits they act on, and parameters that are either constants or references to trainable weights and data inputs. It stores no numerical values for weights or inputs — those are supplied at every call — so the same stored circuit can be reused across optimizers and backends. Each provider translates that representation into its own SDK's objects, following a protocol that declares supported gates, qubit limits, shots, batching, and gradient method. The code is organized in three layers (algorithms, circuits, providers), each depending only on the interface of the layer below, and the core installs only NumPy and SciPy, with other frameworks pulled in as optional extras imported on first use.
For benchmarking, the authors first measured routing cost: how long the library takes per call and at compile time versus hand-written code calling PennyLane, Qiskit, or qulacs directly, using an angle-encoded depth-3 circuit measuring one Pauli operator per qubit, reporting the best of ten calls after three discarded warmups with bitwise parity of results. They then benchmarked simulation speed relative to the NumPy simulator on raw circuit execution (7 circuit families) and on three application workloads (VQE, QAOA, HQNN training).
For hardware, they built Quantum Circuit Born Machines from IQP circuits — Hadamards, a diagonal layer of commuting single-qubit Z rotations and two-qubit ZZ interactions along the edges of an interaction graph, then Hadamards — using two interaction graphs, heavy-hex and grid-2D, extracted directly from the physical coupling maps of IBM Heron r2 (156 superconducting qubits, sparse heavy-hexagonal) and IQM Emerald (54 qubits, square lattice). They ran n=20 and n=54 circuits on both devices, 8 executions in total, 8,000 shots each, with the same parameter realization per circuit. Because the commuting IQP structure allows low-weight Z expectation values to be computed exactly and classically from the graph and parameters at cost O(2^{|ω|}|∂ω|) — no full 2^n state vector needed — they restricted analysis to observables of weight at most four and kept the 64 expectation values with the largest ideal magnitude. Agreement was scored by a least-squares slope α (how much ideal signal magnitude survives, with 1 meaning ideal) and by RMSE (absolute deviation).
Why This Matters
The work reframes backend selection as a workload-dependent engineering decision rather than a fixed platform commitment. For research, it provides a controlled demonstration that abstracting over providers is cheap in the per-call regime, and that hardware topology matching can change which QPU produces better results even within one algorithmic family — a confound that single-platform studies cannot separate from device noise. It also offers a concrete measurement protocol (classically exact low-weight Z references, slope plus RMSE) for comparing devices on circuits too large to simulate directly.
Real-world applications targeted by the library's own modules:
- Molecular and materials simulation through the chemistry module (fermionic mappings, UCCSD ansätze, VQE with OpenFermion and PySCF-built Hamiltonians).
- Combinatorial optimization via QUBO and Ising formulations, Max-Cut construction, and a QAOA solver.
- Quantum machine learning pipelines for classification, regression, and time-series problems through scikit-learn-compatible estimators and PyTorch layers.
- Generative modeling and sampling with QCBMs built from IQP circuits, which the paper notes are believed hard to sample from classically under standard complexity assumptions, and photonic experiments through the Perceval provider.
Industry relevance: the optional-dependency design (NumPy-and-SciPy-only core) lowers installation friction, the unified gradient interface avoids vendor lock-in during algorithm development, and the provider protocol lets teams add internal or newly released backends without touching circuit or algorithm code — attractive for groups benchmarking hardware vendors or hedging across cloud quantum services.
Future Directions
- Expand the provider, module, algorithm, and block set, including noise modelling and analogue quantum computing as new directions.
- Improve usability by supporting more common programming patterns and utility functions to streamline application development.
- Deepen integration with Qiskit and PennyLane beyond the execution layer, for example through circuit import and export at the construction layer.
- Broaden and strengthen the empirical evaluation, since the current QPU comparison uses a single parameter realization per circuit and one execution per device and therefore does not capture run-to-run variation or calibration drift, while simulator timings were collected on a single x86 machine pinned to one thread (so GPU or multi-threaded execution may reorder the rankings).
Target Audience
Quantum software developers and applied researchers who need to run the same variational algorithm, gradient-based training loop, or benchmarking study across several simulators and hardware vendors; machine-learning practitioners integrating quantum components into PyTorch or scikit-learn pipelines; and teams evaluating quantum hardware procurement or cross-vendor performance, who will find the topology-versus-routing analysis directly actionable. Readers interested primarily in quantum algorithms or hardware physics will find the paper's value in its benchmarking methodology rather than in new algorithmic results.
Authors’ abstract
Quantum software ecosystems provide increasingly capable tools for simulation and hardware execution, but differences in programming models, supported features, and backend capabilities can make it difficult to move and systematically compare the same quantum algorithm across execution environments. We introduce eigenkit, a provider-neutral quantum computing library that separates algorithm definition from backend execution through a common circuit representation and…
The full abstract on arXiv