Quantum Computing Notes
Quantum Computing Notes
Dirac Notation
Dirac Notation
Vectors
A column vector is represented as a "ket".
Outer Product
Tensor Product
|x⟩ ⊗ |y⟩ = |x⟩|y⟩ = |x, y⟩
Common Bases
Bases
Standard vectors
|label⟩ =
⎢⎥
⎡
⎣
an
a1
⟨label| = [a 1 … a n ]
Inner Product
0
0
|0⟩ = [ ], |1⟩ = [ ]
1
⎤
1 1
⎡ ⎤ ⎡ ⎤
√2 √2
|+⟩ = , |−⟩ =
1 1
⎣ ⎦ ⎣− ⎦
√2 √2
± 1 1
|Φ ⟩ = |00⟩ ± |11⟩
√2 √2
± 1 1
|Ψ ⟩ = |01⟩ ± |10⟩
√2 √2
Hadamard Operator
https://en.wikipedia.org/wiki/Hadamard_transform
H |0⟩ = |+⟩ and H |1⟩ = |−⟩
The hadamard operator is its own inverse. If you apply it twice, you end up
back at the start
It is NOT the change of basis from Z to X basis
This operator must be hermitian, so its adjoint is its inverse.
Additionally H is its own inverse, so H 2
= I
We want to measure what state the quantum system "collapses" to. Before we
measure, the system is in some inbetween state. After measurement, it is either
or.
With the definition of |ψ⟩, there is a certain probability of either |0⟩ or |1⟩ (which we
will derive shortly).
The set of all measurements operators (one for each outcome to measure)
{M x } x∈all outcomes
x∈X
For each measurement operator, the sum of all the measurement operators
applied to its adjoint must add up to one. This is in order to maintain a probability
distribution (the sum of all outcomes must add up to 1).
Outcome
The measurement operator is a mapping from M : V → V . It outputs a vector in V
space.
M x |ψ⟩
The post measured state is the quantum state of the system after measurement.
Since the application of a measurement collapses the system, M |ψ⟩ is not x
M x |ψ x ⟩
|ψ x ⟩ =
√ ⟨M x |ψ x ⟩|M x |ψ x ⟩⟩
These are a lot of symbols, but if we break it down, let the measurement outcome
be |ψ ⟩ = M |ψ ⟩
O x x
|ψ O ⟩ |ψ O ⟩
|ψ x ⟩ = =
√ ⟨ψ O |ψ O ⟩ ∣∣ |ψ O ⟩ ∣∣
Probability of outcome x
The probability of measuring outcome x is simply the squared magnitude of the
measuredment outcome |ψ ⟩ = M |ψ ⟩
O x x
P (x) = ⟨ψ O |ψ O ⟩
Since we take the conjugate of the second argument, this results in taking the
adjoint of M and |ψ ⟩
x x
–
∗ ∗
⟨ψ O |ψ O ⟩ = I P (M x |ψ x ⟩, M x |ψ x ⟩) = M x |ψ x ⟩⟨ψ x |M x = ⟨ψ x |M x M x |ψ x ⟩
Phase
Global phase
∗ −iθ ∗ iθ
p G (i) = w/ global phase = (⟨ψ|U e M i )(M i e U |ψ⟩)
iθ −iθ ∗ ∗
= e e (⟨ψ|U M M i U |ψ⟩)
i
∗ ∗
= ⟨ψ|U M i M i U |ψ⟩
Let U convert psi in the B basis to the Z basis. |ψ⟩ → U |ψ⟩ = |ϕ⟩
n
˙ 2 2 2
p(i) = | ⟨i|ϕ⟩| = |⟨i|U |ψ⟩| = |⟨i| (∑ |j⟩⟨b j |)|ψ⟩|
j=1
˙ 2
p(i) =∣ ⟨b i |ψ⟩ ∣
4: Combining 2 systems
|ψ⟩ ∈ C
n
, |μ⟩ ∈ C n
The state space of a composite system is the Tensor Product of the individual
spaces.
Joint state: |ψ⟩ ⊗ |u⟩
See more Entangled systems
Q-bit dimension
Two qbits: C 2
⊗ C
2
≅C
4
Example:
2 different particles and I want to apply two different operators A and B to each
particle
(A|ψ⟩) ⊗ (B|μ⟩)
Example:
Computing inner product with the bell basis
1 1
|ψ⟩ = |+⟩ ⊗ |+⟩ + |−⟩ ⊗ |−⟩
√2 √2
Find: ⟨Ψ +
|Ψ
+
⟩
1 1 1
( ⟨0| ⊗ ⟨0| + ⟨1| ⊗ ⟨1|) ( |0⟩ ⊗ |0⟩ +
√2 √2 √2
1 1 1 1
= (⟨0| ⊗ ⟨0|)(|0⟩ ⊗ |0⟩) + (⟨0| ⊗ ⟨0|)(|1⟩ ⊗ |1⟩) + (⟨1| ⊗ ⟨1|)(|0⟩ ⊗ |0⟩) + (⟨1|
2 2 2 2
1
= 1 ∗ 1 +
2
Find: ⟨Ψ +
|Ψ
−
⟩ = 0
Find: ⟨Ψ +
|ψ⟩
1 1 1 1
( ⟨0| ⊗ ⟨0| + ⟨1| ⊗ ⟨1|) ( |+⟩ ⊗ |+⟩ + |−⟩ ⊗ |−⟩)
√2 √2 √2 √2
1 1 1 1
= ( ⟨0|+⟩ ⊗ ⟨0|+⟩) + ⟨00| − −⟩ + ⟨11| + +⟩ + ⟨11| − −⟩
2 2 2 2
1 1 1 1 1 1 1 1 1 1 1 1
= ( ) + ( ) + ( ) + (− ∗ − ) = 1
2 √2 √2 2 √2 √2 2 √2 √2 2 √2 √2
Measurement
Measurement
∗
P (0) = ⟨ψ|M M 0 |ψ⟩ = ⟨ψ|0⟩ ⟨0|0⟩ ⟨0|ψ⟩
0
Since ⟨0|0⟩ is 1,
⟨ψ|0⟩ ⟨0|ψ⟩
–
= ⟨ψ|0⟩⟨0|ψ⟩
2
=∣ ⟨ψ|0⟩ ∣
2
=∣ α ∣
So the probability of observing |0⟩ is the same as the α component squared. This
relates to the Pythagorean Theorem because the total probability must always be
1
Measuring q-dits
See Dirac Notation > ^b2b33e
1. Write |ψ⟩ = ∑
n
|v i ⟩ ⊗ |b i ⟩
i=0
You can measure in any basiswrite any vector in the basis you are measuring
If measuring in V basis, need v
1
|0⟩ = (|+⟩ + |−⟩)
√2
( )
1 1 1 1 1 1
( |+⟩ + |−⟩)|0⟩ + ( |+⟩ − |−⟩)) =
√2 √2 √2 √2 √2 √2
1
(|+⟩)
2
1. P (′′v i ′′) = ⟨b i |b i ⟩
Entangled Systems
Entangled systems
https://en.wikipedia.org/wiki/Quantum_foundations
Entaglement
Operations on one particle (a subspace of the tensor) affects the global state
Alice has access to left subspace, Bob to the right
1 1
|00⟩ + |11⟩
√2 √2
ABAB
|0⟩ ⊗ |0⟩; |1⟩ ⊗ |1⟩
example: Find H ⊗ H |Φ +
⟩ in the z basis
H is the haddamard operator
1
= (H ⊗ H |00⟩ + H ⊗ H |11⟩)
√2
1 1
= |++⟩ + |−−⟩
√2 √2
1 1 1 1 1 1 1 1
= ( |0⟩ + |1⟩) ⊗ ( |0⟩ + |1⟩) + ( |0⟩ − |1⟩) ⊗
√2 √2 √2 √2 √2 √2 √2 √2
1 1
= (|00⟩ + |10⟩ + |01⟩ + |11⟩) + (|00⟩ −
2√ 2 2√ 2
1
= |00
√2
Alice does something and bob does nothing, that is the same as alice does
nothing and bob does something
$$\begin{align}
\end{align}$$
∗ ∗
= ∑(M x ⊗ I )(M x ⊗ I ) = ∑ M x M x ⊗ I
∗
= (∑ M Mx ) ⊗ I
x
= I ⊗ I = I
+
1 1
N 0 |Ψ ⟩ = (|0⟩⟨0| ⊗ I )|00⟩ + (|0⟩⟨0| ⊗ I )|11⟩
√2 √2
1 1
= |0⟩ ⟨0|0⟩ ⊗ |0⟩ + |0⟩ ⟨0|1⟩ ⊗ |1⟩
√2 √2
1
= |00⟩
√2
1 1 1 1 1
⟨00| |00⟩ = ⟨00|00⟩ = ⟨0|0⟩ ⟨0|0⟩ =
√2 √2 2 2 2
Quantum Nonlocality
https://en.wikipedia.org/wiki/Quantum_nonlocality
x y xy a and b
0 0 0 a(0) xor b(0)
Classical
Probability of winning is sum of all possibilities
P (win) = ∑ V (a, b, x, y)P (ab|xy)P (xy)
x,y,a,b
V (a, b, x, y) = 1 if a xor b = xy or 0
P (ab|xy) = (ab|x, y, λ)P (λ)
Quantum strategy
Instead of sharing classical lambda, share a bell state |Φ +
⟩ = |00⟩ + |11⟩
Alice:
Bob
1. If y=0, measure in Z basis and output b
2. If y=1, change of basis with R −
π
8
and then measure in the z-basis and output
b
3.
Cases
x=0, y=0, win with probability 1
x=1, y=0 or x=0,y=1 win with probability approx 85%
1 1
(R π
⊗ I) ( |00⟩ + |11⟩) =
8
√2 √2
1 1
= R π
⊗ I |00⟩ + R π
⊗ I |11⟩
8 AB 8 AB
√2 √2
1 π π π
= (cos |0⟩ )|0⟩ 1 (− sin + cos |1⟩)
A B+
√2 8 √2 8 8
1 π 1 π 1 π 1
= cos |00⟩ + sin |10⟩ − sin |01⟩ +
√2 8 √2 8 √2 8 √2
If they see a 00 or a 11, then they win because product of xy must equal a
xor b (add)
Square the coefficients to get the probability of winning in this strategy
2
1 π 1 2 π
P (W ) = cos + cos ≈ 85%
2 8 2 8
4
(1 + 0.85 + 0.85 + 0.5) ≈ 80%
Comparison
shared classical < entanglement < PR-box (something that is always right) < 1 bit
faster than light travel
Measuring along the basis |ψ +
⟩ for state |++⟩
+ +
P (ψ ) =∣ ⟨+ + |ψ ⟩ ∣
∑ N x∗ N x
Hadamard w/ entanglement
Bases > Hadamard Operator
1
= (|0, 0, … , 0⟩ + |0 … 01⟩ + ⋯ + |
n
√2
1
= ∑
n
√2
x∈{
Find H ⊗n
1. Re-write H
Assume that |x ⟩ represents an input vector and |y
n n⟩ is the corresp. output
vector
Hadmard is defined as H = |+⟩⟨0| + |−⟩⟨1|
1 1
H = (|0⟩ + |1⟩)⟨0| + (|0⟩ − |1⟩)⟨1|
√2 √2
1
= (|0⟩⟨0| + |1⟩⟨0| + |0⟩⟨1| − |1⟩⟨1|)
√2
√2
∑
x,y∈{0,1}
(−1)
xy
|y⟩⟨x|
⎛ ⎞ ⎛ ⎞
1
x1 y1 xn yn
= ∑ (−1) |y 1 ⟩⟨x 1 | ⊗ ⋯ ⊗ ∑ (−1) |y n ⟩⟨x n |
√2 n ⎝ ⎠ ⎝ ⎠
x 1 ,y 1 ∈{0,1} x n ,y n ∈{0,1}
1 x 1 y 1 +x 2 y 2 +⋯+x n y n
= ∑ ∑ … ∑ (−1) |y 1 … y n ⟩⟨x 1 … x n |
√2 n
x 1 ,y 1 ∈{0,1} x 2 ,y 2 ∈{0,1} x n ,y n ∈{0,1}
1
x⋅y
= ∑ ∑ (−1) |y⟩⟨x|
n
√2 n n
x∈{0,1} y∈{0,1}
1
x⋅y
= ∑ (−1) |y⟩⟨x|
n
√2 n
x,y∈{0,1}
Intuition
H |0⟩ = |+⟩ =
1
√2
(|0⟩ + |1⟩) which creates a balanced superposition between
0 and 1
H is an operator that creates a superposition of all possible bitstring inputs
⊗n
√2
n ∑
y 1 ..y n ∈{0,1}
n (−1)
x⋅y
|y 1 … y n ⟩
POVMs
POVMs (Positive Operator Valued Measures)
Definition: A collection of operators that are positive and the following are true
Positive because p(x) = ⟨ψ|M M |ψ⟩ = ⟨y|y⟩ and the inner product of same
∗
x x
Basic Gates
Circuit: acts on n-qubits and consists of multiple "gates" (simple unitary
operators)
https://en.wikipedia.org/wiki/Quantum_logic_gate
NOT gate: the X pauli matrices
Phase flip: the Z pauli matrixes
Pauli X-gate
Maps |0⟩ → |1⟩ and |1⟩ → |0⟩
Each wire = 1 qubit, unless notated otherwise
Each qubit wire is really tensored together
Oracle gate
{0, 1}represents an n-bit string. f (x) represents a classical function converted to
n
quantum gates
Let U be the oracle function {0, 1} → {0, 1}
f
n m
Ensure invertible
U f |x⟩ = |f (x)⟩ is not answer. Not invertible b/c n ≠ m (diff dimension size)
Solution: Def an n qubit input register |x⟩ ⊗n
and init output register w/ m
qubits |y⟩ ⊗m
so n + m → n + m
Input register is "pass through"
Output register is dummy input (initialized |y⟩ )
|m⟩ |m⟩
= |0⟩
a b a ⊕ b
0 0 0
0 1 1
1 0 1
1 1 0
Option 2 (intuitively)
′ ′ ′
⟨x, y ⊕ f (x) ∣ x , y ⊕ f (x )⟩
If x and x are different (0 and 1), then the inner products are both
′
′
⟨x|x ⟩ ⊗ ⟨1 ⊕ f (x)|1 ⊕ f (x )⟩ = 1
′
b/c x and x' must be 1 or else it would cancel
etc
Controlled Operations
Any controlled operation c(U ) can be constructed from single qubit ops and a
CNOT
"If one thing is true, do U. Otherwise, do nothing"
Control-Not (CN OT )
If the control is in a state of |1⟩, then apply the NOT gate to the target
CN OT |a, b⟩ = |a, a ⊕ b⟩
CN OT |0, 0⟩ = |0, 0⟩
CN OT |0, 1⟩ = |0, 1⟩
CN OT |1, 0⟩ = |1, 1⟩
CN OT |1, 1⟩ = |1, 0⟩
Controlled Gate
A unitary operator that applies a gate depending on a control bit (when = 1)
Can replace I with another gate if you want to apply a diff operator when =
B
Check
Check c(U )|0⟩ ⊗ |ψ⟩ = |0⟩ should not use U b/c control is inactive
= |0⟩|ψ⟩ + 0
= 0 + |1⟩U |ψ⟩
If control=0
If control=1
Alpha gate
A unitary gate which applies a phase
|0⟩ → e
iα
|0⟩ and |1⟩ → e iα
|1⟩
1 0
V = ( )$$![[P astedimage20230320153144.png]]
iα
0 e
Toeffoli gate
A 3 qubit operation, |x, y, z⟩ → |x, y, z ⊕ xy⟩
Means if y AND z are both 1, then flip z
Like a double input controlled NOT, C 2
(X)
Can be built from CNOT (2-qubit op) and unitaries (1-qubit op). Can't do it
classically with the same number of inputs
Process
1. Prepare a state |ψ ⟩, which is |x x … x ⟩ and x ∈ {0, 1}
x 1 2 n n
Practicality
It is not always practical to create U because it is 2 × 2 matrix. Use basic
n n
Deutsch-Joza Algorithm
#game
A person gives the computer a function f (x) where f : {0, 1}
n
→ {0, 1} and are
promised either
balanced - half of input space outputs a 0, and half outputs a 1 (randomly
assigned)
constant - constant (0 or 1) for all values of x
Assuming f (x) can be converted into a quantum circuit (so inputs are a
superposition of possible inputs), this algorithm can give with 100% certainty
whether balanced or constant. Uses "quantum parallelism"
Summary
Classical needs 2 n−1
+ 1 queries worst case while quantum needs only 1
Need to test half input space + 1 to determine if balanced or constant (
n
2
+ 1
2
)
"Phase kickback" where by algebraic manipulation you can re-express the
current state differently so the classical output is in the phase
|t 1 ⟩
|t 2 ⟩
1
|t 2 ⟩ : U f |t 1 ⟩ = ∑ |x⟩|0 ⊕ f (x)⟩ − |x⟩|1 ⊕ f (x)⟩
√ 2 n+1 n
x∈{0,1}
If f(x)=1:
1 1
∑ |x⟩ ⊗ (|0 ⊕ 1⟩ − |1 ⊕ 1⟩) = ∑ |x⟩(|1⟩ − |0⟩)
√ 2 n+1 n √ 2 n+1 n
x∈{0,1} x∈{0,1}
1
= ∑ −|x⟩|−⟩
√2 n n
x∈{0,1}
If f(x)=0:
1 1
∑ |x⟩ ⊗ (|0 ⊕ 0⟩ − |1 ⊕ 0⟩) = ∑ |x⟩(|0⟩ − |1⟩)
√ 2 n+1 √ 2 n+1
x∈{0,1} n x∈{0,1} n
1
= ∑ |x⟩|−⟩
√2 n n
x∈{0,1}
Notice the negative sign is the only difference. We can "kick back" the phase (the
sign) by making it depend on the value of f(x) only.
1
f (x)
|t 2 ⟩ = ∑ (−1) |x, −⟩
√2 n
n
x∈{0,1}
|t 3 ⟩
⎛ ⎞
1
⊗n f (x) ⊗n
|t 3 ⟩ : (H ⊗ I )|t 2 ⟩ = ∑ (−1) H |x⟩ ⊗ I |−⟩
⎝ √2 n n
⎠
x∈{0,1}
⎛ ⎞
1 f (x)
1 x⋅z
= ∑ (−1) ∑ (−1) |z⟩ ⟨x|x⟩ ⊗ |−⟩
√2 n n √2 n ⎝ n
⎠
x∈{0,1} z∈{0,1}
1 f (x)+x⋅z
= ∑ ∑ (−1) |z⟩ ⊗ |−⟩
n
2
n n
z∈{0,1} x∈{0,1}
The ⊗|−⟩ is known as a separable state. It can effectively be "factored" out of the
entire sum.
∑
x∈{0,1}
n is the superposition of all input bit strings
∑
z∈{0,1}
n is the sum of all possible outcomes, similar to
α|0 … 0⟩ + β|00 … 1⟩ + ⋯ + z|1 … 1⟩
2n
∑
x∈{0,1}
n (−1)
f (x)+x⋅z
1 f (x)+x⋅z
P (z = 0 … 0) = ∑ (−1)
n
2
x∈{0,1} n
1
f (x)
because z=all zeroes, ∑ (−1)
n
2
n
x∈{0,1}
f(x)=1
Example
period?
∣
If f(x) is balanced (half 1s, half 0s)
2
1
n
∑
x∈{0,1}
Quantum teleportation
n
(−1)
1
f (x) = f (x + r) = f (x + 2r)
n
f (x)
x∈{0,1}
2
(−1)
n
f (x)
∈ {0, 1}
2
You have a punction with a hidden period s. In how many queries can you find the
Alice needs to send two classical bits to Bob so then he can apply the x and
z gate depending on what Bob's results are
1 entangled bit + 2 classical bits >= 1-qubit
Superdense coding
Density Operators
n
1
2
n
(−2
(1 + 1 + ⋯ + 1) + (−1 − 1 ⋯ − 1)
n/2
n
)
2
= 1
= 0
+ + ∗
+p(01)(X A ⊗ I B |Φ ⟩⟨Φ |X ⊗ I)
X- not gate
+ + + + − − − −
ρ = p(00)|Φ ⟩⟨Φ | + p(01)|Ψ ⟩⟨Ψ | + p(10)|Φ ⟩⟨Φ | + p(11)|Ψ ⟩⟨Ψ |
2
1
1 I
+ +
tr A (|Φ ⟩⟨Φ |) = (|0⟩⟨0| + |1⟩⟨1|) =
2 2
1 1
Δ(ρ, σ) = tr|ρ − σ| = ∑ |λ i |
2 2
Properties
Δ(ρ, σ) = Δ(σ, ρ)
Δ(ρ, ρ) = 0
let tau=rho
0 ≤ 1 ≤ 2
1
0 ≤ ≤ 1
2
Density operator ρ = ∑ n
i=0
P x (i)|i⟩ ⟨i⟩ and ρ = ∑ n
i=0
P y (i)|i⟩⟨i|
n n
i=0 i=0
2
n
i=0 x y
Quantum Teleportation
Quantum Teleportation
Alice has a quantum state |ψ⟩ = α|0⟩ + β|1⟩she wants to the information send to
Bob. How does she do it?
You never are transmitting particles! Just information about the state
state
Overview
1. Split a bell pair |Φ +
⟩ =
1
√2
(|00⟩ + |11⟩) particle and give one to Alice and one
to Bob
Alice has two particles, her quantum state and her bell pair
2. Alice applies a CN OT w/ Alice's particle (control) and Bob's particle target
3. Alice applies hadamard on the state she wants to send
4. She then measures the state of |ψ⟩ and her pair. She sends the classical
information to Bob who then applies an X gate or a Z gate based on
5. Alice measures her particle's state
Derivation
+ 1 1 1
t 0 = |ψ⟩ ⊗ |Φ ⟩ = (α|0⟩ + β|1⟩) ( |00⟩ + |11⟩) = (α|000⟩ + α|011⟩ + β|100⟩
√2 √2 √2
Apply the CNOT gate to |ψ⟩ (control) and to Alice's bell pair (target)
If |ψ⟩ = 1, then that flips the bell pair
Doesn't affect Bob's bell pair
2
t 2 = (H ⊗ I )|t 1 ⟩ =
1 1
(α(|0⟩ + |1⟩)|00⟩ + α(|0⟩ + |1⟩)|11⟩ + β(|0⟩ − |1⟩)|10⟩ + β(|0⟩ − |1⟩)|01⟩)
√2 √2
1
= (α|000⟩ + α|100⟩ + α|011⟩ + α|111⟩ + β|010⟩ − β|110⟩ + β|001⟩ − β|101⟩)
2
1 1
|00⟩ ⊗ ( α|0⟩ + β|1⟩)
2 2
1 1
+|01⟩ ⊗ ( α|1⟩ + β|0⟩)
2 2
1 1
+|10⟩ ⊗ ( α|0⟩ − β|1⟩)
2 2
1 1
+|11⟩ ⊗ ( α|1⟩ − β|0⟩)
2 2
We know α 2
+ β
2
= 1 b/c is a normalized quantum state
If you have 01 you can do a bit flip and get |ψ⟩ back!
The X gate (bit flip) is controlled by the second bit
Density Operators
Density Operators
for i = 1 to i = n
The density operator is defined as ρ = ∑ i
p i |ψ i ⟩⟨ψ i |
Requirements
1. Must be Hermitian ρ ∗
= ρ
Partial trace
Is linear
Is equivalent to zooming in to a single party's particle to see what information
is available to them
Trace of outer product is same as inner product
tr A ignores A's information. Only gives the reality that B can observe
= ⟨a 1 |a 2 ⟩|b 1 ⟩⟨b 2 |
**any operator can be written as ρ = ∑ |a 1,i ⟩⟨a 2,i | ⊗ |b 1,i ⟩⟨b 2,i |
Postulates
1. Open systems w/ incomplete information/uncertainty of state can be made
with the density operator
2. Given ρ and U , the evolved state is U ρU ∗
Examples
What is the prob of measuring |ψ⟩ with the ensembled (1, |ψ⟩⟨ψ|)?
= tr(|0⟩ ⟨0|0⟩⟨0|(|ψ⟩⟨ψ|))
= tr(|0⟩⟨0|)
2
⟨ψ|(|0⟩ ⟨0|0⟩⟨0|)|ψ⟩ = ⟨ψ|0⟩ ⟨0|ψ⟩ = | ⟨ψ|0⟩|
Fourier Transform
Fourier transform
√N
∑
n−1
j=0
xj e
2πijk/N
∑ x j |j⟩ → ∑ y k |k⟩
j=0 k−0
yk is FT of state amplitude x j
Prep work
1. Write the state |j⟩ in binary form, j = j 12
n−1
+ ⋯ + jn 2
0
, or shorthand
j = j1 j2 … jn
2
j1
4
jm
2
m+1
Definition
(0.j n ) (0.j n−1 j n ) (0.j 1 j 2 …j n )
(|0⟩ + ω |1⟩) ⊗ (|0⟩ + ω |1⟩) ⊗ ⋯ ⊗ (|0⟩ + ω |1⟩)
|j 1 , … , j n ⟩ =
n/2
2
1 0
Rk = [ k
]
2πi/2
0 e
Examples
QFT of |0⟩
1 n−1 jk
|j⟩ → QFT → ∑ ω |k⟩
√N k=0
1 0⋅0 0⋅1
(ω |0⟩ + ω |1⟩)
√2
1
(|0⟩ + |1⟩)
2
|w⟩ = exp(
If we can show F
† †
F = FF = I
n n
2 −1 2 −1
† 1 ′ ′ † 1
j k ′ ′ jk
F F = ( ∑ (ω ) |j ⟩⟨k |) ( ∑ ω |k⟩⟨j|)
√2 n √2 n
j ′ ,k ′ =0 j,k=0
1 ′
−j k
′
′ ′
( ∑ ω |j ⟩ ⟨k |k⟩⟨j|)
n
2 ′ ′
k ,j ,k,j
Quantum complexity
Quantum Complexity
√2
(|00⟩ + |11⟩) This is equivalent to copying the state
You can use CNOTs to "record" what you would have measured at that point
and copy into an auxiliary register
If |ψ⟩ = 1
√2
(|0⟩ + |1⟩) , we can save a copy of |ψ⟩ into another register
Auxiliary space keeps track of all the possible outcomes that could have
been
The complexity of an algorithm isn't solely on the unitary operations, but also
the measurements.
No cloning theorem
There does not exist an operator U such that U |ψ, 0⟩ = |ψ⟩ ⊗ |ψ⟩ for all |ψ⟩
Correlary
If you can't clone something, then you can't erase a quantum state
U |ψ, ψ⟩ → |ψ, 0⟩ , which is really U ∗
|ψ, 0⟩ → |ψ, ψ⟩ which is the no cloning
theorem
Shor's Algorithm
Shor's Algorithm
Factoring
Two prime factors of a number n can be determined by
2
n ≡ 1 (mod n)
2
n − 1 ≡ 0 (mod n)
(n + 1)(n − 1) ≡ 0 (mod n)
Periodicity
f is periodic if f (a) = f (a + n) for period size n
f (r) = a
r
(mod n) are periodic
a must be co-prime with n (guess, if not, try again with a different guess)