Skip to main content

IQC 002

· 7 min read

Ket​

∣ψ⟩=(ψ0ψ1)|\psi\rangle = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix}

∣0⟩=(10)|0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}

∣1⟩=(01)|1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}

∣ψ⟩=ψ0∣0⟩+ψ1∣1⟩=ψ0(10)+ψ1(01)|\psi\rangle = \psi_0 |0\rangle + \psi_1 |1\rangle \\ \quad = \psi_0 \begin{pmatrix} 1 \\ 0 \end{pmatrix} + \psi_1 \begin{pmatrix} 0 \\ 1 \end{pmatrix}

Matrices​

  • Matrices represent linear transformations (quantum gates). A general 2x2 matrix is: A=(α00α01α10α11)A = \begin{pmatrix} \alpha_{00} & \alpha_{01} \\ \alpha_{10} & \alpha_{11} \end{pmatrix}
  • Identity matrix: I=(1001)I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}
  • Linearity: A(∣ψ⟩+∣ϕ⟩)=A∣ψ⟩+A∣ϕ⟩A(|\psi\rangle + |\phi\rangle) = A|\psi\rangle + A|\phi\rangle

Bra and Daggers​

Dagger​

  • Conjugate Transpose: swap rows/columns and complex-conjugates every entry.
  • Ket becomes Bra: ∣ψ⟩†=(ψ0ψ1)†=(ψ0‾ψ1‾)=⟨ψ∣|\psi\rangle^\dagger = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix}^\dagger = \begin{pmatrix} \overline{\psi_0} & \overline{\psi_1} \end{pmatrix} = \langle\psi|
  • For a matrix: A†=(α00‾α10‾α01‾α11‾)A^\dagger = \begin{pmatrix} \overline{\alpha_{00}} & \overline{\alpha_{10}} \\ \overline{\alpha_{01}} & \overline{\alpha_{11}} \end{pmatrix}
  • Key Identities:
    • (αA)†=α‾A†(\alpha A)^\dagger = \overline{\alpha} A^\dagger
    • (A†)†=A(A^\dagger)^\dagger = A
    • (AB)†=B†A†(AB)^\dagger = B^\dagger A^\dagger

Hermitian and Unitary Matrices​

  • Hermitian: H†=HH^\dagger = H
    • Self-adjoint matrices, their eigenvalues are always real.
    • Observables in quantum mechanics are Hermitian.
  • Unitary: U†U=UU†=IU^\dagger U = UU^\dagger = I
    • The inverse of a unitary matrix is its conjugate transpose.
    • Unitary matrices preserve norms

Inner Product​

  • The angle between two vectors ∣ψ⟩|\psi\rangle and ∣ϕ⟩|\phi\rangle is defined as bra-ket: ⟨ψ∣ϕ⟩=(ψ0‾ψ1‾)(ϕ0ϕ1)=ψ0‾ϕ0+ψ1‾ϕ1\langle\psi|\phi\rangle = (\overline{\psi_0} \overline{\psi_1}) \begin{pmatrix} \phi_0 \\ \phi_1 \end{pmatrix} = \overline{\psi_0}\phi_0 + \overline{\psi_1}\phi_1
  • Important properties:
    • Order Matters: ⟨ψ∣ϕ⟩≠⟨ϕ∣ψ⟩\langle\psi|\phi\rangle \neq \langle\phi|\psi\rangle
    • But ⟨ψ∣ϕ⟩=⟨ϕ∣ψ⟩‾\langle\psi|\phi\rangle = \overline{\langle\phi|\psi\rangle} (Complex Conjugate)
    • The modulus is symmetric: ∣⟨ψ∣ϕ⟩∣=∣⟨ϕ∣ψ⟩∣|\langle\psi|\phi\rangle| = |\langle\phi|\psi\rangle|
  • The Magnitude of a vector is given by: ∥∣ψ⟩∥2=⟨ψ∣ψ⟩=∣ψ0∣2+∣ψ1∣2\| |\psi\rangle \|^2 = \langle\psi|\psi\rangle = |\psi_0|^2 + |\psi_1|^2

Orthonormal of the Computational Basis​

  • The basis states ∣0⟩|0\rangle and ∣1⟩|1\rangle are orthonormal: ⟨0∣0⟩=1,⟨1∣1⟩=1,⟨0∣1⟩=0,⟨1∣0⟩=0\langle 0|0\rangle = 1, \quad \langle 1|1\rangle = 1, \quad \langle 0|1\rangle = 0, \quad \langle 1|0\rangle = 0
  • This simplifies inner products enormously when working with the computational basis: ⟨ψ∣ϕ⟩=(ψ0‾⟨0∣+ψ1‾⟨1∣)(ϕ0∣0⟩+ϕ1∣1⟩) \langle\psi|\phi\rangle = (\overline{\psi_0}\langle0| + \overline{\psi_1}\langle1|) (\phi_0|0\rangle + \phi_1|1\rangle)
  • All corss terms vanish due to orthogonality, leaving: =ψ0‾ϕ0⟨0∣0⟩+ψ0‾ϕ1⟨0∣1⟩+ψ1‾ϕ0⟨1∣0⟩+ψ1‾ϕ1⟨1∣1⟩ = \overline{\psi_0}\phi_0 \langle0|0\rangle + \overline{\psi_0}\phi_1 \langle0|1\rangle + \overline{\psi_1}\phi_0 \langle1|0\rangle + \overline{\psi_1}\phi_1 \langle1|1\rangle =ψ0‾ϕ0+ψ1‾ϕ1= \overline{\psi_0}\phi_0 + \overline{\psi_1}\phi_1

Outer Products​

  • The outer product of two vectors produces a matrix: ∣ψ⟩⟨ϕ∣=(ψ0ψ1)(ϕ0‾ϕ1‾)=(ψ0ϕ0‾ψ0ϕ1‾ψ1ϕ0‾ψ1ϕ1‾)|\psi\rangle\langle\phi| = \begin{pmatrix} \psi_0 \\ \psi_1 \end{pmatrix} \begin{pmatrix} \overline{\phi_0} & \overline{\phi_1} \end{pmatrix} = \begin{pmatrix} \psi_0\overline{\phi_0} & \psi_0\overline{\phi_1} \\ \psi_1\overline{\phi_0} & \psi_1\overline{\phi_1} \end{pmatrix}
  • Basis outer products: ∣0⟩⟨1∣=(0100),∣1⟩⟨0∣=(0010)|0\rangle\langle1| = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}, \quad |1\rangle\langle0| = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix}
  • Any matrix can be expanded in terms of outer products of the computational basis: A=α00∣0⟩⟨0∣+α01∣0⟩⟨1∣+α10∣1⟩⟨0∣+α11∣1⟩⟨1∣A = \alpha_{00} |0\rangle\langle0| + \alpha_{01} |0\rangle\langle1| + \alpha_{10} |1\rangle\langle0| + \alpha_{11} |1\rangle\langle1|

The Qubit​

A qubit is the fundamental unit of quantum information

∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha |0\rangle + \beta |1\rangle

  • where α,β∈C\alpha, \beta \in \mathbb{C} are complex numbers such that ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1 (normalization condition).
  • Any normalized single-qubit state can be parameterized using two angles θ\theta and ϕ\phi (real numbers): ∣ψ⟩=cos⁡θ∣0⟩+eiϕsin⁡θ∣1⟩|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle
  • Key difference from a bit: a bit is either 0 or 1, while a qubit can be in a superposition of both states simultaneously until measured.

Measurement​

  • When you measure a qubit ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha |0\rangle + \beta |1\rangle in the computational basis, you get:
    • ∣0⟩|0\rangle with probability ∣α∣2|\alpha|^2
    • ∣1⟩|1\rangle with probability ∣β∣2|\beta|^2
OutcomeProbabilityPost-measurement State
0$\alpha
1$\beta
  • The result of measuring a qubit is a single classical bit.
  • For ∣ψ⟩=cos⁡θ∣0⟩+eiϕsin⁡θ∣1⟩|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle:
    • Probability of measuring ∣0⟩|0\rangle: cos⁡2θ\cos^2\theta
    • Probability of measuring ∣1⟩|1\rangle: sin⁡2θ\sin^2\theta
    • The phase ϕ\phi does not affect measurement outcomes.

One-Qubit Gates​

Pauli Matrices​

Unitary matrics

I=(1001),X=(0110),Y=(0−ii0),Z=(100−1)\mathbb{I} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

  • XX is the quantum NOT gate:
    • X∣0⟩=∣1⟩X|0\rangle = |1\rangle
    • X∣1⟩=∣0⟩X|1\rangle = |0\rangle
  • ZZ filps the phase of ∣1⟩|1\rangle:
    • Z∣0⟩=∣0⟩Z|0\rangle = |0\rangle
    • Z∣1⟩=−∣1⟩Z|1\rangle = -|1\rangle
  • All three (X,Y,Z)(X, Y, Z) are both Hermitian and unitary.

Hadamard Gate​

H=12(111−1)H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}

  • HH creates superpositions:
    • H∣0⟩=∣0⟩+∣1⟩2H|0\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}
    • H∣1⟩=∣0⟩−∣1⟩2H|1\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}}
  • HH also "un-does" superpositions:
    • H(∣0⟩+∣1⟩2)=∣0⟩H\left(\frac{|0\rangle + |1\rangle}{\sqrt{2}}\right) = |0\rangle
    • H(∣0⟩−∣1⟩2)=∣1⟩H\left(\frac{|0\rangle - |1\rangle}{\sqrt{2}}\right) = |1\rangle

Rotation Gate​

R(θ)=(cos⁡θsin⁡θ−sin⁡θcos⁡θ)R(\theta) = \begin{pmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{pmatrix}

  • R(θ)R(\theta) rotates the state vector by an angle θ\theta in the ∣0⟩|0\rangle-∣1⟩|1\rangle plane.

The Bloch Sphere​

Every single-qubit state ∣ψ⟩=cos⁡θ∣0⟩+eiϕsin⁡θ∣1⟩|\psi\rangle = \cos\theta|0\rangle + e^{i\phi}\sin\theta|1\rangle maps to a point on the surface of a unit sphere

  • θ\theta is polar angle from north pole
  • ϕ\phi is azimuthal angle around equator
  • ∣0⟩|0\rangle is at the north pole
  • ∣1⟩|1\rangle is at the south pole
  • ∣0⟩+∣1⟩2\frac{|0\rangle + |1\rangle}{\sqrt{2}} is on the equator at ϕ=0\phi=0

Exercises​

  1. For any two-dimensional state vector ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle = \alpha |0\rangle + \beta |1\rangle, it holds that ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1.
  2. Measuring a qubit in the {∣0⟩,∣1⟩}\{|0\rangle, |1\rangle\} basis yields a probabilistic outcome when both α\alpha and β\beta are non-zero.
  3. A global phase factor eiγe^{i\gamma} applied to a qubit state does not change the probabilities of measurement outcomes in the computational basis.
  4. The Bloch sphere represents all pure single-qubit states as points on the surface of the sphere.
  5. A real 2×22 \times 2 matrix is a valid quantum gate only if it is unitary, not merely invertible.
  6. The Pauli-X gate flips ∣0⟩|0\rangle to ∣1⟩|1\rangle and ∣1⟩|1\rangle to ∣0⟩|0\rangle.
  7. When a qubit is measured in a given basis, the state collapses to the basis state corresponding to the measurement outcome.
  8. Unitary matrices preserve the norm of any vector they act on.
  9. If ∣ψ⟩=cos⁡(θ)∣0⟩+eiϕsin⁡(θ)∣1⟩|\psi\rangle = \cos(\theta)|0\rangle + e^{i\phi}\sin(\theta)|1\rangle, then the probability of measuring ∣0⟩|0\rangle is cos⁡2(θ)\cos^2(\theta).
  10. The state 12∣0⟩+32∣1⟩\frac{1}{2}|0\rangle + \frac{\sqrt{3}}{2}|1\rangle is properly normalized.
  11. If ∣ψ⟩=13∣0⟩+23eiπ/4∣1⟩|\psi\rangle = \frac{1}{\sqrt{3}}|0\rangle + \sqrt{\frac{2}{3}} e^{i\pi/4}|1\rangle, then the probability of measuring ∣0⟩|0\rangle is 13\frac{1}{3}.
  12. The states 12(∣0⟩+∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle) and 12(∣0⟩−∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle - |1\rangle) are orthogonal.
  13. The Pauli-X matrix X=(0110)X = \begin{pmatrix}0 & 1 \\ 1 & 0\end{pmatrix} satisfies X2=IX^2 = I, where II is the 2×22 \times 2 identity matrix.
  14. Applying the Pauli-Z gate Z=(100−1)Z = \begin{pmatrix}1 & 0 \\ 0 & -1\end{pmatrix} to 12(∣0⟩+i∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle + i|1\rangle) produces 12(∣0⟩−i∣1⟩)\frac{1}{\sqrt{2}}(|0\rangle - i|1\rangle).