{"slug": "quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster", "title": "Quantum simulator for major chip types, for AI agents, 6x faster", "summary": "Vicena Labs released Quantum Circuit Simulator 0.5.0rc5, an Apache-2.0-licensed quantum circuit simulator built for AI agents and researchers that the company says runs 6x faster, authored by Mehdi Farza and installable from GitHub rather than PyPI. The package simulates noisy circuits against measured calibrations of 65 IBM chips and 3 Google chips plus Microsoft's Majorana 2 topological chip, supports exact-gradient VQE and QAOA across up to 4,096 shared parameters, returns amplitudes and bitstrings up to 28 qubits (any size for Clifford circuits), and exports chip designs as GDSII, DXF, SVG or 3D STL CAD files. Vicena also runs the simulator through a scientist agent that writes circuits from plain-language prompts, executes them on real chip calibrations and reports results as JSON with provenance.", "body_md": "**A quantum circuit simulator by [Vicena Labs](https://vicena.ai), built for AI agents and the scientists who work with them.** It answers the question that decides where quantum computing effort goes: *will this algorithm work on that hardware, at this size and noise level, and what would make it work?* In one package you can:\n\n- simulate noisy circuits on real chips' calibrations;\n- develop algorithms with exact gradients;\n- design new chips, compare them and export them as 2D or 3D CAD;\n- get every answer as JSON that says how it was computed and whether it is exact.\n\n[Vicena](https://vicena.ai) runs this package for you: describe the study in plain language and its scientist agent writes the circuit, runs it on a real chip's calibration, checks the result and reports it with provenance. Click a prompt to open it in Vicena, ready to send:\n\n- [**Run a Bell circuit on IBM Fez**](https://vicena.ai/agent?q=Using%20the%20Quantum%20Circuit%20Simulator%2C%20run%20a%20Bell%20circuit%20on%20IBM%20Fez%27s%20real%20calibration%20and%20show%20me%20the%20ideal%20and%20noisy%20results%20from%204%2C096%20shots.) : ideal and noisy results from 4,096 shots.\n- [**Reproduce IBM's 127-qubit utility experiment**](https://vicena.ai/agent?q=Using%20the%20Quantum%20Circuit%20Simulator%2C%20reproduce%20IBM%27s%20127-qubit%20kicked%20Ising%20utility%20experiment%20%28Kim%20et%20al.%2C%20Nature%202023%29%20for%205%20Trotter%20steps%20on%20the%20ibm_kyiv%20calibration%2C%20and%20compare%20the%20ideal%20and%20noisy%20magnetization%20with%20the%20paper%27s%20exact%20values.) : the kicked Ising circuit on IBM Kyiv's calibration, against the paper's exact values.\n- [**Design QAOA on all 156 qubits of IBM Fez**](https://vicena.ai/agent?q=Using%20the%20Quantum%20Circuit%20Simulator%2C%20design%20a%20QAOA%20Max-Cut%20algorithm%20on%20all%20156%20qubits%20of%20IBM%20Fez%20and%20compare%20its%20ideal%20and%20noisy%20results%20with%20random%20and%20optimal%20cuts.) : a Max-Cut algorithm, ideal and noisy, against random and optimal cuts.\n\nOr type your own question at [vicena.ai](https://vicena.ai).\n\n**Release candidate 0.5.0rc5, by Mehdi Farza at Vicena Labs, licensed under Apache-2.0.** It is not yet published on PyPI; [install it from GitHub](#install-and-run-locally). The repository contains the source, tests, examples and benchmark evidence. See [LICENSE](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/LICENSE), [third-party notices](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/THIRD_PARTY.md), [how to cite it](#citing-and-attribution) and the [related work](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/related-work.md) it builds on.\n\n- **Simulates circuits on chips.** It compiles a circuit onto a superconducting, trapped-ion, neutral-atom or custom chip, then simulates it with gate errors, idle relaxation, crosstalk and readout error.\n- **Develops algorithms.** It builds Hamiltonians, Trotter and QAOA circuits, runs VQE and QAOA with exact gradients in up to 4,096 shared parameters, applies zero-noise extrapolation, and estimates the shot budget a hardware run needs.\n- **Designs hardware.** It builds chips (modules, defects, physics-derived errors, crosstalk), grows them to larger sizes with the same architecture, and ranks designs on real workloads.\n- **Returns states and samples.** It gives amplitudes, density matrices and measured bitstrings with noise, up to 28 qubits, and any size for Clifford circuits.\n- **Ships real chips and standard circuits.** It includes 65 IBM chips and 3 Google chips from their measured calibrations, Microsoft's Majorana 2 topological chip and tetron arrays of any size, D-Wave Advantage-style annealers, and over a hundred benchmark circuits from MQT Bench and Supermarq.\n- **Draws chips as CAD files.** It writes any chip, real or designed, as a GDSII, DXF or SVG layout, or as a 3D STL model.\n\nThe main solver propagates each observable backward through the circuit, in the Heisenberg picture, as a sum of Pauli operators. It touches only the observable's backward **light cone**, so cost depends on the cone, not the register: a local observable on a 1,000-qubit shallow circuit is cheap. The solver is written in C++, groups observables whose cones overlap, and differentiates every shared parameter. It can compile the propagation once into a reusable graph, so each new parameter vector costs one pass forward and one pass back. An optional truncation answers deeper circuits approximately, with a rigorous bound on what it discarded. We call this the Pauli-cone method.\n\nA router chooses the solver for every question and says which one it used:\n\n1. exact Pauli cones;\n2. the state vector, or the density matrix for noisy circuits;\n3. exact local density matrices;\n4. truncated Pauli cones with a convergence check.\n\nIt can also cross-check one method against another. Pauli propagation itself returns expectation values; the state simulators add states and samples.\n\nSupported operations include H, SX, X/Y/Z, RX/RY/RZ, CZ, ECR, fSim (theta derivative only), any fixed one- or two-qubit unitary, independent Pauli errors, one/two-qubit depolarization, zero-temperature T1/T2 relaxation, and asymmetric Z readout. Circuits address **1–16,384 logical qubits**; the Pauli-cone solver uses **at most 256 active wires per observable light cone**, and larger circuits are remapped into local cones. In exact mode, a cone too broad for its term budget is refused instead of answered partially. Nothing needs a hosted account, API key, internet connection at runtime, or proprietary application installation.\n\nA quantum computer's output can be checked on an ordinary computer by simulating the same circuit. We compare this package with **seven other open-source simulators on 26 circuits**, from 10 to 1,024 qubits, on one Vicena computer (an AMD EPYC server).\n\nOn repeated runs of a prepared circuit, as in an optimiser or a parameter sweep, this package is **about 3 to 100 times faster** than the fastest of the seven. Each row sets our slowest measured time against the best time of any other simulator, over 1 and 16 threads:\n\n| Circuit, repeated runs | Ours | Fastest other | Lead | \n|---|---|---|---|\n| Noisy, 1,024 qubits, 3 layers | 321 µs | 33 ms | 103× | \n| Noiseless, 20 qubits, 4 layers | 472 µs | 42 ms | 89× | \n| Noisy, 400 qubits, 3 layers | 146 µs | 12.6 ms | 86× | \n| Noisy, 10 qubits, 4 layers | 27.8 µs | 311 µs | 11× | \n| IBM's 127-qubit experiment, 5 steps, θh = π/2 | 8.67 ms | 80.8 ms | 9.3× | \n| Noiseless, 12 qubits, 2 layers | 21.1 µs | 103 µs | 4.9× | \n| One qubit's value, 100 qubits, 4 layers | 44.7 µs | 144 µs | 3.2× | \n\nThese are seven of the 14 circuits where a comparison stands; the [full table](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/conservative.py) runs from 3.2 to 103 times and reads the published records. Two circuits where the other tool was killed for memory are left out, and single runs are not claimed. The records are the [run of 23–24 November 2026](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/results-2026-11-24-vicena/README.md) and a [rerun of one tool](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/results-2026-11-24-rerun/README.md) on 24 November, each with its known faults listed. Other work may have shared the machine; a [paired run on an idle machine](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/paired.py) will replace them.\n\n**The other simulators**, with thanks to the people who make them, and how each ran:\n\n| Simulator | What it is | Set up as | \n|---|---|---|\n| [PauliPropagation.jl](https://github.com/MSRudolph/PauliPropagation.jl) | Pauli propagation in Julia, from EPFL | `VectorPauliSum` , the`Performance` module's fused kernels,`min_abs_coeff = 1e-12` | \n| [IBM pauli-prop](https://github.com/Qiskit/pauli-prop) | IBM's Pauli propagation for Qiskit | `atol = 1e-12` | \n| [sparse Pauli dynamics](https://github.com/tbegusic/spd) (spd) | The code behind Begušić, Gray and Chan's classical simulation of IBM's experiment | Clifford parts moved into the Pauli frame once, commuting rotations merged, threshold 1e-12 | \n| [quimb](https://github.com/jcmgray/quimb) | Tensor networks, which follow entanglement instead of Pauli terms | `local_expectation` with automatic contraction paths | \n| [Qiskit Aer](https://github.com/Qiskit/qiskit-aer) ,[Qulacs](https://github.com/qulacs/qulacs) ,[PennyLane Lightning](https://github.com/PennyLaneAI/pennylane-lightning) | Full state-vector and density-matrix simulators, exact up to roughly 26 qubits, or 10 with noise | Their default fast paths; Lightning's adjoint gradients | \n\nEvery simulator also ran on circuits cut to each observable's backward light cone and relabelled onto the fewest qubits, as one circuit or as one circuit per observable term. Quantum Circuit Simulator finds those light cones itself and ran the uncut circuits, exactly and at the same 1e-12 threshold. Each figure is the median of five fresh parameter vectors in a fresh process with a 120 s limit; times exclude one-off setup, which the [full tables](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/results-2026-11-24-vicena/README.md) report separately.\n\n**Where it is not faster:**\n\n- **Small circuits** , where each call's fixed cost dominates.\n- **Deep circuits.** In the published run, exact mode refused circuits of 6–8 layers at its million-term cap; quimb solved three of them in 0.2–1.8 s and Aer the 24-qubit one in 1–14 s. Two deep noisy circuits and IBM's 20-step circuit were finished by no tool.\n- **One-off evaluations of large circuits.** Setup takes 100–300 ms on the 400- and 1,024-qubit grids, so for a single run other tools are often faster. The published single-run figures are invalid, because they counted compilation as another tool's setup. Profiling puts most of that in building and preparing the circuit in Python, not in compiling the graph.\n\n**What makes repeated evaluations cheap:** each observable touches only its backward light cone, and a wire is contracted into the input state as soon as propagation passes it; gates and noise on the same wires are merged, and each layer of gates is applied to a Pauli term in one pass; and the graph backend compiles the propagation once into flat arithmetic, so each new parameter vector is one pass forward and one back.\n\n**Reproduce it** with one command, `benchmarks/independent/scoreboard.sh <out-dir> <threads>`, which checks every tool's installation, records the machine and versions, and marks every circuit where this package is less than ten times faster. We welcome corrections from any tool's authors. [Measured performance](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/performance.md) explains the method, and [the raw records](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/independent/results-2026-11-24-vicena/README.md) keep every refusal and timeout.\n\nUse Python 3.10 or later. NumPy is the only runtime Python dependency. The package is not on PyPI yet, so installation compiles the extension from source and needs Git, a C++17 compiler and Python development headers.\n\n```\npython -m pip install \"git+https://github.com/vicena-labs/quantum-circuit-simulator\"      # or, from a checkout: python -m pip install .\nquantum-circuit-simulator doctor\nquantum-circuit-simulator example > problem.json\nquantum-circuit-simulator run problem.json\n```\n\nFor an optional extra such as `[qiskit]`, install `\"quantum-circuit-simulator[qiskit] @ git+https://github.com/vicena-labs/quantum-circuit-simulator\"`.\n\nExisting circuits run without rewriting. OpenQASM 2 is read with no dependencies; OpenQASM 3 and Qiskit circuits need the `[qiskit]` extra. Every gate is decomposed exactly into the native set, and Qiskit Parameters become shared parameters, so one prepared plan serves a whole parameter sweep.\n\n```\nquantum-circuit-simulator plan circuit.qasm --observable \"0.5*Z0*Z1 - X3\"   # dry run: is exact feasible?\nquantum-circuit-simulator run circuit.qasm --observable \"0.5*Z0*Z1 - X3\" --noise-2q 0.01\npython\nfrom quantum_circuit_simulator.interop import expectation\nfrom quantum_circuit_simulator.estimator import Estimator          # a Qiskit Estimator V2\n\nprint(expectation(qiskit_circuit, \"Z0*Z1\", values={\"theta\": 0.3}, gradients=True))\nevs = Estimator().run([(qiskit_circuit, observables, parameter_values)]).result()[0].data.evs\n```\n\n`quantum_circuit_simulator.hamiltonians` builds Pauli-sum Hamiltonians (transverse-field Ising, Heisenberg/XXZ, Max-Cut and Fermi-Hubbard under Jordan–Wigner, on chains, grids and random regular graphs) or loads them from JSON, strings, Qiskit `SparsePauliOp` or OpenFermion `QubitOperator`. `trotter` and `qaoa` turn them into circuits whose angles are shared, weighted parameters, so time or the QAOA angles are differentiable. `quantum_circuit_simulator.algorithms` adds an `Objective` that reuses one plan per Hamiltonian, optimisers (Adam, gradient descent, SPSA, L-BFGS) that keep a full trace, `vqe`, `qaoa`, zero-noise extrapolation (` zne`) and the statistical error of a hardware run with a given number of shots (`shot_noise`).\n\n``` python\nfrom quantum_circuit_simulator import algorithms as al, devices, hamiltonians as hm\n\nh = hm.heisenberg(hm.chain(8))\nresult = al.vqe(h, al.hardware_efficient(8, layers=3), steps=300)      # exact gradients, 64 parameters\nprint(result.value, result.reference)                                     # versus exact diagonalisation\nnoisy = al.vqe(h, al.hardware_efficient(8, layers=3), device=devices.get(\"heavy-hex-127\"))\ncut = al.qaoa(hm.maxcut(hm.random_regular(12, 3)), depth=2)               # approximation ratio, best bitstring\nquantum-circuit-simulator optimize --model heisenberg --lattice grid --size 3,3 --device heavy-hex-127 --progress\nquantum-circuit-simulator zne circuit.qasm --observable \"Z0*Z1\" --device square-grid --fit richardson\nquantum-circuit-simulator shot-noise circuit.qasm --observable h.json --shots 10000\n```\n\nWith more than 16 parameters, gradients come from the graph backend's single reverse pass (the native solver computes them 16 per pass). On a 12-qubit, 120-parameter ansatz with a Heisenberg Hamiltonian the graph returns the value and all 120 derivatives in 5 ms, against 0.85 s for the native passes (an Apple M-series laptop, one thread).\n\nThese modules follow what quantum simulation and algorithm papers do today; [research practice](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/research-practice.md) lists the publications behind each and what is still missing. Every one is checked against an exact reference in the tests.\n\n- **Chemistry** (`chemistry` , the`[chemistry]` extra for PySCF): molecules by name or geometry, active spaces, Jordan–Wigner, Bravyi–Kitaev and parity mappings, Z2 tapering, Hartree–Fock states and UCCSD ansätze. H2 matches PySCF's FCI energy to 1e-8 in every mapping; tapering takes it from 4 qubits to 1.\n- **Error mitigation** (`mitigation` ): propagated noise absorption (`pna` , the noise inverted into the observable by Pauli propagation), probabilistic error cancellation with its sampling overhead (`pec` ,`pec_overhead` ), and readout correction (`readout_correct` ,`mitigated_counts` , TREX).\n- **Measurement planning** (`measurement` ): grouping by qubit-wise or full commutation with the Clifford that diagonalises each group, exact shot budgets with optimal allocation, and classical shadows.\n- **Hamiltonian dynamics** (`dynamics` ): Suzuki formulas of any even order, qDRIFT, commutator bounds on the Trotter error, and multi-product formulas.\n- **Fault-tolerant resources** (`resources` ): T counts with rotation synthesis, surface-code distance, factories, physical qubits and runtime, from a transparent model that states its assumptions; tetron chips supply their own error rates.\n- **QAOA practice** (`baselines` ): fixed-angle and transferred initial angles, and classical baselines (brute force, simulated annealing, Goemans–Williamson with cvxpy).\n\n``` python\nfrom quantum_circuit_simulator import (algorithms as al, baselines, chemistry, devices, dynamics,\n                                       hamiltonians as hm, measurement, mitigation, resources)\nfrom quantum_circuit_simulator.compiler import compile_circuit\n\nlih = chemistry.molecule(\"LiH\", active=(2, 3), mapping=\"parity\", taper=True)    # 3 qubits\nprint(lih.exact_energy(), lih.energies[\"casci\"])                                # -7.8630808, from PySCF\nprint(measurement.shot_budget(lih.hf_program(), lih.hamiltonian, precision=1.6e-3)[\"optimal_shots\"])\n\nbell = compile_circuit(open(\"bell.qasm\").read(), devices.get(\"ibm_fez\"), layout=\"trivial\")\nprint(mitigation.pna(bell, \"Z0*Z1\"))                       # 0.94 noisy, 1.0 with the noise model inverted\n\ntfim = hm.transverse_field_ising(hm.chain(8), h=1.0)\nprint(dynamics.trotter_error_bound(tfim, 1.0, steps=10, order=2))\nprint(resources.estimate(dynamics.suzuki(tfim, 1.0, steps=10, order=4), physical_error=1e-3))\n\ncut = hm.maxcut(hm.random_regular(12, 3, seed=1))\nprint(al.qaoa(cut, depth=2, init=\"fixed-angle\").value, baselines.brute_force(cut)[\"value\"])\n```\n\n`quantum_circuit_simulator.statevector` simulates states directly: amplitudes of noise-free circuits up to 28 qubits, density matrices up to 12 qubits, and measured bitstrings with noise and readout error, sampled exactly from the density matrix or from one quantum trajectory per shot. Clifford circuits of any size are sampled through Stim (the `[stim]` extra). A circuit compiled onto a large chip is sampled on the qubits it uses only. The solver router cross-checks Pauli propagation against these simulators on request (`solve(..., cross_check=True)`).\n\n```\nquantum-circuit-simulator sample circuit.qasm --shots 4000 --device heavy-hex-127 --seed 1\nquantum-circuit-simulator statevector circuit.qasm\n```\n\nEvery command prints one JSON document tagged `schema: quantum-circuit-simulator-<kind>/1` with a `provenance` record (package and library versions, platform, SHA-256 of the canonical request, seed, UTC time), so a result can be reproduced and cited. Compiling reports a noise budget per qubit and per coupler (gate, idle, spectator and readout errors and ZZ phase) and, with `--schedule`, every gate's physical qubits, start time and duration; chips carry qubit coordinates in lattice units. Long tasks stream JSON-line progress events on standard error with `--progress`, and sweeps resume from a `--checkpoint` file. Fields are only added within a schema version.\n\n**Real chips.** `devices.get(\"ibm_fez\")` returns IBM's 156-qubit Heron r2 chip, and `devices.get(\"google_willow_pink\")` Google's 105-qubit Willow chip. Each is built from a published calibration snapshot: every qubit's T1, T2, readout and gate error, every coupler's two-qubit error, gate durations, IBM's qubit frequencies and anharmonicities, and the chip's real coordinates. The package includes 65 IBM chips (Heron, Eagle, Falcon, Hummingbird and older) and Google's Rainbow, Weber and Willow Pink. `quantum-circuit-simulator devices` lists them with their snapshot dates. The compiler gives each gate T1/T2 relaxation for its duration and depolarizing noise for the rest of its measured error, as hardware errors arise. On IBM snapshots it agrees with Qiskit Aer's noise model to within 0.01, and it adds the relaxation of idle qubits, which Aer's backend model leaves out.\n\n**Topological chips.** `devices.get(\"microsoft_majorana_2\")` is Microsoft's Majorana 2 (June 2026): the published unit cell of four tetron qubits, each an H of two Pb-on-InAs topological wires. Tetrons compute by parity measurements, so the compiler charges every Clifford gate its measurements, every T gate a magic state, and any other angle a synthesized sequence of about 3 log2(1/ε) T gates; idle tetrons take parity flips (bit flips from the Z-parity lifetime, phase flips from the X-parity lifetime) instead of T1/T2 decay. Every number carries its source in `parameters[\"sources\"]`: Microsoft has published Majorana 2's Z-parity lifetime (22 s, on one wire) and readout time, not its gate fidelities, so the X-parity lifetime and measurement errors come from the Majorana 1-generation tetron and the magic-state error is a labelled assumption. With those values a Bell pair does not survive, which is the honest state of the published data, and independent physicists dispute that these devices are topological qubits at all. `devices.get(\"tetron-array\", rows=27, columns=13)` builds Microsoft's roadmap arrays with what-if targets, `design.expand` grows any tetron chip, and every value can be overridden (`devices.get(\"microsoft_majorana_2\", tau_x_s=1e-3)`).\n\n**Benchmark circuits.** `circuits.library()` lists over a hundred circuits from MQT Bench (QFT, Grover, QPE, amplitude estimation, arithmetic, QAOA, VQE ansätze, quantum walks and more) and Supermarq, at sizes up to 127 qubits, in this package's gate set. `circuits.load(\"mqt/qft\", 16)` returns one as OpenQASM, and sweeps take library names like families. `family(\"kicked-ising\")` is IBM's 127-qubit utility experiment.\n\n**CAD.** `cad.write(chip, \"chip.gds\")` writes a chip as GDSII (also DXF, SVG, and STL for a 3D model): Xmon-style transmon crosses, coupler traces and readout pads at the chip's coordinates, or sites for ions, atoms and annealers, on separate layers in micrometres. The STL model raises them on a silicon slab, with heights exaggerated so the circuit can be seen; [IBM Fez's](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/images/ibm_fez.stl) and [Majorana 2's](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/images/microsoft_majorana_2.stl) models open in GitHub's 3D viewer. It is a placement layout for drawing, documenting and starting a design, not a fabrication-ready mask; full electromagnetic layout is the job of tools such as Qiskit Metal or KQCircuits.\n\nThe figures are drawn from the bundled data by [`tools/render_readme_images.py`](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/tools/render_readme_images.py). The qubit layer of the exploded view is the package's own CAD layout; the readout, wiring and package beneath it are drawn from the same positions to show how such a chip is built, not from IBM's design.\n\n**Annealing.** `annealing.anneal(problem, devices.get(\"dwave-advantage\"))` embeds an Ising or QUBO problem on a D-Wave Advantage-style Pegasus chip (or Advantage2 Zephyr, Chimera, Pegasus, Zephyr) with minorminer, rescales it to the chip's h and J ranges, can add control errors, and samples it with simulated quantum annealing (path-integral Monte Carlo), simulated annealing or tabu search. It reports the best energy, the exact ground energy and its probability on small problems, chain lengths and chain breaks. These are models of an annealer, not the device. Needs the `[dwave]` extra.\n\n```\nquantum-circuit-simulator devices                                     # layouts and real chips\nquantum-circuit-simulator run circuit.qasm --observable \"Z0*Z1\" --device ibm_fez --compile\nquantum-circuit-simulator circuits --suite \"MQT Bench\" --search qft    # the benchmark library\nquantum-circuit-simulator sweep --family mqt/qft --sizes 8,16 --device ibm_torino --device google_willow_pink\nquantum-circuit-simulator cad ibm_fez --out fez.gds                    # or fez.stl for a 3D model\nquantum-circuit-simulator anneal --model maxcut --lattice regular --size 60,3 --device dwave-advantage\n```\n\n`quantum_circuit_simulator.devices` describes chips: connectivity, native gates, gate and readout errors, coherence times and gate durations, in one JSON format that also serves for custom chips. The catalogue covers:\n\n- superconducting heavy-hex (including the 127-qubit IBM Eagle-style layout), square-grid and line chips;\n- all-to-all trapped ions;\n- neutral-atom arrays;\n- D-Wave-style Chimera, Pegasus and Zephyr annealer graphs (the last two need the `[dwave]` extra).\n\nCatalogue noise values are typical figures for each technology, not calibration data for a particular chip.\n\n``` python\nfrom quantum_circuit_simulator import devices\nfrom quantum_circuit_simulator.interop import expectation\n\nchip = devices.get(\"heavy-hex-127\")\nfor factor in (0.5, 1, 2):                       # a noise sweep on one chip\n    print(factor, expectation(circuit_qasm, \"Z0*Z1\", device=chip.scaled_noise(factor)).value)\nquantum-circuit-simulator devices                                   # the catalogue\nquantum-circuit-simulator device square-grid --param rows=6 --param columns=6\nquantum-circuit-simulator run circuit.qasm --observable \"Z0*Z1\" --device all-to-all-ions --device-param n=20\n```\n\nWith `--device`, the response reports any two-qubit operations on qubits the chip does not couple. To run on the chip, add `--compile`.\n\n`quantum_circuit_simulator.compiler` routes a circuit onto a chip:\n\n- it places the qubits, inserting SWAPs where needed (built in, or Qiskit's SABRE with `router=\"sabre\"` );\n- it schedules gates with the chip's durations;\n- it simulates gate errors, T1/T2 decay of idle qubits, and readout error on the measured Paulis.\n\nObservables keep the circuit's qubit numbers, and `noise_scale` multiplies every error and decoherence rate for noise sweeps. Without noise, a compiled circuit reproduces the original expectation exactly.\n\n`quantum_circuit_simulator.design` builds new chips. It can:\n\n- tile modules joined by links with their own error rates;\n- remove defective qubits and edit couplers;\n- derive gate errors from T1, T2 and gate durations (the exact coherence limit, plus control error).\n\nIt can also give every qubit its own errors and coherence times, add crosstalk (spectator errors and ZZ phases around two-qubit gates), and grow any chip to more qubits with the same architecture. A sweep can grow the chip for each size with `--device fit:NAME`. `compare` ranks designs against catalogue chips on benchmark circuits. Both are also commands (`quantum-circuit-simulator design`, `quantum-circuit-simulator compare`), and a designed chip is an ordinary device file.\n\nSweeps put it together: compile and solve over chips, noise scales and sizes, with the ideal value and routing cost beside every point. The solver is chosen automatically and every row says whether it is exact.\n\n```\nquantum-circuit-simulator sweep --family qaoa-ring --sizes 8,12,16 --device heavy-hex-127 \\\n    --device \"all-to-all-ions:n=16\" --noise-scales 0,1,2 --format markdown\npython\nfrom quantum_circuit_simulator.compiler import compile_circuit\ncompiled = compile_circuit(circuit_qasm, devices.get(\"heavy-hex-127\"), noise_scale=2)\nprint(compiled.report[\"swaps\"], compiled.report[\"duration_s\"], compiled.expectation(\"Z0*Z1\").value)\n```\n\nThe command line is built to be driven by AI agents in a shell:\n\n- every command prints one JSON document;\n- every error carries a `hint` naming the next step;\n- `quantum-circuit-simulator capabilities` and`quantum-circuit-simulator schema` describe the tool;\n- `quantum-circuit-simulator guide` prints a usage guide written for agents.\n\n[AGENTS.md](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/AGENTS.md) points agents to it.\n\nNo compiler runs when importing the package or evaluating a circuit. `--backend python` selects the reference implementation explicitly. The default native backend fails visibly if its term budget is exceeded.\n\n``` python\nfrom quantum_circuit_simulator import Circuit\n\ncircuit = Circuit(2, n_parameters=1)\ncircuit.gate(\"RY\", [0], theta=0.7, param=0)\ncircuit.gate(\"H\", [1]).gate(\"CZ\", [0, 1])\ncircuit.depolarize([0, 1], probability=0.01)\ncircuit.relax(0, duration=2e-7, t1=70e-6, t2=90e-6)\ncircuit.readout(0, p01=0.02, p10=0.01)\n\nplan = circuit.prepare([(1.0, {0: \"Z\"})], backend=\"native\")\nfor result in plan.evaluate_many([[0.0], [0.1], [-0.1]]):\n    print(result.value, result.gradient)\n\n# Skip derivative propagation when only values are needed.\nprint(plan.evaluate_value([0.1]))\nprint(plan.evaluate_values([[0.0], [0.1], [-0.1]]))\npython\nfrom quantum_circuit_simulator import Truncation\n\napprox = circuit.prepare([(1.0, {0: \"Z\"})], truncation=Truncation(min_coefficient=1e-4, max_weight=6))\nresult = approx.evaluate([0.1])\nprint(result.value, result.error_bound, result.gradient_error_bound)\n```\n\n`min_coefficient` discards a term once its coefficient falls below that fraction of the observable's l1 norm; gradient evaluations keep a term while any derivative coefficient is above it. `max_weight` discards terms acting on more than that many wires still open, after early contraction into the input state. `error_bound` is rigorous: a term `c*P` discarded at any point would have contributed `c*Tr(rho P)`, and `|Tr(rho P)| <= 1`. It is a worst case and is often much larger than the actual error, so check convergence by tightening the threshold over several levels (`--converge` needs three that agree). Agreement is empirical: coefficient truncation can plateau and then move, so confirm a headline value independently when the bound is uninformative. Truncation runs on `native`, `graph` and `auto`; the other backends refuse it. The native solver chooses the discarded terms afresh at every evaluation. A truncated `graph` chooses them when it compiles, at the angles bound then, and keeps evaluating that smaller graph; its bound is still computed at each evaluation's own angles, so it stays rigorous and grows when the parameters move to where the discarded terms matter. When the bound exceeds `reprepare_factor` (default 2) times its value at compilation, the graph compiles itself again at the current angles; `reprepare_factor=None` keeps the first graph.\n\n`threads=N` in `prepare` evaluates independent cone groups in parallel. Results do not depend on the thread count.\n\nEach vector contains **additive shifts from the original gate angles**, not absolute replacements. Every occurrence of parameter 0 receives the same shift. The returned derivative is with respect to that shared shift. Reusing a plan never reuses a previous numerical answer. Preparing a plan takes an owned snapshot; later edits to the original circuit do not change it.\n\n| Backend | Use | Limits and behavior | \n|---|---|---|\n| `native` (default) | Sparse local observables and shared gradients | C++ execution; hard live-term cap; early contraction into product inputs | \n| `python` | Inspectable sparse reference | Same transfer conventions and numerical filters; slower Python maps | \n| `graph` | Repeated parameter vectors on manageable structural graphs | Compiles the propagation once, then each evaluation is one pass over stored arithmetic with reverse differentiation; records native fallback if graph preparation exceeds its limits | \n| `dense` | Small cones with broad Pauli support | Analytic channel-adjoint gradients; defaults to six cone wires and a 64 MiB density-array work budget | \n| `auto` | Explicit sparse-to-dense capacity fallback | Falls back on a sparse cap failure only; does not predict the fastest method | \n\n```\ngraph = circuit.prepare([(1.0, {0: \"Z\"})], backend=\"graph\",\n                        graph_max_nodes=2_000_000, graph_max_edges=10_000_000)\nresult = graph.evaluate([0.1], gradients=False)  # gradient is an empty tuple\nprint(result.backend, graph.diagnostics, graph.numerics)\n```\n\n`evaluate_many(..., gradients=False)` returns `Evaluation` objects with empty gradients. The convenience `evaluate_values()` returns only floats. Duplicate observables are combined and exact cancellations are removed before cone construction. Detailed budget and fallback contracts are in [architecture](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/architecture.md).\n\n- `depolarize(..., probability=p)` means total probability of a uniformly chosen nonidentity Pauli error. It is not Aer’s depolarizing lambda; for k wires,`lambda = p * 4**k / (4** k - 1)` .\n- Relaxation duration, T1 and T2 must use the same units; `0 < T2 <= 2*T1` . The model assumes zero temperature.\n- Readout uses `p01=P(measure 1 | prepared 0)` and`p10=P(measure 0 | prepared 1)` . X/Y observables on a wire with this classical Z-readout model are rejected instead of inventing a measurement model.\n- Sparse native/reference arrays are float64, with absolute transfer filtering at `5e-15` and coefficient filtering at`1e-16` times the observable's l1 norm, so results scale linearly with observable weights. Graphs do not prune coefficients; dense arrays are complex128. Structural cone reduction and early product-input contraction are exact algebraically, but no backend certifies an accumulated floating-point error bound. Truncated plans bound the truncation error, not floating-point roundoff. Read`plan.numerics` for the active policy.\n- Exceeding a declared budget fails the request unless an explicitly selected fallback succeeds within its own limits. No incomplete sum is returned as success. A prepared object cannot be evaluated concurrently; use separate plans for parallel callers.\n\nThe command-line interface validates a versioned JSON request, limits input to 4 MiB and executes one worker with a wall deadline (`--timeout`, default 60 seconds). The deadline begins after request input has been read. This is not a secure sandbox or a hard RAM budget for untrusted services; see [security boundaries](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/.github/SECURITY.md).\n\nThe source includes [a developer guide](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/developer-guide.md), examples for line/grid/custom connectivity, a small MaxCut QAOA circuit, a variational energy/gradient-descent example, and within-package backend comparisons. These examples let researchers build new ansätze on *supplied coupling graphs*; the graphs are not calibrated chips or hardware transpilation. The package remains an optimized **noisy Pauli observable/gradient backend**, not a complete full-state/sampling algorithm suite. See the [capability and speedup inventory](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/developer-guide.md#which-earlier-optimizations-are-actually-included).\n\n```\npython examples/architecture_playground.py --topology grid --rows 2 --cols 2\npython examples/architecture_playground.py --topology custom --file examples/custom_topology.json\npython examples/qaoa_maxcut.py --qubits 3\npython examples/variational_energy.py --steps 6\npython examples/compare_backends.py\n```\n\n[Architecture](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/architecture.md) explains the process and representation choices. [Execution graphs](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/execution-graph.md) covers reusable topology and reverse differentiation. [JSON interface](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/json-interface.md) specifies operations and error handling. [Measured performance](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/performance.md) separates new measurements from historical prototype results. [Comparison methodology](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/comparison-methodology.md) and the [benchmark harness](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/benchmarks/README.md) describe independent baselines and missing comparisons. [Release checklist](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/release-checklist.md) covers source publication.\n\n[Wide-register qualification](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/large-register-validation.md) documents the 4,096/16,384-qubit local tests and limitations. [Validation](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/validation.md) records the installed-package checks, numerical coverage, source scanning and remaining qualification limits.\n\n```\npython -m pip install '.[test]'\npython -m pytest -q\npython tools/check_source_hygiene.py  # Strict source-archive check.\n# In a Git checkout, use: python tools/check_source_hygiene.py --tracked-only\npython tools/check_release.py\n```\n\nWheels are built by the [wheel workflow](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/.github/workflows/wheels.yml) and uploaded to PyPI only from a published GitHub release. The [contribution guide](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/.github/CONTRIBUTING.md) and [third-party dependency review](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/THIRD_PARTY.md) explain what is included. Static source checks are safeguards, not proof of ownership or absence of unknown secrets.\n\nThe restricted fresh-circuit native executables are retained as **experimental sources**, not exposed as the general package CLI. Their narrower input contract and missing production isolation should not be confused with the public Circuit API.\n\nQuantum Circuit Simulator implements Heisenberg-picture Pauli propagation, a method developed across a substantial literature, and reuses ideas from several open tools. [Related work](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/related-work.md) lists the papers and software it builds on, what each contributed, and how Quantum Circuit Simulator differs.\n\nIf you use Quantum Circuit Simulator in a publication, a thesis, a report or a product, please cite it and Vicena Labs. GitHub's **Cite this repository** button gives this entry in several formats, from [CITATION.cff](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/CITATION.cff):\n\n```\n@software{quantum_circuit_simulator,\n  author       = {Farza, Mehdi and {Vicena Labs}},\n  title        = {Quantum Circuit Simulator: noisy circuits, algorithms and chip design with the Pauli-cone method},\n  version      = {0.5.0rc5},\n  year         = {2026},\n  publisher    = {Vicena Labs},\n  url          = {https://github.com/vicena-labs/quantum-circuit-simulator},\n  license      = {Apache-2.0}\n}\n```\n\nWhen you modify it or build on it, keep the attribution. The Apache-2.0 [license](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/LICENSE) requires every copy and derivative work to keep the copyright, patent and attribution notices, to include the [NOTICE](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/NOTICE) file, and to mark the files you changed. Please also keep the citation above in your documentation, and cite the methods this package builds on, listed in [related work](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/related-work.md).\n\nQuantum Circuit Simulator **0.3.0a1** introduced a wide logical-register adapter: 1–16,384 indexed wires, connected line/grid/user-supplied topologies, and native evaluation of local observables even when their wire indices exceed 255. The backward dependency graph for all observables is traversed once. Observables whose combined cone is small enough are grouped, each group is renumbered to its own wires, and all groups run in one native call over one shared bound copy of the circuit. Independent idle wires contract analytically.\n\n```\npython examples/large_qubit_grid.py --rows 64 --columns 64 --observables 128 --vertical\npython examples/large_qubit_grid.py --rows 128 --columns 128 --observables 32\n```\n\nThese demos use a parameterized RY layer on every physical wire, independent horizontal CZ pairs, an optional `--vertical` CZ matching, depolarizing noise, and sampled Z expectations. **They do not simulate arbitrary strongly entangled 4,096- or 16,384-qubit states.** The public interface keeps the 16-shared-parameter and 1,024-observable limits. Each cone is bounded to 256 physical wires, with stage and Pauli-term budgets; an oversized cone is refused. The `max_cone_qubits` parameter sets a lower refusal threshold at every register width.\n\nDevelopers can register a trusted backend for tensor networks, trajectory sampling, stabilizers, or another representation without modifying the native solver. `register_backend('ext-example', factory)` expects a factory returning a plan with `bind()` and `evaluate()`; see [the extensibility guide](https://github.com/vicena-labs/quantum-circuit-simulator/blob/main/docs/extensibility.md). External backends must provide their own numerical validation, and they execute in process, not a sandbox. A custom backend receives the full wide register rather than being forced into the 256-wire cone adapter.", "url": "https://wpnews.pro/news/quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster", "canonical_source": "https://github.com/vicena-labs/quantum-circuit-simulator", "published_at": "2026-11-25 20:25:43+00:00", "updated_at": "2026-11-25 20:42:23.936591+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-research", "ai-tools"], "entities": ["Vicena Labs", "Mehdi Farza", "Quantum Circuit Simulator", "IBM", "Google", "Microsoft", "Majorana 2", "D-Wave"], "also_reported_by": [], "takeaway": "Vicena's Quantum Circuit Simulator 0.5.0rc5 lets builders compile circuits onto superconducting, trapped-ion or neutral-atom chip calibrations, run VQE/QAOA with exact gradients in up to 4,096 shared parameters, and get JSON results with provenance, at up to 28 qubits (any size for Clifford circuits", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster", "markdown": "https://wpnews.pro/news/quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster.md", "text": "https://wpnews.pro/news/quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster.txt", "jsonld": "https://wpnews.pro/news/quantum-simulator-for-major-chip-types-for-ai-agents-6x-faster.jsonld"}}