Quantum Benchmarking · Rust · Open Source
CleitonForge routes identical quantum circuits through multiple simulation backends using a canonical intermediate representation. It found something that standard benchmarks miss entirely.
The Finding
The Rz(λ) gate is one of the most common in quantum computing. IBM, Qiskit, and OpenQASM 3 define it with a specific sign convention. Most simulators follow it. quantrs2-core does not — and no standard benchmark catches it, because random-angle circuits average out the divergence.
It only surfaces in circuits with purposeful angles — exactly the ones used in QAOA, VQE, and variational quantum algorithms. The error is not small: it is exactly zero fidelity.
The Quantum Volume benchmark — the industry standard for comparing simulators — is entirely insensitive to this class of divergence. Haar-random circuits use angles drawn from a uniform distribution; the sign flip maps one random angle to another from the same distribution. In expectation, HOG fractions are identical. CleitonForge's QAOA benchmark, which uses specific optimization angles, exposes the divergence immediately.
import cforge # QAOA circuit built for quantrs2 convention circuit = build_qaoa(gamma=-3*pi/4, beta=-pi/8) # Before: fidelity(native, quantrs2) = 0.00000000 fixed = cforge.normalize(circuit) # After: fidelity(native, quantrs2) = 1.00000000 # Or directly from QASM: fixed = cforge.normalize_qasm(qasm_source)
Get Started
import cforge, math # Build circuit with the builder API c = cforge.Circuit(2) c.h(0); c.h(1) c.cx(0, 1) c.rz(-3 * math.pi / 2, 1) c.cx(0, 1) c.rx(-math.pi / 4, 0) c.rx(-math.pi / 4, 1) # Run on any backend r = cforge.run(c, backend="statevector", shots=4096) print(r.top_states(4)) # Normalize convention before running on quantrs2 fixed = cforge.normalize(c) r2 = cforge.run(fixed, backend="quantrs2")
Full documentation and examples at
github.com/cleitonaugusto/CleitonForge.
A Jupyter notebook reproducing all findings is at
notebooks/convention_demo.ipynb.
Who uses it
cforge.normalize(circuit)
before execution. One line. Prevents silent wrong results.
Publication
Cleiton Augusto Correa Bezerra · 2026
DOI: 10.5281/zenodo.21210972 · Zenodo open access.
Teams running quantum workloads across IBM, AWS Braket, Azure Quantum, or multiple on-prem simulators need consistency that no single vendor can provide. cforge-enterprise delivers per-device calibration tables, convention-aware circuit routing, Zero-Noise Extrapolation, and readout mitigation as a service.