## 1 “It can only be attributable to human error”

In a not too distant future, a quantum computer engineer will be confronted with the problem of automating the compilation of what a user wishes to execute (quantum algorithm) to instructions which a quantum computer is able to execute.

A quantum algorithm is implemented as a quantum circuit formed of quantum gates operating on quantum bits (qubits). Executing a quantum circuit is different compared to classical circuit execution. The wires and the gates of a classical circuit are implemented in hardware. In contrast, for a quantum circuit, only the qubits may be seen as part of the hardware, because the gates are understood as instructions for transforming qubit states. There are multiple related gate sets which can be used to express quantum algorithms, and their relation is similar to how classical programming languages are compiled from high level ones into lower level and finally assembler instructions.

For solving the problem, the quantum computer engineer should learn about how defects are useful for constructing reliable quantum circuits [5, 2]. He needs to devise a method to automatically transform the high level description of the quantum algorithm into an equivalent low level description. This would be straightforward in an ideal world, but in reality quantum hardware is faulty. The solution is to chose a suitable quantum error correcting code and to compile the algorithm into an intermediate description language which guarantees very high computational reliability. The surface quantum error correcting code is chosen due to its excellent error correcting properties and very low resource overheads. The surface code can be used for hardware failing less than 1% of time.

It is reasonable to assume that the first quantum computer will be built from faulty hardware entities arranged in a two dimensional lattice (e.g. Figure (a)a). Each entity in the lattice represents a physical qubit that can be manipulated individually or interacted with its nearest neighbours. Physical qubits can be either on (when actively manipulated) or off (when not being used). The available computational resources are constraint by the lattice area (number of physical qubits) and time (number of interaction rounds).

The engineer faces the challenge of compiling (as efficiently as possible with respect to the computational resources) an algorithm into surface code elements. This article will alleviate the engineer’s fear of defects, because these are basic error corrected elements used by the surface code.

### 1.1 Quantum Circuit Ingredients

Quantum circuits have their own particularities, given that they describe computations based on quantum physical effects. Firstly, a quantum circuit has the same number of inputs and outputs. Secondly, all the gates have the same number of inputs and outputs, and thirdly, the state of arbitrary qubits cannot be copied. From a diagrammatic point of view, a quantum circuit is a set of horizontal wires interrupted by quantum gates (e.g. Figure 3). Quantum circuit wires are qubit abstractions. The state of a qubit is transformed by each gate applied to that wire after a left-to-right traversal. Circuit inputs are on the left side, the outputs on the right side.

It would be difficult to discuss circuits and computations without introducing a few technical details. The state of a qubit named

is a two dimensional complex vector denoted

and imagined to indicate a point on the surface of a three dimensional unit sphere (Figure 1). Quantum gates rotate qubit states around a sphere axis and each single qubit gate can be decomposed into three rotations around two orthogonal axes, for example Z and X. Considering the arbitrary quantum gate , we will write , where and are rotation operators around the X and Z axes, and are rotation angles. This decomposition is a first example of how a high level description (gate) is compiled into a lower level description (only rotation gates). Single qubit measurements are probabilistic and performed around sphere axis. The probability of the measurement result depends on the angle between the measured state and the measurement axis. Multi-qubit gates exist too: for example, the CNOT gate is one possibility to create the quantum specific phenomenon of entanglement. Quantum entanglement occurs when pairs of qubits are interacted in a manner such that the state of each qubit cannot be described independently. The CNOT gate performs a bit flip of a computational state (target) if another state is

(control).### 1.2 Defects, Braids and Distillations

Bad environment has also an influence on quantum circuits, resulting in faulty qubit initialisations and measurements or faulty quantum gate applications. The majority of the environment-induced faults can be mitigated by quantum error correcting codes. From the perspective of the surface code, logical qubits are encoded and operated (initialisations, measurements and gates) by switching off sets of physical qubits in the lattice and interacting only the qubits still on. It suffices to mention that there are two methods (primal and dual) for manipulating single physical qubits and for saving the details about how the qubits interact with each other. Physical qubits, depending on their manipulation method, are switched on and off in turns: primal, dual, primal …

A defect abstracts how a set of switched off lattice physical qubits is evolving in time (Figure (a)a), and depending on the physical qubits type, the defect can be either primal or dual. A logical qubits is formed by pairs of same type defects and, as a result, the surface code allows the construction of primal and dual logical qubits.

A logical CNOT gate (Figure (b)b) is a braid between defects of opposite type (a primal and a dual): the dual logical qubit controls the primal logical qubit (target). Braids between defects of the same type leave the corresponding logical qubit states untransformed; the result is a logical identity gate. Braiding is the only straightforward operation between defects, implying that arbitrary quantum circuits, consisting of logical qubit initialisations, logical CNOT gates and logical qubit measurements, can be easily protected the surface code.

Error correction capability of the surface code (its distance) is a function of defect circumference and defect distances: construct distant, thick defects when using very faulty hardware, and construct close, thin defects when the hardware is less faulty. Code distance is not discussed in the following because it does not influence the definition of defects and braids

The surface code will not solve all environment related issues. Although an initialised qubit will be protected against errors, it may have a low fidelity: using the sphere visualisation, there is a large distance between the actual state and the ideal state. Fidelity is increased by distillation procedures [1] expressed as subcircuits. These take multiple low fidelity instances of a state and output a single high fidelity state. Consequently, the surface code will have to protect circuits including distillation procedures.

## 2 The RISC of Quantum Circuits

Reduced instruction set computing (RISC) was proposed as a way to increase classical computing performance, but the performance of quantum computers is not a thoroughly discussed research topic for the moment. However, there are sufficient reasons why a reduced set of quantum gates is useful. On the one hand, design automation methods can focus on a common framework; on the other, there are known efficient methods to actively protect specific gates against errors.

### 2.1 T is the Difficult Gate

Quantum computers seem more powerful for particular tasks which are exponentially difficult for classical computers. There are exceptions: quantum computations using only Clifford gates; but these are not universal, cannot express the full capabilities of quantum computing. Clifford gates are the Hadamard , , , the CNOT, and any other gate combination of the previous (e.g. ). Only the Clifford+T gate set is universal and indeed exponentially difficult for classic computers, because of the gate .

All gate types are translatable into Clifford+T, and research has focused lately on this set. Computations including state distillations can be protected by the surface code if all the circuit’s gates are decomposed into Clifford+T and then into ICM (single qubit initialisations, CNOT gates and single qubit measurements) [4], the smallest set of gates.

### 2.2 Initialise, Entangle and Measure

ICM are the RISC of surface code protected quantum circuits. Clifford+T gates are translated into subcircuits of only qubit initialisations, CNOT gates and qubit measurements. Initialisations can be either one of four possible states (, , , ), while measurements are of two types: single qubit independent ones (Figure (a)a), and classically controlled measurements (Figure (b)b).

An ICM single qubit rotation (e.g. V, S, T) about an angle is implemented by entangling an ancilla qubit (initialised into one of the four states) to the qubit representing the state to be rotated, and measuring one of the two qubits. Quantum measurements are probabilistic and will yield a rotation by or by (a rotation about in the opposite direction). The latter situation requires the wrongly rotated state to be corrected by an additional rotation of . For the V and S gates, the correction can be tracked through the CNOT circuit and does not need to be implemented as a gate. The ICM formulation of the S gate is illustrated in Figure (a)a.

The ICM T gate () is slightly more complex, because it requires an S gate correction () which cannot be tracked. It needs to be executed inside the circuit and, therefore, four other ancilla qubits are entangled and measured depending on the topmost result. The circuit performs a rotation irrespective of the upper result.

### 2.3 “Forget about small efficiencies”

Compiling a quantum circuit into surface code elements is halfway finished. The ICM form introduced a quantum circuit wire for each ancilla qubit, but not all the qubits are required simultaneously during a computation. Independent qubits can share the same wire, so that a qubit measurement is not preceded by another qubit’s initialisation. This leads to less physical resources required for error correcting the computation.

## 3 The Defects Ensemble

At last, the quantum computer engineer can protect a quantum circuit against the bad environment. The circuit is translated into an assembly of braided defects (e.g. Figure 4). It is not specified if a qubit should be primal or dual, and the solution is to consider all the qubits being primal, and implement a logical CNOT between primal qubits. Each CNOT from the circuit is implemented by the primal only braided logical CNOT from Figure (b)b.

The resulting circuit (e.g. Figure 5) includes distillations symbolised by boxes of different volumes ( and ). Boxes are placeholders of surface code protected versions of the distillation subcircuits. Distillations are probabilistic (may not succeed and the output state has low fidelity) and heralded (it is known if distillation succeeded). The engineer computes the number of boxes to be sufficient for very computational reliability, and lets all boxes execute in order to know which were successful and which not. Only outputs of successful boxes are usable, and each high fidelity output is connected to the circuit by a pair of defects to where it is needed.

## 4 TODO: Build quantum computer

The T gate, the one which makes quantum computations difficult, greatly influences the defects assembly too. The gate requires high fidelity states, and the total number of corresponding distillations combined with their resource requirements is so high that it almost monopolises the cost of error correcting an arbitrary quantum computation.

Instead of a conclusion, the quantum computing engineer should not be afraid of defects and be motivated to investigate ways to optimise distillations and their placement in assemblies. The engineer can learn more about this topic by using the complete introduction to the surface code offered in [2] and the description of how defect assemblies are generated [3].

## References

- [1] Sergey Bravyi and Alexei Kitaev. Universal quantum computation with ideal clifford gates and noisy ancillas. Physical Review A, 71(2):022316, 2005.
- [2] Austin G Fowler, Matteo Mariantoni, John M Martinis, and Andrew N Cleland. Surface codes: Towards practical large-scale quantum computation. Physical Review A, 86(3):032324, 2012.
- [3] Alexandru Paler, Simon J Devitt, and Austin G Fowler. Synthesis of arbitrary quantum circuits to topological assembly. arXiv preprint arXiv:1604.08621, 2016.
- [4] Alexandru Paler, Ilia Polian, Kae Nemoto, and Simon J Devitt. A compiler for fault-tolerant high level quantum circuits. arXiv preprint arXiv:1509.02004, 2015.
- [5] Robert Raussendorf and Jim Harrington. Fault-tolerant quantum computation with high threshold in two dimensions. Physical review letters, 98(19):190504, 2007.

Comments

There are no comments yet.