Quantum Knowledge Base
Explore the fundamental building blocks of quantum circuits and the algorithms that power them.
Quantum Gates
The unitary operations that manipulate qubits.
Quantum Algorithms
Advanced procedures for solving complex problems.
Circuit Rules & Theory
Best practices for designing functional quantum circuits.
The Rules of Measurement
Core Idea: A measurement turns a quantum state into a classical value via Wavefunction collapse. After that, the qubit is no longer "quantum" in the same way.
1. Place measurement at the end (Default Rule)
Most circuits measure at the very end. You want quantum effects (superposition, entanglement) to fully evolve first. Measurement too early destroys those effects.
2. Don't apply quantum gates after measurement
Quantum gates require a quantum state, but measurement yields a classical bit. This follows from Quantum Mechanics.
3. Measurement "cuts" the circuit
After measurement, there is no more superposition or entanglement, and the qubit cannot be used as a target for quantum gates like CNOT. Think of everything after as classical logic.
4. Mid-circuit measurement is allowed (Advanced)
You can measure in the middle if you use the result only for classical control (e.g., feedback-based algorithms, adaptive circuits).
5. You can reinitialize after measurement
Some systems allow you to measure the qubit, set it back to |0⟩ (Reset gate), and use it again.
6. Measure only what you need
Measuring more qubits implies more noise and less quantum advantage. Only measure the qubits that carry the final answer.
7. Measurement is probabilistic
If your state is |ψ⟩ = a|0⟩ + b|1⟩, then P(0) = |a|² and P(1) = |b|². You often need many runs ("shots") to estimate results accurately.