Quantum information is fragile and needs to be protected from various sources of errors. This is usually done by spreading the quantum information into a bigger system, called a quantum error-correcting code. To perform quantum computations, one does not only need to store quantum information but also to manipulate the encoded information. The computations need to be performed at the logical level, meaning while the information is still encoded since errors can also occur while performing computations. Such operations are called logical gates. In other words, a logical gate is one that is performed on a logical qubit. The realization of a particular operation will depend on the quantum code used to encode the information.
Below are a few examples of logical gates for various codes.
Logical gates for different encodings:
Logical gates for the classical repetition code: In a classical computer, data is represented by strings of bits, where each bit either takes the value \(0\) or \(1\) . To protect the information from an accidental bit flip (a \(0\) becoming a \(1\) or a \(1\) becoming a \(0\)), one may repeat each bit three times (or more) so that even if an error occurs on one of the three physical bits, the majority will most-probably remain unaffected and one can still deduce what the original logical bit was. A common classical gate is the NOT gate which negates the value of a bit by transforming a \(0\) into a \(1\) and vice-versa. If we consider an encoded bit made out of three repeated physical bits, \(0_L = 000\), and apply the NOT gate to all the individual physical bits, we obtain \(111\), that is a logical bit \(1_L\). Likewise, if we start from \(1_L = 111 \) and apply three individual NOT gates, we obtain \(0_L = 000\). In other words, applying three NOT gates transforms a logical bit \(b_L\) into the logical bit NOT \(b_L\): we say that it implements a logical NOT gate. Similarly, the logical operation AND (where \(a\) AND \(b = 1\) if a and b are both equal to \(1\) and \(a\) AND \(b = 0\) otherwise) can also be implemented by applying an AND gate between all three pairs of bits. In fact, in the (very particular) case of the classical repetition code, any logical gate can be implemented by applying the corresponding physical gate on the physical bits.
Logical gates for dual-rail qubits:
Quandela uses dual-rail qubits. The latter are made of a photon and two optical fibres, where the presence of the photon in one or the other fibre represents a logical \(0\) or a logica \(1\) qubit state. Since the information considered is quantum, the state may also be in a superposition of these two options. This code can detect for one photon loss. The X gate is the quantum equivalent of a NOT gate: it transforms a state \(0\) into a state\(1\). For the dual-rail qubit it can be implemented by simply swapping the two waveguides. More generally, any logical gate can be implemented using only linear-optical devices and detectors. This is known as the KLM protocol and it is one of the main strengths of dual-rail qubits.
Logical gates for stabilizer codes:
There are many different quantum encodings, and each comes with its own set of logical gates. As an example, stabilizer codes are a common type of encoding where a logical qubit is encoded into several physical qubits (similarly to the classical repetition code example above). You can find a short introduction on stabilizer codes here. Such codes can for instance be used on top of the dual-rail encoding, in which case the “physical qubits” of the codes are dual-rail qubits. An important concept, when discussing quantum gates, is the universal gate set. This is a set of quantum gates that allows you to approximate any quantum gate to arbitrary precision. The goal is thus to be able to realize a universal gate set fault-tolerantly, i.e., without spreading errors too much.
The planar surface code is a famous example of stabilizer codes. The logical qubits are encoded into a grid of physical qubits. For this code, a universal gate set can be realised fault-tolerantly using transversal gates (see definition below), magic state distillation + injection (in which case a particular state called “magic state” is used to perform a gate) and lattice surgery (which involves “splitting” and “merging” different small grids of physical qubits by applying operations on nearest neighbours in the lattice).
Quandela is also interested in Floquet codes as their implementation is well-suited to Quandela’s hardware. Some of these codes also come with new options for logical gate implementations.
Frequently asked-questions
- What is a fault-tolerant gate? There is more than one definition of a fault-tolerant gate, but in essence, it is a logical gate that will not cause errors to propagate too much. A more concrete definition is that a fault-tolerant gate maps a correctable error to a correctable error.
- What is a transversal gate? Transversal gates are examples of fault-tolerant gates. A single-qubit gate (a gate applied on one logical qubit) is said to be transversal if it is implemented by applying gates that each act on individual physical qubits but do not couple various physical qubits. Similarly, for two-qubit gates, a logical gate is transversal if it can be implemented by applying only physical two-qubit gates between pairs made of a physical qubit from the first logical qubit and the corresponding physical qubit from the second logical qubit.
- Are there codes for which all logical gates are transversal gates? The Eastin-Knill no-go result forbids the existence of a quantum code that can both detect (or correct) any error on a single physical qubit and have a set of universal transversal gates. As a result, one cannot expect to perform all the gates transversally and other methods need to be developed to perform the remaining gates. One such method is magic state distillation followed by state injection. Another option is code switching where we switch between two codes, each of which has certain transversal gates which, taken all together, form a universal gate set.
