Skip to main content

Quantum Class 3, Tues 2021-09-07

1 Homework 3

is out, due Thurs. It's short.

2 New material

Various things designed to solidify your understanding of the fundamentals.

2.1 Math review from Quantum Computing for Computer Scientists

  1. Chapter 2:

    1. Complex vector space, page 34.

      1. n-dim vector $\begin{vmatrix} c_0 \\ \cdots \\ c_{n-1}\end{vmatrix}$

      2. Add 2 vectors.

      3. Multiply vector by scalar.

      4. etc.

    2. Set of $m\times n$ complex matrices, $\mathbb{C}^{m\times n}$, is also a complex vector space.

      1. Transpose, conjugate, adjoint.

      2. Matrix mult is $\star$ in book.

    3. $\mathbb{C}^{m\times n}$ is a complex algebra.

    4. Set of polynomials in one variable of degree $le n$ is a complex vector space.

    5. State of a quantum system is a complex vector.

    6. You can make new vector spaces from combos of old ones.

      1. Cartesian product or direct sum.

      2. Just an ordered pair.

      3. $(v_1, v_2)$.

    7. Set of basis vectors for the vector space.

      1. Every vector $v$ in the space is a linear combo of the basis vectors.

      2. Represent $v$ as the list of weights.

      3. There are many possible basis sets.

      4. Each different basis set causes a different representation for the vectors.

      5. Convert: change of basis.

      6. Cartography example: NAD27, WGS84.

        A bridge between Switzerland and Germany across the Rhine River at Laufenberg had its two ends at different elevations because of a conversion error between two different basis systems.

        https://www.science20.com/news_articles/what_happens_bridge_when_one_side_uses_mediterranean_sea_level_and_another_north_sea-121600

      7. Hadamard matrix is an example.

    8. Section 2.4 Inner product, etc, p 53

    9. Section 2.7 Tensor product of vector spaces, p 66.

      1. $\mathbb{V} \otimes \mathbb{V'}$.

      2. Let $dim(\mathbb{V})=p$ and $dim(\mathbb{V'})=q$ . Then $dim(\mathbb{V} \otimes \mathbb{V'}) = pq$.

      3. This is how quantum systems combine.

      4. Example 2.7.2 p 70.

  2. From end of section 2.3, p.52 to 2.6.

    1. P 52. Transition matrix to convert a vector representation from the canonical basis this another basis is the Hadamark matrix.

    2. Section 2.4. Add an inner product operator to the complex vector space. Note the conjugates in the rules; you don't see them with a real vector space.

    3. Norm, aka length.

    4. We won't need limits etc.

    5. Section 2.5 Eigenvalues and eigenvectors

      1. Eigenvalues don't depend on the representation. Converting to a new basis set doesn't change them.

      2. Geometrically, in 2D, in you transform a circle centered at origin, eigenvalues are lengths of the axes. Eigenvectors are the axes.

    6. Section 2.6 Hermitian and unitary matrices

    7. P 39. Adjoint: conjugate transpose of matrix.

    8. If you use its eigenvectors as a basis, then the matrix diagonalizes to a list of its eigenvalues.

    9. P 62. Hermitian matrix: it is its adjoint.

    10. Unitary: its inverse is its adjoint.

    11. Geometrically, they are rotations since they preserve distances.

    12. Notation confusion: the books uses capital letters both for matrices and vectors.

    13. P 71, tensor product of matrices.

      1. Chapter 3 through 3.2, p 74-88.

      1. p 80, doubly stochastic matrix.

      2. Multiplying it by a vector of probabilities gives a vector of probabilities (i.e., they sum to 1 and $0\le a_i \le 1$ ).

      3. P 88, Chapter 3, section 3.3 Quantum systems,

      4. Real probabilities add.

      5. When probabilities are norms of complex numbers, they might cancel.

    14. p 91, Ex 3.2.2

    15. p 93 double slit experiment

    16. p 97 Section 3.4, Assembling systems

2.2 2 slit experiment compared with real vs complex transitions

2.3 Two and three qubit operators

  1. https://en.m.wikipedia.org/wiki/Bloch_sphere:

    1. The state of a qbit can be represented as a point on or in a sphere of radius 1.

    2. E.g., |1> is the north pole, |0> the south pole.

    3. Many operations are rotations.

  2. Common operations (aka gates):

    https://en.wikipedia.org/wiki/Quantum_logic_gate

    1. Swap

    2. controlled not CNOT cX

      When input is general, it's more sophisticated that it looks.

    3. Hadamard.

      1-qbit creates a superposition.

      https://cs.stackexchange.com/questions/63859/intuition-behind-the-hadamard-gate

      2-qbit creates a uniform superposition

      https://en.wikipedia.org/wiki/Quantum_logic_gate

    4. Toffoli, aka CCNOT.

      Universal for classical boolean functions.

      (a,b,c) -> (a,b, c xor (a and b))

      https://en.wikipedia.org/wiki/Toffoli_gate

    5. Fredkin, aka CSWAP.

      https://en.wikipedia.org/wiki/Fredkin_gate

      3 inputs. Swaps last 2 if first is true.

      sample app: 5 gates make a 3-bit full adder.

  3. Bell state

    1. Maximally entangled.

    2. Hadamard then CNOT.

2.4 Entanglement of 2-qbit system

State is a 4-vector of length 1.

It was originally created as the exterior product of two 2-vectors, the states of two separate 1-qbit systems.

Originally the separate 1-qbit systems didn't affect each other. Either could be transformed and measured.

Then 2-qbit system was rotated with a transformation matrix.

Now, perhaps it can be decomposed into the exterior product of two 2-vectors. Perhaps not.

  1. Case 1: The 4-vector representing the new state can be decomposed.

    1. Then it's still really two separate 1-qbit systems.

    2. They can still either be transformed and measured.

    3. Measuring one qbit does not affect the other qbit.

  2. Case 2: The 4-vector representing the new state cannot be decomposed.

    1. So the 2 qbits are now entangled.

    2. That means that measuring one qbit affects what you will see when you measure the other.

    3. It might just bias the probabilities of measuring the other qbit as 0 or 1.

    4. Or, it might totally control what you will see.

2.5 No Cloning

I made some supplementary material on cloning (copying), which works in the classical world but not in the quantum world.

Classically, you can easily clone a bit. Consider a 2-bit system, $x, y$. Represent the state with a 4-vector

$s=\begin{vmatrix} a_0\\a_1\\a_2\\a_3\end{vmatrix}$

where exactly one $a_i=1$ and the other three are 0. E.g., if $a_3=1$ then $x=y=1$.

Here's a 2-input, 2-output circuit that clones the first bit.

$x'=x\\y'=x$

Its truth table is

x y | x'y'
0 0 | 0 0
0 1 | 0 0
1 0 | 1 1
1 1 | 1 1

The matrix M is:

1 1 0 0
0 0 0 0
0 0 0 0
0 0 1 1

That is, the final state is $s' = \sum_j M_{ij} b_j$

However, M is singular. So this is not a legal quantum circuit. Let's try again.

The better way is the 3-input Toffoli gate. The function is

$x'=x \\ y'=y \\ z'= z \oplus xy$

The truth table is

x y z | x'y'z'
0 0 0 | 0 0 0
0 0 1 | 0 0 1
0 1 0 | 0 1 0
0 1 1 | 0 1 1
1 0 0 | 1 0 0
1 0 1 | 1 0 1
1 1 0 | 1 1 1
1 1 1 | 1 1 0

The matrix is:

1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0

Let x=1, z=0. Then:

x'= 1
y'= y
z'= y

and we've cloned y in the classical case.

This matrix is nonsingular and so is legal in a quantum circuit.

Try $y= \frac{1}{\sqrt{2}} | 0> + \frac{1}{\sqrt{2}} | 1>$. Using x=1, z=0, the input will be

$\frac{ | 1, 0, 0> + | 1, 1, 0>}{\sqrt{2}}$

and the state is

$(0, 0, 0, 0, \frac{1}{\sqrt{2}} , 0, \frac{1}{\sqrt{2}} , 0)^T$

Multiplying that by the matrix gives

$\frac{ | 1, 0, 0> + | 1, 1, 1>}{\sqrt{2}}$

Instead of cloning y into z, this entangled y and z.

This isn't new; we already know how to engangle two qbits.

Engangling isn't the same as cloning. The point of cloning is that we could operate on the two bits separately. If they're engangled, operating on one affects the other.

Note that this changes $x$, not just $y$. Classically, $x$ is an input but that does not change.