QuantumCore

Lesson 16 · 50 min · introductory

The Qubit

Loading progress…

A qubit is the smallest quantum system: a unit vector ∣ψ⟩=α∣0⟩+β∣1⟩\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle in C2\mathbb{C}^2, defined only up to a global phase. This lesson derives the normalisation condition ∣α∣2+∣β∣2=1\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1 from Postulates 1 and 3, counts the real parameters of a pure qubit state (4−1−1=24-1-1=2) and builds the explicit parametrisation cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle, maps spin-12\tfrac12, photon polarisation and transmon circuits onto ∣0⟩,∣1⟩\lvert0\rangle,\lvert1\rangle, and tabulates the six cardinal states ∣0⟩,∣1⟩,∣±⟩,∣±i⟩\lvert0\rangle,\lvert1\rangle,\lvert\pm\rangle,\lvert\pm i\rangle together with the full table of overlaps ∣⟨a∣b⟩∣2∈{0,12,1}\lvert\langle a\vert b\rangle\rvert^2\in\lbrace0,\tfrac12,1\rbrace that makes the ZZ, XX and YY bases mutually unbiased.

Prerequisites: Postulate 3: Projective Measurement & the Born Rule

Objectives and key results
  • Derive ∣α∣2+∣β∣2=1\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1 from the state-space and measurement postulates and normalise any nonzero vector ψ~∈C2\tilde\psi\in\mathbb{C}^2.

  • Prove that a pure qubit state has exactly two real parameters and write it as cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle with θ∈[0,π]\theta\in[0,\pi], ϕ∈[0,2π)\phi\in[0,2\pi).

  • Identify ∣0⟩,∣1⟩\lvert0\rangle,\lvert1\rangle in three physical platforms: spin-12\tfrac12 along zz, photon polarisation H/VH/V, and the two lowest levels of a transmon.

  • Write the six cardinal states as column vectors and compute every overlap ∣⟨a∣b⟩∣2\lvert\langle a\vert b\rangle\rvert^2 between them.

definition · Qubit state
∣ψ⟩=α∣0⟩+β∣1⟩,∣α∣2+∣β∣2=1,∣ψ⟩∼eiγ∣ψ⟩\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle,\qquad \lvert\alpha\rvert^2+\lvert\beta\rvert^2=1,\qquad \lvert\psi\rangle\sim e^{i\gamma}\lvert\psi\rangle
theorem · Two real parameters
∣ψ⟩≃cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩,θ∈[0,π], ϕ∈[0,2π)\lvert\psi\rangle\simeq\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle,\qquad \theta\in[0,\pi],\ \phi\in[0,2\pi)
identity · Mutually unbiased Pauli bases
∣⟨a∣b⟩∣2=12for ∣a⟩,∣b⟩ from different bases among {∣0⟩,∣1⟩}, {∣±⟩}, {∣±i⟩}\lvert\langle a\vert b\rangle\rvert^2=\tfrac12\quad\text{for } \lvert a\rangle,\lvert b\rangle \text{ from different bases among } \lbrace\lvert0\rangle,\lvert1\rangle\rbrace,\ \lbrace\lvert\pm\rangle\rbrace,\ \lbrace\lvert\pm i\rangle\rbrace
formula · Normalisation
∣ψ⟩=∣ψ~⟩∥ψ~∥,∥ψ~∥2=∣α~∣2+∣β~∣2\lvert\psi\rangle=\frac{\lvert\tilde\psi\rangle}{\lVert\tilde\psi\rVert},\qquad \lVert\tilde\psi\rVert^2=\lvert\tilde\alpha\rvert^2+\lvert\tilde\beta\rvert^2

From the postulates to normalisation#

Stage 1 established the postulates for an arbitrary Hilbert space H\mathcal{H}. A qubit is the special case H=C2\mathcal{H}=\mathbb{C}^2, the smallest Hilbert space in which superposition is possible. We fix an orthonormal basis, the computational basis ∣0⟩=(10),∣1⟩=(01),\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix},\qquad \lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix}, so that every vector of C2\mathbb{C}^2 is uniquely α∣0⟩+β∣1⟩=(αβ)\alpha\lvert0\rangle+\beta\lvert1\rangle=\begin{pmatrix}\alpha\\\beta\end{pmatrix} with α,β∈C\alpha,\beta\in\mathbb{C}. The complex numbers α\alpha and β\beta are the probability amplitudes. Not every pair (α,β)(\alpha,\beta) is a physical state; the postulates cut the set down in two ways, one of which (normalisation) we derive now and the other (global phase) in the next section.

Definition

Qubit

A qubit is a quantum system whose state space is C2\mathbb{C}^2. Its pure states are unit vectors ∣ψ⟩=α∣0⟩+β∣1⟩\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle with ∣α∣2+∣β∣2=1\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1, and two unit vectors that differ by a global phase, ∣ψ′⟩=eiγ∣ψ⟩\lvert\psi'\rangle=e^{i\gamma}\lvert\psi\rangle with γ∈R\gamma\in\mathbb{R}, describe the same physical state.

Derivation

Normalisation ∣α∣2+∣β∣2=1\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1 from Postulates 1 and 3

  1. Step 1:
    ∣ψ⟩∈C2,⟨ψ∣ψ⟩=1\lvert\psi\rangle\in\mathbb{C}^2,\qquad \langle\psi\vert\psi\rangle=1
    Postulate 1: the state of an isolated system is a unit vector of its Hilbert space, here C2\mathbb{C}^2.
  2. Step 2:
    ∣ψ⟩=α∣0⟩+β∣1⟩,⟨ψ∣=α∗⟨0∣+β∗⟨1∣\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle,\qquad \langle\psi\rvert=\alpha^*\langle0\rvert+\beta^*\langle1\rvert
    Expand in the computational basis; the bra is the conjugate transpose, so the coefficients are complex-conjugated.
  3. Step 3:
    ⟨ψ∣ψ⟩=α∗α⟨0∣0⟩+α∗β⟨0∣1⟩+β∗α⟨1∣0⟩+β∗β⟨1∣1⟩\langle\psi\vert\psi\rangle=\alpha^*\alpha\langle0\vert0\rangle+\alpha^*\beta\langle0\vert1\rangle+\beta^*\alpha\langle1\vert0\rangle+\beta^*\beta\langle1\vert1\rangle
    The inner product is linear in the ket and antilinear in the bra, giving four terms.
  4. Step 4:
    =∣α∣2⋅1+α∗β⋅0+β∗α⋅0+∣β∣2⋅1=∣α∣2+∣β∣2=\lvert\alpha\rvert^2\cdot1+\alpha^*\beta\cdot0+\beta^*\alpha\cdot0+\lvert\beta\rvert^2\cdot1=\lvert\alpha\rvert^2+\lvert\beta\rvert^2
    Orthonormality ⟨i∣j⟩=δij\langle i\vert j\rangle=\delta_{ij} kills the cross terms, and z∗z=∣z∣2z^*z=\lvert z\rvert^2.
  5. Step 5:
    P(0)=⟨ψ∣P0∣ψ⟩=∣⟨0∣ψ⟩∣2=∣α∣2,P(1)=∣⟨1∣ψ⟩∣2=∣β∣2P(0)=\langle\psi\vert P_0\vert\psi\rangle=\lvert\langle0\vert\psi\rangle\rvert^2=\lvert\alpha\rvert^2,\qquad P(1)=\lvert\langle1\vert\psi\rangle\rvert^2=\lvert\beta\rvert^2
    Postulate 3 (Born rule) for the ZZ measurement with projectors P0=∣0⟩⟨0∣P_0=\lvert0\rangle\langle0\rvert, P1=∣1⟩⟨1∣P_1=\lvert1\rangle\langle1\rvert.
  6. Step 6:
    P(0)+P(1)=∣α∣2+∣β∣2=⟨ψ∣ψ⟩=1P(0)+P(1)=\lvert\alpha\rvert^2+\lvert\beta\rvert^2=\langle\psi\vert\psi\rangle=1
    The two outcomes are exhaustive and exclusive, so their probabilities must sum to one; this is exactly the unit-norm condition of Postulate 1, so the two postulates are consistent.

Result

∣α∣2+∣β∣2=1\boxed{\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1}
Derivation

Worked example: normalising (1+i)∣0⟩+2∣1⟩(1+i)\lvert0\rangle+2\lvert1\rangle

  1. Step 1:
    ∣ψ~⟩=(1+i)∣0⟩+2∣1⟩\lvert\tilde\psi\rangle=(1+i)\lvert0\rangle+2\lvert1\rangle
    An unnormalised vector: α~=1+i\tilde\alpha=1+i, β~=2\tilde\beta=2.
  2. Step 2:
    ∣α~∣2=(1+i)∗(1+i)=(1−i)(1+i)=1−i2=2\lvert\tilde\alpha\rvert^2=(1+i)^*(1+i)=(1-i)(1+i)=1-i^2=2
    Modulus squared of a complex number is the number times its conjugate; i2=−1i^2=-1.
  3. Step 3:
    ∣β~∣2=22=4,∥ψ~∥2=2+4=6\lvert\tilde\beta\rvert^2=2^2=4,\qquad \lVert\tilde\psi\rVert^2=2+4=6
    Add the squared moduli (the derivation above with general coefficients).
  4. Step 4:
    ∣ψ⟩=∣ψ~⟩6=1+i6∣0⟩+26∣1⟩\lvert\psi\rangle=\frac{\lvert\tilde\psi\rangle}{\sqrt6}=\frac{1+i}{\sqrt6}\lvert0\rangle+\frac{2}{\sqrt6}\lvert1\rangle
    Divide by the norm 6\sqrt6; the result has unit norm because ∥c v∥=∣c∣ ∥v∥\lVert c\,v\rVert=\lvert c\rvert\,\lVert v\rVert.
  5. Step 5:
    α=16+i6≈0.4082+0.4082 i,β=26≈0.8165\alpha=\frac{1}{\sqrt6}+\frac{i}{\sqrt6}\approx0.4082+0.4082\,i,\qquad \beta=\frac{2}{\sqrt6}\approx0.8165
    Real and imaginary parts, to four decimals.
  6. Step 6:
    P(0)=26=13,P(1)=46=23,P(0)+P(1)=1P(0)=\frac{2}{6}=\frac13,\qquad P(1)=\frac{4}{6}=\frac23,\qquad P(0)+P(1)=1
    Born rule on the normalised amplitudes; the check P(0)+P(1)=1P(0)+P(1)=1 confirms the normalisation.

Result

∣ψ⟩=1+i6∣0⟩+26∣1⟩,P(1)=23\boxed{\lvert\psi\rangle=\tfrac{1+i}{\sqrt6}\lvert0\rangle+\tfrac{2}{\sqrt6}\lvert1\rangle,\quad P(1)=\tfrac23}

Quick check

Normalise ∣ψ~⟩=3∣0⟩+4i∣1⟩\lvert\tilde\psi\rangle=3\lvert0\rangle+4i\lvert1\rangle. What is P(1)P(1)?

tolerance ±0.001

Two real parameters#

Two complex numbers are four real numbers, so C2≅R4\mathbb{C}^2\cong\mathbb{R}^4. Normalisation is one real equation, which leaves the unit sphere S3⊂R4S^3\subset\mathbb{R}^4 (three real parameters). The global phase is one more real redundancy: Postulate 3 gives ∣⟨i∣eiγψ⟩∣2=∣eiγ∣2∣⟨i∣ψ⟩∣2=∣⟨i∣ψ⟩∣2\lvert\langle i\vert e^{i\gamma}\psi\rangle\rvert^2=\lvert e^{i\gamma}\rvert^2\lvert\langle i\vert\psi\rangle\rvert^2=\lvert\langle i\vert\psi\rangle\rvert^2 for every basis and every measurement, and Postulate 2 gives U(eiγ∣ψ⟩)=eiγU∣ψ⟩U(e^{i\gamma}\lvert\psi\rangle)=e^{i\gamma}U\lvert\psi\rangle, so no experiment can distinguish ∣ψ⟩\lvert\psi\rangle from eiγ∣ψ⟩e^{i\gamma}\lvert\psi\rangle. Removing it leaves 4−1−1=24-1-1=2 real parameters.

Theorem

Canonical form of a pure qubit state

Every unit vector ∣ψ⟩=α∣0⟩+β∣1⟩∈C2\lvert\psi\rangle=\alpha\lvert0\rangle+\beta\lvert1\rangle\in\mathbb{C}^2 equals eiγ(cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩)e^{i\gamma}\big(\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle\big) for some γ∈R\gamma\in\mathbb{R}, θ∈[0,π]\theta\in[0,\pi] and ϕ∈[0,2π)\phi\in[0,2\pi). The pair (θ,ϕ)(\theta,\phi) is unique when 0<θ<π0<\theta<\pi; at the poles θ∈{0,π}\theta\in\lbrace0,\pi\rbrace the value of ϕ\phi is irrelevant.

Proof (6 steps)
  1. Step 1:
    α=r0eiφ0,β=r1eiφ1,r0,r1≥0, φ0,φ1∈R\alpha=r_0e^{i\varphi_0},\quad \beta=r_1e^{i\varphi_1},\qquad r_0,r_1\ge0,\ \varphi_0,\varphi_1\in\mathbb{R}
    Polar form of the two amplitudes: four real numbers (r0,φ0,r1,φ1)(r_0,\varphi_0,r_1,\varphi_1), the C2≅R4\mathbb{C}^2\cong\mathbb{R}^4 count.
  2. Step 2:
    r02+r12=1r_0^2+r_1^2=1
    Normalisation ∣α∣2+∣β∣2=1\lvert\alpha\rvert^2+\lvert\beta\rvert^2=1 removes one real parameter.
  3. Step 3:
    ∃! θ∈[0,π]:r0=cos⁡θ2,  r1=sin⁡θ2\exists!\ \theta\in[0,\pi]:\quad r_0=\cos\tfrac\theta2,\ \ r_1=\sin\tfrac\theta2
    (r0,r1)(r_0,r_1) is a point of the unit circle in the closed first quadrant; θ/2∈[0,π/2]\theta/2\in[0,\pi/2] is its polar angle, where both cosine and sine are non-negative.
  4. Step 4:
    ∣ψ⟩=eiφ0(cos⁡θ2∣0⟩+ei(φ1−φ0)sin⁡θ2∣1⟩)\lvert\psi\rangle=e^{i\varphi_0}\Big(\cos\tfrac\theta2\lvert0\rangle+e^{i(\varphi_1-\varphi_0)}\sin\tfrac\theta2\lvert1\rangle\Big)
    Factor eiφ0e^{i\varphi_0} out of both terms.
  5. Step 5:
    γ:=φ0,ϕ:=(φ1−φ0) mod 2π\gamma:=\varphi_0,\qquad \phi:=(\varphi_1-\varphi_0)\bmod 2\pi
    Only the relative phase ϕ\phi survives inside the bracket; γ\gamma is a global phase and is physically irrelevant, which removes the second real parameter.
  6. Step 6:
    ∣ψ⟩≃cos⁡θ2∣0⟩+eiϕsin⁡θ2∣1⟩\lvert\psi\rangle\simeq\cos\tfrac\theta2\lvert0\rangle+e^{i\phi}\sin\tfrac\theta2\lvert1\rangle
    Two real parameters (θ,ϕ)(\theta,\phi) remain. If 0<θ<π0<\theta<\pi both r0,r1>0r_0,r_1>0, so φ0,φ1\varphi_0,\varphi_1 are defined modulo 2π2\pi and ϕ\phi is unique; at θ=0\theta=0 (β=0\beta=0) or θ=π\theta=\pi (α=0\alpha=0) one phase is undefined, so ϕ\phi is arbitrary.

∎

Quick check

Which state is physically identical to ∣ψ⟩=12(∣0⟩+i∣1⟩)\lvert\psi\rangle=\tfrac{1}{\sqrt2}(\lvert0\rangle+i\lvert1\rangle)?

Select one answer

Reading the canonical form off two amplitudes. The amplitude editor below draws α\alpha and β\beta as points of two complex planes and prints the norm N=∣α∣2+∣β∣2N=\lvert\alpha\rvert^2+\lvert\beta\rvert^2, the Born probabilities P(0)=∣α∣2/NP(0)=\lvert\alpha\rvert^2/N, P(1)=∣β∣2/NP(1)=\lvert\beta\rvert^2/N and the Bloch angles of the theorem, θ=2arccos⁡(∣α∣/N)\theta=2\arccos(\lvert\alpha\rvert/\sqrt N) and ϕ=arg⁡β−arg⁡α\phi=\arg\beta-\arg\alpha. This first copy is a fixed display of ∣ψ⟩=0.6∣0⟩+0.8i∣1⟩\lvert\psi\rangle=0.6\lvert0\rangle+0.8i\lvert1\rangle; the derivation shows where each of its numbers comes from.

Derivation

Every number shown for 0.6∣0⟩+0.8i∣1⟩0.6\lvert0\rangle+0.8i\lvert1\rangle

  1. Step 1:
    N=∣0.6∣2+∣0.8i∣2=0.36+(−0.8i)(0.8i)=0.36+0.64=1N=\lvert0.6\rvert^2+\lvert0.8i\rvert^2=0.36+(-0.8i)(0.8i)=0.36+0.64=1
    The modulus squared of 0.8i0.8i is the number times its conjugate; −i⋅i=1-i\cdot i=1. The vector is already a unit vector.
  2. Step 2:
    P(0)=∣α∣2N=0.36,P(1)=∣β∣2N=0.64P(0)=\frac{\lvert\alpha\rvert^2}{N}=0.36,\qquad P(1)=\frac{\lvert\beta\rvert^2}{N}=0.64
    Born rule; dividing by NN is harmless here because N=1N=1.
  3. Step 3:
    α=0.6 ei⋅0,β=0.8 eiπ/2\alpha=0.6\,e^{i\cdot0},\qquad\beta=0.8\,e^{i\pi/2}
    Polar forms: 0.60.6 lies on the positive real axis and 0.8i0.8i on the positive imaginary axis.
  4. Step 4:
    cos⁡θ2=∣α∣N=0.6 ⇒ θ=2arccos⁡0.6≈1.8546  (≈106.26∘)\cos\tfrac\theta2=\frac{\lvert\alpha\rvert}{\sqrt N}=0.6\ \Rightarrow\ \theta=2\arccos0.6\approx1.8546\ \ (\approx106.26^\circ)
    The theorem's r0=cos⁡θ2r_0=\cos\tfrac\theta2 with θ∈[0,π]\theta\in[0,\pi]; consistently sin⁡θ2=1−0.36=0.8=∣β∣\sin\tfrac\theta2=\sqrt{1-0.36}=0.8=\lvert\beta\rvert.
  5. Step 5:
    ϕ=arg⁡β−arg⁡α=π2−0=π2\phi=\arg\beta-\arg\alpha=\tfrac\pi2-0=\tfrac\pi2
    The relative phase; the global phase is γ=arg⁡α=0\gamma=\arg\alpha=0.
  6. Step 6:
    cos⁡θ2∣0⟩+eiπ/2sin⁡θ2∣1⟩=0.6∣0⟩+0.8i∣1⟩\cos\tfrac\theta2\lvert0\rangle+e^{i\pi/2}\sin\tfrac\theta2\lvert1\rangle=0.6\lvert0\rangle+0.8i\lvert1\rangle
    Reassemble the canonical form: eiπ/2=ie^{i\pi/2}=i.

Result

N=1,(P(0),P(1))=(0.36,0.64),θ=2arccos⁡0.6≈1.8546,ϕ=π2\boxed{N=1,\quad\big(P(0),P(1)\big)=(0.36,0.64),\quad\theta=2\arccos0.6\approx1.8546,\quad\phi=\tfrac\pi2}

Normalise by hand, then by button. The second editor is interactive and starts from the unnormalised pair α~=2\tilde\alpha=2, β~=1+2i\tilde\beta=1+2i without automatic normalisation, so it reports N≠1N\neq1. Derive its numbers first (below), then press Normalise, which divides both amplitudes by N\sqrt N, and compare. Afterwards drag the handles or type a modulus and an argument. Two things never change the probabilities: rescaling both amplitudes by the same positive factor (the editor divides by NN) and turning both handles by the same angle (a global phase leaves ∣α∣\lvert\alpha\rvert, ∣β∣\lvert\beta\rvert and arg⁡β−arg⁡α\arg\beta-\arg\alpha unchanged, hence also θ\theta and ϕ\phi). Moving one handle to the origin puts the state at a pole, where ϕ\phi is undefined and shown as a dash.

Derivation

Normalising 2∣0⟩+(1+2i)∣1⟩2\lvert0\rangle+(1+2i)\lvert1\rangle

  1. Step 1:
    N=∣2∣2+∣1+2i∣2=4+(1−2i)(1+2i)=4+1−4i2=9N=\lvert2\rvert^2+\lvert1+2i\rvert^2=4+(1-2i)(1+2i)=4+1-4i^2=9
    Squared moduli as in the worked example of the first section; −4i2=4-4i^2=4.
  2. Step 2:
    ∣ψ⟩=19(2∣0⟩+(1+2i)∣1⟩)=23∣0⟩+1+2i3∣1⟩\lvert\psi\rangle=\frac{1}{\sqrt9}\big(2\lvert0\rangle+(1+2i)\lvert1\rangle\big)=\tfrac23\lvert0\rangle+\tfrac{1+2i}{3}\lvert1\rangle
    Divide by the norm N=3\sqrt N=3: this is what the Normalise button does.
  3. Step 3:
    P(0)=49≈0.4444,P(1)=59≈0.5556P(0)=\tfrac49\approx0.4444,\qquad P(1)=\tfrac59\approx0.5556
    ∣23∣2=49\lvert\tfrac23\rvert^2=\tfrac49 and ∣1+2i∣2/9=59\lvert1+2i\rvert^2/9=\tfrac59; the editor shows the same bars before and after normalising, because it always divides by NN.
  4. Step 4:
    θ=2arccos⁡23≈1.6821,ϕ=arg⁡(1+2i)−arg⁡2=arctan⁡2≈1.1071\theta=2\arccos\tfrac23\approx1.6821,\qquad\phi=\arg(1+2i)-\arg2=\arctan2\approx1.1071
    1+2i1+2i lies in the first quadrant, so its argument is arctan⁡21\arctan\tfrac21; arg⁡2=0\arg2=0.

Result

N=9,∣ψ⟩=23∣0⟩+1+2i3∣1⟩,(P(0),P(1))=(49,59)\boxed{N=9,\qquad\lvert\psi\rangle=\tfrac23\lvert0\rangle+\tfrac{1+2i}3\lvert1\rangle,\qquad\big(P(0),P(1)\big)=\big(\tfrac49,\tfrac59\big)}

Born probabilities versus measured frequencies#

The Born rule predicts probabilities; an experiment returns counts. Measuring NN identically prepared copies of ∣ψ⟩=0.6∣0⟩+0.8i∣1⟩\lvert\psi\rangle=0.6\lvert0\rangle+0.8i\lvert1\rangle in the ZZ basis gives outcome 11 on each copy independently with probability p=P(1)=0.64p=P(1)=0.64, so the observed frequency f^\hat f of 11 is a random variable centred on pp. How far it may stray follows from the binomial distribution.

Derivation

Spread of the measured frequency and the χ2\chi^2 statistic

  1. Step 1:
    K∼Bin(N,p),p=0.64,N=1000K\sim\mathrm{Bin}(N,p),\qquad p=0.64,\quad N=1000
    KK counts the shots with outcome 11: a sum of NN independent Bernoulli variables, each 11 with probability pp.
  2. Step 2:
    E[K]=Np=640,Var(K)=Np(1−p)=1000⋅0.64⋅0.36=230.4\mathbb E[K]=Np=640,\qquad\mathrm{Var}(K)=Np(1-p)=1000\cdot0.64\cdot0.36=230.4
    A Bernoulli variable has mean pp and variance p−p2=p(1−p)p-p^2=p(1-p); means and (for independent terms) variances add.
  3. Step 3:
    f^=KN,E[f^]=p,σf^=p(1−p)N=0.64⋅0.361000=0.481000≈0.0152\hat f=\frac KN,\qquad\mathbb E[\hat f]=p,\qquad\sigma_{\hat f}=\sqrt{\frac{p(1-p)}{N}}=\sqrt{\frac{0.64\cdot0.36}{1000}}=\frac{0.48}{\sqrt{1000}}\approx0.0152
    Dividing a random variable by NN divides its standard deviation by NN; 0.64⋅0.36=0.8⋅0.6=0.48\sqrt{0.64\cdot0.36}=0.8\cdot0.6=0.48.
  4. Step 4:
    f^∈[p−1.96 σf^, p+1.96 σf^]≈[0.610, 0.670]in about 95% of runs\hat f\in\big[p-1.96\,\sigma_{\hat f},\ p+1.96\,\sigma_{\hat f}\big]\approx[0.610,\ 0.670]\quad\text{in about }95\%\text{ of runs}
    Central limit theorem: with Np(1−p)=230.4≫1Np(1-p)=230.4\gg1 the binomial is close to a normal distribution, and ±1.96\pm1.96 standard deviations hold 95%95\% of a normal law.
  5. Step 5:
    χ2=(K0−E0)2E0+(K−E1)2E1=(K−Np)2Np(1−p)=z2,z=f^−pσf^\chi^2=\frac{(K_0-E_0)^2}{E_0}+\frac{(K-E_1)^2}{E_1}=\frac{(K-Np)^2}{Np(1-p)}=z^2,\qquad z=\frac{\hat f-p}{\sigma_{\hat f}}
    With K0=N−KK_0=N-K and E0=N(1−p)E_0=N(1-p) the two deviations are equal up to sign, and 1Np+1N(1−p)=1Np(1−p)\tfrac1{Np}+\tfrac1{N(1-p)}=\tfrac{1}{Np(1-p)}.
  6. Step 6:
    E[χ2]=1,P(χ2>3.84)≈0.05\mathbb E[\chi^2]=1,\qquad P(\chi^2>3.84)\approx0.05
    Two bins whose counts must add up to NN leave 2−1=12-1=1 degree of freedom; zz is approximately standard normal, so χ2=z2\chi^2=z^2 has mean 11 and exceeds 1.962≈3.841.96^2\approx3.84 in about 5%5\% of runs.

Result

σf^=p(1−p)/N≈0.0152  (N=1000),χ2=z2 with one degree of freedom\boxed{\sigma_{\hat f}=\sqrt{p(1-p)/N}\approx0.0152\ \ (N=1000),\qquad\chi^2=z^2\ \text{with one degree of freedom}}

What to read in the histogram. The exact bars are the Born probabilities 0.360.36 and 0.640.64; next to them are the frequencies of 10001000 shots drawn from a seeded generator (seed 00, so the same sample appears on every visit). The two sampled bars differ from the exact ones by the same amount in opposite directions, typically by about one standard deviation σf^≈0.015\sigma_{\hat f}\approx0.015, and the χ2\chi^2 line reports the statistic above with 11 degree of freedom. Values up to about 3.843.84 are what chance alone produces in 95%95\% of runs; a value far beyond, say 2020, would mean the samples were not drawn from the Born distribution. Because σf^\sigma_{\hat f} scales as 1/N1/\sqrt N, quadrupling the number of shots only halves the typical deviation, to 0.48/4000≈0.00760.48/\sqrt{4000}\approx0.0076: estimating amplitudes from measurements is expensive, a theme that returns with shot noise in variational algorithms.

Physical qubits#

The abstract space C2\mathbb{C}^2 is realised by any physical system with two perfectly distinguishable states that can be put into coherent superposition. Three platforms and their identification of the computational basis:

  • Spin-12\tfrac12 along zz (electron, nucleus, trapped-ion hyperfine pseudo-spin). The observable Sz=ℏ2ZS_z=\tfrac\hbar2 Z has eigenstates ∣↑z⟩\lvert\uparrow_z\rangle with eigenvalue +ℏ2+\tfrac\hbar2 and ∣↓z⟩\lvert\downarrow_z\rangle with eigenvalue −ℏ2-\tfrac\hbar2. The map is ∣0⟩≡∣↑z⟩\lvert0\rangle\equiv\lvert\uparrow_z\rangle, ∣1⟩≡∣↓z⟩\lvert1\rangle\equiv\lvert\downarrow_z\rangle, so a Stern–Gerlach apparatus oriented along zz performs the ZZ measurement, and spin up along xx is ∣+⟩\lvert+\rangle.
  • Photon polarisation. Horizontal and vertical linear polarisation are orthogonal: ∣0⟩≡∣H⟩\lvert0\rangle\equiv\lvert H\rangle, ∣1⟩≡∣V⟩\lvert1\rangle\equiv\lvert V\rangle. A polarising beam splitter transmitting HH and reflecting VV is the ZZ measurement; diagonal polarisation ∣D⟩=12(∣H⟩+∣V⟩)\lvert D\rangle=\tfrac{1}{\sqrt2}(\lvert H\rangle+\lvert V\rangle) is ∣+⟩\lvert+\rangle, and circular polarisation 12(∣H⟩±i∣V⟩)\tfrac{1}{\sqrt2}(\lvert H\rangle\pm i\lvert V\rangle) is ∣±i⟩\lvert\pm i\rangle (the sign-to-handedness assignment is a convention).
  • Transmon (superconducting circuit). A Josephson-junction anharmonic oscillator has levels E0<E1<E2<…E_0<E_1<E_2<\dots with E2−E1≠E1−E0E_2-E_1\neq E_1-E_0. Microwave pulses at the frequency ω01=(E1−E0)/ℏ\omega_{01}=(E_1-E_0)/\hbar address only the lowest pair, so the qubit is ∣0⟩≡∣g⟩\lvert0\rangle\equiv\lvert g\rangle (ground) and ∣1⟩≡∣e⟩\lvert1\rangle\equiv\lvert e\rangle (first excited); the anharmonicity keeps population out of ∣2⟩\lvert2\rangle (leakage).

The six cardinal states and mutually unbiased bases#

The eigenvectors of the three Pauli matrices give six distinguished states, the cardinal states, lying at the six poles of the Bloch sphere: ∣0⟩=(10),∣1⟩=(01),∣+⟩=12(11),∣−⟩=12(1−1),∣+i⟩=12(1i),∣−i⟩=12(1−i).\lvert0\rangle=\begin{pmatrix}1\\0\end{pmatrix},\quad \lvert1\rangle=\begin{pmatrix}0\\1\end{pmatrix},\quad \lvert+\rangle=\frac{1}{\sqrt2}\begin{pmatrix}1\\1\end{pmatrix},\quad \lvert-\rangle=\frac{1}{\sqrt2}\begin{pmatrix}1\\-1\end{pmatrix},\quad \lvert+i\rangle=\frac{1}{\sqrt2}\begin{pmatrix}1\\i\end{pmatrix},\quad \lvert-i\rangle=\frac{1}{\sqrt2}\begin{pmatrix}1\\-i\end{pmatrix}. They satisfy Z∣0⟩=∣0⟩Z\lvert0\rangle=\lvert0\rangle, Z∣1⟩=−∣1⟩Z\lvert1\rangle=-\lvert1\rangle, X∣±⟩=±∣±⟩X\lvert\pm\rangle=\pm\lvert\pm\rangle and Y∣±i⟩=±∣±i⟩Y\lvert\pm i\rangle=\pm\lvert\pm i\rangle. For instance Y∣+i⟩=(0−ii0)12(1i)=12(−i⋅ii)=12(1i)Y\lvert+i\rangle=\begin{pmatrix}0&-i\\i&0\end{pmatrix}\tfrac{1}{\sqrt2}\begin{pmatrix}1\\i\end{pmatrix}=\tfrac{1}{\sqrt2}\begin{pmatrix}-i\cdot i\\i\end{pmatrix}=\tfrac{1}{\sqrt2}\begin{pmatrix}1\\i\end{pmatrix}. Each pair is an orthonormal basis: the ZZ basis {∣0⟩,∣1⟩}\lbrace\lvert0\rangle,\lvert1\rangle\rbrace, the XX basis {∣+⟩,∣−⟩}\lbrace\lvert+\rangle,\lvert-\rangle\rbrace and the YY basis {∣+i⟩,∣−i⟩}\lbrace\lvert+i\rangle,\lvert-i\rangle\rbrace.

Derivation

Step-by-step overlap ∣⟨+∣+i⟩∣2\lvert\langle +\vert +i\rangle\rvert^2

  1. Step 1:
    ⟨+∣=(∣+⟩)†=12(11)\langle+\rvert=\big(\lvert+\rangle\big)^\dagger=\tfrac{1}{\sqrt2}\begin{pmatrix}1&1\end{pmatrix}
    The bra is the conjugate transpose; the entries are real, so conjugation does nothing.
  2. Step 2:
    ⟨+∣+i⟩=12(11)12(1i)=12(1⋅1+1⋅i)=1+i2\langle+\vert+i\rangle=\tfrac{1}{\sqrt2}\begin{pmatrix}1&1\end{pmatrix}\tfrac{1}{\sqrt2}\begin{pmatrix}1\\i\end{pmatrix}=\tfrac12(1\cdot1+1\cdot i)=\tfrac{1+i}{2}
    Row times column.
  3. Step 3:
    ∣⟨+∣+i⟩∣2=(1−i)(1+i)4=1−i24=24=12\lvert\langle+\vert+i\rangle\rvert^2=\frac{(1-i)(1+i)}{4}=\frac{1-i^2}{4}=\frac{2}{4}=\frac12
    Modulus squared via the complex conjugate.
  4. Step 4:
    ⟨+i∣=12(1−i),⟨+i∣−i⟩=12(1⋅1+(−i)(−i))=12(1+i2)=0\langle+i\rvert=\tfrac{1}{\sqrt2}\begin{pmatrix}1&-i\end{pmatrix},\qquad \langle+i\vert-i\rangle=\tfrac12\big(1\cdot1+(-i)(-i)\big)=\tfrac12(1+i^2)=0
    For comparison, within the YY basis: conjugating i↦−ii\mapsto -i in the bra is essential; forgetting it would give 12(1−i2)=1\tfrac12(1-i^2)=1, the wrong answer.
  5. Step 5:
    ⟨0∣±⟩=12,⟨0∣±i⟩=12,⟨1∣±⟩=±12,⟨1∣±i⟩=±i2\langle0\vert\pm\rangle=\tfrac{1}{\sqrt2},\quad \langle0\vert\pm i\rangle=\tfrac{1}{\sqrt2},\quad \langle1\vert\pm\rangle=\pm\tfrac{1}{\sqrt2},\quad \langle1\vert\pm i\rangle=\pm\tfrac{i}{\sqrt2}
    Overlaps with the ZZ basis read off the column vectors directly; every modulus squared is 12\tfrac12.
  6. Step 6:
    ⟨±∣±′i⟩=12(1±(±′i)) ⇒ ∣⟨±∣±′i⟩∣2=14(1+1)=12\langle\pm\vert\pm' i\rangle=\tfrac12\big(1\pm(\pm' i)\big)\ \Rightarrow\ \lvert\langle\pm\vert\pm' i\rangle\rvert^2=\tfrac14(1+1)=\tfrac12
    All four XX–YY overlaps have the form 12(1+ϵi)\tfrac12(1+\epsilon i) with ϵ=±1\epsilon=\pm1, whose modulus squared is 14⋅2\tfrac14\cdot2.

Result

∣⟨a∣b⟩∣2={1a=b0a≠b in the same basis12a,b in different bases\boxed{\lvert\langle a\vert b\rangle\rvert^2=\begin{cases}1 & a=b\\ 0 & a\ne b \text{ in the same basis}\\ \tfrac12 & a,b \text{ in different bases}\end{cases}}
∣⟨a∣b⟩∣2∣0⟩∣1⟩∣+⟩∣−⟩∣+i⟩∣−i⟩∣0⟩1012121212∣1⟩0112121212∣+⟩1212101212∣−⟩1212011212∣+i⟩1212121210∣−i⟩1212121201\begin{array}{c|cccccc} \lvert\langle a\vert b\rangle\rvert^2 & \lvert0\rangle & \lvert1\rangle & \lvert+\rangle & \lvert-\rangle & \lvert+i\rangle & \lvert-i\rangle\\ \hline \lvert0\rangle & 1 & 0 & \tfrac12 & \tfrac12 & \tfrac12 & \tfrac12\\ \lvert1\rangle & 0 & 1 & \tfrac12 & \tfrac12 & \tfrac12 & \tfrac12\\ \lvert+\rangle & \tfrac12 & \tfrac12 & 1 & 0 & \tfrac12 & \tfrac12\\ \lvert-\rangle & \tfrac12 & \tfrac12 & 0 & 1 & \tfrac12 & \tfrac12\\ \lvert+i\rangle & \tfrac12 & \tfrac12 & \tfrac12 & \tfrac12 & 1 & 0\\ \lvert-i\rangle & \tfrac12 & \tfrac12 & \tfrac12 & \tfrac12 & 0 & 1 \end{array}
Overlap table |⟨a|b⟩|² for rows/columns 0, 1, +, −, +i, −i6×6

Definition

Mutually unbiased bases

Two orthonormal bases {∣ai⟩}\lbrace\lvert a_i\rangle\rbrace and {∣bj⟩}\lbrace\lvert b_j\rangle\rbrace of Cd\mathbb{C}^d are mutually unbiased if ∣⟨ai∣bj⟩∣2=1d\lvert\langle a_i\vert b_j\rangle\rvert^2=\tfrac1d for all i,ji,j. The table shows that the ZZ, XX and YY bases are pairwise mutually unbiased with d=2d=2: preparing any state of one basis and measuring in another gives a perfectly uniform outcome, so a measurement in one basis reveals no information about which state of another basis was prepared. This is the property exploited by the BB84 key-distribution protocol.

Circuit · 1 qubit

Quantum circuit on 1 qubitH on q0; S on q0q0HS

Preparing ∣+i⟩\lvert+i\rangle from ∣0⟩\lvert0\rangle: H∣0⟩=12(∣0⟩+∣1⟩)H\lvert0\rangle=\tfrac{1}{\sqrt2}(\lvert0\rangle+\lvert1\rangle), then S=diag(1,i)S=\mathrm{diag}(1,i) multiplies the ∣1⟩\lvert1\rangle amplitude by ii, giving SH∣0⟩=12(∣0⟩+i∣1⟩)=∣+i⟩SH\lvert0\rangle=\tfrac{1}{\sqrt2}(\lvert0\rangle+i\lvert1\rangle)=\lvert+i\rangle with amplitudes [12,i2]\big[\tfrac{1}{\sqrt2},\tfrac{i}{\sqrt2}\big] and ZZ statistics P(0)=P(1)=12P(0)=P(1)=\tfrac12.

∣ψ⟩=12∣0⟩+12 i∣1⟩\lvert\psi\rangle = \tfrac{1}{\sqrt{2}}\lvert 0\rangle + \tfrac{1}{\sqrt{2}}\,i\lvert 1\rangle
  • |0⟩0.5
  • |1⟩0.5

Quick check

Compute ∣⟨−∣−i⟩∣2\lvert\langle-\vert-i\rangle\rvert^2.

tolerance ±0.001

References

  1. M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press (2010), §1.2 and §2.2.
  2. P. Krantz et al., A quantum engineer’s guide to superconducting qubits, Applied Physics Reviews 6, 021318 (2019).doi:10.1063/1.5089550
  3. W. K. Wootters and B. D. Fields, Optimal state-determination by mutually unbiased measurements, Annals of Physics 191, 363 (1989).doi:10.1016/0003-4916(89)90322-9

Hands-on labs

  • Normalise a qubit state

    1 step · auto-graded

    Normalise (1+i)∣0⟩+2∣1⟩(1+i)\lvert0\rangle+2\lvert1\rangle and read off its Born probability P(1)P(1).

    Open lab