Seminars on Quantum Computing

Zhengfeng Ji

Lecture 1: Introduction to Quantum Computing

About this Course

Welcome

Seminars on Quantum Computing is a quantum computing course designed for undergraduate students in the computer science.

This is an incomplete set of notes prepared by Zhengfeng Ji for the course.

Quantum Computing

  1. What is quantum computing, or more generally, what is quantum information science?

    The first example question in ChatGPT: Explain quantum computing in simple terms.

    ChatGPT example questions

    The answer I got was:

    Quantum computing is a type of computing that uses the principles of quantum mechanics, the science of the very small, to process information. Instead of using classical bits, which can be either 0 or 1, quantum computers use quantum bits or qubits, which can be in multiple states at the same time.

    This ability to exist in multiple states simultaneously is called superposition and allows quantum computers to perform certain calculations much faster than classical computers. In addition, quantum computers can also use a phenomenon called entanglement, where the state of one qubit is correlated with the state of another, to further enhance their computational power.

    Quantum computing has the potential to solve some of the world's most challenging problems in fields such as cryptography, drug discovery, and climate modeling. However, building a fully functional quantum computer remains a major scientific and engineering challenge, and many of the applications of quantum computing are still in the experimental stage.

    You can try DeepSeek V3 and you will get something similar or better.

    They all describe the outline and motivation of this course well!

  2. Quantum + Information: The second quantum revolution

    The success of quantum mechanics. Laser, GPS, etc.

    From passive understanding of the collective effects to active manipulation of individual particles.

History, Highlights, Current Status

  1. History and highlights

    a. Early history: Feynman 1982, Deutsch 1985, Deutsch-Jozsa 1992 b. Shor's factoring algorithm 1994 (breaks RSA) c. Quantum cryptography (QKD, Bennett Brassard 84) d. Quantum teleportation (Bennett et al., 1993) e. Simulation of quantum systems (Feynman's dream)

  2. Current status

    Primitive quantum computers are being built. Many players are racing to build quantum computers: Google, IBM, China, …

    Different labs/companies are betting on different hardware routes: Superconducting qubits, ion traps, photonic systems, topological qubits, and more recently, neutral atom platforms.

    Nowadays, there are programmable quantum computers with 50-1000 qubits.

    Major problem: devices are noisy! The noise level is around 103.

  3. Supremacy and simulation of Google and USTC

    Google Sycamore

    Sycamore, 53 qubits

    Zhuchongzhi, 66 qubits

    The biggest competitor to quantum computers are clever classical algorithms: In Nov 2021, a group from Chinese Academy of Sciences used tensor network algorithms to reproduce the statistics of the Google supremacy experiment using 512 GPUs in 15 hours.

    Both Google and USTC have upgraded the system to battle against better classical simulation methods and hardware.

  4. On the theory side: new algorithms, new protocols, fault-tolerant quantum computing, new insights on the power of quantum computers

    More computer scientists get involved

  5. Hype?

    a. TIME's new cover: Quantum computers will transform our world—and create a 21st century "space race"

    b. Quantum computing has a hype problem, MIT Technology Review, By Sankar Das Sarma.

    Quantum computing startups are all the rage, but it's unclear if they'll be able to produce anything of use in the near future.

Learning Quantum Computing

  1. What you will learn in this subject

    1. Quantum information basics (for about 1/3 of the time)
    2. Topics in quantum computing
    3. Research skills. Get an idea of what the big questions are for quantum computing.
  2. Is quantum computing hard to learn?

    The mathematics is easy, the physics is hard.

    There is a simple mathematical framework describing quantum mechanics with merely four postulates, about state space, evolution, measurement, and joint system, respectively, in both the pure state and mixed state settings.

    The postulates are simple, but the truly amazing thing to note is how far these four simple postulates can bring us.

    "Shut up and calculate!"

  3. Reiterate over the four postulates from different perspectives.

Lecturers

  • Zhengfeng Ji, Yuan Feng, and Jianxin Chen

  • Office: 1-707, Ziqiang S&T Building

  • Research direction of Zhengfeng

    Quantum computing, theory of computing.

  • Research direction of Yuan

    Quantum computing, theory of programming, mathematical logic.

  • Research direction of Jianxin

    Quantum computing, computer architecture.

Q & A

  • Online: Wechat group, learn.tsinghua.edu.cn, email

  • Office hour: after each class

Assessment

  1. Homework on the quantum information basics. (40%)

  2. Work on projects in groups and take an idea to the extreme (Given projects, or projects of your choice approved by your lecturers), write an essay, present your findings.

    We will grade your project by its writing and format (10%), originality (20%), completion (10%), and presentation (20%).

  3. Extra rule: If your project yields results deemed near-publishable by the teachers' evaluation, you will automatically receive an A+.

Textbook

a. Quantum Computation and Quantum Information (Mike & Ike)

b. Aaronson Lecture Notes

c. de Wolf Lecture Notes

d. Foundations of Quantum Programming by Mingsheng (Tsinghua Online Access)

CS, Mathematics, and Physics

Quantum Computing is Interdisciplinary

Computer science

Mathematics

Physics

  1. Three basic statements about the physical world

    1. Probability

      jPj=1,Pj0

      Monotonicity

      Single-slit case

    2. Locality

      Things can only propagate through the universe at a certain speed.

      In physics, locality naturally emerges from Einstein's special theory of relativity, which implies that no signal can propagate faster than the speed of light.

    3. Local Realism

      Things have predetermined value, which depends on parameters in a local region.

      Einstein: I like to think the moon is there even if I am not looking at it.

  2. Church-Turing thesis

    What is Church-Turing thesis?

    TCS is mathematics but the Church-Turing thesis connects it to physics.

    Information is physical.

    Conversely: It from qubit.

  3. Quantum mechanics and the above principles

    Probability stays, yet monotonicity goes away.

    Locality stays but realism is abandoned.

    EPR and Bell's inequality.

    Quantum computing does not falsify Church-Turing, but seriously challenges the extended Church-Turing thesis.

The Double-Slit Experiment

Single-slit and double-slit pattern

Watch this video.

Double-slit with an observer: which path did the electron take?

If there is a conscious observer, the distribution goes back to classical! That is the same as decoherence in a quantum system interacting with an environment!

Quantum mechanics is an (unusual) theory using probability.

A cat isn't found in a superposition of alive and dead states, because it interacts constantly with its environment. These interactions essentially leak information about the 'cat system' out.

This explains the difficulty of building a quantum computer. Quantum computers need to be isolated well from the environment yet still easy to manipulate.

Shor's factoring algorithm can be thought of as a large-scale interference experiment.

  1. Born's rule

    1. Probability stays but monotonicity goes.

      God does play dice, and an unusual one.

      Einstein liked inventing phrases such as "God does not play dice," "The Lord is subtle but not malicious." On one occasion Bohr answered, "Einstein, stop telling God what to do."

      Instead of probabilities, quantum mechanics uses amplitudes.

      p=|α|2.

    2. Let αi be the amplitude that it lands on a position through slit i.

      α=α1+α2.

      Example α1=1/2 and α2=1/2. What is the probability p?

      Cancellation!

Linear Algebra Formulation

Linear Algebra for Probabilities

  • Consider the problem of flipping a coin.

    Pr(heads)=p,Pr(tails)=q.

  • Apply a transform X.

    In general, the transform is a matrix of transition probabilities p(a|b).

    Markov chain and stochastic matrix.

    Now consider two independent coins. This leads to the tensor product very naturally.

    More generally, the tensor product of two matrices A,B is defined as a block matrix

    AB=(A1,1BA1,2BA1,nBA2,1BA2,2BA2,nBAm,1BAm,2BAm,nB).
  • Consider the CNOT matrix.

    It creates a correlation between the two coins.

  • Quantum mechanics is similar, except that it uses amplitudes.

Quantum (Pure) States

A quantum state is a unit vector of CN.

Finite dimensional spaces suffice for this course.

A qubit is a superposition of 0 and 1.

Quantum states are superposition of possibilities.

Dirac notation.

ket, bra (|0,|1,|+,|,|ψ).

State Transformation

Unitary. UU=I.

Examples: I,X,Y,Z,H,S,T, CNOT, rotations.

H=12[1111]. H|0=|+,H|1=|.

Why unitary? Unitary operators are the only operators that preserve the length of vectors.

Reading I

  1. Movie: The Quantum Tamers

  2. 一场从根上开始的革命 (by Mingsheng Ying)

  3. Simulating physics with computers (by Richard P. Feynman)

  4. 40 years of quantum computing

    • 18:01 Charlie Bennett - 1981 and the Beginning of Quantum Information

    • 49:20 Peter Shor - Development of Quantum Algorithms and Error Correction

Lecture 2: Postulates of Quantum Mechanics

Recap

  • Probability, amplitude, and Born's rule

    Two-slit experiment

    A (classical) random bit the mixture of 0 or 1 described by probabilities.

    A quantum bit (qubit) is a superposition state described by amplitudes for 0 and 1.

    1-norm vs. 2-norm theory.

  • Linear algebra for probability

    A (random) bit is represented as a vector (p0p1).

    X and CNOT as operations on the probability vector.

    X is the NOT gate in matrix form!

    CNOT says if the control bit is 1, flip the target bit.

    Tensor product arises naturally.

    Binary symmetric channel as a matrix.

  • Linear algebra for quantum mechanics

  • Quantum gates

    • Unitary gates

    • Pauli X,Y,Z

    • The Hadamard gate H

Hadamard Gates and Quantum Interference

  • In some sense, the most important quantum gate.

  • The Hadamard gate H has the matrix form

    H=12[1111].

    It maps |0,|1 to |+,|, and vice versa.

  • H and H2.

    Destructive interference (in the tree for H2|0).

  • All quantum gates are changes of basis.

    We can expand |0 in the basis of |+ and |.

Born's Rule Revisited

  • |0,|1 is not special.

  • There are different ways to measure in quantum!

  • What if we measure along another choice of basis? Say, |+,|?

    Decompose the state |ψ as a combination of |+ and |.

  • Two views:

    1. Apply H, and measure in the standard basis,
    2. Measure in the |± basis (X basis).
  • The projection picture on the circle.

  • Projective measurements.

Multiple Qubits

Like calculating the probability of two independent random bits, we can use the tensor product to represent the state of multiple qubits.

It is now the tensor product of quantum states (vectors of amplitudes instead of vectors of probabilities).

  1. Two-qubit states

    • A general two-qubit state is

      |ψ=α|00+β|01+γ|10+δ|11
    • It is the superposition of four possibilities.

    • Born's rule gives the probability of four outcomes.

    • In principle there's no distance limitation between the two qubits.

      Let's say the first qubit is in Alice's hand. What happens if Alice measures it?

      If Alice obtained 0 outcome, then the state is

      α|00+β|11|α|2+|β|2.
    • This is called the Partial Measurement Rule, which follows from the measurement postulate.

      M0=|00|IM1=|11|I
  2. Two-qubit gates

    Single-qubit gates as a two-qubit gate: XI and IX.

    Applying the same single-qubit gate on the two qubits: HH.

    CNOT gate.

More Linear Algebra Facts

We need some facts from linear algebra to take our grasp of quantum mechanics to the next level.

Matrix and Vectors

A(jaj|vj)=jajA|vj.

Matrix entries Aij=i|A|j.

Inner Product

  1. Hilbert space: vector space with an inner product.

    What is an inner product (,)?

    1. Linear in the second argument,
    2. (|u,|v)=(|v,|u),
    3. (|u,|u)0 with equality iff |u=0.

    A concrete example is

    (|u,|v)=j=1dujvj.

    Question: is this the only possibility?

    Dirac notation u|v.

  2. The norm is induced by the inner product (of the Hilbert space).

    |u=u|u.

    The normalization of |u is |u/|u.

  3. The decomposition of a state into basis

    |ψ=jaj|λj.

    Then

    aj=λj|ψ.
  4. Orthonormal basis and completeness relation:

    If {|λi} form an orthonormal basis, then we have

    j|λjλj|=I.
  5. Adjoints of operators

    Let A be a linear operator on a Hilbert space. There exists a unique operator A such that for all |v,|w,

    (|v,A|w)=(A|v,|w).

    In the matrix form, A is the conjugate transpose of A.

Eigenvalues and Eigenvectors

A|λ=λ|λ.

Matrix A is diagonalizable if A=jλj|λjλj| where |λj form an orthonormal set of eigenvectors of A.

Example: What is the eigenvalues and eigenvectors of X?

  • Spectral decomposition theorem

    Theorem. Any normal operator A on space V is diagonalizable with respect to some orthonormal basis of V, and vice versa.

  • Families of diagonalizable matrices

    Matrix Condition Eigenvalues
    Normal A and A commute Complex
    Hermitian H=H Real
    Unitary UU=I Phase
    Projection P2=P,P=P {0,1}
    Reflection R2=I,R=R {±1}

Tensor Products

  • AB is a block matrix whose i,j-th block is ai,jB.

    XY=[000i00i00i00i000]

Matrix Functions

For A=aa|aa|, define f(A)=af(a)|aa|.

Example: exp(A).

Four Postulates

  1. State

    The state of a closed quantum system can be described by a unit vector in a Hilbert space (called the state space).

    Closed: no observer, no leak of information to the environment!

    If a "particle" can be in one of the d possibilities from a finite set Γ, the state space is H=CΓ. That is, to each possibility in Γ, a complex number (the amplitude) is assigned.

    |ψ=[ψ1ψ2ψd]

    such that |ψ=|ψ1|2++|ψd|2=1.

  2. Evolution

    The discrete time evolution of the closed system can be described by a unitary operator. If the state at time t0 is |ψ0, the state at time t1 can be obtained as

    |ψ1=U|ψ0.

    It also follows from the Schrödinger equation

    it|ψ(t)=H|ψ(t).

    Take =1, the evolution from t0 to t1 is

    U=exp(iH(t1t0)).
  3. Measurement

  4. Composite system

    The state of a composite system whose components have states |ψ1,|ψ2,,|ψm is the tensor product state

    |ψ1|ψ2|ψm.

Measurement

  1. The measurement postulate

    Quantum measurements are described by a collection {Mm} of measurement operators. These are operators acting on the system being measured and must satisfy

    mMmMm=I.

    The index m refers to the measurement outcomes that may occur.

    (Compare the UU=I condition)

    If the state of the system is |ψ immediately before the measurement then the probability that result m occurs is given by

    p(m)=ψ|MmMm|ψ.

    The state after the measurement is

    Mm|ψ/p(m).
  2. Why this general form?

    It is essentially Born's rule when we use ancillary systems and apply a joint unitary operation.

    It is known as the Naimark theorem.

    Hint: Consider a unitary

    U=(M1Mm)
  3. Special case: projective measurement if Mm=|ψmψm| and this will recover the Born's rule.

    Observable: an operator that models the observation of a physical quantity.

    For any Hermitian operator O, the spectral decomposition theorem tells us that it has the form

    O=mmPm,

    where m is from a finite subset of R.

    E(O)=mmp(m)=ψ|O|ψ=O.

    So the average value O on state |ψ is the expectation of outcome value m.

  4. Measurement collapses the state.

    The three polarizer "paradox".

General Properties of Gates and Measurements

  • Gates are:

    1. Invertible

      This means that unitary gates never erase information. Compare this with classical gates!

    2. Deterministic

      Nothing is random in the application of a quantum gate.

    3. Continuous

      There is a unitary operation that represents the evolution of a smaller period of time.

      Explains the necessity of using complex numbers.

      What is the square root of the Z gate?

  • Measurements are:

    1. Irreversible

      We cannot go back to the state before measurement in general!

      The superposition state (wave function) collapses.

    2. Probabilistic

      Born's rule.

    3. Discontinuous

      The collapse of the wave function in measurement is considered instantaneous!

  • How does quantum mechanics reconcile these two conflicting operations? Born's rule!

    Gates preserve the 2-norm, and measurements give the probabilities determined by the 2-norm.

Reading II

If you want to think more about superposition, the lecture by Allan Adams on superposition is highly recommended.

Lecture 3: Single Qubit Revisited

Recap

Quantum Postulates

  1. States
  2. Evolution
  3. Measurement
  4. Composition

Measurement

Quantum measurements are described by measurement operators {Mm} satisfying

mMmMm=I.
  1. The probability that m occurs is ψ|MmMm|ψ.

  2. The post-measurement state given outcome m is proportional to Mm|ψ.

An observable is a Hermitian operator whose eigenprojectors form a set of measurement operators indexed by the eigenvalues.

Z is an observable, which corresponds to the computational measurement {|aa|} with outcomes (1)a.

Global and Relative Phase

  • The global phase is not observable in quantum mechanics.

Quantum Circuits

How do we process information using the four postulates?

Classical Information Review

  1. Boolean functions, Boolean circuits, and Boolean formulas

    • A Boolean function is function f:{0,1}n{0,1}.

      There are 22n of them!

      • Simple Boolean functions: AND (), OR (), NOT (¬), NAND ().
      • n=1 and n=2.
    • A Boolean circuit is a model of computation using gates and wires.

      • Each gate has at most two inputs and one output;
      • The fan-out of a gate is unrestricted;
      • Fan-in 0 nodes correspond to input variables;
      • Fan-out 0 node(s) correspond to output(s).
    • A Boolean formula is a Boolean circuit where all gates have fan-out at most 1.

  2. Functional completeness

    • A set of Boolean functions fi:{0,1}ni{0,1} is functionally complete if the functions "generate" every f:{0,1}n{0,1} for all n1.

    • {AND,OR,NOT} is functionally complete.

    • Shannon formula:

      f(x1,...,xn)=((¬x1)f(0,x2,...,xn))(x1f(1,x2,...,xn)).
    • {NAND} is functionally complete.

    • Disjunctive normal form (sum of minterms):

      f(a1,...,an)=1i=1nxiai, where xiai={¬xiif ai=1,¬xiif ai=0.

Quantum Circuit Notations

  • Quantum circuit is our new language for describing quantum information processing.

  • Reversibility implies that the quantum circuit looks more regular (the same number of input and output qubits).

  • From left to right: initial state |ψ0, the first gate U1, the second gate U2, …, the last gate UT.

  • Reverse the order when writing them in an equation:

    UTU2U1|ψ0.
  • Multi-qubit gates CNOT, C-U, CCNOT (Toffoli) in circuit diagrams.

  • What does it mean to apply a single qubit U to a multi-qubit states?

Examples

  1. Prepare a classical bit string x from the all-zero string.

  2. H|0 and measure.

  3. Bell state preparation.

Qubit as a Sphere

Superpositions of 0 and 1

Qubit is the quantum analog of bit and is, therefore, the simplest yet most important concept in quantum information processing.

Some noteworthy examples of states are:

|0=(10),|1=(01),|+=|0+|12=12(11),|=|0|12=12(11).
  • Single-qubit states

    Bloch sphere
    |ψ=α|0+β|1.
  • Examples of single-qubit states |0,|1,|+,|.

  • α and β are complex numbers.

  • Quantum theory is a 2-norm theory: |α|2+|β|2=1.

  • Global phases do not matter and so we can write

    |ψ=cosθ2|0+sinθ2eiφ|1
  • Pure single-qubit states are on the Bloch sphere.

Pauli Operators

Before discussing mixed states in the Bloch sphere, we review the Pauli operators.

σx=X=(0110),σy=Y=(0ii0),σz=Z=(1001).
  • Pauli operators are unitary, Hermitian, and traceless.

    • What are their eigenvalues and eigenvectors?

    • Pauli operators as observables.

  • Commutation and anti-commutation relations of Pauli operators

    [σx,σy]=2iσz,{σx,σy}=0,[σy,σz]=2iσx,{σy,σz}=0,[σz,σx]=2iσy,{σz,σx}=0.

Qubit Observables

  • For any unit vector n=(nx,ny,nz)R3, define

    nσ=k{x,y,z}nkσk.
  • It is unitary, Hermitian, and traceless

    (nσ)2=I.
  • For pure state |ψ=cosθ2|0+sinθ2eiφ|1 and its coordinate nψ, we have

    nψσ=(cosθsinθeiφsinθeiφcosθ).
  • What are the eigenvectors of the above operator?

The coordinate of |ψ in R3 is

(nx,ny,nz)=(sinθcosφ,sinθsinφ,cosθ).

It would be more natural first to define the nσ operator for any coordinate and define the pure state as its eigenvalue-1 eigenstate.

It explains the θ2 used to define the state |ψ.

Rotate!

Pauli Actions on the Bloch Sphere

  • Pauli X, Y, Z rotate the Bloch sphere by angle π along the x, y, z axis, respectively.

  • The example of the Z action:

    cosθ2|0+sinθ2eiφ|1cosθ2|0sinθ2eiφ|1.
  • How about nσ?

  • We do quantum information processing simply by rotating the qubits in our system!

More Examples

  • Hadamard H, phase gate S, π/8 gate T

    H=12(1111),S=(100i),T=(100eπi/4).
  • Rotations through a=x,y,z axis

    Ra(ϕ)=exp(ϕ2iσa)=cosϕ2Iisinϕ2σa.
  • In particular, Rz(ϕ)=(eϕ2i00eϕ2i), and T is Rz(π/4) up to a global phase.

Simple Circuit Identities

  1. H2=I,T2=S,T4=Z,T8=I,
  2. XYX=Y,HXH=Z,HYH=Y,HZH=X,
  3. XRx(ϕ)X=Rx(ϕ),
  4. XRy(ϕ)X=Ry(ϕ),
  5. XRz(ϕ)X=Rz(ϕ),
  6. H=X+Z2,
  7. HSHZSHZHZHZST=THSHZSHZHZHZS.

Arbitrary Single-Qubit Unitary Operation

  • Rotations along n

    Rn(ϕ)=exp(ϕ2inσ)=cosϕ2Iisinϕ2nσ.
  • Any single-qubit unitary operator U can be written as

    U=eiαRn(ϕ),

    for some α, ϕ, and n.

  • (Z-Y decomposition) Any single-qubit unitary U has the form

    U=eiαRz(β)Ry(γ)Rz(δ).

Collapse!

Quantum Measurements on a Qubit

  • The computational (standard) basis measurement (Z measurement)

    Is the state |0 or |1?

  • (Born's rule) When we measure |ψ=α|0+β|1:

    • With probability |α|2, the measurement outcome is 0 and the state collapse to |0;

    • With probability |β|2, the measurement outcome is 1 and the state collapse to |1.

Measurement in the Hadamard Basis

  • Hadamard basis measurement (X measurement):

    Is the state |+ or |?

  • When we measure |ψ=α|0+β|1:

    • With probability |α+β|2/2, the outcome is + and the state collapse to |+;

    • With probability |αβ|2/2, the outcome is and the state collapse to |.

  • Measurement operators

    M+=I+X2=|++|,M=IX2=||.
  • X as an observable.

  • Why is it called the Hadamard basis measurement?

General Projective Qubit Measurement

  • A projective measurement in the direction of n

    Note that nσ is an observable.

  • Measurement operators

    Mb=I+(1)bnσ2, for b=0,1.
  • Check that Mb is indeed projective and M0+M1=I.

Detect Elitzur-Vaidman Bomb

Someone sends you a box, which is either a dud (empty box) or a bomb attached to a quantum device that will trigger the explosion if it measures a |1 on the photon sent in. Your task is to detect if there is a bomb inside.

Classical Method

Not very interesting

Send in |+, Measure Output in |±

Dud: No explosion, measures |+.

Bomb: 50% explosion, 25% measures |+, 25% measures |.

Elitzur-Vaidman Protocol:

a. Start with |0, rotate ϵ angle, and send it in.

Use Ry(ϵ) to implement the ϵ rotation.

b. Repeat N=O(1/ϵ) times without measuring. c. Measure in the standard basis.

Dud: No explosion, measures |1 if N=π/ϵ.

Bomb: O(ϵ) probability of explosion, measures |0.

Pr(explodes)Nsin2(ϵ2)=O(ϵ).

This is known as the quantum Zeno effect.

Lecture 4: Entanglement and Mixed States

Recap

  • Bloch sphere
  • Rotate, collapse, bomb!

Entangle!

Entanglement is yet another peculiar quantum phenomenon along with superposition and measurement.

Two-Qubit States

  • Superpositions of 00, 01, 10, 11

    |ψAB=α00|00+α01|01+α10|10+α11|11.
  • Tensor products |ab=|a|b, for a,b{0,1}.

  • Tensor product of two matrices

  • Vector representation (αij)

  • Normalization condition a,b|αab|2=1.

Two-Qubit Gates

  • CNOT, SWAP, Controlled-U, …

    CNOT:|a,b|a,ab,SWAP:|a,b|b,a,Controlled-U:|a,ψ|aUa|ψ.
  • Circuit identities

  • Control vs. target

  • CNOT and single-qubit gates are all you need for universal quantum computing.

The Characteristic Trait

…, then they can no longer be described in the same way as before, viz. by endowing each of them with a representative of its own. I would not call that one but rather the characteristic trait of quantum mechanics, the one that enforces its entire departure from classical lines of thought. By the interaction the two representatives [the quantum states] have become entangled.

Bell States

  • Four Bell states

    |β00=|00+|112,|β01=|01+|102,|β10=|00|112,|β11=|01|102.
  • The first index determines the sign; the second determines the parity.

  • Prepare the Bell states

  • The Bell states are also known as the EPR states, and we often use |EPR to denote |β00.

  • Singlet state |β11 is an anti-symmetric state.

  • The other three states are all symmetric and span the symmetric subspace of the two-qubit state space.

Entanglement

It is easy to verify that this state is not a product of single-qubit states!

A picture of entanglement.

Basic rules of quantum mechanics imply the existence of EPR, arguably what troubled Einstein the most in quantum mechanics! It is what he called the 'spooky action at a distance'.

EPR Paradox

  • Consider two players Alice and Bob sharing an EPR state. Alice brings her particle to the moon while Bob stays on earth.

    Fact: If Alice measures her particle, she instantaneously knows whether Bob's state is |0 or |1 (which Bob can confirm if he performs the standard basis measurement).

  • Is it a big deal?

    It is not very different from a pair of two perfectly correlated classical bits.

    A pair of gloves in two boxes.

  • EPR considers other possibilities: Alice can measure in a different basis.

    There is another way to open the box.

    We have measured Z basis, what about X measurement? That is, what happens if Alice measures |±?

    1. Method I. M0=|++|I and M1=||I.

    2. Method II. Write EPR state

      |EPR=|+++|2.

    The conclusion is that Alice will instantaneously know whether Bob's post-measurement state is |+ or |.

Superluminal Communication? No!

Consider two situations. In the first, Alice measures in the standard basis, she will obtain a=0,1 with equal probability and Bob's qubit collapses to |a. In the second, she measures in the Hadamard basis, she will obtain a=+,, with equal probability and Bob's qubit collapses to |a.

It looks as if Alice's measurement choice affects Bob's final state! Would it allow Alice to send information instantaneously to Bob?

What are the states of Bob in the two situations?

Bob's view and Alice's view.

The mixed state framework will help us to answer the question and see why this won't allow superluminal communication.

Mixed States

Ensembles

In the first situation, Bob's state is in an equal distribution over |0,|1. In the second, it is an equal distribution over |+ and |. Can we distinguish these two cases in quantum mechanics?

Let's generalize a little bit and consider a distribution of pure states described by an ensemble {(pi,|ψi)}. It means that our knowledge of the quantum system says that it is in state |ψi with probability pi.

Consider a quantum measurement {M0,M1} measuring the state ensemble. The probability that a occurs is

Pr(a)=ipiψi|MaMa|ψi.

We can rewrite it using cyclic property of the trace as

Pr(a)=tr((ipi|ψiψi|)MaMa).

We call

ρ=ipi|ψiψi|

the density matrix of the ensemble. The probability is determined by the density matrix, so it makes sense to use the density matrix to describe the state of the system.

Bob's Mixed State

We now go back to the EPR paradox. When Alice measures |0,|1, Bob's state is also |0 or |1, which Alice knows for sure as it will be the same as her measurement outcome. But Bob does not know the measurement outcome, so before Alice send the outcome to him, his knowledge of the system is that it is |0 or |1 with equal probability. The density matrix is

ρ=12(|00|+|11|)=I2.

If Alice measured |+,|. Bob's qubit is |+ or | with equal probability. Hence, the density matrix is

ρ=12(|++|+||)=I2.

So even though the two ensembles look very different, the density matrices in the two situations are the same. It means that no measurement on Bob's system can tell the two cases apart. This makes perfect sense as the state of Bob should not change when Bob has done nothing to his system.

It explains why density matrix is more fundamental then ensemble of quantum states.

No superluminal communication is possible using the strategy above!

Density Matrix

Mathematically, a density matrix is positive semidefinite and of trace 1 (iff there is a corresponding ensemble). It is a description of the state of a quantum system that is more general than state vectors for pure states.

Any pure state |ψ has a density matrix representation ρ=|ψψ|.

Example: The density matrix for |+ is

|++|=12[1111].

The spectral decomposition of a density matrix

ρ=jλj|ψjψj|

gives a possible ensemble {(λj,|ψj)} for the density matrix.

Probability can be considered a special case where the density matrix is diagonal.

Quantum Postulates (Mixed States)

  1. The state is now a density matrix.

  2. Evolution: ρUρU.

  3. Measurement: Pr(m)=tr(MmMmρ) and the post-measurement state is proportional to

    MmρMm.
  4. Tensor: ρ=ρ1ρn.

Mixed States of a Qubit

Expansion in the Pauli Operators

  • Define an inner product on the 2 by 2 matrix space

    (A,B)=tr(AB)2.
  • Together with I, Pauli matrices form an orthonormal basis!

  • For all ρ, we can write

    ρ=I+nσ2, where na=tr(ρσa).
  • The positive semidefinite condition is equivalent to n1.

Mixed States on the Bloch sphere

  • The Bloch sphere has all valid single-qubit states.

  • What are the states of the north pole, the origin, and (1,0,0)?

  • From coordinate n, we can compute the state as

    ρ=I+nσ2.
  • Conversely, given the density matrix ρ, the expansion in the Pauli operators basis gives a vector n=(nx,ny,nz)

    na=tr(ρσa), for a=x,y,z.
  • Classical probability over a bit can be represented as diagonal density matrices corresponding to the line segment between the north and south poles.

  • Summarize: Things that can be identified with point n on the sphere.

Measurement of Mixed Qubit State

  • When we measure ρ=(I+nσ)/2:

    • With probability tr(ρ|00|)=(1+nz)/2, the measurement outcome is 0 and the state collapse to |00|;

    • With probability tr(ρ|11|)=(1nz)/2, the measurement outcome is 1 and the state collapse to |11|.

Partial Trace

Partial Trace and Purification

What is the state of A given the state of AB? We cannot answer the question in the pure state framework, and we can now with density matrices.

Partial Trace

Let ρAB the joint state of A and B systems. What is the state of B only? Is there a density matrix associated with system B given that we know the state of both A and B?

We need an effective representation of the state on B so that measurement only depends on this reduced state (not the joint state).

Let M be a measurement operator; the probability its outcome occurs is

tr(ρAB(IAMM)),

which is a linear functional of MM. So there is a ρB such that

tr(ρAB(IAMM))=tr(ρBMM).

The partial trace is defined by

trA:|i,jk,l|A,B=tr(|ik|A)|jl|B.

Extend by linearity.

tr(ρAB(IAMM))=tr(trA(ρAB)MM).

Reduced Density Matrix

The reduced density matrix ρB=trA(ρAB).

What is the partial trace of the EPR state?

The reduced density matrices of ρAB=ρAρB is ρA and ρB. The converse is usually not true!

Purification

For any mixed state ρB, there is a system A of the same dimension as B and a pure state |ψAB such that

trA(|ψψ|AB)=ρB.

Use the spectral decomposition theorem again!

Example: The EPR state is a purification of I/2.

Mixed states arise when we lose control of a system!

Lecture 5: Quantum Information

Review of Quantum Information Basics

  • Homework I

    1. Problem 3 about computing

      x|Hn|y.
    2. Problem 4

  • Spectral decomposition

    Consider a special case where A is Hermitian.

    Let λ1 be an eigenvalue of A and |e1 a corresponding eigenvalue.

    λ1(|e1,|e1)=(|e1,A|e1)=(A|e1,|e1)=λ1(|e1,|e1).

    This means that λ1 is real.

    Consider subspace K spanned by all vectors orthogonal to |e1.

    We prove that K is an invariant subspace of A. Suppose |ψK, we have e1|A|ψ=λ1e1|ψ=0. Use induction to complete the proof.

    In standard textbooks, it says that A=UDU. Using Dirac notation, we write it as

    A=U(jλj|jj|)U.

    In this form, |ej=U|j will be the eigenvectors of A, and we write

    A=jλj|ejej|,

    and |ej's are orthonormal.

  • Measurement

    1. Projective measurements

      Measurement operators are projectors such as |00| and |11|.

      Note that |ψψ| is the projector to the span of |ψ.

      A set of projectors {Pj} form a projective measurement if jPj=I.

    2. General measurement satisfies jMjMj=I

    3. When we don't care about the post-measurement state, we consider measurement operators Nj=MjMj0.

      The completeness condition is jNj=I.

      The probability that j occurs is tr(Njρ).

      They are called positive-operator valued measure (POVM).

Entanglement Revisit

Schmidt Decomposition

(Schmidt Decomposition). For a bipartite pure quantum state |ψAB, we can write

|ψAB=j=1kλj|ψA(i)|ψB(i),

where kmin(dimA,dimB), λj>0, and both {|ψA(i)} and {|ψB(i)} are orthonormal.

  • The meaning of the theorem says that, up to a change of local basis, an entangled state can be written as

    jλj|jA|jB.
  • Hint: Consider the singular value decomposition of matrix (ψj,k).

  • EPR as a mirror!

    For any matrix U:

    (UI)j|j,j=(IUT)j|j,j=i,jUi,j|i,j
  • λj's are called the Schmidt coefficients

  • What are the Schmidt coefficients of the Bell states?

    How about product states?

  • Thanks to this theorem, the theory of pure bipartite entanglement is well established.

Nielsen's Theorem

  • Local operation and classical communication (LOCC)

  • Nielsen's Theorem

    Let |ψ and |ϕ be two entangled states on systems A,B. Their Schmidt coefficients are λ=(λj) and γ=(γj) respectively.

    Theorem (Nielsen). There is an LOCC transforming |ψ to |ϕ if and only if the majorization condition λγ holds.

    The condition λγ is that for all k

    j=1kλjj=1kγj.

    A simple corollary is that there is an LOCC transforming an EPR pair to an arbitrary entangled pair of qubits.

    EPR: Maximally entangled states.

Multiple-Qubit Entanglement

  • Superpositions of 000, 001, 010, , 111

  • GHZ state

    |GHZ=|000+|1112.
  • W state

    |W=|001+|010+|1003.

Entanglement in Mixed States?

Entanglement in Use

Entanglement is a resource for many quantum information processing tasks

Now utilized for good at a distance of at least 1200km (Mozi satellite).

Quantum entanglement—physics at its strangest—has moved out of this world and into space. In a study that shows China's growing mastery of both the quantum world and space science, a team of physicists reports that it sent eerily intertwined quantum particles from a satellite to ground stations separated by 1200 kilometers, smashing the previous world record. (Science, 15 JUN 2017)

What is Information?

A qubit is a unit of quantum information storing the quantum state of a two-level physical system.

Quantum information is more general than classical information. We can store a bit in a qubit. But to store a qubit, it may require an infinite number of bits.

Distingish (Mixed) Quantum States

Consider an encoding aρa for a=0,1.

  • Promise: The system is in one of the two states ρ0 and ρ1,

  • Problem: Decide which is the case.

  • Measurement is the only bridge between the quantum and classical worlds. So we use a measurement with measurement operators M0 and M1

    Minimize: Tr(M0ρ1)+Tr(M1ρ0)Subject to: M00,M10,M0+M1=I.
  • The optimal M0 minimizes Tr(M0(ρ1ρ0))

  • In the qubit case, we write ρb=(I+vbσ)/2, and ρ0ρ1=vσ for v=(v0v1)/2. The optimal M0 should be

    12(I+vvσ)
  • The minimal error probability is therefore (2v0v1)/4.

    1. If two states |u and |v of a qubit are orthogonal, there is a projective measurement to tell them apart.
    2. If two states are co-linear, they are indistinguishable.

The amount of information one can store and reliably read from a qubit is only a single bit.

The states |0 and |+ are different but not perfectly distinguishable.

Non-orthogonality is the key issue.

What is information? What is quantum information?

We can store the whole Internet in a single qubit, but we cannot reliably read information out.

Holevo Bound

A. Holevo
  • For a quantum state ρ, its von Neumann entropy is S(ρ)=tr(ρlog(ρ)).

    The eigenvalues of ρ form a probability distribution whose Shannon entropy equals the von Neumann entropy S(ρ).

Mutual information H(X:Y)=H(X)+H(Y)H(XY).

Theorem. Let {(px,ρx)} be an ensemble of states. Alice prepares ρx with probability px and sends it to Bob. Bob measures the state and gets outcome y. Then the mutual information (accessible information) between X and Y satisfies

H(X:Y)S(xpxρx)xpxS(ρx).

The right-hand side is called Holevo χ.

We will prove a poor man's version of Holevo's theorem.

Let X be a uniformly distributed random variable taking values in [N]. Consider an encoding of classical information xρx into quantum systems of n levels. For all measurement (POVM) {Mm}, the probability that the measurement correctly guesses x is

px=tr(Mxρx)tr(Mx).

In expectation the success probability is therefore

Expx1Nxtr(Mx)=nN.

Quantum One-Time Pad

Let ρ be an arbitrary qubit state, say |00|.

The quantum one-time pad works as follows:

  1. Choose two random bits a,b and,
  2. Apply Ua,b=XaZb to the qubit.

For a player who does not know a,b, the state is

14a,bUa,bρUa,b=I2.

No-Cloning Theorem

Unknown quantum states cannot be copied.

There is no unitary transformation U that can map any |ψ|0 to |ψ|ψ.

Compute the inner product.

Note: |0 and |1 can be cloned using the CNOT gate.

Tomography

State Tomography

  • Given a large number of i.i.d samples of quantum state ρ, find the density matrix for ρ.

  • In the single-qubit case, I, Pauli X, Y, Z form an orthonormal basis, so

    ρ=tr(ρ)I+tr(Xρ)X+tr(Yρ)Y+tr(Zρ)Z2.
  • For example, to estimate tr(Zρ), we need to measure ρ in the Z basis multiple times, obtaining z1,z2,,zm{±1}. Then (izi)/m is an empirical estimate of tr(Zρ).

  • Note that the standard deviation is 1/m and so we need to repeat about O(1/ϵ2) times to have ϵ precision.

State Tomography for Multiple Qubits

  • Multiple qubit case is similar:

    ρ=Ptr(ρP)P2n,

    where the summation goes over n-qubit Pauli operators.

  • Check that I and Pauli operators form a basis also in the multiple qubit case.

  • But it's a summation of 4n terms!

    In the lab, it would take days to tomography a system of more than 10 qubits.

    Theorem. The sample complexity for tomography is Ω~(d2/ϵ2), where d is the dimension and ϵ is the precision in the so called trace distance.

  • To make things worse, each term needs high precision for the triangle inequality to give meaningful bounds.

    There are 4n small real numbers tr(ρP), and we have to ensure that their error sum is still controlled.

  • How do we even know the quantum device works as expected when tomography of its state is impractical?

Example: Tomography of the Singlet State

  • We need to estimate 15 real numbers μP=tr(|β11β11|P) for non-identity two-qubit Pauli operators P.

    I X Y Z
    I 0 0 0
    X 0 -1 0 0
    Y 0 0 -1 0
    Z 0 0 0 -1
    1. For P=XX,YY,ZZ, μP=1,

    2. For all other P, μP=0.

  • Note that in this simple case, it suffices to check the XX,YY,ZZ average values in the first case to certify that the state is the singlet state.

    The singlet state is the unique state stabilized by XX and ZZ.

Lecture 6: Teleportation

Teleport!

The Setup

  • We have two players, Alice and Bob.

  • Alice and Bob share an EPR state.

  • Alice also has an input qubit given in some unknown state |ψ.

    Classically, there are two methods.

    1. Physically transfer
    2. Copy and send
  • She wants to transfer this qubit to Bob using classical communication only.

  • Even if Alice knows the description of the state |ψ, for example, maybe she prepared the state using a circuit on her own, the task is still really challenging.

    To describe the state, we need to specify two real numbers!

  • The teleportation protocol needs to transfer two bits from Alice to Bob by consuming the shared EPR state.

The Protocol

  • We name the qubit in the shared EPR state between Alice and Bob and the input qubit as A, B, and C, respectively.

    1. Alice measures the projective measurement defined by the four Bell states on A and C, let a,b be the outcome bits;
    2. Alice sends the classical outcome a,b to Bob;
    3. Bob applies ZaXb to B.
  • The Bell states form an orthonormal basis for the two-qubit system AC.

How Did the Authors Come Up With This?

  • The protocol is simple but very hard to find and only discovered in 90's (quantum mechanics was completely established in the 30's).

  • Teleporting an unknown quantum state via dual classical and Einstein-Podolsky-Rosen channels

    [C. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres and W. Wootters, '93]

  • The Origins of Quantum Teleportation - Charles Bennett

    Bennett on the origins of teleportation (Video)

What is it that they don't have that they need that would enable them to do as well if they were in separate locations than if they were in the same location.

… So then we realized that by sharing entanglement between the two observers and by permitting them to communicate, you could simulate being in the same place.

Analysis

Analysis I: Direct

|β00=|00+|112,|β01=|01+|102,|β10=|00|112,|β11=|01|102.
  • Before Alice's measurement, the state is

    |Init=12(α|0+β|1)C(|00+|11)AB.
  • Expand the state using the Bell basis, we have

    |Init|β00(α|0+β|1)B+|β01(α|1+β|0)B+|β10(α|0β|1)B+|β11(α|1β|0)B.

    If it is the first you see this, you may feel a bit confused about how we get the above expansion. The key is to use linearity to do this on product state terms and take the sum. Alternatively, you may consider multiplying

    I=i,j|βijβij|ACIB
  • If the measurement has outcome a,b, the state on B after correction is

    α|0+β|1.

Analysis II: Delayed Measurement (Skip)

  • Measurements can be delayed to the end.

    Proof: Use controlled gates to simulate classical control.

  • For a=0,1,

    |a(|00+|11)|aa0+|aa¯1|aaa+|aa¯a|0aa+|0a¯a=2|0|+|a.

Analysis III: Tensor (Skip)

  • Tensors are generalizations of matrices.

    • Matrix A maps a pair of indices (i,j) to a scaler Ai,j.

    • A rank-k tensor T maps a k-tuple (i1,i2,,ik) to a scaler Ti1,i2,,ik.

  • Tensor diagrams.

    • We use a circle (or other shapes) to represent the tensor and k open edges connected to it to represent the k indices.

    • The dimension of each index is the number of different values it takes.

  • Tensor contraction generalizes matrix multiplication.

    If two indices have the same dimension, the contraction operation identifies them and sums them over.

    kAijkBlkm.
  • Trace in tensor network!

Analysis III: Tensor (cont.)

  • States, gates, and measurements are all tensors

    Quantum circuits are tensor networks!

  • Teleportation as a tensor contraction:

    • The EPR state is a wire in the tensor picture;

    • We can move the tensor node freely along the wires.

  • Bob gets the one-time pad of Alice input qubit as Uab=ZaXb.

Analysis IV: Stabilizer (Skip)

  • Specifying quantum states using operators:

    XX|EPR=|EPRZZ|EPR=|EPR

    |EPR is stabilized by XX and ZZ.

    XX and ZZ commute.

  • XX and ZZ as observables:

    Measure both qubits in the Hadamard basis (X measurement), and output the parity.

    I+XX2=I+X2I+X2+IX2IX2
  • The Bell measurement is the same as measuring the XX and ZZ observables.

    • We can measure both as they are compatible.

    • Back propagation of operators

  • Teleportation is explained in the stabilizer framework.

    • It is enough to make sure X and Z measurements are recovered.

Discussions

Understanding Teleportation

  • What if the input state on C is part of a larger system CD and the state on CD is |ψCD?

  • After the teleportation, the state on BD is |ψ. That is, the correlation (entanglement) between CD is preserved and teleported to BD!

  • A special case is when |ψ=|EPR, another EPR pair.

    It is known as the Entanglement Swapping protocol.

  • Would teleportation allow faster-than-light quantum transmission?

    Bob has one-time padded quantum information without the two bits.

  • Would teleportation allow the cloning of quantum information?

  • Did the Bell measurement learn anything about the input state?

Superdense Coding

  • A dual problem of teleportation
  1. Alice and Bob share an EPR state;
  2. Alice gets two bits a,b as input;
  3. Alice applies XaZb on her half of the EPR state and sends her qubit to Bob;
  4. Bob performs Bell measurement to get a,b.
  • The four Bell states can be transformed to each other locally.

  • The four Bell states are orthogonal to each other and are therefore perfectly distinguishable.

  • A scheme for sharing classical secrets (2 bits) among two players (each holding one qubit).

    Question: is it possible to share quantum secrets?

Entanglement as a Resource

  • Teleportation, superdense coding, and many other protocols use EPR and entanglement as resource, without which the protocols cannot be carried out.

  • They motivated the study of entanglement as a new type of resource.

    How do we quantify the amount of entanglement needed for a certain task?

Mixed State Entanglement (Skip)

  • A mixed state ρAB is said to be separable if there is an ensemble of the form {(pi,ρA(i)ρB(i))}i=1k such that

    ρAB=i=1kpiρA(i)ρB(i).
  • Separable states are preparable using LOCC only

  • Wide range of applications

    [M. Ying, L. Zhou, and Y. Li, Reasoning about Parallel Quantum Programs, '18], [C. Piveteau and D. Sutter, Circuit Knitting with classical communication, '22]

Peres PPT Condition (Skip)

  • How to check if a mixed state is separable or not?

  • Partial transpose

    ()TB:|ijkl||ilkj|.
  • (PPT condition). If ρ is a separable state, then ρTB is positive semidefinite.

    i=1kpiρA(i)ρB(i)i=1kpiρA(i)(ρB(i))TB.
  • Check that the |EPR state is not PPT.

  • The PPT condition is a necessary and sufficient condition for separability only for 2 by 2 and 2 by 3 systems.

  • In general, it is NP-hard even to approximate with 1/poly error!

    [S. Gharibian, Strong NP-Hardness of the Quantum Separability Problem, '08]

Entanglement Distillation and Cost

  • Distillable entanglement and entanglement cost

    EDEC.

    • Distillable entanglement ED(ρAB) is the rate at which we can generate the EPR state using LOCC.

    • Entanglement cost EC(ρAB) is the rate at which EPR can be transformed to the state ρAB.

  • If ρAB is a pure state,

    ED(ρAB)=EC(ρAB)=S(ρA)=S(ρB).
  • Bound entanglement: entangled states which cannot be distilled exist!

    [Horodecki3, Mixed-state entanglement and distillation, 1998]

Applications and Extensions

  • Quantum networks

    Teleportation empowers entanglement swapping and quantum repeaters.

  • Gate teleportation

    [Aliferis and Leung, Computation by measurements: a unifying picture, 2014]

  • Port-based teleportation

Lecture 7: Quantum Circuits and Early Quantum Algorithms

Quantum Circuits and Universality

Toffoli and Fredkin

We have seen many quantum gates such as H and CNOT. We now introduce two three-qubit gates called Toffoli and Fredkin.

  • Toffoli

    Toffoli:|a,b,c|a,b,cab.
  • Fredkin

    Fredkin:|a,b,c{|a,b,c if a=0,|a,c,b if a=1.
  • Both Toffoli and Fredkin are classically universal.

    Simulate NAND using Toffoli.

Reversible Computation

  • Reversible classical computation and Landauer's principle

    Energy consumption and irreversibility in computation

    In the scenario where a computer erases bit of information, it results in the dissipation of energy into its surrounding environment. The minimum amount of energy that is released is proportional to kBTln2, where kB is Boltzmann's constant and T denotes the temperature of the environment.

    Does computation have to consume energy?!

    It's possible to perform classical computation reversibly (using Toffoli or Fredkin).

  • Uncompute technique

    Clean the computational garbage!

Universal Gate Sets

  • A set of quantum gates is universal if all other unitary operators can be generated exactly (or approximately) from that set.

    1. All gates are in SU(d)
    2. For any USU(d), there is product of elements in the set that approximates U.

    Quantum computers are digital.

    Approximation in the sense of the following distance

    d(U,V)=UV=sup|ψ(UV)|ψ.
  • Example:

    1. CNOT and single-qubit gates (exact);

    2. CNOT, H, T (approximate);

    3. Toffoli, H (weakly universal).

      Complex numbers are essential for quantum mechanics but not for quantum computing.

      With an extra qubit, it is possible to map a circuit U with complex entries to a circuit V with real entries.

      Trick: a+bi[abba].

Solovay-Kitaev Theorem

According to Wikipedia, it was first announced by Robert M. Solovay in 1995 and independently proven by Alexei Kitaev in 1997.

Let G be a universal gate set for SU(d). Then there is a constant c such that any unitary in SU(d) can be approximated to error ϵ using a product of elements in G of length logc(1/ϵ).

Lemma. Let [U,V]=UVU1V1 be the group commutator of U,V and let Sϵ be {USU(2):IUϵ}. If Γ is an ϵ2-net for Sϵ, then [Γ,Γ]={[U,V]U,VΓ} is an ϵ3-net for Sϵ2.

  • Note that the lemma is not easy to use iteratively as the scaling of ϵ-net and the size of the neighborhood of the identity do not match the initial condition.

  • The closedness condition under inverse is not needed anymore.

Subadditivity of Errors

Suppose Ui,Vi are unitary operators satisfying UiViϵ for all i=1,2,,t. Then

UtU2U1VtV2V1tϵ.

Proof: By the triangle inequality and unitary invariance of the operator norm,

UtU2U1VtV2V1=UtU2U1UtVt1V1+UtVt1V1VtV2V1UtU2U1UtVt1V1+UtVt1V1VtV2V1=Ut1U2U1Vt1V2V1+UtVttϵ.

This means that for a circuit of m gates using one gate set can be transformed to a circuit of size mpolylog(m/ϵ) using one other gate where the total approximation error is ϵ.

Early Quantum Algorithms

Superposition of Function Calls

  • Let f:XY be a function that we know how to efficiently implement classically.

  • This implies that we can efficiently perform the following transform

    Of:|x|y|x|y+f(x).
  • The superposition principle then implies that we can efficiently prepare

    1|X|xX|x|f(x).

    Use the uncompute technique.

  • Phase oracle: If Y={0,1}, we can use the so-called "phase-kickback" technique to implement the transform

    Of,±:|x(1)f(x)|x.

We add a | ancilla to implement the phase oracle using the standard oracle.

To implement the standard oracle, we may need a controlled phase oracle.

Deutsch-Jozsa Algorithm: Problem Statement

D. Deutsch
R. Jozsa
  • Let n be an integer and N=2n.

  • We are given oracle access to f:{0,1}n{0,1} with the promise that

    1. f(x) is either always 0 or all 1 (constant) or
    2. For exactly half of the inputs f(x)=0 (balanced).
  • Problem: find out which of the above two cases is true.

  • A classical algorithm will need Ω(N) queries to f in the worst case.

Deutsch-Jozsa Algorithm

  1. Apply Hn to |0n;
  2. Call oracle Of,± once in superposition;
  3. Apply Hn;
  4. Measure all qubits in the Z basis, answer 'constant' if all outcome is 0 and answer 'balanced' otherwise.

Quantum parallelism and cancellation!

  • After Step 2, the state is

    1|X|x(1)f(x)|x.
  • The action of Hn is

    Hn:|x1|X|y(1)xy|y.

    So after Step 3, the state is proportional to

    1|X|x,y(1)f(x)+xy|y.
  • The probability of observing y=0 is (1|X|x(1)f(x))2.

Bernstein-Vazirani Algorithm (Skip)

Bernstein-Vazirani algorithm.

  1. Apply Hn to |0n;
  2. Call oracle Of,±;
  3. Apply Hn;
  4. Measure all qubits and answer.
  • Given oracle access to f(x)=sx where s is a hidden secret.

  • Problem: Find s.

  • Analysis

    • Similar to the analysis of the Deutsch-Jozsa algorithm.

    • Before measurement, the state is

      1|X|x,y(1)f(x)+xy|y=1|X|x,y(1)x(y+s)|y=|s.
  • Any classical algorithm (deterministic or randomized) needs n queries.

    The final answer consists of n bits, and one classical query learns at most 1 bit of information.

Simon's Algorithm: Problem Statement

  • Simon's algorithm is the main inspiration for Shor's factoring quantum algorithm.

  • It shows that quantum computers are provably exponentially more efficient (in terms of the number of queries) than bounded-error randomized algorithms.

  • Simon's problem setup:

    Oracle f:{0,1}n{0,1}n satisfies that f(x)=f(x) if and only if x=x or s+x=x for some hidden secret s0.

  • Problem: Find s.

  • Note that the function f outputs multiple bits now, and it is a 2-to-1 function.

Simon's Algorithm

  1. For i=1,2,,O(n) do:
    1. Prepare state x|xA|f(x)B;
    2. Measure register B;
    3. Apply Hn and measure all qubits in A to get y(i);
  2. Solve sy(i)=0 for all i.
  • The state on A after the measurement is

    12(|x+|x+s)A,

    for some random x.

    It is the superposition of preimages of f for f(x).

  • After Step 1.3 each iteration, the state on A can be written as

    12n+1y((1)xy+(1)(x+s)y)|y=12n+1y(1)xy(1+(1)sy)|y.
  • The measurement will output a random y such that sy=0.

  • Step 1.2 is not necessary.

Simon's Algorithm: Analysis

  • Each y(i) is sampled independently among those satisfying sy(i)=0.

  • To determine s, we need to have n1 linearly independent y(i)'s.

  • If the dimension of span(y(1),y(2),,y(i1)) has rank k<n1, then the probability that y(i) is not in the span is 12k2n112. This implies that the algorithm runs in O(n) iterations with high probability.

    Simon's algorithm queries the oracle O(n) times.

  • Yet any classical algorithm needs Ω(2n) queries!

Simon's Algorithm: Classical Bounds

  • Upper bound: By the birthday paradox, we expect to find x,x such that f(x)=f(x) after O(2n) queries.

  • Lower bound: Any classical (randomized or deterministic) algorithm needs Ω(2n) queries.

    • We say that a sequence x1,x2,,xk is bad if there is no collision.

      This excludes at most (k2) possible s's.

    • For all k2n, the probability that x1,x2,,xk is bad can be bounded as

      Pr(x1,,xk is bad)=j=2kPr(x1,,xj is bad|x1,,xj1 is bad)=j=2k(1j12n(j12))1j=2kj12n(j12)1k22n+1.

Fourier Transform

Discrete Fourier Transform (DFT)

  • Let X={0,1,,N1} be a finite set.

  • The discrete Fourier transform transforms a function

    f:XC

    to another function f^ where

    f^(y)=1NxXωNxyf(x).

    Here, ωN=e2πi/N is the N-th root of unity.

    The normalization factor makes the map a unitary operator!

  • A transformation on a sequence of N complex numbers.

  • An important tool in classical signal processing.

Fast Fourier Transform (FFT)

  • Cooley–Tukey algorithm, from O(N2) to O(NlogN):

    f^(y)=1NxXωNxyf(x).
    • Gauss (1805)!

    • Assume for simplicity N=2n.

    • Consider the even and odd parts of f defined on {0,1,,N/21},

      fe(x)=f(2x),fo(x)=f(2x+1).
    • Recursive structure: for 0y<N/2,

      f^(0y)=12[fe^(y)+ωNyfo^(y)].

Fast Fourier Transform (cont.)

  • What about the second half? For 1y, we have

    f^(1y)=1N0x<N/2(ωN2x(y+N/2)fe(x)+ωN(2x+1)(y+N/2)fo(x))=12(f^e(y)ωNyf^o(y)).
  • The recursion relation is

    f^(0y)=12[fe^(y)+ωNyfo^(y)],f^(1y)=12[fe^(y)ωNyfo^(y)].
  • FFT: compute the fast Fourier transform (recursively) on the even and odd parts respectively and combine the results using the above rule.

Quantum Fourier Transform

Quantum Fourier Transform (QFT)

P. Shor
  • For function f:XC, define quantum state.

    |f=xXf(x)|x.
  • Quantum Fourier transform maps the superposition |f to |f^

    Verify that F|f=|f^.

  • Recall that quantum computation is about the processing of superposition states.

    In QFT, we transform the amplitudes by DFT.

  • The QFT is a unitary transform:

    F=1Nx,yXωNxy|yx|.

    Hadamard is the smallest Fourier transform (N=2)!

    Hadamard and Toffoli are quantum universal.

QFT: Efficient Realization I

  • Use the recursion in a quantum way.

    f^(0y)=12[fe^(y)+ωNyfo^(y)]f^(1y)=12[fe^(y)ωNyfo^(y)]
  • Apply QFT of n1 qubits to the first n1 qubits only once!!!

    Then do some post-processing.

  • Cheating?! No!

QFT: Efficient Realization II

  1. After the QFT on the first n1 qubits, we have

    |f=|fe|0+|fo|1|fe^|0+|fo^|1.
  2. Define function g^o(y)=ωNyfo^(y), and apply n1 controlled phase gates, we have

    |fe^|0+|g^o|1.
  3. Apply Hadamard to the last qubit, we get

    |fe^+|g^o2|0+|fe^|g^o2|1.
  4. Move the last qubit to the first by SWAP gates, and we have |f^.

    The last step is needed because we need f^(0y) and f^(1y).

Remarks on QFT

  • We have shown an efficient implementation of QFT.

    Complexity is n2 or log2N.

    A result shows that, if small rotations are omitted, QFT still works approximately and has complexity nlogn.

  • Do not expect it to be useful in most problems of signal processing!

    You cannot read out the values of the amplitudes.

Lecture 8: Quantum Algorithms II

Course Projects

Project Guidelines

You may select one of the provided topics and work in a group of up to three students. While not mandatory, students are strongly encouraged to pursue projects that contribute something novel, whether through a new perspective, innovative methods, or original algorithms.

  1. Topic Selection Rules

    Each topic can be chosen by at most two groups. Selection is on a first-come, first-served basis (先到先得).

    After making your choice, please contact the teaching assistant via WeChat as soon as possible to secure your topic.

  2. Contribution statement

    The final submission must explicitly state each team member’s role, responsibilities, and specific contributions (e.g., theoretical analysis, implementation, experiments, writing, etc.).

  3. Evaluation Criteria

    Your project will be evaluated based on the following components:

    1. Understanding

      • Demonstrate a thorough comprehension of the topic, including its background, key concepts, and relevant techniques.
      • (If applicable) Discuss recent advancements in the field, citing relevant literature.
    2. Writing (Research Paper Submission) Your written submission should follow a structured research paper format, including:

      • Introduction – Provide context, problem motivation, and a high-level summary of your contributions.
      • Preliminaries – Define key notations, assumptions, and foundational concepts.
      • Main Technical Content – Present your core methodology, analysis, or findings with rigor.
      • Summary & Discussion – Conclude with key takeaways, limitations, and directions for future work.

      Submission Timeline:

      • A draft must be submitted before the presentation.
      • A final polished document is due before Week 18.

      In the final submission, please clearly state your individual contributions to the project.

    3. Presentation (Week 16)

      • Prepare clear, well-organized slides to effectively communicate your work.
      • Emphasize key insights, methodology, and results.
      • Engage the audience with a logical flow and confident delivery.
    4. Originality

      • Submissions that introduce novel ideas, techniques, or near-publishable results will be highly rewarded.
      • Creativity and innovation in problem-solving are strongly encouraged.

Quantum Theory Projects

  1. T1: Quantum Algorithms and Sparse Optimization

    HTML, PDF, Markdown

  2. T2: IQP Circuits, Different Constructions and Noise Effects

    HTML, PDF, Markdown

  3. T3: Resource Estimation for Proof of Quantumness

    HTML, PDF, Markdown

  4. T4: Robust Combiners for Quantum Cryptographic Primitives

    HTML, PDF, Markdown

Quantum Software Projects

  1. S1: Classical simulation of quantum circuits

    HTML, PDF, Markdown

  2. S2: Birkhoff-von Neumann Quantum Logic

    HTML, PDF, Markdown

  3. S3: Quantum Circuits and Polynomials

    HTML, PDF, Markdown

  4. S4: Game Designed for Quantum Computing

    HTML, PDF, Markdown

Quantum Error Correction Code Projects

  1. C1: Quantum Error Correction Codes with Transversal Clifford Gates

    HTML, PDF, Markdown

  2. C2: Exploration of Error Correction Algorithms for Quantum Dynamic Codes

    HTML, PDF, Markdown

  3. C3: Gate Scheduling for Syndrome Measurements

    HTML, PDF, Markdown

Quantum Phase Estimation

Phase Estimation: Introduction

  • In phase estimation, we have access to controlled-Ux for all xX and also an eigenstate |ϕ of U where

    U|ϕ=eiϕ|ϕ.
  • The problem is to estimate the phase ϕ[0,2π) to some desired precision.

    • Inverse Fourier transform

      F1=1Nx,yXωNxy|yx|.
  • Phase estimation is a powerful quantum algorithmic subroutine used in many other quantum algorithms.

Phase Estimation

  • To get an m-bit estimate of ϕ, the phase estimation procedure performs the following with n=m+O(log(1/ϵ)),

    1. Prepare state 1NxX|x|ϕ;

    2. Apply unitary xX|xx|Ux, and the state becomes 1NxXeiϕx|x|ϕ;

    3. Apply an inverse quantum Fourier transform on the first register.

  • If ϕ=2πy/2n for some yX, the state in the first register before the inverse Fourier transform is F|y.

  • The first register is a good approximation of ϕ/2π.

  • The approximation will have m bits of precision with probability at least 1ϵ.

    If n=m, the outcome is the best n-bit approximation with probability at least 4/π2.

Discrete Logarithm and Diffie-Hellman

2015 Turing Award

New directions in cryptography

  • Given a cyclic group G=g0 generated by g0 and an element hG, the size N=|G| is known.

  • The discrete logarithm logg0h of h in G with respect to g0 is the smallest non-negative integer α such that g0α=h.

  • Important for classical cryptography (Diffie-Hellman key exchange)!

  • We can completely break the protocol, if we can solve the discrete logarithm for A and B, the two messages exchanged by the players,

  • Yet, no efficient classical algorithm is known.

Quantum Attack on Diffie-Hellman

  • We attack the protocol by giving a quantum algorithm for computing the discrete logarithm of a given h.

  • Consider the following unitary.

    U:|g|hg

    It is possible to implement controlled-Ux operators for any x by repeated squaring.

  • Define states |ϕy=1NxXωNxy|g0x, then

    U|ϕy=1NxXωNxy|g0x+logg0h=ωNylogg0h|ϕy.
  • Use phase estimation!

Quantum Attack on Diffie-Hellman

  • How do we prepare the eigenstate |ϕy=1NxXωNxy|g0x?

    • It is not easy as the phase ωNxy depends on the discrete log of g0x.

    • It won't work if we prepare 1NxXωNxy|x|g0x.

    • Forgetting quantum information coherently (|x here) is hard!

  • We can sample a random pair of (y,|ϕy).

    1. Prepare 1NxX|x|g0x.
    2. Apply the QFT to the first register to get 1Nx,yXωNxy|y|g0x.
    3. Measure the first register.

Shor's Factoring Algorithm: Background

  • Factoring has been widely studied, and no classical algorithm is known.

    The best known classical algorithm runs in time 2(logN)c for c=1/2 (or 1/3 depending on number theory conjectures).

  • People believe factoring is hard and use it to construct public-key cryptography.

    Rivest, Shamir, and Adleman receive 2002 Turing Award for this.

  • Factoring is in BQP.

    Shor's algorithm for factoring runs in poly(logN) quantum time.

  • A challenge to extended Church-Turing thesis:

    Any efficient computation performed on a physically realistic model can be carried out efficiently on a Turing machine.

  • How did Peter Shor discover his algorithm?

    Watch this video

From Factoring to Order-finding

  • Knowing the period of x0,x1,x2,modN helps solving the factoring problem for N.

    The smallest non-zero r such that xr1(modN).

  • If r is even and xr/2+1 and xr/21 are not multiples of N, we have

    xr1=(xr/21)(xr/2+1)=kN.
  • Then gcd(xr/21,N) and gcd(xr/2+1,N) will be non-trivial factors of N.

  • Number theory: The condition above happens with probability 1/2 over random x.

  • Find the period of f(a)=xa(modN).

    The period can be huge, and the problem is believed to be classically hard.

Phase Estimation for Order-finding

  • Phase estimation applied to

    U|y=|xymodN.
  • Some eigenvectors of U:

    |us=1rk=0r1ωrsk|xkmodN.U|us=1rk=0r1ωrsk|xk+1modN=ωrs|us.
  • U is unitary, and by using modular exponentiation, we can implement controlled-Uj.

  • How do we prepare the eigenstate |us depending on r?

Eigenstate for Phase Estimation

  • We don't know how to prepare |us for given s.

  • Yet, we have

    1rs=0r1|us=1rs,k=0r1ωrsk|xkmodN=|1.
  • We can obtain high precision of the phase φs/r for some random s.

  • Use continued fraction algorithm to find r.

    Suppose s/r is a rational number satisfying

    |srφ|12r2.

    Then the continued fraction algorithm for φ can find s and r efficiently.

  • Some hidden detail: Need a minor fix when s and r are not coprime.

Hidden Subgroup Problems

  • The development of Simon's and Shor's algorithms motivated the quantum algorithmic framework called hidden subgroup problem (HSP).

  • It generalized the technique to a lot more problems with group (algebraic) structures.

    Simons problem: {0,s} is a subgroup of {0,1}n.

    Theorem: any finite abelian group is isomorphic to a direct product of cyclic groups.

  • The abelian HSP problem is completely understood.

  • Most of the non-abelian cases are open with a few exceptions.

  • A famous open problem is the dihedral subgroup problem, for which the best quantum algorithm (Kuperberg's algorithm) runs in time O(2n).

Shor's Algorithm and Public-key Cryptography

  • Shor's algorithm breaks the RSA public-key cryptosystem if large-scale quantum computers can be built.

  • Similar algorithms can break elliptic-curve based public-key cryptography.

  • Post-quantum cryptography is emerging.

  • NIST PQC standardization process announced the third-round candidates in July, 2020 and the candidates to be standardized in July, 2022.

    Year Public-Key encryption/KEMs Digital signatures
    2020 Classic McEliece (Code-based) CRYSTALS-DILITHIUM (Lattice-based)
    2020 CRYSTALS-KYBER (Lattice-based, LWE) FALCON (Lattice-based)
    2020 NTRU (Lattice-based) Rainbow (Multivariate)
    2020 SABER (Module Learning With Rounding)
    2022 CRYSTALS-KYBER (Lattice-based, LWE) CRYSTALS-DILITHIUM (Lattice-based)
    2022 FALCON (Lattice-based)
    2022 SPHINCS+ (Hash-based)

Grover's Algorithm

Both Shor and Grover were at Bell Labs at that time.

Unstructured Search Problem

  • Suppose you have a Boolean function f:{0,1}n{0,1} to which we can make oracle access as before.

  • We know that there is one and only one input x such that f(x)=1.

    We call this x the marked item.

  • How many queries to f do we need to find the marked item?

  • Classically Θ(N) for N=2n.

  • In 1996, Grover gave a quantum algorithm that makes O(N) queries only.

    How?! It's not very different from Elitzur-Vaidmen.

  • This marks the beginning of an interesting line of research on quantum algorithmic techniques different from QFT and HSP.

  • Remark: Grover's algorithm requires the oracle or QRAM (for database search).

Grover's Algorithm

  1. Prepare the equal superposition state 12nx|x.
  2. Apply the Grover iterate k times.
  3. Measure.
  • Define Grover iterate as

    G=HnRHnOf,±,

    where R is the reflection along |0n.

  • An example for n=2 and marked item x=10:

    12(1111)12(1111)=14(1111)+14(1131)(0010).

Grover's Algorithm: Analysis

  • Good state |G=|x for f(x)=1 and bad state |B=1N1x:f(x)=0|x.

  • The uniform superposition state |U is in the span of |G and |B,

    |U=sinθ|G+cosθ|B, for θ=arcsin(1/N).
  • The Grover iterate consists of two reflections which generate a rotation of 2θ.

  • After k iterations, the state is sin((2k+1)θ)|G+cos((2k+1)θ)|B.

  • Choose kπ4θ=O(N) as sinθθ.

Amplitude Amplification

  1. Setup the starting state |U=A|0;
  2. Repeat the following for O(1/p) times:
    1. Apply Of,±;
    2. Apply ARA1;
  3. Measure.
  • A Boolean function f:X{0,1} partitions X into good and bad elements.
  • Suppose there is a quantum algorithm A with no intermediate measurements starting from |0 finds a good element with probability p.
  • The amplitude amplification algorithm finds a good element with O(1/p) calls to A and A1.
  • Grover's algorithm is the special case where A=Hn.

Grover is Optimal

This is known as BBBV (Bennett-Bernstein-Brassard-Vazirani), proved even before Grover's algorithm where the authors tried to show that there shouldn't be quantum polynomial time algorithms for NP-hard problems.

  • Quantum algorithms need Ω(N) queries to solve the search problem.

  • There are now many proofs for this fact and there is an advanced theory called quantum query complexity answering related questions.

  • A quantum query algorithm for solving the search problem has the form

    UTOTO2U1O1U0.
  • Hybrid argument proof idea:

    f(x 1 2 x0 N
    f(x) 0 0 0 0
    1. First, consider a case where f(x)=0 for all x and so all oracle calls are identity maps.

    2. There will be an x0 that is not queried very often because there are so many x's to query.

    3. If we reprogram the oracle so that f(x0)=1, the algorithm will not notice this change (by a hybrid argument).

Hybrid Argument Proof

  • We use a hybrid argument to prove the claim.

  • Consider Hybrid 0 and let the state before the t-th query be |ψt=xXαx(t)|x.

  • Then xXt=1T|αx(t)|2=T.

  • There is an x0 such that t=1T|αx0(t)|2T/N.

  • By Cauchy-Schwarz, t=1T|αx0(t)|T/N.

  • It is easy to show ξtξt12|αx0(Tt+1)| and ξTξ02t|αx0(t)|2T/N.