MENOS
A quantum circuit simulation compiler and runtime. It analyzes each workload and selects a feasible execution plan from estimated cost and resource limits, as a native Qiskit BackendV2 and EstimatorV2.

Don't just simulate the circuit. Plan how it should run.
One fixed algorithm is the wrong default. Instead of forcing every circuit through one rigid simulation engine, MENOS works as a compiler and runtime: it analyzes the circuit, prices candidate strategies, runs the cheapest feasible plan, and monitors it against strict resource limits.
Before simulation begins, MENOS converts the circuit into its intermediate representation, drops operations outside the causal past of the requested output (light-cone reduction), and identifies independent qubit subgraphs that can be simulated separately and recombined exactly.
Every engine reachable from Python is exact. MENOS never silently switches to approximate results when an exact run cannot fit within budget; the job is refused, not degraded.
Up to 40.8× faster on Bernstein–Vazirani.
On identical circuits from 4 to 21 qubits, MENOS on a host CPU outpaced PennyLane lightning.gpu on an RTX 3050 for Bernstein–Vazirani and VQE workloads. The GPU pulls ahead on deep 20-qubit QAOA and QFT circuits.
Experiment A: Bernstein–Vazirani, MENOS (host CPU) versus PennyLane lightning.gpu (RTX 3050). Medians.
| Qubits | Gates | Depth | MENOS (ms) | PL GPU (ms) | Ratio |
|---|---|---|---|---|---|
| 5Q | 16 | 6 | 0.21 | 4.14 | 19.90× |
| 9Q | 30 | 8 | 0.45 | 5.26 | 11.58× |
| 13Q | 44 | 10 | 0.40 | 5.75 | 14.31× |
| 17Q | 58 | 12 | 0.60 | 7.74 | 12.91× |
| 21Q | 72 | 14 | 0.93 | 38.07 | 40.80× |
Hardware: host x86_64 CPU (MENOS, 0 MB dedicated GPU VRAM) versus NVIDIA GeForce RTX 3050 Laptop GPU, 4 GB GDDR6 (lightning.gpu), on Ubuntu 24.04 LTS (WSL2), NVIDIA driver 592.82, CUDA 13.1, cuStateVec cu12. Methodology: median of 5 repetitions, 1 warm-up run, 1,024 shots per configuration, matched circuit definitions for both backends. These benchmarks were run on the developer's own machine; results depend on hardware, drivers and configuration. Datacenter GPUs and GPU-accelerated MENOS were not part of this scope.
Use cases

Plan first, then simulate.
Plan before you simulate
Analyze, cost, select, execute, and replan on overrun. The planner prices every candidate strategy under one cost model and sends the job down the cheapest feasible route; infeasible candidates are recorded with explicit refusal causes.
Six execution strategies
Dense, stabilizer, Pauli propagation, MPS, tensor network, and exact circuit cutting. Each is documented with its selection criteria, so you can read why a plan was chosen.
Strict budgets, exact results
Memory budgets default to 50% of physical RAM and are checked before anything is allocated. Time budgets are monitored at safe boundaries; on overrun the run halts cleanly, records the observed floor, and replans.
CPU or CUDA, by measured cost
For dense simulation the planner calibrates kernel launch and PCIe transfer costs on your machine and picks the GPU only when the estimated end-to-end time is lower. Ties go to the CPU.
Drop-in for Qiskit
MENOS ships as a native Qiskit BackendV2 and EstimatorV2. Existing circuits and estimator workflows run unchanged, with the planner behind them.
What the runtime does
- Circuit analysis and reduction: converts the circuit into its intermediate representation, removes operations outside the causal past via light-cone reduction, and identifies independent qubit subgraphs.
- Candidate strategy pricing: evaluates dense, stabilizer, MPS, Pauli propagation, tensor network, and cut plans under a unified cost model.
- Feasible plan selection: picks the cheapest feasible plan within memory and time budgets. Infeasible candidates are recorded with explicit refusal causes rather than hidden.
- Calibrated CPU and CUDA choices: selects GPU execution for dense simulation only when estimated end-to-end seconds, including data transfer latency, are lower than on the CPU.
- Strict exactness by default: every engine reachable from Python is exact. When an exact run cannot fit within budget, the job is refused rather than degraded.
- Safe monitoring and replanning: time budgets are checked at safe boundaries. On overrun, execution halts cleanly, records the observed runtime floor, and re-invokes the planner.
- Automatic factorization: qubits that never share an entangling operation are simulated as separate regions and recombined with no loss of exactness.
Getting started
MENOS is a Python package. Install it, then run a circuit through the Qiskit adapter.
Install
pip, with the Qiskit adapter
pip install "menos[qiskit]"Verify
python -c "import menos; print(menos.__version__)"Qiskit BackendV2
Bell state, 1,000 shots
"""Bell state through the Qiskit BackendV2 adapter."""
from qiskit import QuantumCircuit
from menos.qiskit import MENOSBackend
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])
backend = MENOSBackend()
result = backend.run(qc, shots=1000, seed_simulator=7).result()
counts = result.get_counts()
print(counts)
# A Bell pair only ever yields 00 or 11, and every shot is accounted for.
assert set(counts) <= {"00", "11"}
assert sum(counts.values()) == 1000Specs
- Version
- 1.2.0
- License
- Apache-2.0
- Python
- ≥ 3.10
- Verified on
- Linux x86-64 · Windows x64
- Interfaces
- Qiskit BackendV2 and EstimatorV2
- Engines
- Dense (CPU and CUDA), stabilizer, Pauli propagation, MPS, tensor network, exact circuit cutting
- Memory budget
- 50% of physical RAM by default; checked before allocation
- GPU
- NVIDIA CUDA for the dense engine, chosen by measured cost
- Benchmarks on this page were measured on a single developer machine against an entry-level laptop GPU. Numbers will differ on other hardware, drivers and configurations.
Questions
What is MENOS?
A quantum circuit simulation compiler and runtime. It analyzes each circuit, prices candidate execution strategies, and runs the cheapest plan that fits your memory and time budgets, exposed to Python as a Qiskit BackendV2 and EstimatorV2.
Are results exact?
Yes. Every engine reachable from Python is exact. If no exact plan fits within budget, MENOS refuses the job with an explicit cause instead of switching to an approximate method.
Do I need a GPU?
No. Everything runs on the host CPU. If an NVIDIA GPU is available, the planner uses it for dense simulation only when its calibrated cost model says it will be faster end to end.
Which platforms are supported?
Python 3.10 and later, verified on Linux x86-64 and Windows x64.
How is it licensed?
Apache-2.0. The source is on GitHub and the package installs from PyPI.
