Lecture 2

Updated 27 Nov 2026

Quantum Bit as Probability Distribution

  • In quantum computing, we enable parallelism by:
    1. Converting a bitstring into a sequence of binary distributions
    2. Manipulating these distributions with complex matrix operations
    3. Sharing data structures via quantum entanglement and lazy evaluation
  • Quantum state for a binary distribution:

u=[αβ]⊤\mathbf{u} = \begin{bmatrix} \alpha & \beta \end{bmatrix}^{\top}

where α,β\alpha,\beta are complex coefficients, and

P(0∣u)=∣α∣2P(1∣u)=∣β∣2\boxed{P(0\mid\mathbf{u}) = |\alpha|^2} \qquad \boxed{P(1\mid\mathbf{u}) = |\beta|^2}

📝 Instructor's annotation: labeled α,β\alpha,\beta as "probability amplitudes," and drew a little wave symbol next to ∣0⟩|0\rangle and ∣1⟩|1\rangle, tagged "diff. phases." The point: α\alpha and β\beta aren't just sizes — each one can also carry its own complex phase (a "spin direction"), and that phase is what later lets quantum states interfere with each other.

💡 Analogy: Think of α\alpha and β\beta like the volume knobs on two speakers labeled "0" and "1." Squaring the volume tells you how likely you are to hear that speaker when you "measure" — but each speaker can also be playing at a different phase (timing offset), which is invisible to the volume meter alone but matters once you start mixing signals together.

  • Discrete binary values 00 and 11 can be represented as pure quantum states

∣0⟩=[10]⊤∣1⟩=[01]⊤|0\rangle = \begin{bmatrix} 1 & 0 \end{bmatrix}^{\top} \qquad |1\rangle = \begin{bmatrix} 0 & 1 \end{bmatrix}^{\top}

This notation is called 'ket'; e.g. ∣0⟩|0\rangle reads "ket-zero" and ∣1⟩|1\rangle reads "ket-one"

  • Meaning: ∣n⟩|n\rangle is a one-hot column vector on the nn-th position, where the index starts with 00, and nn is a binary number

📝 Instructor's annotation: worked a concrete example directly on the slide — ∣2⟩=[001⋮];←;index 2|2\rangle = \begin{bmatrix} 0 \\ 0 \\ 1 \\ \vdots \end{bmatrix} ;\leftarrow; \text{index } 2 making explicit that for a general one-hot state ∣n⟩|n\rangle, the single 11 sits at position nn, counting from 00.

💡 Analogy: ∣n⟩|n\rangle is like a row of light switches where exactly one switch is flipped "on." ∣2⟩|2\rangle means "the switch at position 2 (the third switch) is on, everything else is off." That single "on" switch is the state.

Dirac's Notation (Bra–Ket)

  • The adjoint of these vectors are

⟨0∣=∣0⟩∗=[10]⟨1∣=∣1⟩∗=[01]\langle 0| = |0\rangle^{*} = \begin{bmatrix} 1 & 0 \end{bmatrix} \qquad \langle 1| = |1\rangle^{*} = \begin{bmatrix} 0 & 1 \end{bmatrix}

This notation is called 'bra'

📝 Instructor's annotation: wrote "(conjugate transpose)" right under the "Dirac's Notation" title — a one-line reminder of what the adjoint (⋅)∗(\cdot)^{*} actually does: flip the vector from a column to a row (or back), and take the complex conjugate of every entry.

  • Meaning: ⟨n∣\langle n| is a one-hot row vector on the nn-th position
  • Dirac's notation: ∣n⟩|n\rangle and ⟨n∣\langle n|, where

⟨0∣0⟩=∣0⟩∨∣0⟩=1⟨0∣1⟩=∣0⟩∨∣1⟩=0\langle 0|0\rangle = |0\rangle \vee |0\rangle = 1 \qquad \langle 0|1\rangle = |0\rangle \vee |1\rangle = 0

📝 Instructor's annotation: spelled out the raw matrix multiplication behind each result, step by step: [10][10]=1×1+0×0=1[10][01]=1×0+0×1=0\begin{bmatrix} 1 & 0 \end{bmatrix}\begin{bmatrix} 1 \\ 0 \end{bmatrix} = 1{\times}1+0{\times}0 = 1 \qquad \begin{bmatrix} 1 & 0 \end{bmatrix}\begin{bmatrix} 0 \\ 1 \end{bmatrix} = 1{\times}0+0{\times}1 = 0

  • How about ⟨1∣1⟩\langle 1|1\rangle and ⟨1∣0⟩\langle 1|0\rangle? (By the same pattern: ⟨1∣1⟩=1\langle 1|1\rangle = 1 and ⟨1∣0⟩=0\langle 1|0\rangle = 0 — a bra and ket "match" only when they point at the same basis position.)

  • Mixed state: a mixture of pure states

∣ψ⟩=α∣0⟩+β∣1⟩=[αβ]⊤where ∣α∣2+∣β∣2=1\boxed{|\psi\rangle = \alpha|0\rangle + \beta|1\rangle = \begin{bmatrix} \alpha & \beta \end{bmatrix}^{\top}} \qquad \text{where } |\alpha|^2+|\beta|^2=1

  • Mixed state can also be seen as a superposition

∣ψ⟩=r1cis⁡θ1∣0⟩+r2cis⁡θ2∣1⟩|\psi\rangle = r_1 \operatorname{cis}\theta_1 |0\rangle + r_2\operatorname{cis}\theta_2|1\rangle

  • Adjoint of a mixed state

⟨ψ∣=∣ψ⟩∗=r1cis⁡(−θ1)⟨0∣+r2cis⁡(−θ2)⟨1∣\langle \psi| = |\psi\rangle^{*} = r_1\operatorname{cis}(-\theta_1)\langle 0| + r_2 \operatorname{cis}(-\theta_2)\langle 1|

💡 Analogy: cis⁡θ\operatorname{cis}\theta (short for cos⁡θ+isin⁡θ\cos\theta+i\sin\theta) is just a point on the unit circle at angle θ\theta — a "compass direction" for a phase. Taking the adjoint of a state is like looking at every one of its compass directions in a mirror: every angle θ\theta flips to −θ-\theta, and rows swap with columns.

Exercise 2.1 — Quantum State

📝 Instructor's annotation: wrote "all" next to the exercise title — a note to work through every part of this exercise, not just a selection.

Normalize the following vectors and rewrite them as mixed states in Dirac's notation.

  1. [10]⊤\begin{bmatrix}1 & 0\end{bmatrix}^{\top}
  2. [11]⊤\begin{bmatrix}1 & 1\end{bmatrix}^{\top}
  3. [cis⁡π41]⊤\begin{bmatrix}\operatorname{cis}\frac{\pi}{4} & 1\end{bmatrix}^{\top}
  4. [cis⁡π6cis⁡(−π6)]⊤\begin{bmatrix}\operatorname{cis}\frac{\pi}{6} & \operatorname{cis}(-\frac{\pi}{6})\end{bmatrix}^{\top}
  5. [i/4−i/6]⊤\begin{bmatrix}i/4 & -i/6\end{bmatrix}^{\top}
  6. [1i]⊤\begin{bmatrix}1 & i\end{bmatrix}^{\top}
  7. [0−1+i]⊤\begin{bmatrix}0 & -1+i\end{bmatrix}^{\top}

Answer the following questions.

  1. Compute the adjoints of all quantum states in Ex 1–7 and write them down in Dirac's notation.
  2. Suppose ∣ψ⟩=r1cis⁡θ1∣0⟩+r2cis⁡θ2∣1⟩|\psi\rangle = r_1\operatorname{cis}\theta_1|0\rangle+r_2\operatorname{cis}\theta_2|1\rangle. Show that ⟨ψ∣=r1cis⁡(−θ1)⟨0∣+r2cis⁡(−θ2)⟨1∣\langle\psi| = r_1\operatorname{cis}(-\theta_1)\langle 0|+r_2\operatorname{cis}(-\theta_2)\langle 1|
  3. Show that for any complex vector ∣ψ⟩=α∣0⟩+β∣1⟩|\psi\rangle=\alpha|0\rangle+\beta|1\rangle, ⟨ψ∣ψ⟩=∣α∣2+∣β∣2\langle\psi|\psi\rangle = |\alpha|^2+|\beta|^2 [Hint: u∨v=∑k=1Mukvk‾\mathbf{u}\vee\mathbf{v} = \sum_{k=1}^{M}u_k\overline{v_k}]

Compute the inner product ⟨ϕ∣ψ⟩\langle\phi|\psi\rangle of the following state pairs.

  1. ϕ=∣0⟩\phi=|0\rangle and ψ=∣0⟩\psi=|0\rangle
  2. ϕ=∣0⟩\phi=|0\rangle and ψ=−∣0⟩\psi=-|0\rangle
  3. ϕ=∣1⟩\phi=|1\rangle and ψ=∣0⟩\psi=|0\rangle
  4. ϕ=∣0⟩\phi=|0\rangle and ψ=i∣0⟩\psi=i|0\rangle
  5. ϕ=12(∣0⟩+∣1⟩)\phi=\frac{1}{\sqrt2}(|0\rangle+|1\rangle) and ψ=∣0⟩\psi=|0\rangle
  6. ϕ=12(∣0⟩+∣1⟩)\phi=\frac{1}{\sqrt2}(|0\rangle+|1\rangle) and ψ=cis⁡π4∣0⟩\psi=\operatorname{cis}\frac{\pi}{4}|0\rangle
  7. ϕ=12(∣0⟩+∣1⟩)\phi=\frac{1}{\sqrt2}(|0\rangle+|1\rangle) and ψ=−cis⁡π4∣1⟩\psi=-\operatorname{cis}\frac{\pi}{4}|1\rangle
  8. ϕ=12(i∣0⟩−i∣1⟩)\phi=\frac{1}{\sqrt2}(i|0\rangle - i|1\rangle) and ψ=−cis⁡π4∣1⟩\psi=-\operatorname{cis}\frac{\pi}{4}|1\rangle
  9. ϕ=12(cis⁡π3∣0⟩+cis⁡2π3∣1⟩)\phi=\frac{1}{\sqrt2}\left(\operatorname{cis}\frac{\pi}{3}|0\rangle+\operatorname{cis}\frac{2\pi}{3}|1\rangle\right) and ψ=12(cis⁡(−π3)∣0⟩+cis⁡π3∣1⟩)\psi=\frac{1}{\sqrt2}\left(\operatorname{cis}(-\frac{\pi}{3})|0\rangle+\operatorname{cis}\frac{\pi}{3}|1\rangle\right)

Answer the following questions.

  1. Compute ⟨ϕ∣ψ⟩\langle\phi|\psi\rangle, where ∣ϕ⟩=r1cis⁡θ∣0⟩+r2∣1⟩|\phi\rangle=r_1\operatorname{cis}\theta|0\rangle+r_2|1\rangle and ∣ψ⟩=r1∣0⟩+r2cis⁡(−θ)∣1⟩|\psi\rangle=r_1|0\rangle+r_2\operatorname{cis}(-\theta)|1\rangle
  2. Compute ⟨ϕ∣ψ⟩\langle\phi|\psi\rangle, where ∣ϕ⟩=r1cis⁡θ1∣0⟩+r2cis⁡θ2∣1⟩|\phi\rangle=r_1\operatorname{cis}\theta_1|0\rangle+r_2\operatorname{cis}\theta_2|1\rangle and ∣ψ⟩=s1cis⁡λ1∣0⟩+s2cis⁡λ2∣1⟩|\psi\rangle=s_1\operatorname{cis}\lambda_1|0\rangle+s_2\operatorname{cis}\lambda_2|1\rangle
  3. Show that for any quantum state ∣ψ⟩|\psi\rangle and phase θ\theta, ⟨cis⁡θ,ψ∣cis⁡θ,ψ⟩=⟨ψ∣ψ⟩\langle \operatorname{cis}\theta,\psi \mid \operatorname{cis}\theta,\psi\rangle = \langle\psi|\psi\rangle

2. Quantum Operators

What Is a Quantum Operator?

  • Inner product: phase synchronicity, which implies state similarity

⟨ϕ∣ψ⟩=∣ϕ⟩∨∣ψ⟩=∣ϕ⟩⊤∣ψ⟩‾\langle\phi|\psi\rangle = |\phi\rangle \vee |\psi\rangle = |\phi\rangle^{\top}\overline{|\psi\rangle}

  • Outer product: pairwise synchronicity, which implies state mapping ∣ψ⟩↦∣ϕ⟩|\psi\rangle \mapsto |\phi\rangle

∣ϕ⟩⟨ψ∣=∣ϕ⟩∧∣ψ⟩=∣ϕ⟩∣ψ⟩∗|\phi\rangle\langle\psi| = |\phi\rangle\wedge|\psi\rangle = |\phi\rangle|\psi\rangle^{*}

  • Quantum operator: is a unitary matrix

U=∑k=1K∣ϕk⟩⟨ψk∣\boxed{\mathbf{U} = \sum_{k=1}^{K}|\phi_k\rangle\langle\psi_k|}

where each (ψk,ϕk)(\psi_k,\phi_k) is a pair of input and output states

  • How does it work?

U∣q⟩=(∑k=1K∣ϕk⟩⟨ψk∣)∣q⟩=∑k=1K∣ϕk⟩(⟨ψk∣q⟩)=∑k=1K∣ϕk⟩⟨ψk∣q⟩\begin{aligned} \mathbf{U}|q\rangle &= \left(\sum_{k=1}^{K}|\phi_k\rangle\langle\psi_k|\right)|q\rangle \\ &= \sum_{k=1}^{K}|\phi_k\rangle\big(\langle\psi_k|q\rangle\big) \\ &= \sum_{k=1}^{K}|\phi_k\rangle\langle\psi_k|q\rangle \end{aligned}

📝 Instructor's annotation: labeled the two Greek letters directly — "ϕ\phi = phi" and "ψ\psi = psi" — then, on the final line, drew a brace under ∣ϕk⟩|\phi_k\rangle labeled "vector," and pointed at ⟨ψk∣q⟩\langle\psi_k|q\rangle with two labels: "complex number" and "sim btw. input ∣q⟩|q\rangle and state ∣ψk⟩|\psi_k\rangle."

💡 Analogy: Each term ∣ϕk⟩⟨ψk∣q⟩|\phi_k\rangle\langle\psi_k|q\rangle works like a vending machine: ⟨ψk∣q⟩\langle\psi_k|q\rangle is a single number measuring "how much does my input ∣q⟩|q\rangle resemble input-basis kk?" — then that number scales the output vector ∣ϕk⟩|\phi_k\rangle. Sum over all kk, and you get a blend of outputs weighted by how well the input matched each recipe.

  • Interpretation:
    1. Input state ∣q⟩|q\rangle is compared against each input basis ∣ψk⟩|\psi_k\rangle
    2. Each output basis ϕk\phi_k is multiplied by the input-state similarity ⟨ψk∣q⟩\langle\psi_k|q\rangle

Worked Example 1 — Building an Operator from a State Mapping

  • Suppose we want to construct a quantum operator from the following state mapping

∣0⟩↦∣0⟩+∣1⟩2∣1⟩↦∣0⟩−∣1⟩2|0\rangle \mapsto \frac{|0\rangle+|1\rangle}{\sqrt2} \qquad |1\rangle \mapsto \frac{|0\rangle-|1\rangle}{\sqrt2}

  • Our quantum operator is

U=∣0⟩+∣1⟩2∣0⟩∗+∣0⟩−∣1⟩2∣1⟩∗=∣0⟩+∣1⟩2⟨0∣+∣0⟩−∣1⟩2⟨1∣\begin{aligned} \mathbf{U} &= \frac{|0\rangle+|1\rangle}{\sqrt2}|0\rangle^{*} + \frac{|0\rangle-|1\rangle}{\sqrt2}|1\rangle^{*} \\ &= \frac{|0\rangle+|1\rangle}{\sqrt2}\langle 0| + \frac{|0\rangle-|1\rangle}{\sqrt2}\langle 1| \end{aligned}

📝 Instructor's annotation: broke the outer product down into its raw column-times-row matrix form, term by term: 12∣0⟩+12∣1⟩;=;[1/21/2][10];+;[1/2−1/2][01]\frac{1}{\sqrt2}|0\rangle+\frac{1}{\sqrt2}|1\rangle ;=; \begin{bmatrix}1/\sqrt2 \\ 1/\sqrt2\end{bmatrix}\begin{bmatrix}1 & 0\end{bmatrix} ;+; \begin{bmatrix}1/\sqrt2 \\ -1/\sqrt2\end{bmatrix}\begin{bmatrix}0 & 1\end{bmatrix} This is the mechanical heart of "ket times bra": a column vector times a row vector literally multiplies out into a full matrix.

  • Trick 1: Each ∣j⟩⟨k∣|j\rangle\langle k| represents the value at position (row jj, column kk)
    • We put 12(∣0⟩+∣1⟩)\frac{1}{\sqrt2}(|0\rangle+|1\rangle) into column 00
    • We put 12(∣0⟩−∣1⟩)\frac{1}{\sqrt2}(|0\rangle-|1\rangle) into column 11
  • Therefore, our quantum operator U\mathbf{U} is:

U=[121212−12]=12[111−1]\boxed{\mathbf{U} = \begin{bmatrix} \dfrac{1}{\sqrt2} & \dfrac{1}{\sqrt2} \\[6pt] \dfrac{1}{\sqrt2} & -\dfrac{1}{\sqrt2} \end{bmatrix} = \dfrac{1}{\sqrt2}\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}}

  • Beware: You always have to compute the adjoint of each input basis ⟨ψk∣\langle\psi_k|

💡 Analogy: This particular operator is the Hadamard gate — it takes a definite ∣0⟩|0\rangle or ∣1⟩|1\rangle and spreads it evenly into a 50/50 superposition, like a perfectly balanced coin-flip machine (with the ∣1⟩|1\rangle output picking up a negative sign for the second case).

Worked Example 2 — A Phase-Swap Operator

  • Now let's construct a quantum operator from the following state mapping

cis⁡π4∣0⟩↦∣1⟩cis⁡(−π4)∣1⟩↦∣0⟩\operatorname{cis}\frac{\pi}{4}|0\rangle \mapsto |1\rangle \qquad \operatorname{cis}(-\frac{\pi}{4})|1\rangle \mapsto |0\rangle

  • Remember: Always compute the adjoint of the input bases

U=∣1⟩(cis⁡π4∣0⟩)∗+∣0⟩(cis⁡(−π4)∣1⟩)∗=∣1⟩(cis⁡(−π4)⟨0∣)+∣0⟩(cis⁡π4⟨1∣)=cis⁡(−π4)∣1⟩⟨0∣+cis⁡π4∣0⟩⟨1∣\begin{aligned} \mathbf{U} &= |1\rangle\left(\operatorname{cis}\tfrac{\pi}{4}|0\rangle\right)^{*} + |0\rangle\left(\operatorname{cis}(-\tfrac{\pi}{4})|1\rangle\right)^{*} \\ &= |1\rangle\left(\operatorname{cis}(-\tfrac{\pi}{4})\langle 0|\right) + |0\rangle\left(\operatorname{cis}\tfrac{\pi}{4}\langle 1|\right) \\ &= \operatorname{cis}(-\tfrac{\pi}{4})|1\rangle\langle 0| + \operatorname{cis}\tfrac{\pi}{4}|0\rangle\langle 1| \end{aligned}

  • Trick 1: Each ∣j⟩⟨k∣|j\rangle\langle k| represents the value at position (row jj, column kk)
    • We put 0∣0⟩+cis⁡(−π4)∣1⟩0|0\rangle + \operatorname{cis}(-\frac{\pi}{4})|1\rangle into column 00
    • We put cis⁡π4∣0⟩+0∣1⟩\operatorname{cis}\frac{\pi}{4}|0\rangle + 0|1\rangle into column 11
  • Therefore, our quantum operator U\mathbf{U} is:

U=[0cis⁡π4cis⁡(−π4)0]\boxed{\mathbf{U} = \begin{bmatrix} 0 & \operatorname{cis}\dfrac{\pi}{4} \\[4pt] \operatorname{cis}(-\dfrac{\pi}{4}) & 0 \end{bmatrix}}

  • Trick 2: It is recommended to have unit input and output bases, because we want to avoid stretching
  • Trick 3: In most cases, the input bases are ∣0⟩|0\rangle and ∣1⟩|1\rangle for ease of understanding

Exercise 2.2 — Quantum Operator

Compute a quantum operator for the following state mappings.

  1. ∣0⟩↦∣1⟩|0\rangle \mapsto |1\rangle and ∣1⟩↦∣0⟩|1\rangle \mapsto |0\rangle
  2. ∣0⟩↦−i∣1⟩|0\rangle \mapsto -i|1\rangle and ∣1⟩↦i∣0⟩|1\rangle \mapsto i|0\rangle
  3. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦−∣1⟩|1\rangle \mapsto -|1\rangle
  4. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦i∣1⟩|1\rangle \mapsto i|1\rangle
  5. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦cis⁡(−π4)∣1⟩|1\rangle \mapsto \operatorname{cis}(-\frac{\pi}{4})|1\rangle
  6. ∣0⟩↦∣0⟩+∣1⟩2|0\rangle \mapsto \frac{|0\rangle+|1\rangle}{\sqrt2} and ∣1⟩↦∣0⟩−∣1⟩2|1\rangle \mapsto \frac{|0\rangle-|1\rangle}{\sqrt2}
  7. ∣0⟩+∣1⟩2↦∣0⟩\frac{|0\rangle+|1\rangle}{\sqrt2} \mapsto |0\rangle and ∣0⟩−∣1⟩2↦∣1⟩\frac{|0\rangle-|1\rangle}{\sqrt2} \mapsto |1\rangle
  8. cis⁡π4∣0⟩↦cis⁡π4∣1⟩\operatorname{cis}\frac{\pi}{4}|0\rangle \mapsto \operatorname{cis}\frac{\pi}{4}|1\rangle and cis⁡π4∣1⟩↦cis⁡π4∣0⟩\operatorname{cis}\frac{\pi}{4}|1\rangle \mapsto \operatorname{cis}\frac{\pi}{4}|0\rangle
  9. cis⁡(−π/4)∣0⟩+cis⁡(−π/4)∣1⟩2↦∣0⟩\dfrac{\operatorname{cis}(-\pi/4)|0\rangle+\operatorname{cis}(-\pi/4)|1\rangle}{\sqrt2} \mapsto |0\rangle and cis⁡(π/4)∣0⟩−cis⁡(π/4)∣1⟩2↦∣1⟩\dfrac{\operatorname{cis}(\pi/4)|0\rangle-\operatorname{cis}(\pi/4)|1\rangle}{\sqrt2} \mapsto |1\rangle

📝 Instructor's annotation: next to question 9, wrote "TRICK: CALM DOWN" — a light reassurance that even though the phase algebra looks intimidating, the same three tricks above still apply; there's no shortcut being hidden from you.

Answer the following questions.

  1. Show that for any quantum operator U\mathbf{U}, applying it twice on any quantum state yields the same state. UU∣ψ⟩=∣ψ⟩\mathbf{UU}|\psi\rangle = |\psi\rangle
  2. Show that if there exists a phase θ\theta such that all kk-th input–output pairs are in the form cis⁡θ∣ψk⟩↦cis⁡θ∣ϕk⟩\operatorname{cis}\theta|\psi_k\rangle \mapsto \operatorname{cis}\theta|\phi_k\rangle, then the quantum operator is U=∑k=1K∣ϕk⟩⟨ψk∣\mathbf{U} = \sum_{k=1}^{K}|\phi_k\rangle\langle\psi_k| θ\theta is called a global phase.

Extract a state mapping out of each quantum operator as follows.

  1. [1001]\begin{bmatrix}1&0\\0&1\end{bmatrix}
  2. [100−1]\begin{bmatrix}1&0\\0&-1\end{bmatrix}
  3. 12[111−1]\dfrac{1}{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix}
  4. [−i0i0]\begin{bmatrix}-i&0\\i&0\end{bmatrix}
  5. 12[cis⁡π4cis⁡π4cis⁡(−π4)−cis⁡(−π4)]\dfrac{1}{\sqrt2}\begin{bmatrix}\operatorname{cis}\frac{\pi}{4} & \operatorname{cis}\frac{\pi}{4} \\ \operatorname{cis}(-\frac{\pi}{4}) & -\operatorname{cis}(-\frac{\pi}{4})\end{bmatrix}

Answer the following questions.

  1. Show that any quantum operator U=[acbd]\mathbf{U} = \begin{bmatrix}a & c \\ b & d\end{bmatrix} can always be rewritten as U(λ)=[a−bˉcis⁡λbaˉcis⁡λ]\mathbf{U}(\lambda) = \begin{bmatrix}a & -\bar{b}\operatorname{cis}\lambda \\ b & \bar{a}\operatorname{cis}\lambda\end{bmatrix} for some phase λ\lambda. [Hint: U\mathbf{U} is a unitary matrix; i.e. U−1=U∗\mathbf{U}^{-1}=\mathbf{U}^{*} and det⁡(U)=1\det(\mathbf{U})=1. Note that U−1=1det⁡(U)[d−c−ba]\mathbf{U}^{-1} = \dfrac{1}{\det(\mathbf{U})}\begin{bmatrix}d & -c \\ -b & a\end{bmatrix}.]

3. Universal Rotation

The Bloch Sphere

  • Motivation: How can we represent such a probability distribution with a particle's spin in a unit sphere?
  • Spin coordinate is a vector function of polar angle θ\theta and azimuthal angle ϕ\phi

σ(θ,ϕ)=[sin⁡θcos⁡ϕsin⁡θsin⁡ϕcos⁡θ]\sigma(\theta,\phi) = \begin{bmatrix} \sin\theta\cos\phi \\ \sin\theta\sin\phi \\ \cos\theta \end{bmatrix}

  • Quantum state is like a Rubik's cube
    • Axis Z: ∣0⟩|0\rangle = up and ∣1⟩|1\rangle = down
    • Axis X: ∣+⟩|+\rangle = front and ∣−⟩|-\rangle = back
    • Axis Y: ∣+i⟩|{+i}\rangle = right and ∣−i⟩|{-i}\rangle = left

image-2 Caption — Figure 1: Bloch sphere. ∣0⟩|0\rangle sits at the top pole, ∣1⟩|1\rangle at the bottom pole; around the equator sit ∣+⟩|+\rangle (positive real), ∣−⟩|-\rangle (negative real), ∣+i⟩|{+i}\rangle (positive imaginary), and ∣−i⟩|{-i}\rangle (negative imaginary), with θ\theta measured down from the top pole and ϕ\phi swept around the equator.

💡 Analogy: The Bloch sphere is like a globe for a single qubit. The north pole is ∣0⟩|0\rangle, the south pole is ∣1⟩|1\rangle, and every point on the surface in between is a valid superposition — its latitude (θ\theta) sets the mix of ∣0⟩|0\rangle vs. ∣1⟩|1\rangle, and its longitude (ϕ\phi) sets the relative phase between them.

Spinors

  • Spinor (pronounced 'spinner') is an affine transformation that rotates a complex vector and slightly changes the sign of its phase in parallel
    • Non-spinning objects take a 360°360° full rotation: π\pi to flip the sign and 2π2\pi to return to the original sign
    • Spinning objects take a 720°720° full rotation: 2π2\pi to flip the sign and 4π4\pi to return to the original sign
  • Activity: Let's make a one-twist Möbius strip and observe a full rotation on it
  • The notion of spinor is applied only on the phase θ\theta to reflect the spin direction

image-3 Caption — Figure 2: Rotation on a one-twist Möbius strip. The printed figure marks a point on the strip's loop as "Original sign: +" at the start; after tracing one full loop around the strip, the same point comes back around with its sign flipped to "New sign: −." A second full loop is needed to return the point to "+". The instructor additionally hand-labeled the figure "Möbius strip."

💡 Analogy: A normal loop (like walking around a circular track) brings you back to exactly where you started after one lap. A one-twist Möbius strip is different — because of the twist, one lap brings you back to the same position but flipped to the "other side." You need a second lap to truly return to your starting orientation. Spinors (like electrons, and the phase of a qubit) behave the same way: a 360°360° rotation isn't quite "back to normal" — it takes 720°720°.

The 3-Step Universal Rotation

  • Any quantum operator is decomposed into a 3-step rotation: ω→θ2→ϕ\omega \to \frac{\theta}{2} \to \phi

image-4 Caption — Figure 3: Universal rotation, shown as four Bloch-sphere panels.

  • Start: the state begins pointing at ∣0⟩|0\rangle.
  • Step 1: rotate only ∣1⟩|1\rangle around Axis Z by phase ω\omega.
  • Step 2: rotate both ∣0⟩|0\rangle and ∣1⟩|1\rangle together around Axis X by phase θ/2\theta/2.
  • Step 3: rotate only ∣1⟩|1\rangle around Axis Z by phase ϕ\phi.

📝 Instructor's annotation: next to Step 2 (the θ/2\theta/2 rotation), wrote "like a spinor" — flagging that this middle step is exactly the spinor behavior described above: it's why the angle here is θ/2\theta/2 rather than θ\theta.

The Universal Rotation Operator: U3

  • All quantum operators are spinors (unitary operators equipped with sign flipping)

U3(ϕ,θ,ω)=[cos⁡θ2−cis⁡ωsin⁡θ2cis⁡ϕsin⁡θ2cis⁡(ϕ+ω)cos⁡θ2]\boxed{\mathbf{U}_3(\phi,\theta,\omega) = \begin{bmatrix} \cos\dfrac{\theta}{2} & -\operatorname{cis}\omega\sin\dfrac{\theta}{2} \\[6pt] \operatorname{cis}\phi\sin\dfrac{\theta}{2} & \operatorname{cis}(\phi+\omega)\cos\dfrac{\theta}{2} \end{bmatrix}}

This matrix representation was first proposed by IBM Quantum Platform.

  • The rotation matrix U3(ϕ,θ,ω)\mathbf{U}_3(\phi,\theta,\omega) can also be seen as a state mapping

∣0⟩↦cos⁡θ2∣0⟩+cis⁡ϕsin⁡θ2∣1⟩|0\rangle \mapsto \cos\frac{\theta}{2}|0\rangle + \operatorname{cis}\phi\sin\frac{\theta}{2}|1\rangle ∣1⟩↦−cis⁡ωsin⁡θ2∣0⟩+cis⁡(ϕ+ω)cos⁡θ2∣1⟩|1\rangle \mapsto -\operatorname{cis}\omega\sin\frac{\theta}{2}|0\rangle + \operatorname{cis}(\phi+\omega)\cos\frac{\theta}{2}|1\rangle

  • Inventing the rotation matrix:
    • Previously, we found that any quantum operator can be rewritten as U=[acbd]=[a−bˉcis⁡λbaˉcis⁡λ]\mathbf{U} = \begin{bmatrix}a & c \\ b & d\end{bmatrix} = \begin{bmatrix}a & -\bar{b}\operatorname{cis}\lambda \\ b & \bar{a}\operatorname{cis}\lambda\end{bmatrix}
    • Since U\mathbf{U} is unitary, each column should be a unit vector; i.e. aaˉ+bbˉ=1a\bar{a}+b\bar{b}=1
    • Motivated by cos⁡2x+sin⁡2x=1\cos^2x+\sin^2x=1, we choose a=cos⁡θ2a = \cos\dfrac{\theta}{2} due to the spinors
    • To make bb a complex number, we choose b=cis⁡ϕsin⁡θ2b = \operatorname{cis}\phi\sin\dfrac{\theta}{2}
    • Letting λ=ω+ϕ\lambda=\omega+\phi, we choose c=−bˉcis⁡(ω+ϕ)=−cis⁡ωsin⁡θ2c=-\bar{b}\operatorname{cis}(\omega+\phi) = -\operatorname{cis}\omega\sin\dfrac{\theta}{2}
    • Therefore, d=cos⁡θ2cis⁡(ω+ϕ)d = \cos\dfrac{\theta}{2}\operatorname{cis}(\omega+\phi)

Converting Any Operator to U3

  • Any quantum operator Q\mathbf{Q} can be converted to U3(ϕ,θ,ω)\mathbf{U}_3(\phi,\theta,\omega)

Q=[a1cis⁡λ1−a2cis⁡λ3a2cis⁡λ2a1cis⁡λ4]\mathbf{Q} = \begin{bmatrix} a_1\operatorname{cis}\lambda_1 & -a_2\operatorname{cis}\lambda_3 \\ a_2\operatorname{cis}\lambda_2 & a_1\operatorname{cis}\lambda_4 \end{bmatrix}

where all ak,λka_k,\lambda_k are real numbers

  • Steps:
    1. Rewrite Q\mathbf{Q} with the global phase λ1\lambda_1 Q′=[a1−a2cis⁡(λ3−λ1)a2cis⁡(λ2−λ1)a1cis⁡(λ4−λ1)]\mathbf{Q}' = \begin{bmatrix} a_1 & -a_2\operatorname{cis}(\lambda_3-\lambda_1) \\ a_2\operatorname{cis}(\lambda_2-\lambda_1) & a_1\operatorname{cis}(\lambda_4-\lambda_1) \end{bmatrix}
    2. We obtain θ,ϕ,ω\theta,\phi,\omega via

θ=2arccos⁡a1a12+a22ϕ=λ2−λ1ω=λ3−λ1\boxed{\theta = 2\arccos\dfrac{a_1}{\sqrt{a_1^2+a_2^2}}} \qquad \boxed{\phi=\lambda_2-\lambda_1} \qquad \boxed{\omega=\lambda_3-\lambda_1}

📝 Instructor's annotation: drew two arrows into the general Q\mathbf{Q} matrix, one pointing at each aka_k coefficient, both labeled "Each column must be a unit vector" — a reminder of why aka_k and the paired sine/cosine terms are constrained the way they are: unitarity forces every column of Q\mathbf{Q} to have length 1.

  • Example: Let's convert Q\mathbf{Q} to U3\mathbf{U}_3

Q=[111−1]\mathbf{Q} = \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}

  1. We rewrite Q\mathbf{Q} with the global phase 00
    Q′=[1−1cis⁡π1cis⁡01cis⁡π]\mathbf{Q}' = \begin{bmatrix} 1 & -1\operatorname{cis}\pi \\ 1\operatorname{cis}0 & 1\operatorname{cis}\pi \end{bmatrix}
  2. We extract θ,ϕ,ω\theta,\phi,\omega via:
    θ=2arccos⁡112+12=π2ϕ=0ω=π\theta=2\arccos\frac{1}{\sqrt{1^2+1^2}}=\frac{\pi}{2} \qquad \phi=0 \qquad \omega=\pi

Exercise 2.3 — Rotation Matrix U3

Convert the following quantum operators into the equivalent rotation matrices.

  1. [100−1]\begin{bmatrix}1&0\\0&-1\end{bmatrix}
  2. [0110]\begin{bmatrix}0&1\\1&0\end{bmatrix}
  3. 12[1−111]\dfrac{1}{\sqrt2}\begin{bmatrix}1&-1\\1&1\end{bmatrix}
  4. [−i0i0]\begin{bmatrix}-i&0\\i&0\end{bmatrix}
  5. 12[cis⁡π4cis⁡π4cis⁡(−π4)−cis⁡(−π4)]\dfrac{1}{\sqrt2}\begin{bmatrix}\operatorname{cis}\frac{\pi}{4} & \operatorname{cis}\frac{\pi}{4} \\ \operatorname{cis}(-\frac{\pi}{4}) & -\operatorname{cis}(-\frac{\pi}{4})\end{bmatrix}

Answer the following questions.

  1. Show that for any quantum operator Q=[a1cis⁡λ1−a2cis⁡λ3a2cis⁡λ2a1cis⁡λ4]\mathbf{Q} = \begin{bmatrix} a_1\operatorname{cis}\lambda_1 & -a_2\operatorname{cis}\lambda_3 \\ a_2\operatorname{cis}\lambda_2 & a_1\operatorname{cis}\lambda_4 \end{bmatrix} we can extract θ,ϕ,ω\theta,\phi,\omega for U3\mathbf{U}_3 via: θ=2arccos⁡a1a12+a22ϕ=λ2−λ1ω=λ3−λ1\theta = 2\arccos\dfrac{a_1}{\sqrt{a_1^2+a_2^2}} \qquad \phi=\lambda_2-\lambda_1 \qquad \omega=\lambda_3-\lambda_1

Convert the following state mappings into the equivalent rotation matrices.

  1. ∣0⟩↦∣1⟩|0\rangle \mapsto |1\rangle and ∣1⟩↦∣0⟩|1\rangle \mapsto |0\rangle
  2. ∣0⟩↦i∣1⟩|0\rangle \mapsto i|1\rangle and ∣1⟩↦−i∣0⟩|1\rangle \mapsto -i|0\rangle
  3. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦−∣1⟩|1\rangle \mapsto -|1\rangle
  4. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦i∣1⟩|1\rangle \mapsto i|1\rangle
  5. ∣0⟩↦∣0⟩|0\rangle \mapsto |0\rangle and ∣1⟩↦cis⁡(−π4)∣1⟩|1\rangle \mapsto \operatorname{cis}(-\frac{\pi}{4})|1\rangle
  6. ∣0⟩↦∣0⟩+∣1⟩2|0\rangle \mapsto \frac{|0\rangle+|1\rangle}{\sqrt2} and ∣1⟩↦∣0⟩−∣1⟩2|1\rangle \mapsto \frac{|0\rangle-|1\rangle}{\sqrt2}
  7. ∣0⟩+∣1⟩2↦∣0⟩\frac{|0\rangle+|1\rangle}{\sqrt2} \mapsto |0\rangle and ∣0⟩−∣1⟩2↦∣1⟩\frac{|0\rangle-|1\rangle}{\sqrt2} \mapsto |1\rangle
  8. cis⁡π4∣0⟩↦cis⁡π4∣1⟩\operatorname{cis}\frac{\pi}{4}|0\rangle \mapsto \operatorname{cis}\frac{\pi}{4}|1\rangle and cis⁡π4∣1⟩↦cis⁡π4∣0⟩\operatorname{cis}\frac{\pi}{4}|1\rangle \mapsto \operatorname{cis}\frac{\pi}{4}|0\rangle
  9. cis⁡(−π/4)∣0⟩+cis⁡(−π/4)∣1⟩2↦∣0⟩\dfrac{\operatorname{cis}(-\pi/4)|0\rangle+\operatorname{cis}(-\pi/4)|1\rangle}{\sqrt2} \mapsto |0\rangle and cis⁡(π/4)∣0⟩−cis⁡(π/4)∣1⟩2↦∣1⟩\dfrac{\operatorname{cis}(\pi/4)|0\rangle-\operatorname{cis}(\pi/4)|1\rangle}{\sqrt2} \mapsto |1\rangle

Answer the following questions.

  1. Explain briefly why it takes a 720°720° full rotation to return to the origin on a one-twist Möbius strip.
  2. Show that U3(ϕ1,θ1,ω1)U3(ϕ2,θ2,ω2)=U3(ϕ1+ϕ2, θ1+θ2, ω1+ω2)\mathbf{U}_3(\phi_1,\theta_1,\omega_1)\mathbf{U}_3(\phi_2,\theta_2,\omega_2) = \mathbf{U}_3(\phi_1+\phi_2,\ \theta_1+\theta_2,\ \omega_1+\omega_2)
  3. Show that U3∗(ϕ,θ,ω)=U3(−ω,−θ,−ϕ)\mathbf{U}_3^{*}(\phi,\theta,\omega) = \mathbf{U}_3(-\omega,-\theta,-\phi)

4. Multi-Qubit States

What Is a Multi-Qubit?

  • Multi-qubit is equivalent to a bitstring in classical computers, e.g. ∣10011⟩|10011\rangle is equivalent to binary 1001110011 (decimal 1919)
  • Multi-qubit of length NN is a one-hot vector of 2N2^N dimensions, where ∣s⟩|s\rangle has the one-hot position at ss, starting from 00
  • Example:

∣00⟩=[1000]⊤∣10⟩=[0010]⊤|00\rangle = \begin{bmatrix}1&0&0&0\end{bmatrix}^{\top} \qquad |10\rangle = \begin{bmatrix}0&0&1&0\end{bmatrix}^{\top} ∣000⟩=[10000000]⊤∣101⟩=[00000100]⊤|000\rangle = \begin{bmatrix}1&0&0&0&0&0&0&0\end{bmatrix}^{\top} \qquad |101\rangle = \begin{bmatrix}0&0&0&0&0&1&0&0\end{bmatrix}^{\top}

📝 Instructor's annotation: under each entry of the ∣00⟩|00\rangle and ∣10⟩|10\rangle vectors, wrote tiny basis labels — 00, 01, 10, 11 — directly beneath the four positions, so it's visually obvious which vector slot corresponds to which 2-qubit basis string.

  • Multi-qubit state is a superposition of multi-qubits ∣ϕk⟩|\phi_k\rangle and their coefficients αk\alpha_k:

∣ϕ⟩=α1∣ϕ1⟩+⋯+αK∣ϕK⟩\boxed{|\phi\rangle = \alpha_1|\phi_1\rangle+\dots+\alpha_K|\phi_K\rangle}

where the probability distribution for each multi-qubit is P(ϕk∣ϕ)=∣αk∣2P(\phi_k\mid\phi) = |\alpha_k|^2

  • Example: Consider the state ∣ϕ⟩|\phi\rangle

∣ϕ⟩=12∣00⟩+12∣11⟩|\phi\rangle = \frac{1}{\sqrt2}|00\rangle + \frac{1}{\sqrt2}|11\rangle

The distribution for each outcome is

P(00∣ϕ)=(1/2)2=0.5P(11∣ϕ)=(1/2)2=0.5P(00\mid\phi) = (1/\sqrt2)^2= 0.5 \qquad P(11\mid\phi) = (1/\sqrt2)^2= 0.5

💡 Analogy: A multi-qubit is still just "one switch on, all others off" — only now the switchboard is much bigger (2N2^N switches for NN qubits instead of 22). ∣101⟩|101\rangle simply means "the switch labeled 101 (decimal 5) is the one that's on."

Exercise 2.4 — Multi-Qubit State

Convert the following multi-qubit states to the equivalent vectors.

  1. ∣1⟩|1\rangle
  2. 12∣0⟩−12∣1⟩\frac{1}{\sqrt2}|0\rangle - \frac{1}{\sqrt2}|1\rangle
  3. 32∣10⟩+12∣11⟩\frac{\sqrt3}{2}|10\rangle + \frac{1}{2}|11\rangle
  4. 12(−i∣0⟩+i∣1⟩)\frac{1}{\sqrt2}(-i|0\rangle + i|1\rangle)
  5. 12(∣00⟩−∣01⟩+∣10⟩−∣11⟩)\frac{1}{2}(|00\rangle - |01\rangle + |10\rangle - |11\rangle)
  6. 12(∣010⟩+∣101⟩)\frac{1}{\sqrt2}(|010\rangle + |101\rangle)
  7. 12(cis⁡π4∣0110⟩−cis⁡(−π4)∣1110⟩)\frac{1}{\sqrt2}\left(\operatorname{cis}\frac{\pi}{4}|0110\rangle - \operatorname{cis}(-\frac{\pi}{4})|1110\rangle\right)
  8. 18∑k=000111cis⁡kπ4∣k⟩\dfrac{1}{\sqrt8}\displaystyle\sum_{k=000}^{111}\operatorname{cis}\dfrac{k\pi}{4}|k\rangle

Convert the following vectors to the equivalent multi-qubit states.

  1. [10]⊤\begin{bmatrix}1&0\end{bmatrix}^{\top}
  2. 12[i−i]⊤\dfrac{1}{\sqrt2}\begin{bmatrix}i & -i\end{bmatrix}^{\top}
  3. 12[cis⁡π4cis⁡(−π4)]⊤\dfrac{1}{\sqrt2}\begin{bmatrix}\operatorname{cis}\frac{\pi}{4} & \operatorname{cis}(-\frac{\pi}{4})\end{bmatrix}^{\top}
  4. 13[10−11]⊤\dfrac{1}{\sqrt3}\begin{bmatrix}1 & 0 & -1 & 1\end{bmatrix}^{\top}
  5. 12[100i0−1−i0]⊤\dfrac{1}{2}\begin{bmatrix}1 & 0 & 0 & i & 0 & -1 & -i & 0\end{bmatrix}^{\top}
  6. [12cis⁡π30032cis⁡2π3]⊤\begin{bmatrix}\frac{1}{2}\operatorname{cis}\frac{\pi}{3} & 0 & 0 & \frac{\sqrt3}{2}\operatorname{cis}\frac{2\pi}{3}\end{bmatrix}^{\top}

Tensor Product

  • Tensor product: We can construct a longer multi-qubit by enumeratively concatenating shorter multi-qubits
  • Suppose we have

∣ψ⟩=α1∣ψ1⟩+⋯+αK∣ψK⟩∣ϕ⟩=β1∣ϕ1⟩+⋯+βM∣ϕM⟩|\psi\rangle = \alpha_1|\psi_1\rangle+\dots+\alpha_K|\psi_K\rangle \qquad |\phi\rangle = \beta_1|\phi_1\rangle+\dots+\beta_M|\phi_M\rangle

  • Their tensor product is

∣ψ⟩⊗∣ϕ⟩=∑k=1K∑m=1Mαkβm∣ψkϕm⟩\boxed{|\psi\rangle \otimes |\phi\rangle = \sum_{k=1}^{K}\sum_{m=1}^{M}\alpha_k\beta_m|\psi_k\phi_m\rangle}

where the distribution for outcome ψkϕm\psi_k\phi_m becomes P(ψkϕm)=∣αkβm∣2P(\psi_k\phi_m)=|\alpha_k\beta_m|^2

  • Example: Let

∣ψ⟩=12∣01⟩+12∣10⟩∣ϕ⟩=12∣00⟩+12∣11⟩|\psi\rangle = \frac{1}{\sqrt2}|01\rangle + \frac{1}{\sqrt2}|10\rangle \qquad |\phi\rangle = \frac{1}{\sqrt2}|00\rangle + \frac{1}{\sqrt2}|11\rangle

We then have

∣ψ⟩⊗∣ϕ⟩=12∣0100⟩+12∣0111⟩+12∣1000⟩+12∣1011⟩\begin{aligned} |\psi\rangle \otimes |\phi\rangle &= \frac{1}{2}|0100\rangle + \frac{1}{2}|0111\rangle \\ &\quad + \frac{1}{2}|1000\rangle + \frac{1}{2}|1011\rangle \end{aligned}

Note that each outcome has equal probabilities (1/2)2=0.25(1/2)^2 = 0.25

💡 Analogy: The tensor product is like combining two independent menus into one combo menu: if ∣ψ⟩|\psi\rangle offers "01 or 10" and ∣ϕ⟩|\phi\rangle offers "00 or 11," the combined system offers every possible pairing (0100, 0111, 1000, 1011), each with a probability equal to the product of the two individual probabilities.

Factorizing Multi-Qubit States

Example: Factorize 12(∣00⟩+∣01⟩)\dfrac{1}{\sqrt2}(|00\rangle+|01\rangle).

  1. Factorization of two qubits means (a∣0⟩+b∣1⟩)⊗(c∣0⟩+d∣1⟩)=ac∣00⟩+ad∣01⟩+bc∣10⟩+bd∣11⟩(a|0\rangle+b|1\rangle)\otimes(c|0\rangle+d|1\rangle) = ac|00\rangle+ad|01\rangle+bc|10\rangle+bd|11\rangle
  2. We obtain the following equations ac=ad=1/2bc=bd=0ac=ad=1/\sqrt2 \qquad bc=bd=0
  3. Since c,d≠0c,d\neq0, therefore b=0b=0.
  4. Since c=dc=d, we therefore obtain:
    • Case 1: a=1/2, b=0, c=d=1a=1/\sqrt2,\ b=0,\ c=d=1
    • Case 2: a=1, b=0, c=d=1/2a=1,\ b=0,\ c=d=1/\sqrt2

Example: Factorize 12(∣00⟩+∣11⟩)\dfrac{1}{\sqrt2}(|00\rangle+|11\rangle).

  1. Factorization of two qubits means (a∣0⟩+b∣1⟩)⊗(c∣0⟩+d∣1⟩)=ac∣00⟩+ad∣01⟩+bc∣10⟩+bd∣11⟩(a|0\rangle+b|1\rangle)\otimes(c|0\rangle+d|1\rangle) = ac|00\rangle+ad|01\rangle+bc|10\rangle+bd|11\rangle
  2. We obtain the following equations ac=bd=1/2ad=bc=0ac=bd=1/\sqrt2 \qquad ad=bc=0
  3. Since a,b,c,d≠0a,b,c,d\neq0, there are no ways to allow ad=bc=0ad=bc=0.
  4. Therefore, there are no solutions for these equations. This multi-qubit state cannot be factorized any further.

💡 Analogy: Factorizing a state is like asking "can I split this recipe into two independent dishes cooked separately?" 12(∣00⟩+∣01⟩)\frac{1}{\sqrt2}(|00\rangle+|01\rangle) can — it's really just "qubit A is ∣0⟩|0\rangle" combined independently with "qubit B is a 50/50 mix." But 12(∣00⟩+∣11⟩)\frac{1}{\sqrt2}(|00\rangle+|11\rangle) can't be split at all — the two qubits are locked together (this is the first entangled state you meet in this chapter, formally introduced next).

Factorization Formulae

  • Common prefix ∣w⟩|w\rangle

∑k=1Nak∣wsk⟩=∣w⟩⊗(∑k=1Nak∣sk⟩)\boxed{\sum_{k=1}^{N}a_k|ws_k\rangle = |w\rangle \otimes \left(\sum_{k=1}^{N}a_k|s_k\rangle\right)}

  • Common suffix ∣w⟩|w\rangle

∑k=1Nak∣skw⟩=(∑k=1Nak∣sk⟩)⊗∣w⟩\boxed{\sum_{k=1}^{N}a_k|s_kw\rangle = \left(\sum_{k=1}^{N}a_k|s_k\rangle\right) \otimes |w\rangle}

  • Bit-flipped prefixes ∣w⟩|w\rangle and ∣w‾⟩|\overline{w}\rangle

∑k=1Nak(b∣wsk⟩+c∣w‾sk⟩)=(b∣w⟩+c∣w‾⟩)⊗(∑k=1Nak∣sk⟩)\boxed{\sum_{k=1}^{N}a_k\left(b|ws_k\rangle+c|\overline{w}s_k\rangle\right) = \left(b|w\rangle+c|\overline{w}\rangle\right)\otimes\left(\sum_{k=1}^{N}a_k|s_k\rangle\right)}

∑k=1Nak(b∣skw⟩+c∣skw‾⟩)=(∑k=1Nak∣sk⟩)⊗(b∣w⟩+c∣w‾⟩)\boxed{\sum_{k=1}^{N}a_k\left(b|s_kw\rangle+c|s_k\overline{w}\rangle\right) = \left(\sum_{k=1}^{N}a_k|s_k\rangle\right)\otimes\left(b|w\rangle+c|\overline{w}\rangle\right)}

Exercise 2.5 — Tensor Product and Factorization

Compute the following tensor products. Compare each of them against a lattice.

  1. ∣1⟩⊗∣0⟩|1\rangle\otimes|0\rangle
  2. ∣0⟩+∣1⟩2⊗∣0⟩−∣1⟩2\dfrac{|0\rangle+|1\rangle}{\sqrt2} \otimes \dfrac{|0\rangle-|1\rangle}{\sqrt2}
  3. ∣00⟩+∣11⟩2⊗∣0⟩−∣1⟩2\dfrac{|00\rangle+|11\rangle}{\sqrt2} \otimes \dfrac{|0\rangle-|1\rangle}{\sqrt2}
  4. ∣00⟩+∣11⟩2⊗∣01⟩+∣10⟩2\dfrac{|00\rangle+|11\rangle}{\sqrt2} \otimes \dfrac{|01\rangle+|10\rangle}{\sqrt2}
  5. ∣0⟩⊗∣0⟩+∣1⟩2⊗∣1⟩|0\rangle \otimes \dfrac{|0\rangle+|1\rangle}{\sqrt2} \otimes |1\rangle
  6. ∣0⟩+∣1⟩2⊗∣0⟩−∣1⟩2⊗∣0⟩+∣1⟩2\dfrac{|0\rangle+|1\rangle}{\sqrt2} \otimes \dfrac{|0\rangle-|1\rangle}{\sqrt2} \otimes \dfrac{|0\rangle+|1\rangle}{\sqrt2}
  7. ∣0⟩+∣1⟩2⊗∣01⟩+∣10⟩2⊗∣0⟩−∣1⟩2\dfrac{|0\rangle+|1\rangle}{\sqrt2} \otimes \dfrac{|01\rangle+|10\rangle}{\sqrt2} \otimes \dfrac{|0\rangle-|1\rangle}{\sqrt2}
  8. ∣00⟩+∣01⟩+∣10⟩3⊗∣01⟩+∣10⟩+∣11⟩3\dfrac{|00\rangle+|01\rangle+|10\rangle}{\sqrt3} \otimes \dfrac{|01\rangle+|10\rangle+|11\rangle}{\sqrt3}

Factorize the following multi-qubit states into as many tensor products as possible.

  1. 12(∣100⟩+∣101⟩)\frac{1}{\sqrt2}(|100\rangle+|101\rangle)
  2. 12(∣001⟩+∣101⟩)\frac{1}{\sqrt2}(|001\rangle+|101\rangle)
  3. 12(∣000⟩+∣001⟩+∣110⟩+∣111⟩)\frac{1}{2}(|000\rangle+|001\rangle+|110\rangle+|111\rangle)
  4. 12(∣001011⟩+∣000111⟩)\frac{1}{\sqrt2}(|001011\rangle+|000111\rangle)
  5. 12(∣1100⟩+∣1101⟩+∣1110⟩+∣1111⟩)\frac{1}{2}(|1100\rangle+|1101\rangle+|1110\rangle+|1111\rangle)
  6. 210∣100000⟩−110∣100100⟩+110∣101000⟩−210∣101100⟩\dfrac{2}{\sqrt{10}}|100000\rangle - \dfrac{1}{\sqrt{10}}|100100\rangle + \dfrac{1}{\sqrt{10}}|101000\rangle - \dfrac{2}{\sqrt{10}}|101100\rangle
  7. 12(∣001100⟩−∣111111⟩)\frac{1}{\sqrt2}(|001100\rangle-|111111\rangle)
  8. 13(∣1000⟩+∣0100⟩+∣0010⟩)\frac{1}{\sqrt3}(|1000\rangle+|0100\rangle+|0010\rangle) [hard]

Answer the following questions.

  1. Show that we cannot factorize 12(∣000⟩+∣111⟩)\frac{1}{\sqrt2}(|000\rangle+|111\rangle) any further.
  2. Show that if ∣w⟩|w\rangle is a multi-qubit of length N>1N>1, then we cannot factorize 12(∣w⟩+∣w‾⟩)\frac{1}{\sqrt2}(|w\rangle+|\overline{w}\rangle) any further.
  3. Show that if ∣w⟩|w\rangle and each ∣sk⟩|s_k\rangle are multi-qubits, then ∑k=1Nak∣wsk⟩=∣w⟩⊗∑k=1Nak∣sk⟩\sum_{k=1}^{N}a_k|ws_k\rangle = |w\rangle \otimes \sum_{k=1}^{N}a_k|s_k\rangle
  4. Show that if ∣w⟩|w\rangle and each ∣sk⟩|s_k\rangle are multi-qubits, then ∑k=1Nak∣skw⟩=(∑k=1Nak∣sk⟩)⊗∣w⟩\sum_{k=1}^{N}a_k|s_kw\rangle = \left(\sum_{k=1}^{N}a_k|s_k\rangle\right)\otimes|w\rangle

5. Quantum Entanglement

What Is Entanglement?

  • Entanglement: is the phenomenon where the quantum state of each particle in a group cannot be described independently of the others
  • If a multi-qubit state is factorizable, it can be decomposed into separate qubits
  • However, if it is unfactorizable, we say it is an entangled state
  • Properties
    • Measuring one particle in a group will destroy the superposition, causing all of them to reveal their pure states
    • Entangled states can be used for secure data sharing, where each particle carries shared secret information

image-5 Caption — Figure 4: Entangled states are created with the SPDC process (spontaneous parametric down-conversion) using Beta-Barium Borate (BBO) crystals — two thin crystal sheets with perpendicular polarizations. A photon particle enters the crystal and splits into two entangled particles (A and B). In 2024, it takes 10610^6 photon pumps to create just 1 pair of entangled particles — quantum entanglement is an expensive resource!

Categories of Quantum Entanglement

📝 Instructor's annotation: wrote "John S. Bell" above this slide — the physicist the Bell states are named after. Next to each of the four printed ∣Φ±⟩,∣Ψ±⟩|\Phi^{\pm}\rangle,|\Psi^{\pm}\rangle labels, the instructor also wrote the other Greek letter and crossed it out (e.g. a crossed-out ∣Ψ+⟩|\Psi^{+}\rangle sits beside the printed ∣Φ+⟩|\Phi^{+}\rangle) — a mnemonic against the common mix-up between Φ\Phi (same-value pairs: 00, 11) and Ψ\Psi (opposite-value pairs: 01, 10).

  • Category 1: Bell state

∣Φ+⟩=∣00⟩+∣11⟩2∣Φ−⟩=∣00⟩−∣11⟩2\boxed{|\Phi^{+}\rangle = \frac{|00\rangle+|11\rangle}{\sqrt2}} \qquad \boxed{|\Phi^{-}\rangle = \frac{|00\rangle-|11\rangle}{\sqrt2}}

∣Ψ+⟩=∣01⟩+∣10⟩2∣Ψ−⟩=∣01⟩−∣10⟩2\boxed{|\Psi^{+}\rangle = \frac{|01\rangle+|10\rangle}{\sqrt2}} \qquad \boxed{|\Psi^{-}\rangle = \frac{|01\rangle-|10\rangle}{\sqrt2}}

We refer to each qubit of the entangled state with letters A, B, C, …
For example, ΨA+\Psi^{+}_A and ΨB+\Psi^{+}_B are either (0,0)(0,0) or (1,1)(1,1)

💡 Analogy: Remember it as Φ\Phi = "same" (both qubits always agree: 00 or 11) and Ψ\Psi = "swapped" (the two qubits always disagree: 01 or 10) — matching the instructor's crossed-out reminder above.

  • Category 2: GHZ state (Greenberger, Horne, and Zeilinger)

∣GHZN⟩=∣0⟩⊗N+∣1⟩⊗N2\boxed{|\text{GHZ}_N\rangle = \frac{|0\rangle^{\otimes N}+|1\rangle^{\otimes N}}{\sqrt2}}

where ∣ψ⟩⊗N|\psi\rangle^{\otimes N} is NN repetitions of ∣ψ⟩|\psi\rangle

  • Category 3: W-state

∣WN⟩=1N∑k=1N∣onehot(k)⟩\boxed{|W_N\rangle = \frac{1}{\sqrt N}\sum_{k=1}^{N}|\text{onehot}(k)\rangle}

where onehot(k)\text{onehot}(k) is the one-hot vector at position kk

Quantum Robustness

  • Repetition ∣b⟩⊗N|b\rangle^{\otimes N} is more prone to quantum decoherence than ∣onehot(k)⟩|\text{onehot}(k)\rangle
  • One corrupted qubit (projected to either ∣0⟩|0\rangle or ∣1⟩|1\rangle) makes the remaining qubits disentangled
  • Example: Corruption on the third bit to ∣0⟩|0\rangle of the 3-qubit states is the projector:

P=∣00⟩⟨000∣+∣01⟩⟨010∣+∣10⟩⟨100∣+∣11⟩⟨110∣\mathbf{P} = |00\rangle\langle000| + |01\rangle\langle010| + |10\rangle\langle100| + |11\rangle\langle110|

Note that all multi-qubits ending with ∣1⟩|1\rangle are eliminated

📝 Instructor's annotation: introduced a compact shorthand for projectors like this one — PN@k\mathbf{P}_{N@k}, read as "the projector for NN total qubits, corrupted at position kk." So the projector above is P3@3\mathbf{P}_{3@3}. This is exactly the notation used later in Exercise 2.6 (e.g. P4@2\mathbf{P}_{4@2}).

📝 Instructor's annotation: also wrote "∗\ast Projector matrix can be non-square!" — unlike a quantum operator U\mathbf{U}, which must be square, a projector that "shrinks" a 3-qubit space down to a 2-qubit space (as here) is a rectangular matrix.

  • Case 1: We have a 3-qubit GHZ state

∣GHZ3⟩=12(∣000⟩+∣111⟩)|\text{GHZ}_3\rangle = \frac{1}{\sqrt2}(|000\rangle+|111\rangle)

The superposition collapses to the subspace whose third qubit is ∣0⟩|0\rangle

P∣GHZ3⟩=P(12(∣000⟩+∣111⟩))=∣00⟩=∣0⟩⊗∣0⟩\begin{aligned} \mathbf{P}|\text{GHZ}_3\rangle &= \mathbf{P}\left(\frac{1}{\sqrt2}(|000\rangle+|111\rangle)\right) \\ &= |00\rangle \\ &= |0\rangle \otimes |0\rangle \end{aligned}

The result is not an entangled state

  • GHZ states are fragile and intolerant to corrupted qubits

  • Case 2: We have a 3-qubit W-state

∣W3⟩=13(∣100⟩+∣010⟩+∣001⟩)|W_3\rangle = \frac{1}{\sqrt3}(|100\rangle+|010\rangle+|001\rangle)

The superposition collapses to the subspace whose third qubit is ∣0⟩|0\rangle

P∣W3⟩=P(13(∣100⟩+∣010⟩+∣001⟩))=12(∣10⟩+∣01⟩)\begin{aligned} \mathbf{P}|W_3\rangle &= \mathbf{P}\left(\frac{1}{\sqrt3}(|100\rangle+|010\rangle+|001\rangle)\right) \\ &= \frac{1}{\sqrt2}(|10\rangle+|01\rangle) \end{aligned}

The result is still an entangled state

  • W-states are more robust and tolerant to corrupted qubits

💡 Analogy: GHZ states are like a chain where every link says the exact same thing — break (measure) one link, and the "shared secret" of all links collapses at once into plain agreement (no entanglement left). W-states are like a game of musical chairs where "exactly one" qubit is excited — losing track of one player still leaves genuine uncertainty (and entanglement) among the rest.

Table 1: Comparison of quantum entanglement

Bell StateGHZ StateW-State
Qubit counts23 or more3 or more
RobustnessRobustFragileModerate
Creation complexitySimpleModerateHard
Error toleranceHighLowHigh
ApplicationsFundamental experimentsDistributed quantum computingDistributed quantum computing

Exercise 2.6 — Entanglement

Answer the following questions.

  1. Compute the projector matrix P4@2\mathbf{P}_{4@2} for corruption on the second bit to ∣1⟩|1\rangle of the 4-qubit states.
  2. Compute a 4-qubit GHZ state ∣GHZ4⟩|\text{GHZ}_4\rangle, and show that P4@2∣GHZ4⟩\mathbf{P}_{4@2}|\text{GHZ}_4\rangle is not an entangled state anymore.
  3. Compute a 4-qubit W-state ∣W4⟩|W_4\rangle, and show that P4@2∣W4⟩\mathbf{P}_{4@2}|W_4\rangle is still entangled.
  4. Compute the projector matrix PN@1\mathbf{P}_{N@1} for corruption on the first bit to ∣1⟩|1\rangle of the NN-qubit states.
  5. Show that ∣GHZN⟩|\text{GHZ}_N\rangle is more fragile than ∣WN⟩|W_N\rangle using the projector matrix PN@1\mathbf{P}_{N@1}.
  6. Suppose we have invented a new entangled state ∣QN⟩=∣0⟩⊗N⊗∣1⟩⊗N+∣1⟩⊗N⊗∣0⟩⊗N2|Q_N\rangle = \frac{|0\rangle^{\otimes N}\otimes|1\rangle^{\otimes N} + |1\rangle^{\otimes N}\otimes|0\rangle^{\otimes N}}{\sqrt2} Show that ∣QN⟩|Q_N\rangle is still as fragile as ∣GHZ2N⟩|\text{GHZ}_{2N}\rangle using the projector matrix.
  7. Explain why it is hard to create an entangled state with the SPDC process.

6. Multi-Qubit Quantum Operators

Building Multi-Qubit Gates

  • Quantum operator: is a unitary matrix

U=∑k=1K∣ϕk⟩⟨ψk∣\mathbf{U} = \sum_{k=1}^{K}|\phi_k\rangle\langle\psi_k|

where each (ψk,ϕk)(\psi_k,\phi_k) is a pair of input and output states, single- or multi-qubit

  • That means U\mathbf{U} is always a square matrix (unlike projectors, which can also be non-square)
  • Due to frugality reasons, multi-qubit quantum operators partially manipulate the input state to return the output

📝 Instructor's annotation: on the general formula U=∑k∣ϕk⟩⟨ψk∣\mathbf{U}=\sum_k|\phi_k\rangle\langle\psi_k|, labeled ⟨ψk∣\langle\psi_k| as "input" with the reminder "(don't forget the adjoint)", and labeled ∣ϕk⟩|\phi_k\rangle as "output." A compact restatement of "Beware" from Section 2: the input basis always needs its bra (adjoint) form.

Example — CNOT Gate

  • Let's construct a quantum operator that flips the second qubit if the first qubit is ∣1⟩|1\rangle; i.e.

∣00⟩↦∣00⟩∣01⟩↦∣01⟩∣10⟩↦∣11⟩∣11⟩↦∣10⟩|00\rangle\mapsto|00\rangle \qquad |01\rangle\mapsto|01\rangle \qquad |10\rangle\mapsto|11\rangle \qquad |11\rangle\mapsto|10\rangle

  • Our quantum operator becomes

CNOT=∣00⟩⟨00∣+∣01⟩⟨01∣+∣11⟩⟨10∣+∣10⟩⟨11∣\begin{aligned} \text{CNOT} &= |00\rangle\langle00| + |01\rangle\langle01| + |11\rangle\langle10| + |10\rangle\langle11| \end{aligned}

CNOT=[1000010000010010]\boxed{\text{CNOT} = \begin{bmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \end{bmatrix}}

💡 Analogy: CNOT is a quantum "if-then" switch: qubit 1 is the control (untouched), qubit 2 is the target. If the control reads 11, flip the target; if it reads 00, leave the target alone. It's the quantum-computing equivalent of an XOR gate.

Example — SWAP Gate

  • Let's construct a quantum operator that swaps both input qubits

∣00⟩↦∣00⟩∣01⟩↦∣10⟩∣10⟩↦∣01⟩∣11⟩↦∣11⟩|00\rangle\mapsto|00\rangle \qquad |01\rangle\mapsto|10\rangle \qquad |10\rangle\mapsto|01\rangle \qquad |11\rangle\mapsto|11\rangle

  • Our quantum operator becomes

SWAP=∣00⟩⟨00∣+∣10⟩⟨01∣+∣01⟩⟨10∣+∣11⟩⟨11∣\begin{aligned} \text{SWAP} &= |00\rangle\langle00| + |10\rangle\langle01| + |01\rangle\langle10| + |11\rangle\langle11| \end{aligned}

SWAP=[1000001001000001]\boxed{\text{SWAP} = \begin{bmatrix} 1&0&0&0 \\ 0&0&1&0 \\ 0&1&0&0 \\ 0&0&0&1 \end{bmatrix}}

Exercise 2.7 — Multi-Qubit Operators

Compute multi-qubit operators from the following state mappings.

  1. ∣00⟩↦∣01⟩, ∣01⟩↦∣00⟩, ∣10⟩↦∣10⟩,|00\rangle\mapsto|01\rangle,\ |01\rangle\mapsto|00\rangle,\ |10\rangle\mapsto|10\rangle, and ∣11⟩↦∣11⟩|11\rangle\mapsto|11\rangle
  2. ∣00⟩↦∣01⟩, ∣01⟩↦∣00⟩, ∣10⟩↦i∣11⟩,|00\rangle\mapsto|01\rangle,\ |01\rangle\mapsto|00\rangle,\ |10\rangle\mapsto i|11\rangle, and ∣11⟩↦i∣10⟩|11\rangle\mapsto i|10\rangle
  3. ∣00⟩↦∣00⟩, ∣01⟩↦∣01⟩, ∣10⟩↦∣10⟩+∣11⟩2,|00\rangle\mapsto|00\rangle,\ |01\rangle\mapsto|01\rangle,\ |10\rangle\mapsto \dfrac{|10\rangle+|11\rangle}{\sqrt2}, and ∣11⟩↦∣10⟩−∣11⟩2|11\rangle\mapsto \dfrac{|10\rangle-|11\rangle}{\sqrt2}
  4. ∣00⟩+∣01⟩2↦∣00⟩, ∣00⟩−∣01⟩2↦∣01⟩, ∣10⟩↦∣10⟩,\dfrac{|00\rangle+|01\rangle}{\sqrt2}\mapsto|00\rangle,\ \dfrac{|00\rangle-|01\rangle}{\sqrt2}\mapsto|01\rangle,\ |10\rangle\mapsto|10\rangle, and ∣11⟩↦∣11⟩|11\rangle\mapsto|11\rangle
  5. cis⁡π4∣00⟩↦∣01⟩, cis⁡(−π4)∣01⟩↦∣00⟩, ∣10⟩↦∣10⟩,\operatorname{cis}\frac{\pi}{4}|00\rangle\mapsto|01\rangle,\ \operatorname{cis}(-\frac{\pi}{4})|01\rangle\mapsto|00\rangle,\ |10\rangle\mapsto|10\rangle, and ∣11⟩↦∣11⟩|11\rangle\mapsto|11\rangle

Answer the following questions.

  1. Design a quantum operator whose state mapping is ∣0x⟩↦∣0x⟩|0x\rangle \mapsto |0x\rangle and ∣1x⟩↦∣1x‾⟩|1x\rangle \mapsto |1\overline{x}\rangle, where x‾\overline{x} denotes the bit flipping of xx.

    📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty.

  2. Design a quantum operator that imitates the NAND gate, whose state mapping is ∣xy⟩↦∣x∧y‾⟩⊗∣y⟩|xy\rangle \mapsto |\overline{x\wedge y}\rangle\otimes|y\rangle.

    📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty.

  3. Design a quantum operator that bit-flips the third qubit only if the first and second qubits are ∣1⟩|1\rangle, or preserves the third qubit otherwise.

    📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty. (This is the Toffoli / CCNOT gate.)

  4. Design a quantum operator whose state mapping is ∣xy⟩↦∣x∧y⟩⊗∣x∨y⟩|xy\rangle \mapsto |x\wedge y\rangle\otimes|x\vee y\rangle.

    📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty.


Conclusion

  • Quantum bits
  • Quantum operators
  • Universal rotation
  • Multi-qubit states
  • Quantum entanglement
  • Multi-qubit quantum operators

Target Learning Outcomes

Master Dirac Notation and Quantum State Representation

  • Translate between bitstring distributions, column vectors (kets), and row vectors (bras).
  • Calculate the adjoint of both pure and mixed quantum states.
  • Normalize complex vectors to represent valid mixed states (superpositions) where the sum of squared magnitudes equals 1.
  • Evaluate state similarity using the inner product and understand the concept of phase synchronicity.

Construct and Interpret Quantum Operators

  • Define a quantum operator as a unitary matrix and explain its function as a state mapping mechanism.
  • Synthesize quantum operators from specified state mappings using the outer product or "positional tricks" for matrix construction.
  • Analyze existing unitary matrices to extract their underlying state mappings.

Apply Universal Rotation Theory

  • Visualize quantum states using the Bloch Sphere and understand spin coordinates in terms of polar and azimuthal angles.
  • Decompose any quantum operator into a 3-step rotation using the U3 matrix representation.
  • Convert standard quantum operators into their equivalent U3 parameters by accounting for global phase.

Manipulate Multi-Qubit Systems and Mixed States

  • Represent multi-qubit bitstrings as high-dimensional one-hot vectors (e.g., 2N2^N dimensions for NN qubits).
  • Perform tensor products to construct longer multi-qubits from shorter ones.
  • Execute factorization of mixed states to determine if a multi-qubit system can be decomposed into independent qubits.

Evaluate Quantum Entanglement and Robustness

  • Identify entangled states as mixed states that are unfactorizable.
  • Distinguish between major entanglement categories, including Bell states, GHZ states, and W-states.
  • Assess quantum robustness by calculating how projectors (representing bit corruption) affect the entanglement of different states.
  • Compare the creation complexity and error tolerance of various entangled states in distributed quantum computing contexts.

Design Multi-Qubit Logic Gates

  • Construct complex multi-qubit operators like CNOT and SWAP from conditional state mappings.
  • Design functional quantum gates that imitate classical logic, such as the NAND gate or conditional bit-flippers (Toffoli-style gates).