Circuit Lab
Build a circuit on up to 12 qubits and watch the statevector update after every edit. Qubit is the top wire and the most significant bit, so the basis ket has index . The simulator applies each column's gates to :
The starting circuit prepares the Bell state. With and :
For the qubit chosen in the results pane you see its reduced state and its Bloch vector . For both reduced states are , so and the purity : each qubit alone is maximally mixed because the pair is maximally entangled.
Activate a gate in the palette and then a cell (or drag the gate onto the grid). Multi-qubit gates take one click per wire: the control(s) first, then the target. Rotation angles accept expressions such as pi/2 or acos(1/3).
The noise row adds single-qubit Kraus channels with : amplitude damping (AD, ), phase damping (PD, ), depolarizing (DEP, ), bit flip (BF), phase flip (PF) and thermal relaxation (TR, , , ). A noisy state is mixed and has no statevector, so a circuit with a channel runs on the exact density-matrix backend (at most 8 qubits, since has entries) and the results show and its purity , which equals only for a pure state. The Noisy Bell pair preset applies depolarizing noise with to both qubits of ; each channel shrinks the Pauli components by , so
Activate a gate in the palette, then a cell to place it, or drag a gate onto the grid. Activate a placed gate to select it.
Statevector backend · 2 qubits · main thread
Measurement probabilities
| Basis | Amplitude α | |α| | Phase arg α | Probability |
|---|---|---|---|---|
| |00⟩ | 0.7071 | 0.7071 | 0 | 50.00% |
| |01⟩ | 0 | 0.0000 | — | 0.00% |
| |10⟩ | 0 | 0.0000 | — | 0.00% |
| |11⟩ | 0.7071 | 0.7071 | 0 | 50.00% |
Reduced state of
r = (0.0000, 0.0000, 0.0000), |r| = 0.0000; purity Tr ρ² = 0.5000 (mixed: q0 is entangled with the rest of the register)
Bloch vector r = (0.000, 0.000, 0.000), |r| = 0.000; P(0) = 0.500, P(1) = 0.500; mixed state
Density matrix ρ = |ψ⟩⟨ψ|
Circuit IR (JSON)
{
"version": 1,
"numQubits": 2,
"numClbits": 0,
"ops": [
{
"kind": "gate",
"gate": "H",
"targets": [
0
],
"column": 0,
"id": "ir-0"
},
{
"kind": "gate",
"gate": "CNOT",
"targets": [
0,
1
],
"column": 1,
"id": "ir-1"
}
]
}