IBM Lesson 3 - Quantum-Circuits-Slides
IBM Lesson 3 - Quantum-Circuits-Slides
Contents
1. Quantum circuits
2. Inner products, orthonormality, and projections
3. Limitations of quantum information:
• Irrelevance of global phases
• No-cloning theorem
• Non-orthogonal states cannot be perfectly discriminated
1. Quantum circuits
Circuits
Circuits are models of computation:
• Wires carry information
• Gates represent operations
In this series, circuits are always acyclic — information flows from left to right.
Wires store binary values, gates represent Boolean logic operations, such
as AND (∧), OR (∨), NOT (¬), and FANOUT ( ).
1
1 ∧
Y
¬ 1
1 1 1
∨
0 0
0 ¬ 0
X ∧
0
Circuits
Circuits are models of computation:
• Wires carry information
• Gates represent operations
In this series, circuits are always acyclic — information flows from left to right.
y + 2
x +y
y
2 2 2
y x y+x +y +y
∗
+
1 y+1
Quantum circuits
In the quantum circuit model, the wires represent qubits and the gates represent
both unitary operations and measurements.
Example
1+i
∣0⟩ H S H T 2
∣0⟩ + √1 ∣1⟩
2
⎛ √12 √1
2
⎞ 1 0 1 0
H=⎜
⎜ 1 ⎟
⎟ S=( ) T =( 1+i )
⎝√ − √1 ⎠ 0 i 0 √
2 2 2
⎛ 1+i
2
1−i
2
⎞
T HSH = ⎜
⎜ 1 ⎟
⎟
⎝ √ √i ⎠
2 2
Quantum circuits
Example Convention
1 √1
⎛ √2 2
0 0 ⎞
⎜
⎜ ⎟
⎟
⎜
⎜ 0 0 √1 − √1 ⎟
⎟
⎜
⎜ 2⎟
⎟
⎜
⎜
2 ⎟
⎟
⎜
⎜ √1 √ ⎟
1 ⎟
⎜
⎜ 0 0 ⎟
2 ⎟
⎜
⎜ 2 ⎟
⎟
⎝ √1 − √1 0 0 ⎠
2 2
Quantum circuits
Example
Y H
X +
B
A
Quantum circuits
Example
Y H B
X + A
Quantum circuits
Single-qubit gates Controlled-NOT Swap gate
X
×
+ ×
Y
Toffoli gate Fredkin gate
Z
H ×
S + ×
T
Quantum circuits
It is also sometimes convenient to view arbitrary unitary operations as gates.
U
2. Inner products, orthonormality, and projections
Inner products
When we use the Dirac notation, a ket is a column vector, and its corresponding
bra is a row vector:
⎛ α1 ⎞
⎜ ⎟
∣ψ⟩ = ⎜
⎜
⎜ ⋮ ⎟
⎟
⎟ ⟨ψ∣ = (α1 ⋯ αn )
⎜ ⎟
⎝αn ⎠
⎛ α1 ⎞ ⎛ β1 ⎞
⎜ ⎟ ⎜ ⎟
∣ψ⟩ = ⎜
⎜ ⋮ ⎟
⎜ ⎟
⎟ and ∣ϕ⟩ = ⎜
⎜ ⋮ ⎟
⎜ ⎟
⎟
⎜ ⎟ ⎜ ⎟
⎝αn ⎠ ⎝βn ⎠
Inner products
Suppose that we have two kets:
⎛ α1 ⎞ ⎛ β1 ⎞
⎜ ⎟ ⎜ ⎟
∣ψ⟩ = ⎜
⎜
⎜ ⋮ ⎟
⎟ and ∣ϕ⟩ = ⎜
⎜ ⋮ ⎟
⎟
⎜ ⎟ ⎟ ⎜
⎜ ⎟ ⎟
⎝αn ⎠ ⎝βn ⎠
We then have
⎛ β1 ⎞
⎜ ⎟
⟨ψ∣ϕ⟩ = (α1 ⋯ αn ) ⎜
⎜
⎜ ⋮ ⎟
⎟ = α1 β1 + ⋯ + αn βn
⎟
⎜ ⎟
⎝βn ⎠
= ∑ ∑ αa βb ⟨a∣b⟩
a∈Σ b∈Σ
= ∑ αa β a
a∈Σ
Inner products
Example
∣1⟩ √
∣ϕ⟩ = 21 ∣0⟩ + 2
3
∣1⟩
−∣0⟩ θ ∣0⟩
√
1− 3
⟨ψ∣ϕ⟩ = √ ≈ −0.2588
2 2
Inner products
Example
∣1⟩ √
∣ϕ⟩ = 21 ∣0⟩ + 2
3
∣1⟩
◦
105
−∣0⟩ ∣0⟩
√
1− 3 ◦
⟨ψ∣ϕ⟩ = √ = cos(105 ) ≈ −0.2588
2 2
Inner products
Example
∣1⟩ √
∣ϕ⟩ = 12 ∣0⟩ + 2
3
∣1⟩
◦
90
−∣0⟩ ∣0⟩
√
3
∣ψ⟩ = 2
∣0⟩ − 21 ∣1⟩
−∣1⟩
◦
⟨ψ∣ϕ⟩ = 0 = cos(90 )
Inner products
Relationship to the Euclidean norm
∣ψ⟩ = ∑ αa ∣a⟩
a∈Σ
with itself is
2 2
⟨ψ∣ψ⟩ = ∑ αa αa = ∑ ∣αa ∣ = ∥∣ψ⟩∥
a∈Σ a∈Σ
√
∥∣ψ⟩∥ = ⟨ψ∣ψ⟩
Inner products
Conjugate symmetry
we have
and therefore
⟨ψ∣ϕ⟩ = ⟨ϕ∣ψ⟩
Inner products
Linearity in the second argument
Suppose that ∣ψ⟩, ∣ϕ1 ⟩, and ∣ϕ2 ⟩ are vectors and α1 and α2 are
complex numbers. If we define a new vector
then
Suppose that ∣ψ1 ⟩, ∣ψ2 ⟩, and ∣ϕ⟩ are vectors and β1 and β2 are
complex numbers. If we define a new vector
then
(Equality holds if and only if ∣ψ⟩ and ∣ϕ⟩ are linearly dependent.)
Orthogonality and orthonormality
Two vectors ∣ψ⟩ and ∣ϕ⟩ are orthogonal if their inner product is zero:
⟨ψ∣ϕ⟩ = 0
An orthogonal set {∣ψ1 ⟩, . . . , ∣ψm ⟩} is one where all pairs pairs are orthogonal:
1 j=k
⟨ψj ∣ψk ⟩ = { (for all j =
/ k)
0 j=
/k
For any classical state set Σ, the set of all standard basis vectors
{∣a⟩ ∶ a ∈ Σ}
is an orthonormal basis.
Example
The set {∣+⟩, ∣−⟩} is an orthonormal basis for the 2-dimensional space
corresponding to a single qubit.
Example
+ − + −
The Bell basis {∣ϕ ⟩, ∣ϕ ⟩, ∣ψ ⟩, ∣ψ ⟩} is an orthonormal basis for the
4-dimensional space corresponding to two qubits.
Orthogonality and orthonormality
Example
The set {∣+⟩, ∣−⟩} is an orthonormal basis for the 2-dimensional space
corresponding to a single qubit.
Example
+ − + −
The Bell basis {∣ϕ ⟩, ∣ϕ ⟩, ∣ψ ⟩, ∣ψ ⟩} is an orthonormal basis for the
4-dimensional space corresponding to two qubits.
Example
1
⟨0∣+⟩ = √ = /0
2
Orthogonality and orthonormality
Fact
Suppose that
{∣ψ1 ⟩, . . . , ∣ψm ⟩}
∣ψm+1 ⟩, . . . , ∣ψn ⟩
†
Forming vectors from the columns of U, we can express U U like this:
{∣ψ1 ⟩, . . . , ∣ψm ⟩}
⎛ ⋮ ⋮ ⋮ ⋮ ⋮ ⎞
⎜ ⎟
U=⎜
⎜
⎜ ∣ψ1 ⟩ ∣ψ2 ⟩ ⋯ ∣ψm ⟩ ∣ψm+1 ⟩ ⋯ ∣ψn ⟩ ⎟
⎟
⎟
⎜ ⎟
⎝ ⋮ ⋮ ⋮ ⋮ ⋮ ⎠
Projections
A square matrix Π is called a projection if it satisfies two properties:
†
1. Π = Π
2
2. Π = Π
Example
Π = ∣ψ⟩⟨ψ∣
† † † †
Π = (∣ψ⟩⟨ψ∣) = (⟨ψ∣) (∣ψ⟩) = ∣ψ⟩⟨ψ∣ = Π
† † †
(AB) = B A
Projections
A square matrix Π is called a projection if it satisfies two properties:
†
1. Π = Π
2
2. Π = Π
Example
Π = ∣ψ⟩⟨ψ∣
† † † †
Π = (∣ψ⟩⟨ψ∣) = (⟨ψ∣) (∣ψ⟩) = ∣ψ⟩⟨ψ∣ = Π
2 2
Π = (∣ψ⟩⟨ψ∣) = ∣ψ⟩⟨ψ∣ψ⟩⟨ψ∣ = ∣ψ⟩⟨ψ∣ = Π
Projections
A square matrix Π is called a projection if it satisfies two properties:
†
1. Π = Π
2
2. Π = Π
Example
m
Π = ∑ ∣ψk ⟩⟨ψk ∣
k=1
m † m m
† †
Π = ( ∑ ∣ψk ⟩⟨ψk ∣) = ∑ (∣ψk ⟩⟨ψk ∣) = ∑ ∣ψk ⟩⟨ψk ∣ = Π
k=1 k=1 k=1
m m m
2
Π = ∑ ∑ ∣ψj ⟩⟨ψj ∣ψk ⟩⟨ψk ∣ = ∑ ∣ψk ⟩⟨ψk ∣ = Π
j=1 k=1 k=1
Projections
A square matrix Π is called a projection if it satisfies two properties:
†
1. Π = Π
2
2. Π = Π
Fact
m
Π = ∑ ∣ψk ⟩⟨ψk ∣
k=1
Π1 + ⋯ + Πm = 1
2
Pr(outcome is k) = ∥Πk ∣ψ⟩∥ = ⟨ψ∣Πk ∣ψ⟩
Πk ∣ψ⟩
∥Πk ∣ψ⟩∥
Projective measurements
We can also choose different names for the measurement outcomes. Any
collection of projections {Πa ∶ a ∈ Γ } that satisfies the condition
∑ Πa = 1
a∈Γ
describes a projective measurement having outcomes in the set Γ . The rules are
the same as before:
1. The outcome a ∈ Γ of the measurement is chosen randomly:
2
Pr(outcome is a) = ∥Πa ∣ψ⟩∥
Πa ∣ψ⟩
∥Πa ∣ψ⟩∥
Projective measurements
Example
∣ψ⟩ = ∑ αa ∣a⟩
a∈Σ
2 2
Each outcome a appears with probability ∥∣a⟩⟨a∣ψ⟩∥ = ∣αa ∣ .
∣a⟩⟨a∣ψ⟩ αa
= ∣a⟩
∥∣a⟩⟨a∣ψ⟩∥ ∣αa ∣
Projective measurements
Example
Example
{∣a⟩⟨a∣ ⊗ 1Y ∶ a ∈ Σ}
{∣a⟩⟨a∣ ⊗ 1Y ∶ a ∈ Σ}
2
∥(∣a⟩⟨a∣ ⊗ 1)∣ψ⟩∥
(∣a⟩⟨a∣ ⊗ 1)∣ψ⟩
∥(∣a⟩⟨a∣ ⊗ 1)∣ψ⟩∥
Projective measurements
Example
+ − − + +
Π0 = ∣ϕ⟩⟨ϕ ∣ + ∣ϕ ⟩⟨ϕ ∣ + ∣ψ ⟩⟨ψ ∣
− −
Π1 = ∣ψ ⟩⟨ψ ∣
×
×
∣0⟩ H H
3. Limitations of quantum information
Irrelevance of global phases
Definition
Suppose that ∣ψ⟩ and ∣ϕ⟩ are quantum state vectors satisfying
∣ϕ⟩ = α∣ψ⟩
The states ∣ψ⟩ and ∣ϕ⟩ are then said to differ by a global phase.
iθ
(This requires ∣α∣ = 1. Equivalently, α = e for some real number θ.)
Imagine that two states that differ by a global phase are measured. If we start
with the state ∣ϕ⟩, the probability to obtain any chosen outcome a is
2 2 2 2 2
∣⟨a∣ϕ⟩∣ = ∣α⟨a∣ψ⟩∣ = ∣α∣ ∣⟨a∣ψ⟩∣ = ∣⟨a∣ψ⟩∣
Suppose that ∣ψ⟩ and ∣ϕ⟩ are quantum state vectors satisfying
∣ϕ⟩ = α∣ψ⟩
The states ∣ψ⟩ and ∣ϕ⟩ are then said to differ by a global phase.
iθ
(This requires ∣α∣ = 1. Equivalently, α = e for some real number θ.)
Imagine that two states that differ by a global phase are measured. If we start
with the state ∣ϕ⟩, the probability to obtain any chosen outcome a is
2 2 2 2 2
∥Πa ∣ϕ⟩∥ = ∥αΠa ∣ψ⟩∥ = ∣α∣ ∥Πa ∣ψ⟩∥ = ∥Πa ∣ψ⟩∥
Suppose that ∣ψ⟩ and ∣ϕ⟩ are quantum state vectors satisfying
∣ϕ⟩ = α∣ψ⟩
The states ∣ψ⟩ and ∣ϕ⟩ are then said to differ by a global phase.
iθ
(This requires ∣α∣ = 1. Equivalently, α = e for some real number θ.)
Suppose we apply a unitary operation to two states that differ by a global phase:
Consequently, two quantum state vectors ∣ψ⟩ and ∣ϕ⟩ that differ by a global
phase are completely indistinguishable and are considered to be equivalent.
Irrelevance of global phases
Example
1 1 1 1
∣−⟩ = √ ∣0⟩ − √ ∣1⟩ and − ∣−⟩ = − √ ∣0⟩ + √ ∣1⟩
2 2 2 2
1 1 1 1
∣+⟩ = √ ∣0⟩ + √ ∣1⟩ and ∣−⟩ = √ ∣0⟩ − √ ∣1⟩
2 2 2 2
2 2
∣⟨0∣H∣+⟩∣ = 1 ∣⟨0∣H∣−⟩∣ = 0
2 2
∣⟨1∣H∣+⟩∣ = 0 ∣⟨1∣H∣−⟩∣ = 1
No-cloning theorem
Theorem (No-cloning theorem)
Let X and Y both have the classical state set {0, . . . , d−1}, where d ≥ 2.
There does not exist a unitary operation U on the pair (X, Y) such that
∣00000⟩ ∣ψ⟩
∣ψ⟩ ∣ψ⟩
No-cloning theorem
Theorem (No-cloning theorem)
Let X and Y both have the classical state set {0, . . . , d−1}, where d ≥ 2.
There does not exist a unitary operation U on the pair (X, Y) such that
The operation U must clone the standard basis states ∣0⟩ and ∣1⟩:
Therefore, by linearity,
1 1 1 1
U(( √ ∣0⟩ + √ ∣1⟩) ⊗ ∣0⟩) = √ ∣0⟩ ⊗ ∣0⟩ + √ ∣1⟩ ⊗ ∣1⟩
2 2 2 2
No-cloning theorem
Theorem (No-cloning theorem)
Let X and Y both have the classical state set {0, . . . , d−1}, where d ≥ 2.
There does not exist a unitary operation U on the pair (X, Y) such that
Therefore, by linearity,
1 1 1 1
U(( √ ∣0⟩ + √ ∣1⟩) ⊗ ∣0⟩) = √ ∣0⟩ ⊗ ∣0⟩ + √ ∣1⟩ ⊗ ∣1⟩
2 2 2 2
1 1
U(( √ ∣0⟩ + √ ∣1⟩) ⊗ ∣0⟩)
2 2
1 1 1 1
= ( √ ∣0⟩ + √ ∣1⟩) ⊗ ( √ ∣0⟩ + √ ∣1⟩)
2 2 2 2
No-cloning theorem
Theorem (No-cloning theorem)
Let X and Y both have the classical state set {0, . . . , d−1}, where d ≥ 2.
There does not exist a unitary operation U on the pair (X, Y) such that
Remarks:
• Approximate forms of the cloning theorem are known.
• Copying a standard basis state is possible — the no-cloning theorem does
not contradict this.
∣0⟩ + ∣a⟩
∣a⟩ ∣a⟩
Two states ∣ψ⟩ and ∣ϕ⟩ can be discriminated perfectly if there is a unitary operation
U that works like this:
0 1
∣ψ⟩ ∣ϕ⟩
U U
∣0⋯0⟩ ∣0⋯0⟩
Discriminating non-orthogonal states
0 1
∣ψ⟩ ∣ϕ⟩
U U
∣0⋯0⟩ ∣0⋯0⟩
⟨ψ∣ϕ⟩ = ⟨0⋯0∣0⋯0⟩⟨ψ∣ϕ⟩
†
= (⟨π0 ∣⟨0∣)UU (∣π1 ⟩∣1⟩) = ⟨π0 ∣π1 ⟩⟨0∣1⟩ = 0
Discriminating non-orthogonal states
Conversely, orthogonal quantum states can be perfectly discriminated.
In particular, if ∣ψ⟩ and ∣ϕ⟩ are orthogonal, then any unitary matrix whose first
two columns are ∣ψ⟩ and ∣ϕ⟩ will work.
⎛ ⎞
⎜
⎜ ⋮ ⋮ ⎟
⎟
⎜
⎜ ⎟
⎟
⎜
⎜ ⎟
⎟
⎜
⎜ ∣ψ⟩ ∣ϕ⟩
U=⎜ ⎟
⎟
⎜ ? ⎟
⎟
⎜
⎜ ⎟
⎟
⎜
⎜ ⎟
⎟
⎜
⎜ ⋮ ⋮ ⎟
⎟
⎝ ⎠
∣ψ⟩ U
† ∣0⋯00⟩ ∣ϕ⟩ †
U ∣0⋯01⟩
Discriminating non-orthogonal states
Alternatively, we can define a projective measurement {Π0 , Π1 } like this:
Π0 = ∣ψ⟩⟨ψ∣ Π1 = 1 − ∣ψ⟩⟨ψ∣
2 2
Pr[outcome is 0] = ∥Π0 ∣ψ⟩∥ = ∥∣ψ⟩∥ = 1
2 2
Pr[outcome is 1] = ∥Π1 ∣ψ⟩∥ = ∥0∥ = 0
2 2
Pr[outcome is 0] = ∥Π0 ∣ϕ⟩∥ = ∥0∥ = 0
2 2
Pr[outcome is 1] = ∥Π1 ∣ϕ⟩∥ = ∥∣ϕ⟩∥ = 1