Skip to main content

Quantum Class 1, Mon 2021-08-30

1 Misc

1.1 Syllabus

Read the syllabus, accessible from the top bar.

1.2 Gradescope

We'll use Gradescope for submitting homeworks and possibly projects. I synced it with LMS on as of 8/29.

1.3 Iclicker

We may use the new version of iclicker for in-class quizzes.

1.4 My research

I do parallel geometry algorithms on large problems for CAD and GIS. See my home page. If this is interesting, talk to me. Maybe you can do something that leads to a jointly-authored paper.

1.5 Changes from last year

  1. New textbooks.

  2. More non-IBM material.

  3. No piazza.

  4. Class is in person.

1.6 Optional text

Quantum Computing for Computer Scientists 1st Edition

I used this last year. This is nice but is 20 years old, and so omits some things. However I'll refer to it a little.

I encourage you to read several books, and pick and choose.

2 Quantum Computing: An Applied Approach, chapter 1

  1. Quantum computer: uses properties of quantum mechanics to compute

    1. world is quantum.

    2. compare to classical computer.

  2. quantum properties

    1. superposition

    2. entanglement

  3. state: complete math description of state.

    1. a complex vector.

    2. classical analog: e.g., position of a particle.

  4. superposition: linear combo of states is a legal state.

    1. the weights are complex numbers.

    2. everything in quantum mechanics uses complex numbers.

    3. superposition does not work classically.

  5. measurement of a state $\Psi$:

    1. this discussion assumes some specific set of basis vectors.

    2. you can use different basis systems to represent the same vector, and rotate between them.

    3. $\Psi$ is a linear combo of the basis vectors.

    4. the measurement is also defined wrt that basis.

    5. it changes $\Psi$ state randomly to one of the basis vectors.

    6. the observed output of the measurement is that basis vector.

    7. the probability of $\Psi$ changing to a particular basis vector is the modulus squared of the weight of that basis vector.

    8. define $z^c$ to be the complex conjugate of $z$.

    9. if $\Psi= \alpha\psi_1+\beta\psi_2$, where $\alpha^2+\beta^2=1$ then the probability of $\Psi$ changing to $\psi_1$ is $\alpha^c\alpha$. (the Born rule)

    10. $\alpha^c\alpha$ is called the modulus squared.

    11. important: measuring changes the system.

    12. see the polarization example in the book

  6. A qubit $q$ is a quantum analog to a classical bit.

  7. the quantum analog to classical bits 0 and 1 are $|0\!\!>$ and $|1\!\!>$.

  8. q's state is a superposition (linear combo) of those two basis states:

    1. $q = a|0\!\!> + b|1\!\!>$ ,

    2. where the weights $a$ and $b$ are complex numbers, and $ | a | ^2 + | b | ^2 = 1$.

  9. Note the weird notation (Dirac notation). In $|0\!\!>$, $|$ is like a left bracket and $>$ like a right one.

  10. It is wrong to think that $q$ is really in one of the two states, but you don't know which one. This is the hidden variable theory. It has been proved experimentally to be false.

  11. $q$ is really in both states simultaneously.

    Alice laughed. "There's no use trying," she said: "one can't believe impossible things." "I daresay you haven't had much practice," said the Queen. "When I was your age, I always did it for half-an-hour a day. Why, sometimes I've believed as many as six impossible things before breakfast." - Through the Looking-Glass, and What Alice Found There (1871), by Lewis Carroll (Charles Lutwidge Dodgson).

  12. You cannot observe its state, unless it is $|0\!\!>$ and $|1\!\!>$, in which case you observe $0$ or $1$. This is the classical case.

  13. Otherwise you observe it with a measurement operator that transforms it to either $|0\!\!>$ and $|1\!\!>$, with probabilities

    $| a | ^2$ and $| b | ^2$, respectively.

  14. $a$ and $b$ are complex.

  15. That measurement changes $q$; it no longer has its old value.

  16. You cannot reclaim the old value.

  17. There are many possible measurement operators available.

    1. You can choose which to apply to $q$.

    2. That prevents you from applying the others to $q$, because you don't have $q$ available any more.

    3. Heisenberg uncertainty: measuring, say, position, prevents you from accurately measuring momentum.

  18. $q$, that is, $q$ 's value, can be considered to be a vector of length two: $$\begin{pmatrix} a | 0\!\!> \\ b | 1\!\!> \end{pmatrix} $$ or simply $$\begin{pmatrix}a\\b\end{pmatrix}$$.

  19. You operate on $q$ with a matrix multiplication: $q_2 = M q$.

  20. Unless $M$ is a measurement operator, it is invertible, so you can go backwards.

  21. Examples of 1-qubit gates

    1. not

    2. square root of not

    3. rotation, phase shift

  22. No cloning: You cannot copy a qubit, but can move it.

  23. The life cycle of a qubit:

    1. Create a qubit with a classical value, 0 or 1.

    2. Operate on it with matrices, which rotate it to have complex weights.

    3. Measure it by randomly projecting it onto a basis vector.

  24. So far, not very powerful.

  25. a quantum state $\Psi$ usually has many qubits.

    compare to a classical byte with 8 classical bits.

  26. However the different qubits in $\Psi$$ might be entangled.

    1. This is very weird and powerful.

    2. Entanglement means that if you measure one qubit then what you observe restricts what would be observed when you measure the other qubit.

    3. Even if the two qubits are 1000 mi apart. This has been experimentally observed.

    4. However that does not let you communicate.

2.1 Entanglement

  1. Crazy counterintuitive idea that's the basis for quantum speedup.

  2. Classical metaphor for entanglement:

    1. Start with a piece of paper.

    2. Tear it into two halves.

    3. Put each half into an envelope, seal them, and mix them up, so that you can't tell which half is in which envelope.

    4. Address and mail one envelope to a friend in Australia, and the other to a friend in Greenland.

    5. When the Australian opens his envelope, he knows what the Greenlander will find in his.

    6. However that doesn't let the Australian send any info to the Greenlander, or vv.

  3. This has been demonstrated with real qubits transported 1000 miles apart.

  4. Entanglement means that if you measure one qubit then what you observe restricts what would be observed when you measure the other qubit.

  5. However that does not let you communicate.

  6. The preceding metaphor is wrong in that it has a hidden variable, the unobserved half-paper state. That does not happen in quantum physics. With qubits, the states are not fixed until one is observed. I'm trying to get the idea across.

2.2 Reversibility of Quantum Computation (p9)

#. All operators used in quantum computation other than for measurement must be reversible. - textbook.

  1. Contrast to classical operators like and and or.

3 Chapter 2: history

  1. Read it on your own, but here are some additions:

  2. The property list on p15 is controversial and seems designed to exclude D-Wave.

  3. Like for classical computation, the main ideas of quantum computing were proposed before actual machines could be built.

4 Chapter 3: Qubits, Operators and Measurement

  1. (from the text callout 3.1) qubit: a two-level quantum mechanical system.

  2. state at any given time is a vector in a 2-D complex Hilbert space.

4.1 Two qubit operators

  1. Now, let $q$ be a system with two qubits, i.e., a 2-vector of qubits.

  2. $q$ is now a linear combo of 4 basis values, $ | 00\!\!>$, $ | 01\!\!>$, $ | 10\!\!>$, $ | 11\!\!>$.

  3. $q = a_0 | 00\!\!> + a_1 | 01\!\!> + a_2 | 10\!\!> + a_3 | 11\!\!> $

  4. where $a_i$ are complex and $ \sum | a_i | ^2 = 1$.

  5. $q$ exists in all 4 states simultaneously.

  6. If $q$ is a vector with n component qubits, then it exists in $2^n$ states simultaneously.

  7. This is part of the reason that quantum computation is powerful.

  8. A measurement operator applied to $q$ will rotate it to a basis {00, 01, 10, 11}, so that it will be observed in one of those four cases, with probabilities $ | a_i | ^2$.

  9. You operate on $q$ by multiplying it by a 4x4 matrix operator.

  10. The matrices are all invertible (except for measurement matrices), and all leave $ | q | = 1$.

  11. You set the initial value of $q$ by setting its two qubits each to 0 or 1.

  12. How this is done depends on the particular hw.

  13. I.e., initially, $q_1 = \begin{pmatrix}a_1 | 0\!\!> \\b_1 | 1\!\!> \end{pmatrix}$ and $q_2 = \begin{pmatrix}a_2 | 0\!\!> \\b_2 | 1\!\!> \end{pmatrix}$, and so

    $$q = \begin{pmatrix} q_1 \\ q_2 \end{pmatrix} = \begin{pmatrix} a_1 a_2 | 00 \!\!> \\ a_1 b_2 | 01 \!\!> \\ a_2 b_1 | 10 \!\!> \\ b_1 b_2 | 11 \!\!> \end{pmatrix}$$.

  14. The combined state is the tensor product of the individual qubits.

  15. In this case, you could separate out the individual qubits again.

  16. However, sometimes after operating on the combo (i.e., multiplying by a matrix), you cannot any more separate out the result into a tensor product of individual qubits.

  17. For $n$ qubits, the tensor product is a vector with $2^n$ elements, one element for each possible value of each qubit.

  18. Each element of the tensor product has a complex weight.

  19. You transform a state by multiplying it by a matrix.

  20. The matrix is invertible.

  21. The transformation doesn't destroy information.

  22. When you measure a state, it collapses into one of the basis states. (aka component states)

  23. You don't need to bring in consciousness etc. The collapse happens because the measurement causes the state to interact with the outside world.

  24. The probability of collapsing into a particular state is the squared magnitude of its complex weight.

  25. For some sets of weights, particularly after a transformation, the combined state cannot be separated into a tensor product of individual qubits. In this case, the individual qubits are entangled.

  26. That is the next part of why quantum computation is powerful.

  27. Entanglement means that if you measure one qubit then what you observe restricts what would be observed when you measure the other qubit.

  28. However that does not let you communicate.

  29. The current limitations are that IBM does only a few qubits and that the operation is noisy.

5 Class 2

Chapter 3 and on. Feel free to read ahead.

6 Homework 1

is online, due Thurs.

7 Videos to watch for Thurs

  1. Watch A Beginner’s Guide to Quantum Computing, 18 min, by Dr. Talia Gershon, IBM Research.

  2. David Deutsch - Why is the Quantum so Strange? (8:43)