Skip to main content

Quantum Circuit Builder

Build a 2-qubit circuit one gate at a time. The simulator tracks the full statevector — four complex amplitudes for the basis states 00\lvert 00\rangle, 01\lvert 01\rangle, 10\lvert 10\rangle and 11\lvert 11\rangle — and shows the measurement probabilities live.

The circuit starts pre-loaded with the classic Bell-state recipe (HH on q0, then CNOT q0→q1). Press Clear to start from 00\lvert 00\rangle.

Qubit q0
Qubit q1
Two-qubit

Circuit: H(q0) · CNOT(q0→q1)

BasisAmplitudeP
|000.7150.0%
|010.000.0%
|100.000.0%
|110.7150.0%
|00⟩ — 50.0%
|01⟩ — 0.0%
|10⟩ — 0.0%
|11⟩ — 50.0%

Experiments

  1. Bell stateH(q0) · CNOT(q0→q1) gives (00+11)/2(\lvert 00\rangle + \lvert 11\rangle)/\sqrt{2}: two qubits, perfectly correlated, 50/50 between 00\lvert 00\rangle and 11\lvert 11\rangle. This is entanglement.
  2. All four Bell states — try adding an XX or ZZ on q0 before the CNOT.
  3. Superposition without entanglementH(q0) · H(q1) spreads probability evenly over all four outcomes, but the qubits are still independent.
  4. GHZ-style correlation — chain H(q0) · CNOT(q0→q1) and inspect how the amplitudes concentrate.
From two qubits to many

This simulator stops at two qubits to stay fast and clear, but the idea scales: nn qubits need 2n2^n complex amplitudes — which is exactly why simulating large quantum systems on classical computers is so hard, and why real quantum hardware is interesting.

Ready to run circuits on a real simulator? Head to the Hands-on Labs and build them in Qiskit.