Converting a bitstring into a sequence of binary distributions
Manipulating these distributions with complex matrix operations
Sharing data structures via quantum entanglement and lazy evaluation
Quantum state for a binary distribution:
u=[αβ]⊤
where α,β are complex coefficients, and
P(0∣u)=∣α∣2P(1∣u)=∣β∣2
📝 Instructor's annotation: labeled α,β as "probability amplitudes," and drew a little wave symbol next to ∣0⟩ and ∣1⟩, tagged "diff. phases." The point: α and β 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 α and β 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 0 and 1 can be represented as pure quantum states
∣0⟩=[10]⊤∣1⟩=[01]⊤
This notation is called 'ket'; e.g. ∣0⟩ reads "ket-zero" and ∣1⟩ reads "ket-one"
Meaning: ∣n⟩ is a one-hot column vector on the n-th position, where the index starts with 0, and n is a binary number
📝 Instructor's annotation: worked a concrete example directly on the slide — ∣2⟩=001⋮;←;index 2 making explicit that for a general one-hot state ∣n⟩, the single 1 sits at position n, counting from 0.
💡 Analogy:∣n⟩ is like a row of light switches where exactly one switch is flipped "on." ∣2⟩ 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]
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 (⋅)∗ actually does: flip the vector from a column to a row (or back), and take the complex conjugate of every entry.
Meaning: ⟨n∣ is a one-hot row vector on the n-th position
Dirac's notation: ∣n⟩ and ⟨n∣, where
⟨0∣0⟩=∣0⟩∨∣0⟩=1⟨0∣1⟩=∣0⟩∨∣1⟩=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
How about ⟨1∣1⟩ and ⟨1∣0⟩? (By the same pattern: ⟨1∣1⟩=1 and ⟨1∣0⟩=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
Mixed state can also be seen as a superposition
∣ψ⟩=r1cisθ1∣0⟩+r2cisθ2∣1⟩
Adjoint of a mixed state
⟨ψ∣=∣ψ⟩∗=r1cis(−θ1)⟨0∣+r2cis(−θ2)⟨1∣
💡 Analogy:cisθ (short for cosθ+isinθ) is just a point on the unit circle at angle θ — 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 θ flips to −θ, 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.
[10]⊤
[11]⊤
[cis4π1]⊤
[cis6πcis(−6π)]⊤
[i/4−i/6]⊤
[1i]⊤
[0−1+i]⊤
Answer the following questions.
Compute the adjoints of all quantum states in Ex 1–7 and write them down in Dirac's notation.
Suppose ∣ψ⟩=r1cisθ1∣0⟩+r2cisθ2∣1⟩. Show that ⟨ψ∣=r1cis(−θ1)⟨0∣+r2cis(−θ2)⟨1∣
Show that for any complex vector ∣ψ⟩=α∣0⟩+β∣1⟩, ⟨ψ∣ψ⟩=∣α∣2+∣β∣2 [Hint: u∨v=∑k=1Mukvk]
Compute the inner product ⟨ϕ∣ψ⟩ of the following state pairs.
ϕ=∣0⟩ and ψ=∣0⟩
ϕ=∣0⟩ and ψ=−∣0⟩
ϕ=∣1⟩ and ψ=∣0⟩
ϕ=∣0⟩ and ψ=i∣0⟩
ϕ=21(∣0⟩+∣1⟩) and ψ=∣0⟩
ϕ=21(∣0⟩+∣1⟩) and ψ=cis4π∣0⟩
ϕ=21(∣0⟩+∣1⟩) and ψ=−cis4π∣1⟩
ϕ=21(i∣0⟩−i∣1⟩) and ψ=−cis4π∣1⟩
ϕ=21(cis3π∣0⟩+cis32π∣1⟩) and ψ=21(cis(−3π)∣0⟩+cis3π∣1⟩)
Answer the following questions.
Compute ⟨ϕ∣ψ⟩, where ∣ϕ⟩=r1cisθ∣0⟩+r2∣1⟩ and ∣ψ⟩=r1∣0⟩+r2cis(−θ)∣1⟩
Compute ⟨ϕ∣ψ⟩, where ∣ϕ⟩=r1cisθ1∣0⟩+r2cisθ2∣1⟩ and ∣ψ⟩=s1cisλ1∣0⟩+s2cisλ2∣1⟩
Show that for any quantum state ∣ψ⟩ and phase θ, ⟨cisθ,ψ∣cisθ,ψ⟩=⟨ψ∣ψ⟩
📝 Instructor's annotation: labeled the two Greek letters directly — "ϕ = phi" and "ψ = psi" — then, on the final line, drew a brace under ∣ϕk⟩ labeled "vector," and pointed at ⟨ψk∣q⟩ with two labels: "complex number" and "sim btw. input ∣q⟩ and state ∣ψk⟩."
💡 Analogy: Each term ∣ϕk⟩⟨ψk∣q⟩ works like a vending machine: ⟨ψk∣q⟩ is a single number measuring "how much does my input ∣q⟩ resemble input-basis k?" — then that number scales the output vector ∣ϕk⟩. Sum over all k, and you get a blend of outputs weighted by how well the input matched each recipe.
Interpretation:
Input state ∣q⟩ is compared against each input basis ∣ψk⟩
Each output basis ϕk is multiplied by the input-state similarity ⟨ψk∣q⟩
Worked Example 1 — Building an Operator from a State Mapping
Suppose we want to construct a quantum operator from the following state mapping
📝 Instructor's annotation: broke the outer product down into its raw column-times-row matrix form, term by term: 21∣0⟩+21∣1⟩;=;[1/21/2][10];+;[1/2−1/2][01] 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∣ represents the value at position (row j, column k)
We put 21(∣0⟩+∣1⟩) into column 0
We put 21(∣0⟩−∣1⟩) into column 1
Therefore, our quantum operator U is:
U=212121−21=21[111−1]
Beware: You always have to compute the adjoint of each input basis ⟨ψk∣
💡 Analogy: This particular operator is the Hadamard gate — it takes a definite ∣0⟩ or ∣1⟩ and spreads it evenly into a 50/50 superposition, like a perfectly balanced coin-flip machine (with the ∣1⟩ 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
cis4π∣0⟩↦∣1⟩cis(−4π)∣1⟩↦∣0⟩
Remember: Always compute the adjoint of the input bases
Trick 1: Each ∣j⟩⟨k∣ represents the value at position (row j, column k)
We put 0∣0⟩+cis(−4π)∣1⟩ into column 0
We put cis4π∣0⟩+0∣1⟩ into column 1
Therefore, our quantum operator U is:
U=0cis(−4π)cis4π0
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⟩ and ∣1⟩ for ease of understanding
Exercise 2.2 — Quantum Operator
Compute a quantum operator for the following state mappings.
∣0⟩↦∣1⟩ and ∣1⟩↦∣0⟩
∣0⟩↦−i∣1⟩ and ∣1⟩↦i∣0⟩
∣0⟩↦∣0⟩ and ∣1⟩↦−∣1⟩
∣0⟩↦∣0⟩ and ∣1⟩↦i∣1⟩
∣0⟩↦∣0⟩ and ∣1⟩↦cis(−4π)∣1⟩
∣0⟩↦2∣0⟩+∣1⟩ and ∣1⟩↦2∣0⟩−∣1⟩
2∣0⟩+∣1⟩↦∣0⟩ and 2∣0⟩−∣1⟩↦∣1⟩
cis4π∣0⟩↦cis4π∣1⟩ and cis4π∣1⟩↦cis4π∣0⟩
2cis(−π/4)∣0⟩+cis(−π/4)∣1⟩↦∣0⟩ and 2cis(π/4)∣0⟩−cis(π/4)∣1⟩↦∣1⟩
📝 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.
Show that for any quantum operator U, applying it twice on any quantum state yields the same state. UU∣ψ⟩=∣ψ⟩
Show that if there exists a phase θ such that all k-th input–output pairs are in the form cisθ∣ψk⟩↦cisθ∣ϕk⟩, then the quantum operator is U=k=1∑K∣ϕk⟩⟨ψk∣θ is called a global phase.
Extract a state mapping out of each quantum operator as follows.
[1001]
[100−1]
21[111−1]
[−ii00]
21[cis4πcis(−4π)cis4π−cis(−4π)]
Answer the following questions.
Show that any quantum operator U=[abcd] can always be rewritten as U(λ)=[ab−bˉcisλaˉcisλ] for some phase λ. [Hint: U is a unitary matrix; i.e. U−1=U∗ and det(U)=1. Note that U−1=det(U)1[d−b−ca].]
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 θ and azimuthal angle ϕ
σ(θ,ϕ)=sinθcosϕsinθsinϕcosθ
Quantum state is like a Rubik's cube
Axis Z: ∣0⟩ = up and ∣1⟩ = down
Axis X: ∣+⟩ = front and ∣−⟩ = back
Axis Y: ∣+i⟩ = right and ∣−i⟩ = left
image-2Caption — Figure 1: Bloch sphere. ∣0⟩ sits at the top pole, ∣1⟩ at the bottom pole; around the equator sit ∣+⟩ (positive real), ∣−⟩ (negative real), ∣+i⟩ (positive imaginary), and ∣−i⟩ (negative imaginary), with θ measured down from the top pole and ϕ swept around the equator.
💡 Analogy: The Bloch sphere is like a globe for a single qubit. The north pole is ∣0⟩, the south pole is ∣1⟩, and every point on the surface in between is a valid superposition — its latitude (θ) sets the mix of ∣0⟩ vs. ∣1⟩, and its longitude (ϕ) 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° full rotation: π to flip the sign and 2π to return to the original sign
Spinning objects take a 720° full rotation: 2π to flip the sign and 4π 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 θ to reflect the spin direction
image-3Caption — 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° rotation isn't quite "back to normal" — it takes 720°.
The 3-Step Universal Rotation
Any quantum operator is decomposed into a 3-step rotation: ω→2θ→ϕ
image-4Caption — Figure 3: Universal rotation, shown as four Bloch-sphere panels.
Start: the state begins pointing at ∣0⟩.
Step 1: rotate only ∣1⟩ around Axis Z by phase ω.
Step 2: rotate both ∣0⟩ and ∣1⟩ together around Axis X by phase θ/2.
Step 3: rotate only ∣1⟩ around Axis Z by phase ϕ.
📝 Instructor's annotation: next to Step 2 (the θ/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 rather than θ.
The Universal Rotation Operator: U3
All quantum operators are spinors (unitary operators equipped with sign flipping)
Previously, we found that any quantum operator can be rewritten as U=[abcd]=[ab−bˉcisλaˉcisλ]
Since U is unitary, each column should be a unit vector; i.e. aaˉ+bbˉ=1
Motivated by cos2x+sin2x=1, we choose a=cos2θ due to the spinors
To make b a complex number, we choose b=cisϕsin2θ
Letting λ=ω+ϕ, we choose c=−bˉcis(ω+ϕ)=−cisωsin2θ
Therefore, d=cos2θcis(ω+ϕ)
Converting Any Operator to U3
Any quantum operator Q can be converted to U3(ϕ,θ,ω)
Q=[a1cisλ1a2cisλ2−a2cisλ3a1cisλ4]
where all ak,λk are real numbers
Steps:
Rewrite Q with the global phase λ1Q′=[a1a2cis(λ2−λ1)−a2cis(λ3−λ1)a1cis(λ4−λ1)]
We obtain θ,ϕ,ω via
θ=2arccosa12+a22a1ϕ=λ2−λ1ω=λ3−λ1
📝 Instructor's annotation: drew two arrows into the general Q matrix, one pointing at each ak coefficient, both labeled "Each column must be a unit vector" — a reminder of whyak and the paired sine/cosine terms are constrained the way they are: unitarity forces every column of Q to have length 1.
Example: Let's convert Q to U3
Q=[111−1]
We rewrite Q with the global phase 0 Q′=[11cis0−1cisπ1cisπ]
We extract θ,ϕ,ω via: θ=2arccos12+121=2πϕ=0ω=π
Exercise 2.3 — Rotation Matrix U3
Convert the following quantum operators into the equivalent rotation matrices.
[100−1]
[0110]
21[11−11]
[−ii00]
21[cis4πcis(−4π)cis4π−cis(−4π)]
Answer the following questions.
Show that for any quantum operator Q=[a1cisλ1a2cisλ2−a2cisλ3a1cisλ4] we can extract θ,ϕ,ω for U3 via: θ=2arccosa12+a22a1ϕ=λ2−λ1ω=λ3−λ1
Convert the following state mappings into the equivalent rotation matrices.
∣0⟩↦∣1⟩ and ∣1⟩↦∣0⟩
∣0⟩↦i∣1⟩ and ∣1⟩↦−i∣0⟩
∣0⟩↦∣0⟩ and ∣1⟩↦−∣1⟩
∣0⟩↦∣0⟩ and ∣1⟩↦i∣1⟩
∣0⟩↦∣0⟩ and ∣1⟩↦cis(−4π)∣1⟩
∣0⟩↦2∣0⟩+∣1⟩ and ∣1⟩↦2∣0⟩−∣1⟩
2∣0⟩+∣1⟩↦∣0⟩ and 2∣0⟩−∣1⟩↦∣1⟩
cis4π∣0⟩↦cis4π∣1⟩ and cis4π∣1⟩↦cis4π∣0⟩
2cis(−π/4)∣0⟩+cis(−π/4)∣1⟩↦∣0⟩ and 2cis(π/4)∣0⟩−cis(π/4)∣1⟩↦∣1⟩
Answer the following questions.
Explain briefly why it takes a 720° full rotation to return to the origin on a one-twist Möbius strip.
Show that U3(ϕ1,θ1,ω1)U3(ϕ2,θ2,ω2)=U3(ϕ1+ϕ2,θ1+θ2,ω1+ω2)
Show that U3∗(ϕ,θ,ω)=U3(−ω,−θ,−ϕ)
4. Multi-Qubit States
What Is a Multi-Qubit?
Multi-qubit is equivalent to a bitstring in classical computers, e.g. ∣10011⟩ is equivalent to binary 10011 (decimal 19)
Multi-qubit of length N is a one-hot vector of 2N dimensions, where ∣s⟩ has the one-hot position at s, starting from 0
📝 Instructor's annotation: under each entry of the ∣00⟩ and ∣10⟩ 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⟩ and their coefficients αk:
∣ϕ⟩=α1∣ϕ1⟩+⋯+αK∣ϕK⟩
where the probability distribution for each multi-qubit is P(ϕk∣ϕ)=∣αk∣2
Example: Consider the state ∣ϕ⟩
∣ϕ⟩=21∣00⟩+21∣11⟩
The distribution for each outcome is
P(00∣ϕ)=(1/2)2=0.5P(11∣ϕ)=(1/2)2=0.5
💡 Analogy: A multi-qubit is still just "one switch on, all others off" — only now the switchboard is much bigger (2N switches for N qubits instead of 2). ∣101⟩ 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⟩
21∣0⟩−21∣1⟩
23∣10⟩+21∣11⟩
21(−i∣0⟩+i∣1⟩)
21(∣00⟩−∣01⟩+∣10⟩−∣11⟩)
21(∣010⟩+∣101⟩)
21(cis4π∣0110⟩−cis(−4π)∣1110⟩)
81k=000∑111cis4kπ∣k⟩
Convert the following vectors to the equivalent multi-qubit states.
[10]⊤
21[i−i]⊤
21[cis4πcis(−4π)]⊤
31[10−11]⊤
21[100i0−1−i0]⊤
[21cis3π0023cis32π]⊤
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⟩
Their tensor product is
∣ψ⟩⊗∣ϕ⟩=k=1∑Km=1∑Mαkβm∣ψkϕm⟩
where the distribution for outcome ψkϕm becomes P(ψkϕm)=∣αkβm∣2
Example: Let
∣ψ⟩=21∣01⟩+21∣10⟩∣ϕ⟩=21∣00⟩+21∣11⟩
We then have
∣ψ⟩⊗∣ϕ⟩=21∣0100⟩+21∣0111⟩+21∣1000⟩+21∣1011⟩
Note that each outcome has equal probabilities (1/2)2=0.25
💡 Analogy: The tensor product is like combining two independent menus into one combo menu: if ∣ψ⟩ offers "01 or 10" and ∣ϕ⟩ 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 21(∣00⟩+∣01⟩).
Factorization of two qubits means (a∣0⟩+b∣1⟩)⊗(c∣0⟩+d∣1⟩)=ac∣00⟩+ad∣01⟩+bc∣10⟩+bd∣11⟩
We obtain the following equations ac=ad=1/2bc=bd=0
Since c,d=0, therefore b=0.
Since c=d, we therefore obtain:
Case 1: a=1/2,b=0,c=d=1
Case 2: a=1,b=0,c=d=1/2
Example: Factorize 21(∣00⟩+∣11⟩).
Factorization of two qubits means (a∣0⟩+b∣1⟩)⊗(c∣0⟩+d∣1⟩)=ac∣00⟩+ad∣01⟩+bc∣10⟩+bd∣11⟩
We obtain the following equations ac=bd=1/2ad=bc=0
Since a,b,c,d=0, there are no ways to allow ad=bc=0.
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?" 21(∣00⟩+∣01⟩) can — it's really just "qubit A is ∣0⟩" combined independently with "qubit B is a 50/50 mix." But 21(∣00⟩+∣11⟩) 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).
Show that we cannot factorize 21(∣000⟩+∣111⟩) any further.
Show that if ∣w⟩ is a multi-qubit of length N>1, then we cannot factorize 21(∣w⟩+∣w⟩) any further.
Show that if ∣w⟩ and each ∣sk⟩ are multi-qubits, then k=1∑Nak∣wsk⟩=∣w⟩⊗k=1∑Nak∣sk⟩
Show that if ∣w⟩ and each ∣sk⟩ are multi-qubits, then k=1∑Nak∣skw⟩=(k=1∑Nak∣sk⟩)⊗∣w⟩
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-5Caption — 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 106 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 ∣Φ±⟩,∣Ψ±⟩ labels, the instructor also wrote the other Greek letter and crossed it out (e.g. a crossed-out ∣Ψ+⟩ sits beside the printed ∣Φ+⟩) — a mnemonic against the common mix-up between Φ (same-value pairs: 00, 11) and Ψ (opposite-value pairs: 01, 10).
Category 1: Bell state
∣Φ+⟩=2∣00⟩+∣11⟩∣Φ−⟩=2∣00⟩−∣11⟩
∣Ψ+⟩=2∣01⟩+∣10⟩∣Ψ−⟩=2∣01⟩−∣10⟩
We refer to each qubit of the entangled state with letters A, B, C, …
For example, ΨA+ and ΨB+ are either (0,0) or (1,1)
💡 Analogy: Remember it as Φ = "same" (both qubits always agree: 00 or 11) and Ψ = "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⟩=2∣0⟩⊗N+∣1⟩⊗N
where ∣ψ⟩⊗N is N repetitions of ∣ψ⟩
Category 3: W-state
∣WN⟩=N1k=1∑N∣onehot(k)⟩
where onehot(k) is the one-hot vector at position k
Quantum Robustness
Repetition ∣b⟩⊗N is more prone to quantum decoherence than ∣onehot(k)⟩
One corrupted qubit (projected to either ∣0⟩ or ∣1⟩) makes the remaining qubits disentangled
Example: Corruption on the third bit to ∣0⟩ of the 3-qubit states is the projector:
P=∣00⟩⟨000∣+∣01⟩⟨010∣+∣10⟩⟨100∣+∣11⟩⟨110∣
Note that all multi-qubits ending with ∣1⟩ are eliminated
📝 Instructor's annotation: introduced a compact shorthand for projectors like this one — PN@k, read as "the projector for N total qubits, corrupted at position k." So the projector above is P3@3. This is exactly the notation used later in Exercise 2.6 (e.g. P4@2).
📝 Instructor's annotation: also wrote "∗ Projector matrix can be non-square!" — unlike a quantum operator 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⟩=21(∣000⟩+∣111⟩)
The superposition collapses to the subspace whose third qubit is ∣0⟩
P∣GHZ3⟩=P(21(∣000⟩+∣111⟩))=∣00⟩=∣0⟩⊗∣0⟩
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⟩=31(∣100⟩+∣010⟩+∣001⟩)
The superposition collapses to the subspace whose third qubit is ∣0⟩
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 State
GHZ State
W-State
Qubit counts
2
3 or more
3 or more
Robustness
Robust
Fragile
Moderate
Creation complexity
Simple
Moderate
Hard
Error tolerance
High
Low
High
Applications
Fundamental experiments
Distributed quantum computing
Distributed quantum computing
Exercise 2.6 — Entanglement
Answer the following questions.
Compute the projector matrix P4@2 for corruption on the second bit to ∣1⟩ of the 4-qubit states.
Compute a 4-qubit GHZ state ∣GHZ4⟩, and show that P4@2∣GHZ4⟩ is not an entangled state anymore.
Compute a 4-qubit W-state ∣W4⟩, and show that P4@2∣W4⟩ is still entangled.
Compute the projector matrix PN@1 for corruption on the first bit to ∣1⟩ of the N-qubit states.
Show that ∣GHZN⟩ is more fragile than ∣WN⟩ using the projector matrix PN@1.
Suppose we have invented a new entangled state ∣QN⟩=2∣0⟩⊗N⊗∣1⟩⊗N+∣1⟩⊗N⊗∣0⟩⊗N Show that ∣QN⟩ is still as fragile as ∣GHZ2N⟩ using the projector matrix.
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=1∑K∣ϕk⟩⟨ψk∣
where each (ψk,ϕk) is a pair of input and output states, single- or multi-qubit
That means 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∣, labeled ⟨ψk∣ as "input" with the reminder "(don't forget the adjoint)", and labeled ∣ϕk⟩ 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⟩; i.e.
∣00⟩↦∣00⟩∣01⟩↦∣01⟩∣10⟩↦∣11⟩∣11⟩↦∣10⟩
Our quantum operator becomes
CNOT=∣00⟩⟨00∣+∣01⟩⟨01∣+∣11⟩⟨10∣+∣10⟩⟨11∣
CNOT=1000010000010010
💡 Analogy: CNOT is a quantum "if-then" switch: qubit 1 is the control (untouched), qubit 2 is the target. If the control reads 1, flip the target; if it reads 0, 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⟩
Our quantum operator becomes
SWAP=∣00⟩⟨00∣+∣10⟩⟨01∣+∣01⟩⟨10∣+∣11⟩⟨11∣
SWAP=1000001001000001
Exercise 2.7 — Multi-Qubit Operators
Compute multi-qubit operators from the following state mappings.
∣00⟩↦∣01⟩,∣01⟩↦∣00⟩,∣10⟩↦∣10⟩, and ∣11⟩↦∣11⟩
∣00⟩↦∣01⟩,∣01⟩↦∣00⟩,∣10⟩↦i∣11⟩, and ∣11⟩↦i∣10⟩
∣00⟩↦∣00⟩,∣01⟩↦∣01⟩,∣10⟩↦2∣10⟩+∣11⟩, and ∣11⟩↦2∣10⟩−∣11⟩
2∣00⟩+∣01⟩↦∣00⟩,2∣00⟩−∣01⟩↦∣01⟩,∣10⟩↦∣10⟩, and ∣11⟩↦∣11⟩
cis4π∣00⟩↦∣01⟩,cis(−4π)∣01⟩↦∣00⟩,∣10⟩↦∣10⟩, and ∣11⟩↦∣11⟩
Answer the following questions.
Design a quantum operator whose state mapping is ∣0x⟩↦∣0x⟩ and ∣1x⟩↦∣1x⟩, where x denotes the bit flipping of x.
📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty.
Design a quantum operator that imitates the NAND gate, whose state mapping is ∣xy⟩↦∣x∧y⟩⊗∣y⟩.
📝 Instructor marked this question with a small star doodle — flagged as a step up in difficulty.
Design a quantum operator that bit-flips the third qubit only if the first and second qubits are ∣1⟩, 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.)
Design a quantum operator whose state mapping is ∣xy⟩↦∣x∧y⟩⊗∣x∨y⟩.
📝 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., 2N dimensions for N 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).