Interest in quantum computing has grown rapidly following the discovery by Peter Shor in 1994 of a polynomial-time algorithm for integer factorization [Sho94]. In a classical computer a sequence of N binary digits defines one specific configuration among the 2N possible values. However, in a quantum computer a collection of N "qubits" has a state function (in `ket' notation) ket(ψ) in a Hilbert space, which can be in a superposition of all 2N possible values
ket(ψ) = ∑bv ∈Z2N αbv ket(bv), qquad αbv ∈C, ∑bv |αbv|2 = 1.
A basic theorem in quantum information theory states that it is impossible to clone a quantum state. Since this implies that it is not possible to copy quantum information, it was initially believed that error-correction would be impossible on a quantum computer. However, in 1995 Shor showed that it was possible to encode quantum information in such a way that errors can be corrected, assuming an error model in which errors occur independently in distinct qubits [Sho95].
Following this discovery, a class of quantum error-correcting codes known as stabilizer codes were developed. In [CRSS98] (which is the major reference for this chapter of the Magma Handbook), it was shown that stabilizer codes can be represented in terms of additive codes over finite fields (see chapter ADDITIVE CODES for a description of additive codes). This remarkable result reduces the problem of constructing fault-tolerant encodings on a continuous Hilbert space to that of constructing certain discrete codes, allowing the use of many of the tools developed in classical coding theory.
The current Magma package for quantum codes deals exclusively with finite field representations of stabilizer codes. It is important to keep in mind that, although a quantum code is represented by a code over a finite field, an actual quantum code is in fact a totally different object. The full theory behind quantum stabilizer codes will not be described here, for that the reader should consult the main reference [CRSS98]. A brief synopsis will outline how the finite field representation of a stabilizer code is to be interpreted, and the specifics of this representation in Magma.
Many of the conventions and functions for classical error-correcting code types in Magma can be ambiguous in the context of quantum codes. For this reason the handbook should be carefully consulted before assuming that any particular aspect of a quantum code follows naturally from classical coding theory definitions.
The reduction of the problem of continuous errors on a Hilbert space to a problem employing a discrete finite field representation is achieved by confining attention to a finite error group. An element of the error group, acting on the N qubits, is expressed as a combination of bit flip errors, designated by the operator X, and phase shift errors, designated by the operator Z (as well as an overall phase factor that will be ignored here):
X(ba)Z(bb) ket(bv) = ( - 1)bv .bb ket(bv + ba)
The error group is given by the set { X(ba)Z(bb) : ba, bb ∈Z2n } and its elements can be written as length 2N binary vectors (ba|bb). An error represented by such a vector in Magma is said to be in extended format which is distinct from the default representation. A more common (and practical) representation is as the element bw of F4(N) given by bw = ba + ω bb, where ω is a primitive element of GF(4). This representation is referred to as the compact format, and is the default format used in Magma for quantum codes. Note that this is slightly different to the representation widehat(bw) = ω ba + /line(ω) bb used in [CRSS98] for binary quantum codes, but they are equivalent: bw = /line(ω) * widehat(bw).
The Magma package also supports non-binary quantum codes, which are obtained by generalizing from the binary case in a natural way. For quantum codes based on qubits over GF(q), the compact format in GF(q2) will be bw = ba + λ bb, where λ is a fixed element returned by the function QuantumBasisElement(GF(q2)).
A symplectic inner product is defined on the group of errors, in its representation as a set of GF(q)-vectors. For vectors in extended format this is defined by
(ba1|bb1) * (ba2|bb2) = ba1 .bb2 - ba2 .bb1
In compact format (over GF(4)) the equivalent inner product is defined by
bw1 * bw2 = (Trace)(bw1 ./line(bw)2).
Since the commutator of two errors is given by
eqalign(
Big[ big(X(ba1)&Z(bb1)big)big(X(ba2)Z(bb2)big) -
big(X(ba2)Z(bb2)big)big(X(ba1)Z(bb1)big)Big] ket(bv)
&= ( - 1)bv.bb2 + (bv + ba2).bb1ket(bv + ba1 + ba2)
+ ( - 1)bv.bb1 + (bv + ba1).bb2ket(bv + ba1 + ba2)
&= Big[ ( - 1)ba2.bb1 - ( - 1)ba1.bb2 Big]
( - 1)bv.(bb1 - bb2)ket(bv + ba1 + ba2)
&= Big[1 - δba1.bb2, ba2.bb1 Big] ...
)
then clearly errors will commute if and only if their finite field
representations are orthogonal with respect to the symplectic inner
product.
A quantum stabilizer code is defined by an abelian subgroup of the error group. In the context of its finite field representation this translates to a self-orthogonal additive code under the symplectic inner product. So a quantum stabilizer code Q is defined by a symplectic self-orthogonal additive code S, which is (with some redundancy) termed the stabilizer code of Q.
The error-correcting capability of a code is determined by the set of errors which can not be detected. For classical linear codes these undetectable errors are precisely the non-zero codewords of the code, while for a quantum code, the undetectable errors are given by the set Sperp \ S, where Sperp is the symplectic dual of S.
The most important measure of the ability of a quantum code to correct errors is its minimum weight, that is, is the minimum of the weights of the words of Sperp \ S. An exception to this definition occurs in the case of quantum codes having dimension zero, which are defined by symplectic self-dual stabilizer codes. These are termed "self-dual quantum codes" and are defined to have a minimum weight equal to the (classical) minimum weight of their stabilizer code.