Read Latex

Sunday, January 20, 2019

Computing and the Future 8 - Thoughts on Quantum Computing


Richard Feynman once said, "...nobody understands quantum mechanics" and "If you think you understand quantum mechanics, you don't understand quantum mechanics." So let me be clear, I don't understand quantum mechanics. But I am taking some stabs at how to compute with it and have collected a few constructs along the way. We will  start with this overview by Dr. Shohini Ghose, then we will do some backstory, code something up, and suggest some exciting things to look into.

Quantum Computing Explained in 10 Minutes

If you haven't seen this, stop whatever you are doing right now and watch it unless you are doing brain surgery or flying a 747. Click on the caption below:


- Via Ted Library

The Illuminating Facebook Question

As a matter of practice I posted the video link on my Facebook. After a time Seiichi Kirikami, a geometer and mechanical engineer from Ibaraki, Japan, asked a honest, simple, and incredibly stimulating question:



My edited response was as follows:

I think of it in interval arithmetic, a chunk of numberline, using the notation [x1,x2] for closed intervals that include their endpoints we have:



[0,1] + [0,1] ~= [0,2]

I place the ~ character to include the fact that if entangled addends could be unentangled, then we could invert the operation to find out what the addends were AFTER the operation was complete. This is impossible with conventional addition where the addends are eventually discarded producing closure in TIME, which is interesting. Recall traditional closure means that if we add any two integers, we are guaranteed to get another integer we can represent in the space (barring finite state machine overflow concerns we need not worry about here ). Of the four basic operations +,-,*,/, three are closed, but division by zero is not closed, since it has two possible values, that could not differ by a greater amount. Those two values are +∞ and -∞ depending on whether the denominator our division problem is approaching zero from the left or the right and switching infinitely fast (like an entangled particle fate, faster than light?) as we cross the event horizon from positive to negative x or vica versa.


In her lecture, Dr. Ghose is doing a quantum Boolean operation, which does not have the citizenship of addition in its space. She is doing quantum AND ∩, OR ∪ or NOT(¬). This involves:

  • Two quantities in the binary AND(a,b) case
  • Two quantities in the binary OR (a,b) case, and
  • One quantity in the unary NOT(a) case.

In traditional computing we create addition using the notion of a carry.


Answering Seiichi's Question

Note to the reader: the word "right" is spelled "rite" below so that it has the same number of letters as "left". Apologies to the orthographically sensitive.

If you look at the definition of a qubit on wikipedia you get a Bloch Sphere where the value of the qubit in its superposition state is representable by two parameters that we can think of as latitude and a longitude.





Until the qubit is "read" or "measured" and its wave function collapses the values of latitude and longitude can be anywhere on the Bloch sphere. The symbol |ψ> symbol is in ket notation where the ψ suggests the wave function. When you look at Ghose's video she uses a color swatch where the "color" can range between pure yellow or pure blue or some mixture. In my Facebook answer I started by using an interval to show that the state of the qubit could take on a continuous range of values between zero and one, stand-in's for yellow and blue, but the {lat,lon} vector is what we should really be using. For now I think that this {lat,lon} vector is just a complex number A + Bi, or {A, B} if you prefer. The alert reader will notice there is an issue as to how we resolve the interval arithmetic version [leftX, riteX] with {a, b} vector version. It would look something like {[leftA, riteA],[leftB,riteB]}, but we know that this apparent four degrees of freedom collapses to two as explained in the wiki, leaving us with a single complex number with a real and imaginary component. Also these can be represented in ket notation as |Z> = A + Bi for the qubit case. For multiple qubits we have:



- Great Quantum Mechanic Notation Video

where each ai, bi, is itself a complex number.

In the quantum world of wavefunctions the value of a qubit is a complex number, which allows for the mysteries of entanglement; This is just like the mystery that two complex numbers can be added together to get a real number with no complex component or an imaginary number with no real component. The latter can be thought of as what happens when waves in a ripple tank interfere constructively or destructively.







Adding Two Integers Bitwise

Instead of going straight for the quantum juglar, let's review:

"How do we add two integers using bitwise operators?"


This takes us to a discussion on StackOverflow that answers the question for imperative coding styles. Two solutions are provided, the recursive version is the most elegant so we code it up in our online tool that lets the reader run the code. The operator names are changed to reflect our intention, where the leading q stands for quantum. We hope we can morph this code into a more realistic complex case. Run this code by clicking on the caption below:
- Run this code

Towards a More Complete Answer

A more complete answer can be obtained by repeating Seiichi's Question literally asking:

"How do we add 1 + 1 on a quantum computer."

Again StackOverflow has a well developed answer to this question.


Implementing an Adder on the IBM Quantum Computer


Your assignment is to embed [0,1]+[0,1] on the IBM quantum computer

Later develop the following:


  • think big, not small
  • the antenna issue and microwave circulators
  • Nicolas Gisin entangled photon experiment
  • lithium niobate downconversion
  • triplet fusion upconversion - summary here,  full article here.
  • the half adder
  • the full adder
  • von Neumann architectures
  • dsp architectures
  • quantum computing architectures
  • Gyros are weird, cognitive impediments to progress
The last item in the list led to my proposal for a Warm Quantum Computer.

The year is 1943 for quantum computing, what happens next?