In this chapter, we have tried to cover those aspects of quantum computing, and only those aspects, that are relevant to this thesis. This means that we have avoided a lot of terminology that a reader might expect to see in a paper on quantum computing. Most introductions to quantum computing will refer to Hilbert spaces, vector spaces that possess an inner product (⟨ϕ∣ ∣ψ⟩ for quantum states, often written ⟨ϕ∣ψ⟩). Infinite- dimensional Hilbert spaces are of substantial interest to quantum physicists and have additional properties; however, quantum computation only deals with the specific case of finite-dimensional complex-valued vectors.
We also never explicitly discussed interference. Interference refers to two ampli- tudes canceling one another out. We saw this when we applied a Hadamard twice and obtained 1 2∣0⟩+ 1 2∣1⟩+ 1 2∣0⟩− 1
2∣1⟩ = ∣0⟩. From a physical standpoint, this is an
interesting phenomenon (how are two non-zero probability events combining to form a zero-probability event?), but from a mathematical standpoint, it’s captured in the mundane statement, “superposition behaves like addition”.
Qubits are often visualized as points on a sphere, called theBloch sphere, where the poles correspond to ∣0⟩ and ∣1⟩. Using this model, we can visualize unitary operators as rotations around the sphere. In particular, Pauli’s X, Y, and Z matrices are so named because they represent rotations around thex,y, andzaxes. For our purposes, however, the vector and matrix representations of qubits have proven more useful, and geometric discussions would complicate the picture.
Readers interested in the details of quantum computing and information the- ory beyond those presented here are advised to consult Nielsen and Chuang’s stan- dard text on the subject (2010) or John Watrous’s “Theory of Quantum Informa- tion” (2018).
Chapter 3
A Brief History of Quantum
Programming and Verification
3.1
Circuits, QRAM and Classical Control
The simplest and most influential model of quantum computation is thequantum cir- cuit model(Deutsch, 1989), in which quantum operations are represented as quantum circuits like those in Section 2.3. Unfortunately, as Knill (1996) noted, circuits alone are insufficient to describe many quantum algorithms. In particular, many quantum algorithms assume a sort of control flow in which quantum operations are executed, the results are measured, and classical computations are run on the results. This cy- cle is often repeated as many times as necessary. In response, Knill proposed a set of guidelines for writing pseudocode for quantum algorithms, revolving around the
Quantum Random Access Machine, or QRAM.
The QRAM model assumes that a quantum program has distinct sets of quantum and non-quantum (classical) registers. The quantum registers are very limited in their use: We can initialize quantum registers, apply unitary operations to them, and measure them, turning them into classical registers. The results of the measurement can then be used to perform classical computations. Implicitly, all of the quantum operations are performed on a quantum processor, while the remaining operations are performed locally, as in the following diagram:
Classical Computer Quantum Computer quantum queries measurement results
OpenQASM (Cross et al., 2017), and Quil (Smith et al., 2016) fairly precisely: Each has distinct registers used for quantum computation, which the controlling machine may measure and use in its computation. These “quantum assembly” languages are used in practice to run quantum computations on IBM’s 20-qubit quantum computer (the IBM Quantum Experience) and Rigetti Computing’s online Quantum Processing Units.
Knill’s pseudocode guidelines suggest that quantum registers might also be used as the guard in an IF-THEN-ELSE block, without detailing how to ensure such oper- ations are quantum mechanically valid. In “Towards a Quantum Programming Lan- guage,” Selinger (2004a) proposes a narrower model for quantum computing known asquantum data, classical control. This widely adopted model states that the control flow of a quantum program should always be classical: Though we take advantage of the superposition of data, such as qubits, we should not attempt to run superpo- sitions of programs. Instead, a quantum program should use classical conditionals, loops, and recursion. Most of the languages discussed below follow this framework, with the exception of QML (Altenkirch and Grattage, 2005). We will discuss the alternative approach, known asquantum control, in Section 3.9.
So far, we’ve portrayed the interaction between classical and quantum processors as unidirectional: The classical processor sends operations to the quantum computer, which returns measurement results. However, this doesn’t tell the whole story. Occa- sionally, a quantum computation will itself depend upon some complicated classical computation, which we wouldn’t want to run on a dedicated quantum processor. This classical computation, in turn, might depend on some measurement results. To deal with this, Green et al. (2013a) introduce the notion ofdynamic lifting. This operation is initialized by the quantum processor, which sends data to the classical processor and asks it to compute the remainder of the quantum operation (in Quipper’s case, a circuit) for the QRAM to execute.
Classical Computer Quantum Computer classical queries circuit continuations
Many of the languages we will look at implement some form of dynamic lifting.