Access Functions

Contents

QuantumBasisElement(F) : FldFin -> FldFinElt
Given a degree 2 extension field F = GF(q2), return the element λ ∈F which acts to connect the extended and compact formats. For a vector (ba | bb) in extended format, the corresponding compact format of this vector will be bw = ba + λ bb.
StabilizerCode(Q) : CodeQuantum -> CodeAdd
StabiliserCode(Q) : CodeQuantum -> CodeAdd
    ExtendedFormat: BoolElt             Default: false
The additive stabiliser code S which defines the quantum code Q. By default S is returned in the compact format of a length n code over GF(q2), but if ExtendedFormat is set to true, then it will be returned in extended format as a length 2n code over GF(q).
StabilizerMatrix(Q) : CodeQuantum -> ModMatFldElt
StabiliserMatrix(Q) : CodeQuantum -> ModMatFldElt
    ExtendedFormat: BoolElt             Default: false
Given a quantum code Q return the additive stabiliser matrix M defining Q. By default M is returned in the compact format of a length n code over GF(q2), but if ExtendedFormat is set to true, then it will be returned in the extended format as a length 2n code over GF(q).
NormalizerCode(Q) : CodeQuantum -> CodeAdd
NormaliserCode(Q) : CodeQuantum -> CodeAdd
    ExtendedFormat: BoolElt             Default: false
The additive normalizer code N which defines the quantum code Q. By default N is returned in the compact format of a length n code over GF(q2), but if ExtendedFormat is set to true, then it will be returned in extended format as a length 2n code over GF(q).
NormalizerMatrix(Q) : CodeQuantum -> ModMatFldElt
NormaliserMatrix(Q) : CodeQuantum -> ModMatFldElt
    ExtendedFormat: BoolElt             Default: false
Given a quantum code Q return the additive normalizer matrix M defining Q. By default M is returned in the compact format of a length n code over GF(q2), but if ExtendedFormat is set to true, then it will be returned in the extended format as a length 2n code over GF(q).

Quantum Error Group

As described in the introduction to this chapter, vectors over a finite field used to describe a quantum stabilizer code actually represent elements of the corresponding quantum error group. For a p-ary N qubit system (where p is prime) this error group is the extra-special group with order 22N + 1 consisting of combinations of N bit-flip errors, N phase flip errors, and an overall phase shift. All groups in this section use a polycyclic group representation.

QuantumErrorGroup(p, n) : RngIntElt, RngIntElt -> GrpPC
Return the abelian group representing all possible errors for a length n p-ary qubit system, which is an extra-special group of order p2n + 1 with 2n + 1 generators. The generators correspond to the qubit-flip operators X(i), the phase-flip operators Z(i), and an overall phase multiplication W by the p-th root of unity. The generators appear in the order X(1), Z(1), ..., X(n), Z(n), W.
QuantumBinaryErrorGroup(n) : RngIntElt -> GrpPC
Return the abelian group representing all possible errors on a length n binary qubit system, which is an extra special group of order 22n - 1.

Example QECC_quantum-error-group (H167E14)

The image of a vector in the error group is easily obtained from its extended format representation. We illustrate the connection between symplectic orthogonality as a vector, and commutativity as an element of the error group.
> n := 5;
> VSn  := VectorSpace(GF(2), n);
> VS2n := VectorSpace(GF(2), 2*n);
> E := QuantumBinaryErrorGroup(n);
> BitFlips   := [E.i : i in [1..2*n] | IsOdd(i)  ];
> PhaseFlips := [E.i : i in [1..2*n] | IsEven(i) ];
We first take two vectors which are not orthogonal and show their images in the error group do not commute.
> v1a := VSn ! [0,1,1,0,1]; v1b := VSn ! [0,1,1,0,1];
> v1  := VS2n ! HorizontalJoin(v1a, v1b);
> v2a := VSn ! [1,0,1,1,0]; v2b := VSn ! [0,1,0,1,1];
> v2  := VS2n ! HorizontalJoin(v2a, v2b);
> SymplecticInnerProduct(v1,v2 : ExtendedFormat := true);
1
>
> e1 := &*[ BitFlips[i] : i in Support(v1a) ] *
>       &*[ PhaseFlips[i] : i in Support(v1b) ];
> e2 := &*[ BitFlips[i] : i in Support(v2a) ] *
>       &*[ PhaseFlips[i] : i in Support(v2b) ];
> e1*e2 eq e2*e1;
false
Next a pair of orthogonal vectors is shown to commute.
> v1a := VSn ! [1,1,0,1,0]; v1b := VSn ! [0,0,1,1,0];
> v1  := VS2n ! HorizontalJoin(v1a, v1b);
> v2a := VSn ! [0,1,1,1,0]; v2b := VSn ! [0,1,1,1,0];
> v2  := VS2n ! HorizontalJoin(v2a, v2b);
> SymplecticInnerProduct(v1,v2 : ExtendedFormat := true);
0
>
> e1 := &*[ BitFlips[i] : i in Support(v1a) ] *
>       &*[ PhaseFlips[i] : i in Support(v1b) ];
> e2 := &*[ BitFlips[i] : i in Support(v2a) ] *
>       &*[ PhaseFlips[i] : i in Support(v2b) ];
> e1*e2 eq e2*e1;
true
QuantumErrorGroup(Q) : CodeQuantum -> GrpPC
For a quantum code Q of length n, return the group of all errors on n qubits. This is the full error group, the ambient space containing all possible errors.
StabilizerGroup(Q) : CodeQuantum -> GrpPC
StabiliserGroup(Q) : CodeQuantum -> GrpPC
Return the abelian group of errors that defines the quantum code Q, which is a subgroup of the group returned by QuantumErrorGroup(Q).
StabilizerGroup(Q, G) : CodeQuantum, GrpPC -> GrpPC
StabiliserGroup(Q, G) : CodeQuantum, GrpPC -> GrpPC
Given a quantum code Q with error group G (an extra-special group), return the abelian group of errors of Q as a subgroup of G.

Example QECC_quant-stab-group (H167E15)

The stabilizer group of any quantum stabilizer code over GF(4) will be abelian.
> F<w> := GF(4);
> Q := RandomQuantumCode(F, 10, 6);
> G := StabilizerGroup(Q);
> IsAbelian(G);
true

Example QECC_quant-stab-group-hack (H167E16)

In order to make stabilizer groups from distinct codes compatible with one another, the groups must be created within the same super-structure. This is done by first creating a copy of the full error group, and then generating each instance of a stabilizer group as a subgroup.

In this example, the intersection of the stabilizer groups of two random codes is formed. An error group E which will be a common over group for the two stabilizer groups is first created.

> F<w> := GF(4);
> Q1 := RandomQuantumCode(F, 15, 8);
> Q2 := RandomQuantumCode(F, 15, 8);
>
> E := QuantumErrorGroup(Q1);
> S1 := StabilizerGroup(Q1, E);
> S2 := StabilizerGroup(Q2, E);
> #(S1 meet S2);
2
V2.28, 13 July 2023