Open Quantum Application Research Package¶
OpenQARP is a Python package for quantum computing research. You describe a problem — a molecule, a spin model, an optimisation instance — build a circuit for it, and run that circuit on a fast simulator or compile it for real hardware. It is aimed at researchers: the physics is in the foreground, and the C++ engine underneath is something you should never have to think about.
Install¶
pip install openqarp
Wheels ship for Linux (x86_64, arm64), macOS (Apple silicon, Intel) and
Windows on Python 3.11–3.14. Anywhere else pip compiles the C++ backend
from source, which takes a few minutes. For GPUs, editable installs, or a
build on a machine with little memory, see the Installation Guide. The
distribution is named openqarp; the package you import is qarp.
Getting started¶
Three snippets. Paste them into a Jupyter notebook in order — each one builds on the last.
1. Build a circuit and look at it. Circuits are blocks: you say how many
qubits, add gates, then build().
from qarp.blocks import SimpleBlock
bell = SimpleBlock(2, name="bell")
bell.h(0)
bell.cx(0, 1)
bell.measure([(q, q) for q in range(2)]) # measure qubit q into bit q
bell.build()
bell.plot() # draws the circuit diagram
2. Run it and get the results. A primitive says what you want out of the circuit — here, the distribution of measured bitstrings. The engine runs it.
from qarp.algorithms import Sampler
from qarp.engines import QarpEngine
sampler = Sampler(ket=bell, n_shots=4000)
engine = QarpEngine(seed=42) # seed makes shots reproducible
engine.build([sampler])
results = engine.run()
print(results[0])
# {(0, 0): 0.48875, (1, 1): 0.51125} ← a Bell state, up to shot noise
Keys are tuples of bits indexed by qubit: position q is qubit q. OpenQARP
is least-significant-bit-first everywhere. Values are probabilities, not raw
counts.
3. Measure an observable. Swap the primitive to get an expectation value instead — exactly, or sampled with shots, from the same circuit.
from qarp.operators import QubitOperator
from qarp.algorithms import PauliAveraging, StateVector
circuit = SimpleBlock(2, name="bell")
circuit.h(0)
circuit.cx(0, 1)
circuit.build() # no measurements this time
H = QubitOperator("Z0 Z1") + 0.5 * QubitOperator("X0 X1")
exact = StateVector(ket=circuit, operator=H)
shots = PauliAveraging(ket=circuit, operator=H, n_shots=4000)
engine = QarpEngine(seed=42)
engine.build([exact, shots])
results = engine.run()
print(results[0], results[1])
# (1.4999999999999998+0j) 1.5 ← both agree with ⟨H⟩ = 1.5 by hand
That is the whole mental model: block (what the circuit does) → primitive (what you want out of it) → engine (run it). Everything else — VQE, QPE, circuit cutting, noisy simulation — is those three pieces with more interesting parts plugged in.
Next: the six tutorial_00 … tutorial_05 notebooks in
examples/
take about an hour end to end, or jump straight to the OpenQARP Tutorial.
What’s in OpenQARP¶
Algorithms |
VQE, VQD, SSVQE, ADAPT-VQE / ADAPT-VQD, QAOA, QPE, DOS-QPE, PCE — ready to run, or assembled from primitives. |
Circuits |
Composable blocks: hardware-efficient and QAOA ansatzes, Trotterised evolution, and custom blocks of your own. |
Chemistry & physics |
Electronic structure from plain numpy integral tensors, with Jordan-Wigner, Bravyi-Kitaev and parity mappings. |
Simulation |
Exact state vectors, shot-based sampling, noisy simulation with configurable channels, mid-circuit measurement, and circuit cutting for problems too big for the qubits you have. |
Hardware |
Compile to a device’s gate set and qubit layout, with noise and routing models — and plot any of it with Matplotlib. |
Documentation¶
Full documentation is on GitHub Pages.
Resource |
Description |
|---|---|
Guided path: blocks, primitives, engines, VQE loops |
|
Design principles behind OpenQARP |
|
Build options, GPU, LAPACK, developer setup |
|
~50 runnable notebooks by API area, plus worked use cases |
Benchmarks¶
OpenQARP is benchmarked against qiskit, pennylane, pytket, qulacs and cirq on
operator algebra, simulation, sampling, compilation and end-to-end algorithm
runs. Tables are in benchmarks/tables/; every timing row carries a
correctness check against an independent reference, and rows whose checks
disagree are not published. The harness that regenerates them is
benchmarks/README.md.
Citing¶
If OpenQARP is useful in your research, please cite it. A paper describing
the framework is in preparation; until it appears, cite the software itself
(CITATION.cff carries the same entry in machine-readable form):
@misc{openqarp2026,
author = {Scali, Stefano and Soloviev, Vicente P. and M{\'a}rquez Romero, Antonio and
Coyle, Brian and Buonaiuto, Giuseppe and Paine, Annie and Fetherolf, Jonathan H. and
Diez Garc{\'i}a, Marcos and Krompiec, Michal and Kirsopp, Josh},
title = {{OpenQARP: Open Quantum Application Research Package}},
year = {2026},
doi = {10.5281/zenodo.22755228},
note = {\url{https://github.com/OpenQARP/openqarp}}
}
Contributing & support¶
Contributions are welcome — please read the Contributing Guidelines first and the Code of Conduct, which applies to every project space. For bugs, questions, or feature ideas, open an issue in the Issue Tracker.
OpenQARP is developed and maintained by the Fujitsu Research of Europe team, and
released under the Apache License 2.0 — see LICENSE. The copyright notice
is in NOTICE, which the Apache License requires you to carry forward if you
redistribute OpenQARP or a derivative work; the licenses of the bundled
third-party components are in LICENSES_bundled.txt.