






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Quantum computing Lecture Assignment's detailed solution
Typology: Schemes and Mind Maps
1 / 30
This page cannot be seen from the preview
Don't miss anything!























The single-qubit Clifford group is generated by the Hadamard gate H and the phase gate S, defined as:
0 i
For any unitary operator U and Pauli operator M ∈ {X, Y, Z}, define the conjugation action:
M 7 → U M U †. Show that conjugation by H and S corresponds, up to signs, to a permutation of the set {X, Y, Z}. What are these permutations? Conclude from this that—up to global phase—the single-qubit Clifford group has at most 24 distinct elements, corresponding to the rotations that permute the x, y, and z axes on the Bloch sphere (i.e., the rotational symmetries of a cube or octahedron).
1.1.1 Conjugation by H and S as Permutations of {X, Y, Z} (up to signs)
To show that conjugation by H and S corresponds to permutations of {X, Y, Z} up to signs, we explicitly compute their conjugation actions on each Pauli operator X, Y, Z. Recall the Pauli matrices:
0 −i i 0
Conjugation by H: The Hadamard gate is Hermitian (H†^ = H) and unitary, so conjugation simplifies to:
HM H†^ = HM H
0 −i i 0
Up to signs, H swaps X ↔ Z and leaves Y unchanged. This corresponds to the permutation (X Z) (cycle notation for swapping X and Z).
Conjugation by S: The phase gate S has conjugate transpose S†^ =
0 −i
0 i
0 −i
0 i
0 −i i 0
0 −i
0 i
0 −i
Up to signs, S maps X → Y and Y → X while leaving Z unchanged. This corresponds to the permutation (X Y ) (cycle notation for swapping X and Y ). Hence,Conjugation H and S permutes the Pauli operators {X, Y, Z}
1.1.2 Size of the Single-Qubit Clifford Group: At Most 24 Elements (up to Global Phase)
The single-qubit Clifford group is generated by H and S, and its elements act on Pauli operators via conjugation, preserving the set {±X, ±Y, ±Z}.
1: Axis Permutations (6 Options, from Symmetric Group S 3 ) Any Clifford element U acts on {X, Y, Z} by first permuting the axes (via some permutation of {X, Y, Z}) and then assigning a sign (±1) to each permuted axis. This follows from the defining property: U M U †^ = ϵM ′ where M ′^ is a permutation of M and ϵ = ±1.
Table 1: All Permutations of {X, Y, Z} (from S 3 )
Permutation Type Cycle Notation Axis Transformation Example Clifford Gate Identity (no swap) e (X, Y, Z) → (X, Y, Z) Unit gate I Transposition (swap 2 axes) (X Y ) (X, Y, Z) → (Y, X, Z) S†HS Transposition (X Z) (X, Y, Z) → (Z, Y, X) Hadamard H Transposition (Y Z) (X, Y, Z) → (X, Z, Y ) HSH 3-cycle (cycle all 3 axes) (X Y Z) (X, Y, Z) → (Y, Z, X) SH 3-cycle (reverse) (X Z Y ) (X, Y, Z) → (Z, X, Y ) HS†
The set {X, Y, Z} has 3! = 6 distinct permutations, described by the symmetric group S 3. These include: identity (no permutation), transpositions (swapping two axes: (X Y ), (X Z), (Y Z)), and 3-cycles (cycling all three axes: (X Y Z), (X Z Y )).
2: Sign Choices (4 Valid Options, Constrained by Pauli Anticommutation) For each permutation, we can assign a sign (+1 or −1) to each axis—but Pauli anticommutation relations (e.g., XY = iZ) eliminate invalid combinations. Specifically: - If U XU †^ = ϵX X′, U Y U †^ = ϵY Y ′, then U ZU †^ = ϵX ϵY Z′^ (The third sign is fixed by the first two). This leaves only 2^2 = 4 valid sign combinations, shown in Table 2 (for the identity permutation; logic extends to all permutations).
Table 2: Valid Sign Combinations (for Identity Permutation)
Signs (ϵX , ϵY , ϵZ ) Satisfies ϵZ = ϵX ϵY? Valid? (+1, +1, +1) +1 = (+1)(+1) Yes (+1, − 1 , −1) −1 = (+1)(−1) Yes (− 1 , +1, −1) −1 = (−1)(+1) Yes (− 1 , − 1 , +1) +1 = (−1)(−1) Yes (+1, +1, −1) − 1 ̸= (+1)(+1) No (+1, − 1 , +1) +1 ̸= (+1)(−1) No
3: Total number of distinct actions (6 × 4 = 24) As Permutations and signs are independent choices,
Total valid conjugation actions = Number of permutations × Number of sign combinations = 6 × 4 = 24.
Since each action corresponds to exactly one Clifford element (up to global phase), the single-qubit Clifford group has at most 24 distinct elements.
Define the magic state:
| 0 ⟩ + eiπ/^4 | 1 ⟩ √ 2
Problem: Explain why no circuit made only of H and S gates can transform | 0 ⟩ into |T ⟩. Hint: Think about the Bloch-sphere locations of | 0 ⟩ and |T ⟩, and recall that Clifford operations only map the axes ±X, ±Y, ±Z onto each other. Solution:
Thus, any sequence of Clifford gates acting on | 0 ⟩ (which points along +Z) can only produce states along the six axes ±X, ±Y, ±Z on the Bloch sphere.
|ψ⟩ = cos(θ/2)| 0 ⟩ + eiϕ^ sin(θ/2)| 1 ⟩,
where (θ, ϕ) are the Bloch sphere angles. Comparing with
| 0 ⟩ + eiπ/^4 | 1 ⟩ √ 2
θ =
π 2
, ϕ =
π 4
The corresponding Bloch vector is
(x, y, z) = (sin θ cos ϕ, sin θ sin ϕ, cos θ) =
Figure 2 clearly shows that |T ⟩ does not lie along any of the six Clifford axes.
Figure 2: | 0 ⟩,|T ⟩ and ±X, ±Y, ±Z
Suppose we have an arbitrary data qubit |ψ⟩ = α| 0 ⟩ + β| 1 ⟩,
and an ancilla prepared in the magic state
| 0 ⟩ + eiπ/^4 | 1 ⟩ √ 2
The following procedure uses only Clifford operations and a measurement to implement the non-Clifford T gate on the data qubit.
Figure 3: Enter Caption
The measurement outcome m ∈ { 0 , 1 } controls whether the correction S is applied. Show that, after this correction, the data qubit equals T |ϕ⟩ up to a global phase. Discuss why this procedure effectively injects the non-Clifford resource into the circuit. Initial composite state:
|ψ⟩ ⊗ |T ⟩ =
h α| 0 ⟩| 0 ⟩ + αeiπ/^4 | 0 ⟩| 1 ⟩ + β| 1 ⟩| 0 ⟩ + βeiπ/^4 | 1 ⟩| 1 ⟩
i .
CNOT Gate Application Applying CNOT to the initial state:
CNOT(|ψ⟩ ⊗ |T ⟩) =
h α| 0 ⟩| 0 ⟩ + αeiπ/^4 | 0 ⟩| 1 ⟩ + β| 1 ⟩| 1 ⟩ + βeiπ/^4 | 1 ⟩| 0 ⟩
i
h α| 0 ⟩| 0 ⟩ + βeiπ/^4 | 1 ⟩| 0 ⟩ + αeiπ/^4 | 0 ⟩| 1 ⟩ + β| 1 ⟩| 1 ⟩
i .
Measurement and Correction Measure the ancilla qubit in the computational basis. The measurement outcome m ∈ { 0 , 1 } determines the correction: Case 1: m = 0 The state collapses to:
α| 0 ⟩| 0 ⟩ + βeiπ/^4 | 1 ⟩| 0 ⟩ =
α| 0 ⟩ + βeiπ/^4 | 1 ⟩
The data qubit state is: α| 0 ⟩ + βeiπ/^4 | 1 ⟩. Case 2: m = 1 The state collapses to:
αeiπ/^4 | 0 ⟩| 1 ⟩ + β| 1 ⟩| 1 ⟩ =
αeiπ/^4 | 0 ⟩ + β| 1 ⟩
The data qubit state is:
αeiπ/^4 | 0 ⟩ + β| 1 ⟩.
Apply the correction gate S =
0 i
αeiπ/^4 | 0 ⟩ + β| 1 ⟩
= αeiπ/^4 S| 0 ⟩ + βS| 1 ⟩
= αeiπ/^4 | 0 ⟩ + iβ| 1 ⟩.
We now examine how quantum error correction can protect information against single-qubit errors using the three-qubit bit-flip code.
The code encodes one logical qubit as
| (^0) L⟩ = | 000 ⟩ , | (^1) L⟩ = | 111 ⟩ , |ψL⟩ = α | (^0) L⟩ + β | (^1) L⟩.
If an X error occurs on one of the 3 qubits, the state is flipped. The stabilizer generators
S 1 = Z 1 Z 2 , S 2 = Z 2 Z 3
are measured to detect which qubit flipped. Compute the pattern for each error and show that the pair of results (S 1 , S 2 ) ∈ {(+, +), (+, −), (−, +), (−, −)} uniquely identifies the error location. These operators compare pairs of qubits without collapsing the quantum superposition, as they only reveal information about the relationships between qubits, not their individual states. The measurement outcomes (eigenvalues +1 or −1, denoted as + or −) form the error syndrome that uniquely identifies the error location.
Case 1: No Error
State: |ψL⟩ = α | 000 ⟩ + β | 111 ⟩ S 1 = Z 1 Z 2 : Z 1 Z 2 | 000 ⟩ = (Z | 0 ⟩)(Z | 0 ⟩) | 0 ⟩ = (+1)(+1) | 000 ⟩ = +1 | 000 ⟩ Z 1 Z 2 | 111 ⟩ = (Z | 1 ⟩)(Z | 1 ⟩) | 1 ⟩ = (−1)(−1) | 111 ⟩ = +1 | 111 ⟩ ⇒ S 1 = + S 2 = Z 2 Z 3 : Z 2 Z 3 | 000 ⟩ = | 0 ⟩ (Z | 0 ⟩)(Z | 0 ⟩) = | 0 ⟩ (+1)(+1) | 00 ⟩ = +1 | 000 ⟩ Z 2 Z 3 | 111 ⟩ = | 1 ⟩ (Z | 1 ⟩)(Z | 1 ⟩) = | 1 ⟩ (−1)(−1) | 11 ⟩ = +1 | 111 ⟩ ⇒ S 2 = + Syndrome: (S 1 , S 2 ) = (+, +)
Case 2: X Error on Qubit 1
State: X 1 |ψL⟩ = α | 100 ⟩ + β | 011 ⟩ S 1 = Z 1 Z 2 : Z 1 Z 2 | 100 ⟩ = (Z | 1 ⟩)(Z | 0 ⟩) | 0 ⟩ = (−1)(+1) | 100 ⟩ = − 1 | 100 ⟩ Z 1 Z 2 | 011 ⟩ = (Z | 0 ⟩)(Z | 1 ⟩) | 1 ⟩ = (+1)(−1) | 011 ⟩ = − 1 | 011 ⟩ ⇒ S 1 = − S 2 = Z 2 Z 3 : Z 2 Z 3 | 100 ⟩ = | 1 ⟩ (Z | 0 ⟩)(Z | 0 ⟩) = | 1 ⟩ (+1)(+1) | 00 ⟩ = +1 | 100 ⟩ Z 2 Z 3 | 011 ⟩ = | 0 ⟩ (Z | 1 ⟩)(Z | 1 ⟩) = | 0 ⟩ (−1)(−1) | 11 ⟩ = +1 | 011 ⟩ ⇒ S 2 = + Syndrome: (S 1 , S 2 ) = (−, +)
Case 3: X Error on Qubit 2
State: X 2 |ψL⟩ = α | 010 ⟩ + β | 101 ⟩ S 1 = Z 1 Z 2 : Z 1 Z 2 | 010 ⟩ = (Z | 0 ⟩)(Z | 1 ⟩) | 0 ⟩ = (+1)(−1) | 010 ⟩ = − 1 | 010 ⟩ Z 1 Z 2 | 101 ⟩ = (Z | 1 ⟩)(Z | 0 ⟩) | 1 ⟩ = (−1)(+1) | 101 ⟩ = − 1 | 101 ⟩ ⇒ S 1 = − S 2 = Z 2 Z 3 : Z 2 Z 3 | 010 ⟩ = | 0 ⟩ (Z | 1 ⟩)(Z | 0 ⟩) = | 0 ⟩ (−1)(+1) | 0 ⟩ = − 1 | 010 ⟩ Z 2 Z 3 | 101 ⟩ = | 1 ⟩ (Z | 0 ⟩)(Z | 1 ⟩) = | 1 ⟩ (+1)(−1) | 1 ⟩ = − 1 | 101 ⟩ ⇒ S 2 = − Syndrome: (S 1 , S 2 ) = (−, −)
Case 4: X Error on Qubit 3
State: X 3 |ψL⟩ = α | 001 ⟩ + β | 110 ⟩ S 1 = Z 1 Z 2 : Z 1 Z 2 | 001 ⟩ = (Z | 0 ⟩)(Z | 0 ⟩) | 1 ⟩ = (+1)(+1) | 001 ⟩ = +1 | 001 ⟩ Z 1 Z 2 | 110 ⟩ = (Z | 1 ⟩)(Z | 1 ⟩) | 0 ⟩ = (−1)(−1) | 110 ⟩ = +1 | 110 ⟩ ⇒ S 1 = + S 2 = Z 2 Z 3 : Z 2 Z 3 | 001 ⟩ = | 0 ⟩ (Z | 0 ⟩)(Z | 1 ⟩) = | 0 ⟩ (+1)(−1) | 1 ⟩ = − 1 | 001 ⟩ Z 2 Z 3 | 110 ⟩ = | 1 ⟩ (Z | 1 ⟩)(Z | 0 ⟩) = | 1 ⟩ (−1)(+1) | 0 ⟩ = − 1 | 110 ⟩ ⇒ S 2 = − Syndrome: (S 1 , S 2 ) = (+, −)
Syndrome Table and Error Correction
The calculated syndrome patterns uniquely identify the error location as shown in the following table:
Case Error Location Syndrome (S 1 , S 2 ) 1 No error (+, +) 2 Qubit 1 (−, +) 3 Qubit 2 (−, −) 4 Qubit 3 (+, −)
Each possible single-qubit X error produces a distinct syndrome pattern, allowing for unambiguous iden- tification and correction of the error. The quantum error correction process preserves the encoded quantum information (α and β) by only extracting information about error locations through syndrome measurements, without collapsing the quantum superposition.
Using the results from part (a), explain how the measurement outcomes of (S 1 , S 2 ) identify which qubit has flipped, and specify the corresponding corrective operation needed to restore the encoded state |ψL⟩.
Corrective Operations
For each syndrome pattern, we apply the corresponding X gate to restore the encoded state |ψL⟩:
Syndrome (S 1 , S 2 ) Error Identification Corrective Operation (+, +) No error No operation required (−, +) X error on qubit 1 Apply X to qubit 1 (X 1 ) (−, −) X error on qubit 2 Apply X to qubit 2 (X 2 ) (+, −) X error on qubit 3 Apply X to qubit 3 (X 3 )
Mathematical Verification of Recovery
The recovery procedure successfully restores the encoded state because applying an X gate twice to any qubit returns it to its original state (X^2 = I). For example:
Similarly for errors on qubits 2 and 3. In practice, the recovery procedure is implemented using a quantum circuit that:
Action on ZL:
HLZLH L† = (H 1 H 2 H 3 )(Z 1 Z 2 Z 3 )(H 1 † H 2 † H† 3 ) = (H 1 Z 1 H† 1 )(H 2 Z 2 H† 2 )(H 3 Z 3 H† 3 ) = X 1 X 2 X 3 = XL.
Therefore, the transversal Hadamard operator HL = H 1 H 2 H 3 serves as a valid logical Hadamard gate that interchanges XL and ZL as required.
Action on logical states
We can also verify the action of HL on the logical basis states:
These transformed states represent the logical |+L⟩ and |−L⟩ states respectively, confirming that HL performs the logical Hadamard transformation.
This exercise introduces the idea of reflections in Hilbert space and shows how repeated reflections can amplify the probability of a desired measurement outcome—the principle behind Grover’s search algorithm.
Consider a Boolean function f : { 0 , 1 }n^ → { 0 , 1 } that we use to mark a subset M ⊆ { 0 , 1 }n^ of “good” basis states (i.e., f (x) = 1). Define the operators
Of = I − 2
x: f (x)=
|x⟩⟨x|, D = 2 |Ψ⟩⟨Ψ| − I.
Show that both Of and D are unitary and self-inverse, i.e.
O^2 f = D^2 = I.
Proof for Of :
Let M = {x ∈ { 0 , 1 }n^ : f (x) = 1}. Define the projector:
P =
x∈M
|x⟩⟨x|.
Proof that P 2 = P : Let P =
x∈M |x⟩⟨x|, where^ {|x⟩}^ forms an orthonormal basis for the Hilbert space^ C
2 n. This means:
⟨x|y⟩ = δxy =
1 if x = y 0 if x ̸= y
x∈M
|x⟩⟨x|
y∈M
|y⟩⟨y|
x∈M
y∈M
|x⟩⟨x|y⟩⟨y| (by linearity)
x∈M
y∈M
|x⟩δxy ⟨y| (by orthonormality)
x∈M
|x⟩⟨x| (since only terms with x = y survive)
Therefore, P 2 = P Proof that P †^ = P : For any operator A, its adjoint A†^ satisfies ⟨ϕ|Aψ⟩ = ⟨A†ϕ|ψ⟩ for all vectors |ϕ⟩, |ψ⟩. For P =
x∈M |x⟩⟨x|, we compute its adjoint:
x∈M
|x⟩⟨x|
x∈M
(|x⟩⟨x|)†^ (by linearity of adjoint)
x∈M
|x⟩⟨x| (since (|x⟩⟨x|)†^ = |x⟩⟨x|)
The step (|x⟩⟨x|)†^ = |x⟩⟨x| follows because for any vectors |ϕ⟩, |ψ⟩:
⟨ϕ|(|x⟩⟨x|)ψ⟩ = ⟨ϕ|x⟩⟨x|ψ⟩ = ⟨x|ϕ⟩∗⟨x|ψ⟩ and
Assume from now on and for the rest of this exercise that we start in the specific initial state:
|Ψ⟩ =
2 n
x∈{ 0 , 1 }N
|x⟩
Decompose the |Ψ⟩ into components on the marked and unmarked subspaces,
|Ψ⟩ =
p |Ψgood⟩ +
p 1 − p |Ψbad⟩. Find the dependence of p on the number of marked states M = |M| and the total number of basis states N. Show that both operators D and Of act within the two-dimensional subspace spanned by { |Ψgood⟩, |Ψbad⟩ }. Interpret their action geometrically in this plane and explain why their composition
G = D Of acts as a rotation in that plane.
3.2.1 State Decomposition and Probability Parameter
Initial State Definition: As N = 2n:
|Ψ⟩ =
2 n
x∈{ 0 , 1 }N
|x⟩ =
x∈{ 0 , 1 }N
|x⟩
Probability Amplitudes in Quantum Mechanics
⟨x|Ψ⟩ = ⟨x|
y∈{ 0 , 1 }N
|y⟩
y∈{ 0 , 1 }N
⟨x|y⟩
⟨x|Ψ⟩ =
y∈{ 0 , 1 }N
δxy =
Probability calculation:
P (x) = |⟨x|Ψ⟩|^2 =
Probability Calculation for Marked States Let M be the set of marked states with M = |M| elements. The total probability of measuring any marked state is the sum of probabilities for individual marked states:
p =
x∈M
P (x) =
x∈M
|⟨x|Ψ⟩|^2 =
x∈M
x∈M
Since the summation contains M identical terms:
p =
x∈M
1 − p =
Physical Interpretation The result MN has an intuitive physical interpretation: In classical probability theory, if there are N equally probable states and M of them are ”good” (marked), then the probability of randomly selecting a good state is naturally MN
Relationship to State Decomposition In the state decomposition:
|Ψ⟩ =
p|Ψgood⟩ +
p 1 − p|Ψbad⟩
The parameter p ensures the normalization of the state:
∥
p|Ψgood⟩ +
p 1 − p|Ψbad⟩∥^2 = p + (1 − p) = 1
This satisfies the fundamental normalization condition that all quantum states must obey.
Conclusion
p =
This result establishes the fundamental relationship between the number of marked states and the total number of states. Thus, the complete decomposition is:
r M N
|Ψgood⟩ +
r N − M N
|Ψbad⟩
3.2.2 Operator Actions in the Two-Dimensional Subspace
The oracle acts as Of |x⟩ = (−1)f^ (x)|x⟩, where f (x) = 1 for marked states and 0 otherwise. Of acts on basis states:
Of |Ψgood⟩ =
x∈M
Of |x⟩ =
x∈M
(−|x⟩) = −|Ψgood⟩
Of |Ψbad⟩ =
x /∈M
Of |x⟩ =
x /∈M
|x⟩ = |Ψbad⟩
In matrix form: Of =
Diffusion Operator D: The diffusion operator is D = 2|Ψ⟩⟨Ψ| − I. Define an angle α such that:
cos α =
r M N
, sin α =
r N − M N Then |Ψ⟩ = cos α|Ψgood⟩ + sin α|Ψbad⟩. We compute the action of D on our basis states: For |Ψgood⟩: D|Ψgood⟩ = (2|Ψ⟩⟨Ψ| − I)|Ψgood⟩ = 2|Ψ⟩⟨Ψ|Ψgood⟩ − |Ψgood⟩ = 2|Ψ⟩ cos α − |Ψgood⟩ = 2 cos α(cos α|Ψgood⟩ + sin α|Ψbad⟩) − |Ψgood⟩ = (2 cos^2 α − 1)|Ψgood⟩ + 2 cos α sin α|Ψbad⟩ D|Ψgood⟩ = cos 2α|Ψgood⟩ + sin 2α|Ψbad⟩ For |Ψbad⟩: D|Ψbad⟩ = (2|Ψ⟩⟨Ψ| − I)|Ψbad⟩ = 2|Ψ⟩⟨Ψ|Ψbad⟩ − |Ψbad⟩ = 2|Ψ⟩ sin α − |Ψbad⟩ = 2 sin α(cos α|Ψgood⟩ + sin α|Ψbad⟩) − |Ψbad⟩ = 2 sin α cos α|Ψgood⟩ + (2 sin^2 α − 1)|Ψbad⟩ D|Ψbad⟩ = sin 2α|Ψgood⟩ − cos 2α|Ψbad⟩ In matrix form: D =
cos 2α sin 2α sin 2α − cos 2α
Assume now that there is exactly one marked basis state (M = 1). Within the subspace from (b) spanned by { |Ψgood⟩, |Ψbad⟩ }, show that G = D Of acts in that subspace by an angle 2θ satisfying
sin^2 θ = p. Illustrate geometrically how repeated applications of G rotate the state vector toward the “good” direction.
Initial State Decomposition and Probability p In part (b), the initial state |Ψ 0 ⟩ (typically the uniform superposition |Ψ⟩ = √^1 N
x |x⟩) decomposes as:
|Ψ 0 ⟩ =
p |Ψgood⟩ +
p 1 − p |Ψbad⟩,
where p is the initial probability of measuring a marked state. For M = 1, this probability is the squared overlap of |Ψ 0 ⟩ with |Ψgood⟩: p = |⟨Ψgood|Ψ 0 ⟩|^2.
Substituting |Ψgood⟩ = |m⟩ and |Ψ 0 ⟩ = √^1 N
x |x⟩, we calculate:
⟨Ψgood|Ψ 0 ⟩ =
m
x
|x⟩
⟨m|m⟩ =
where we used orthonormality of basis states (⟨m|x⟩ = δm,x). Thus:
p =
consistent with the general definition from part (b) (p = MN ) with M = 1.
cos α =
r M N
, sin α =
r N − M N
For M = 1, substitute MN = p :
cos α =
p, sin α =
p 1 − p. Now, Defining a new angle θ such that θ = 90·^ − α (i.e., α = 90·^ − θ). Using the trigonometric identity for complementary angles (cos(90·^ − θ) = sin θ):
cos α = cos(90·^ − θ) = sin θ. But from cos α =
p, so:
sin θ =
p.
Squaring both sides gives the desired relationship:
sin^2 θ = p.
Action of G = D Of as a Rotation by 2 θ: From part (b), we know: - The oracle Of acts on the subspace by flipping the sign of |Ψgood⟩ and leaving |Ψbad⟩ unchanged. Its matrix representation in {|Ψgood⟩, |Ψbad⟩} is:
Of =
which corresponds to a reflection about the |Ψbad⟩-axis. From part (b), the diffusion operator D = 2|Ψ 0 ⟩⟨Ψ 0 | − I acts as a reflection about the axis aligned with |Ψ 0 ⟩. Its matrix representation in the subspace is:
cos 2α sin 2α sin 2α − cos 2α
G = D Of =
cos 2α sin 2α sin 2α − cos 2α
− cos 2α sin 2α − sin 2α − cos 2α
Using the angle relationship α = 90·^ − θ, we substitute 2α = 180·^ − 2 θ.
cos 2α = cos(180·^ − 2 θ) = − cos 2θ, sin 2α = sin(180·^ − 2 θ) = sin 2θ.
Substituting:
G =
−(− cos 2θ) sin 2θ −(sin 2θ) −(− cos 2θ)
cos 2θ sin 2θ − sin 2θ cos 2θ
As shown in Figure 4,this is the standard matrix representation of a rotation by angle 2θ in 2D space.
Figure 4: Grotate the state vector toward the “good” direction.Adapted from Lecture Note Figure 7.
3.3.1 Repeated Applications of G
As established earlier, G acts as a rotation operator in the |ΨGood⟩-|ΨBad⟩ subspace, with a rotation angle of 2 θ:
G =
cos(2θ) sin(2θ) − sin(2θ) cos(2θ)
where the columns (and rows) correspond to projections onto |ΨBad⟩ and |ΨGood⟩, respectively. For any state vector |ψ⟩ = (cb, cg ) in this subspace (with cb = ⟨ΨBad|ψ⟩ and cg = ⟨ΨGood|ψ⟩), applying G updates the coordinates as:
G ·
cb cg
cb cos(2θ) + cg sin(2θ) −cb sin(2θ) + cg cos(2θ)
This is the standard result of rotating a vector by 2θ in 2D.
Cumulative Rotation Over k Applications The key property of rotations is that their effects are additive: applying a rotation by α followed by a rotation by β is equivalent to a single rotation by α + β. For G, each application contributes a rotation of 2θ, so k applications result in a total rotation of 2kθ. To formalize this, consider the initial state |Ψ⟩, which makes an angle θ with |ΨBad⟩ (its coordinates are (cos θ, sin θ), since cos θ = ⟨ΨBad|Ψ⟩ and sin θ = ⟨ΨGood|Ψ⟩).
cos θ sin θ
with angle θ relative to |ΨBad⟩.
Starting from |Ψ⟩, show that after k iterations of G the success probability is
Pk = sin^2
(2k + 1)θ
Discuss qualitatively how Pk depends on p, and explain why the probability oscillates as the number of iterations increases.
Step 1: Initial State in the 2D Subspace As established earlier, the quantum state evolves within the 2D subspace spanned by the orthonormal basis {|Ψgood⟩ ≡ |g⟩, |Ψbad⟩ ≡ |b⟩} The initial state |Ψ⟩ : |Ψ⟩ = sin θ |g⟩ + cos θ |b⟩,
where θ is a real angle satisfying sin^2 θ = p. Here, p = |⟨g|Ψ⟩|^2 is the initial success probability (the probability of measuring |g⟩ in |Ψ⟩). The normalization condition ⟨Ψ|Ψ⟩ = 1 ensures sin^2 θ + cos^2 θ = 1, consistent with cos θ = ⟨b|Ψ⟩. Step 2: Rotational Action of G Over k Iterations From part (c), the operator G = DOf :
G =
cos(2θ) − sin(2θ) sin(2θ) cos(2θ)
where the columns (and rows) correspond to projections onto |b⟩ and |g⟩, respectively. Applying Gk^ gives: Gk^ =
cos(2kθ) − sin(2kθ) sin(2kθ) cos(2kθ)
|Ψ(k)⟩ = Gk|Ψ(0)⟩ =
cos(2kθ) · cos θ − sin(2kθ) · sin θ sin(2kθ) · cos θ + cos(2kθ) · sin θ
cos [(2k + 1)θ] sin [(2k + 1)θ]
Step 4: Success Probability Pk The success probability after k iterations is the squared magnitude of the projection of |Ψ(k)⟩ onto |g⟩. From the coordinates above, this projection is sin [(2k + 1)θ]. Thus:
Pk = ⟨g|Ψ(k)⟩
2 = sin^2 [(2k + 1)θ] ,
which matches the desired result. Dependence on p Since sin^2 θ = p, we have θ = arcsin
p
. Substituting this into Pk gives:
Pk = sin^2 [(2k + 1) arcsin (
p)]. For small p (when the number of marked states is much smaller than the total number of states): arcsin (
p) ≈
p (using the approximation arcsin(x) ≈ x for x ≪ 1)
Pk ≈ sin^2 [(2k + 1)
p] Thus, the probability depends on the product of the number of iterations k and the square root of p.
For larger p the nonlinearity of arcsin
p
becomes significant, and Pk evolves more rapidly with k. Oscillation of Pk: Pk = sin^2 [(2k + 1)θ] oscillates because the sine function is periodic with period 2π. As k increases:
p
If two orthogonal states |g 1 ⟩ and |g 2 ⟩ are marked (M = 2), express the relevant two-dimensional subspace and show that the same rotation picture applies with
sin^2 θ =
Step 1: Define Key States and Subspaces Let the total number of basis states be N = 2n. With M = 2 marked states, there are N − 2 unmarked states, denoted |b 1 ⟩, |b 2 ⟩,... , |bN − 2 ⟩. All states |g 1 ⟩, |g 2 ⟩, |b 1 ⟩,... , |bN − 2 ⟩ are orthonormal:
⟨gi|gj ⟩ = δij , ⟨bk|bl⟩ = δkl, ⟨gi|bk⟩ = 0
for i, j ∈ { 1 , 2 } and k, l ∈ { 1 ,... , N − 2 }. Step 2: The 2D Relevant Subspace The dynamics of the search are confined to a 2D subspace spanned by two orthonormal states:
(|g 1 ⟩ + |g 2 ⟩).
This is normalized because:
⟨G|G⟩ =
(⟨g 1 |g 1 ⟩ + ⟨g 1 |g 2 ⟩ + ⟨g 2 |g 1 ⟩ + ⟨g 2 |g 2 ⟩) =
k=
|bk⟩.
This is normalized because:
k=
⟨bk|bk⟩ = 1
These states are orthogonal: ⟨G|B⟩ = 0, since marked and unmarked states are orthogonal. Thus, {|G⟩, |B⟩} forms an orthonormal basis for the 2D subspace. Step 3: Initial State in the 2D Subspace The initial state is typically the uniform superposition over all basis states:
|Ψ⟩ =
|g 1 ⟩ + |g 2 ⟩ +
k=
|bk⟩
Rewrite |Ψ⟩ in terms of |G⟩ and |B⟩ by computing its projections onto these states: Projection onto |G⟩:
(⟨g 1 | + ⟨g 2 |)
|g 1 ⟩ + |g 2 ⟩ +
|bk⟩
Cross terms with unmarked states vanish, leaving:
(⟨g 1 |g 1 ⟩ + ⟨g 2 |g 2 ⟩) =
r 2 N
Projection onto |B⟩:
⟨bk|
|g 1 ⟩ + |g 2 ⟩ +
|bk⟩
Cross terms with marked states vanish, leaving:
p N (N − 2)
k=
⟨bk|bk⟩ =
p N (N − 2)
r N − 2 N