Products

Uncertainty HubLearning workbenchMENOSSimulation runtimeSTHIRASAI modelQaulium StudioBuild studio
Startup AcceleratorComing soon

MENOS

Simulation runtimev1.2.0Apache-2.0

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.

40.8×
Bernstein–Vazirani
21 qubits, vs PennyLane lightning.gpu
11.0×
VQE
vs PennyLane lightning.gpu, RTX 3050
0.93 ms
BV at 21 qubits
median of 5 runs, host CPU
6
Execution strategies
priced under one cost model

Experiment A: Bernstein–Vazirani, MENOS (host CPU) versus PennyLane lightning.gpu (RTX 3050). Medians.

QubitsGatesDepthMENOS (ms)PL GPU (ms)Ratio
5Q1660.214.1419.90×
9Q3080.455.2611.58×
13Q44100.405.7514.31×
17Q58120.607.7412.91×
21Q72140.9338.0740.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.

Benchmark experiments

Four experiments, run on one developer machine. Pick a series and a register size; every number below follows your selection.

PennyLane comparison views

Execution latency (ms, log scale)
0.5 ms1 ms5 ms10 ms50 ms59131721Qubits
MENOS (host CPU, median)PennyLane lightning.gpuSelect a point to compare that register size

Bernstein-Vazirani @ 21 qubits

MENOS0.93ms
PennyLane GPU38.07ms
40.80×MENOS finished first

Circuit: 72 gates, depth 14. Select a point on the chart to compare another size.

Memory and correctness at 17Q

Host memory274.3 MB MENOS · 558.8 MB PennyLane
GPU VRAM0 MB MENOS · 338.5 MB PennyLane
Correctness1 MENOS · 1 PennyLane

Exact 100% agreement (exact secret recovered)

View data table for Bernstein-Vazirani
QubitsGatesDepthMENOS (ms)PL GPU (ms)RatioFaster
5Q1660.214.1419.90×MENOS
9Q3080.455.2611.58×MENOS
13Q44100.405.7514.31×MENOS
17Q58120.607.7412.91×MENOS
21Q72140.9338.0740.80×MENOS
  • Host x86_64 CPU (MENOS) vs NVIDIA GeForce RTX 3050 Laptop GPU (4 GB GDDR6 VRAM, lightning.gpu)
  • Ubuntu 24.04 LTS (WSL2), NVIDIA Driver 592.82, CUDA 13.1, cuStateVec cu12
  • Median of 5 repetitions, 1 warm-up run, 1,024 shots per configuration. Matched circuit definitions for both backends.

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()) == 1000

Specs

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.

Resources