eigenkit: open-source Python library runs one quantum circuit on many backends

Illustrative photo: Eigenkit runs quantum circuits across multiple simulators by changing a single argument.

EigenOrbit has introduced eigenkit, an open-source Python library under the Apache-2.0 license that treats a quantum circuit as a piece of data rather than as objects tied to one SDK. Each backend then compiles that description into its own native format, so moving a program from one simulator to another simulator or a quantum processor means changing the provider argument. The announcement appeared on dev.to on 9 November 2026 and is backed by a GitHub README from the same project.

One description, many compilers

The problem the authors describe is familiar to anyone who has compared quantum toolchains: a model written for PennyLane has to be rewritten for Qiskit Aer, and again for an IBM or IQM device. In eigenkit, a circuit records the gates, the qubits they act on, and parameters that are either constants or references to trainable weights and data inputs. It can be assembled gate by gate with CircuitBuilder or from ready-made blocks such as encodings, variational layers and data re-uploading, and both routes yield the same representation.

As a demonstration, the dev.to post builds a four-qubit IQP circuit and runs it on the built-in numpy simulator, PennyLane, Qiskit Aer and Qulacs. The authors report identical expectation values from all four. The README shows the same circuit on three of those simulators, so the two sources agree on the result and differ only in how many backends they list.

Simulators, QPUs and spending guards

The simulator list covers numpy, PennyLane, Qiskit, Qiskit Aer (statevector and matrix-product-state), Qulacs, qsim, TensorCircuit, CUDA-Q and Amazon Braket simulators. For hardware, IBM devices are reached through Qiskit Runtime, IQM devices through IQM Resonance, and further QPUs through Amazon Braket. Photonic circuits run on Quandela's Perceval. According to the README, IBM Quantum or IQM Resonance access requires an account.

Because paid hardware can be expensive, compiling for a billable device raises a CostWarning, and dry_run_info() previews a job before submission. Gradients on hardware are off by default and must be enabled with enable_gradients=True, since one backward pass needs at least two jobs per weight. Where a provider has its own differentiation, such as the adjoint method on the numpy simulator, Qulacs and TensorCircuit, or PennyLane's autodiff, eigenkit uses it; elsewhere it falls back to the parameter-shift rule. CUDA-Q and Qiskit Runtime are not registered automatically and must be registered by the user.

Fitting the classical stack, with a modest benchmark

A circuit can act as a numpy function or, with the torch interface, as a torch.nn.Module that trains inside a larger model. The ready-made models follow scikit-learn's fit and predict conventions, so they work with Pipeline and GridSearchCV. The library also covers QUBO and Ising problems, Max-Cut, QAOA, VQE with Jordan-Wigner and Bravyi-Kitaev mappings, HHL, iterative amplitude estimation and portfolio risk measures.

The built-in compare() helper trains quantum and classical models on the same data across several seeds. In the authors' own five-seed run on the iris dataset, a quantum-kernel classifier (QSVC) had the highest mean accuracy, 0.974, against 0.965 for an RBF SVC and 0.957 for a random forest. The authors say every pairwise Wilcoxon p-value was 0.5 or higher, so the three models are statistically tied, and the classical SVC predicted about three times faster.

On the iris dataset, QSVC achieved 0.974 mean accuracy, RBF SVC reached 0.965, and random forest scored 0.957.

Why one-argument backend switching matters

The README's argument is that no single backend suits every workload. Simulators vary in speed depending on qubit count, circuit structure, how much entanglement is built, batch size, and whether a job evaluates a circuit once or trains over many batches. They also differ in the gates and parameter expressions they accept and in whether they sample shots or use a GPU. Quantum processors differ in qubit count, connectivity, native gates, error rates, price and queue time, so the better device can change from circuit to circuit. For researchers and machine-learning engineers, cheap backend swapping turns that comparison into an experiment rather than a porting project.

The practical gains fall to teams that compare several simulators on their own workload, or that want to test the same algorithm on IBM, IQM and Braket hardware without maintaining separate code. The cost guards matter in that setting, because it is easy to run many jobs on paid devices by accident. The caveats are equally concrete. All performance and accuracy figures come from the project's own materials, including its report that the abstraction adds a few tens of microseconds per call, measured on PennyLane, Qiskit and Qulacs. The iris result also shows the library's honest framing: it is designed to show when a quantum model brings no advantage, not to promise one.

Install requirements and platform limits

The core install, pip install eigenkit, pulls in numpy, scipy and pydantic and needs Python 3.12, 3.13 or 3.14. PyTorch, scikit-learn and every quantum SDK are optional extras. CUDA-Q ships wheels for Linux (x86_64 and ARM64) and macOS Apple Silicon, where it runs a CPU-only simulator; on Windows and Intel Macs the extra installs nothing and the backend raises an error. PySCF does not support Windows, so real molecular chemistry there needs WSL. The code is on GitHub at eigenorbit/eigenkit, with documentation at docs.kit.eigenorbit.com and an accompanying paper listed as arXiv:2611.02979.

Cover: NOIRLab/NSF/AURA/T. Slovinský · CC BY 4.0 · Wikimedia Commons. Layout and headline text by Signal Titans.

Source: eigenkit: write a quantum circuit once, run it on any backend · GitHub – eigenorbit/eigenkit: Open-source Python library for quantum computing. Build quantum algorithms once, run them on simulators such as Qiskit Aer, PennyLane, CUDA-Q and Qulacs, and on IBM Quant

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *