Advanced Mathematics

Qubits and Quantum Gates

A qubit is a two-state quantum system α∣0⟩+β∣1⟩\alpha|0\rangle + \beta|1\rangle; gates are unitary matrices that rotate it before it is measured.

Needs a step first: 39

A qubit holds a superposition α∣0⟩+β∣1⟩\alpha|0\rangle + \beta|1\rangle with ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1, and measuring it gives a single classical bit. Gates are unitary 2×22\times2 matrices: the Pauli XX flips, ZZ changes the relative sign, and the Hadamard H=12(111−1)H = \frac{1}{\sqrt2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} makes and undoes equal superpositions. A circuit is a product of such matrices, and its power comes from steering amplitudes so that wrong answers cancel and right ones add. With two or more qubits and gates like CNOT, circuits produce entanglement.

Where it shows up: Qubits and gates are the language of entanglement, Bell tests and quantum algorithms.

How to hold it: By hand, until automatic

Know by heart what XX, ZZ and HH do to ∣0⟩|0\rangle, ∣1⟩|1\rangle and ∣±⟩|\pm\rangle, and push a state through a short circuit by 2×22\times2 multiplication as easily as a times table.

What knowing it looks like

  • Apply a short sequence of gates to ∣0⟩|0\rangle by matrix multiplication and give the measurement probabilities.
  • Check that a given matrix is unitary.
  • Explain why HH followed by HH returns the original state, as interference rather than as randomness.

Test yourself

Start a qubit in ∣0⟩|0\rangle and apply HH, then ZZ, then HH. What is the final state, and what are the measurement probabilities? Which single gate is HZHHZH?
Show the worked answer
H∣0⟩=12(∣0⟩+∣1⟩)H|0\rangle = \frac{1}{\sqrt2}(|0\rangle + |1\rangle). ZZ flips the sign of ∣1⟩|1\rangle: 12(∣0⟩−∣1⟩)\frac{1}{\sqrt2}(|0\rangle - |1\rangle). HH maps this to ∣1⟩|1\rangle. So measurement gives 1 with probability 1. Multiplying the matrices, HZH=(0110)=XHZH = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = X, the bit flip.

Needs a step first: 39

Learn it with an AI

Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.

Be my maths tutor. I'm learning "Qubits and Quantum Gates" (Frontier tier): A qubit is a two-state quantum system $\alpha|0\rangle + \beta|1\rangle$; gates are unitary matrices that rotate it before it is measured.
I already know: Spin and the Pauli Matrices.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: Start a qubit in $|0\rangle$ and apply $H$, then $Z$, then $H$. What is the final state, and what are the measurement probabilities? Which single gate is $HZH$?
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.

On the way to

Recommended