miniQ quantum computing emulator artwork with orbit paths, circuit symbols, and state labels

An educational quantum emulator in Rust.

miniQ is a small full state-vector simulator for learning gates, measurement, entanglement, QFT, and small-scale Shor-style circuits without depending on quantum computing libraries.

Built For Learning By Inspection

miniQ keeps the simulation model visible, compact, and hackable. It is designed for readers who want to see what the amplitudes are doing after each circuit step.

01

Inspect The State

Read probabilities, amplitudes, norms, measurement collapse, and most-significant-bit-first labels directly from the simulator.

02

Compose Circuits

Apply core gates, controlled operations, SWAP, QFT, modular arithmetic helpers, and track each operation in circuit history.

03

Understand Scale

Work with exact state vectors while seeing why memory grows as 2^n, and why educational factor-15 demos are not RSA factoring.

A Tiny Circuit, Fully Visible

The CLI can display probabilities, operation history, raw state, and measurement samples from built-in examples.

Bell state demo
cargo run --bin miniq -- bell --shots 1000 --history

Probabilities

|00> 0.500
|11> 0.500

Bell measurements return only correlated outcomes: 00 or 11.

Run It Locally

miniQ is a Rust crate and CLI. Clone the source, run the tests, then try the examples from the command line.

Quickstart
git clone https://github.com/duliodenis/miniQ.git
cd miniQ
cargo test
cargo run --example bell_state
cargo run --bin miniq -- swap --state --history

Exact, Small, And Honest About Scale

State-vector simulation is excellent for learning because every amplitude is available. The cost is exponential memory growth.

  • Storage: an n-qubit circuit stores 2^n complex amplitudes in a Vec<Complex64>.
  • Indexing: qubit 0 is the least significant bit internally, while displayed bitstrings read most-significant bit first.
  • Shor support: miniQ includes educational factor-15 walkthroughs, not fault-tolerant RSA-scale factoring.