A friendly quantum circuit simulator for everyone, written in Rust.
- 🚀 Sparse state tracking for efficient simulation
- 🎲 Reproducible results with seed support
- 🔧 State constraints (Hamming weight, parity)
- 📊 Automatic telemetry logging
- 🌫️ Noise models (dephasing, depolarizing, amplitude damping)
cargo build --releaseCreate a circuit file bell_state.json:
[
{"op": "init", "n": 2},
{"op": "h", "q": 0},
{"op": "cnot", "ctrl": 0, "tgt": 1},
{"op": "measure", "qubits": [0, 1]}
]Run it:
./target/release/cqs run --program bell_state.json --shots 100Creates two entangled qubits - always measures 00 or 11, never mixed states!
[
{"op": "init", "n": 3},
{"op": "h", "q": 0},
{"op": "cnot", "ctrl": 0, "tgt": 1},
{"op": "cnot", "ctrl": 1, "tgt": 2},
{"op": "measure", "qubits": [0, 1, 2]}
]Use seeds for reproducible results:
[
{
"op": "init",
"n": 3,
"seed_hex": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
},
{"op": "h", "q": 0},
{"op": "measure", "qubits": [0, 1, 2]}
]Full documentation available at: https://www.patternripple.com/cqs_rs_docs.html
- Single-qubit: H, X, Y, Z, RX, RY, RZ
- Two-qubit: CNOT, CZ
- Measurement and postselection
- Noise models (dephasing, depolarizing, amplitude damping)
cargo run --release --bin cqs_benchMIT License - See LICENSE file for details
Developed by PatternRipple.com Labs • Created by Nick Panek