Gradients on every backend
Native where a provider has them, parameter-shift everywhere else, through the same interface.
Build quantum algorithms once.
Run them anywhere.
Write a quantum circuit in Python. Run it on a simulator on your laptop or on a real quantum processor in the cloud. Switching between the two is one argument, and the rest of your code stays the same.
$ pip install eigenkitOnly the provider argument changes.
Gate by gate, from ready blocks or inside an estimator. Every route produces the same internal circuit, and the rest of the workflow runs on it.
from eigenkit import CircuitBuilder, Z edges = [(0, 1), (1, 2), (2, 3), (3, 0)] qc = CircuitBuilder(n_qubits=4) for q in range(4): qc.h(q) for (i, j), angle in zip(edges, [0.7, 1.1, 0.4, 1.9]): qc.pauli_exponential((("Z", i), ("Z", j)), angle) for q in range(4): qc.h(q) spec = qc.build() obs = [Z(0) * Z(1), Z(1) * Z(2)]
A provider name is all it takes. The training loop and the gradients stay the same on every simulator.
from eigenkit import Circuit for provider in ["numpy", "qulacs", "tensorcircuit", "qsim"]: circuit = Circuit(spec, observables=obs, provider=provider) print(provider, circuit([])) # same circuit, same gradients, four simulators
Replace the name with a hardware config. Paid devices raise a CostWarning, and the job can be previewed before anything is submitted.
from eigenkit import Circuit, IQMConfig, QiskitRuntimeConfig ibm = QiskitRuntimeConfig(backend_name="ibm_kingston") iqm = IQMConfig(quantum_computer="emerald") circuit = Circuit(spec, observables=obs, provider=ibm) info = circuit.dry_run_info() CostWarning: Qiskit Runtime compile against 'ibm_kingston' via estimator
Quantum and classical models run on the same data over several seeds. A significance test shows whether the difference is real.
from sklearn.svm import SVC from eigenkit import QSVC from eigenkit.benchmark import compare result = compare(models=[QSVC(), SVC()], dataset="moons", n_seeds=10) print(result.table(show_significance=True)) # mean ± std across seeds, * and ** mark p < 0.05 and p < 0.01
from eigenkit import CircuitBuilder, Z edges = [(0, 1), (1, 2), (2, 3), (3, 0)] qc = CircuitBuilder(n_qubits=4) for q in range(4): qc.h(q) for (i, j), angle in zip(edges, [0.7, 1.1, 0.4, 1.9]): qc.pauli_exponential((("Z", i), ("Z", j)), angle) for q in range(4): qc.h(q) spec = qc.build() obs = [Z(0) * Z(1), Z(1) * Z(2)]
from eigenkit import Circuit for provider in ["numpy", "qulacs", "tensorcircuit", "qsim"]: circuit = Circuit(spec, observables=obs, provider=provider) print(provider, circuit([])) # same circuit, same gradients, four simulators
from eigenkit import Circuit, IQMConfig, QiskitRuntimeConfig ibm = QiskitRuntimeConfig(backend_name="ibm_kingston") iqm = IQMConfig(quantum_computer="emerald") circuit = Circuit(spec, observables=obs, provider=ibm) info = circuit.dry_run_info() CostWarning: Qiskit Runtime compile against 'ibm_kingston' via estimator
from sklearn.svm import SVC from eigenkit import QSVC from eigenkit.benchmark import compare result = compare(models=[QSVC(), SVC()], dataset="moons", n_seeds=10) print(result.table(show_significance=True)) # mean ± std across seeds, * and ** mark p < 0.05 and p < 0.01
To switch to another simulator or a quantum processor, you change one argument. The circuit, the training loop and the gradients stay as they are.
with every circuit
Native where a provider has them, parameter-shift everywhere else, through the same interface.
Circuits as PyTorch layers, models as scikit-learn estimators.

Common quantum algorithms ship ready to use, so you can start from a working model.
Quantum and classical models on the same data across several seeds. A Wilcoxon test marks significant differences.
>>> compare(models, dataset="iris", n_seeds=10)Only a few percent of added overhead per call, where distinguishable from noise. Compilation is paid once per circuit.
The fastest simulator for one task can be the slowest for another, and the same holds for quantum processors. With eigenkit, switching takes one argument.
Speed relative to the built-in NumPy simulator (1×), log scale
Fastest single forward pass
Same code on both devices, 8000 shots each
The base install includes the built-in simulator, optimization and chemistry. PyTorch, scikit-learn and quantum SDKs are optional extras.
$ pip install eigenkitPython 3.12, 3.13 and 3.14. Bug reports, ideas and pull requests are welcome.