The Quantum Stack

What does the architecture of a quantum computer look like? And how are you supposed to interact with a quantum chip?

A bit like machine learning with GPUs today, where you do not directly interface with the GPU and where you typically use a library (e.g. PyTorch, TensorFlow) that wraps CUDA or OpenCL. A quantum computer is a specialized accelerator, like a GPU. And like a GPU, a QPU, or quantum processing unit, is not suited for general-purpose computing.

Whereas a GPU is ideal for heavy-duty matrix operations in graphics processing and machine learning, a QPU is best for algorithms that can leverage quantum parallelism to its fullest. That said, quantum computers of the foreseeable future will be mostly useful for quantum simulations in physics, chemistry, and materials science because of the I/O bottleneck. Popular use cases such as optimization with quantum annealing, QAOA or VQE, and quantum machine learning have yet to be shown to have any practical quantum advantage beyond individual problems.

The Quantum Stack

You program a quantum algorithm with a programming language that implements the quantum arithmetic and is compiled into the quantum instruction set supported by the chip itself. The front runners for programming languages are Python and C++, though I suspect that Python will emerge as the primary language once quantum computers are ready for general market adoption. C++ is simply too low level for solving business problems, although many hardware companies have yet to figure that out. OpenQASM is a common intermediate representation of higher-level quantum programming languages.

The quantum stack by <a href='https://doi.org/10.1145/2903150.2906827'>Fu et al.</a>, as reinterpreted by <a href='https://www.qutube.nl/quantum-computer-12/the-building-blocks-of-a-quantum-computer-177'>QuTech</a>
The quantum stack by Fu et al., as reinterpreted by QuTech

Not every quantum computer implements all possible gates, so each operation needs to be translated into a sequence of supported operations for the quantum chip. These operations tend to be electromagnetic or optical pulses of certain frequencies and durations. That is why just above the quantum chip layer in the figure above there is a translation from operations on qubits to the classical world of signals.

How else would you know we are talking about <u>quantum</u> computers...?!
How else would you know we are talking about quantum computers...?!

For the time being, quantum algorithm designers must deal with error correction in their code themselves. With the arrival of fault-tolerant quantum computers in a decade or so, quantum error correction will be handled by the quantum computer itself. That way, quantum software engineers can focus on programming against logical rather than physical qubits.

Systematic errors in quantum computers arise from imperfect manufacturing processes. These errors accumulate when we prepare states, apply gates, and measure qubits.

Decoherence is stochastic and comes from qubits interacting with the environment. Such environmental noise is thermal in nature and it leads to qubits losing their superposition and entanglement. We can limit the influence of environmental noise by cooling quantum chips to fractions above absolute zero. To protect qubits from the deleterious effects of decoherence, we must still add redundancy. The redundancy needed to implement quantum error correction can, for the surface code, require more than 1,000 physical qubits to each logical qubit.