Inner Products and Duals

The functions described in this section use the symplectic inner product defined for quantum codes.

SymplecticInnerProduct(v1, v2) : ModTupFldElt, ModTupFldElt -> FldFinElt
    ExtendedFormat: BoolElt             Default: false
Let v1 and v2 be two vectors belonging to the vector space K(n), where K is a finite field. This function returns the inner product of v1 and v2 with respect to the symplectic inner product. The symplectic inner product in extended format is defined by (a|b) * (c|d) = ad - bc, and its definition transfers naturally to the compact format.

For binary quantum codes whose compact format is over GF(4), the symplectic inner product is given by Trace(v1 ./line(v)2).

SymplecticDual(C) : CodeAdd -> CodeAdd
    ExtendedFormat: BoolElt             Default: false
The dual of the additive (or possibly linear) code C with respect to the symplectic inner product. By default, C is interpreted as being in the compact format (a length n code over GF(q2)), but if ExtendedFormat is set to true, then it will be interpreted as being in extended format (a code of length 2n over GF(q)).
IsSymplecticSelfDual(C) : CodeAdd -> BoolElt
    ExtendedFormat: BoolElt             Default: false
Return true if the code C is equal to its symplectic dual and false otherwise. By default, C is interpreted as being in the compact format (a length n code over GF(q2)), but if ExtendedFormat is set to true, then it will be interpreted as being in extended format (a code of length 2n over GF(q)).
IsSymplecticSelfOrthogonal(C) : CodeAdd -> BoolElt
    ExtendedFormat: BoolElt             Default: false
Return true if the code C is contained in its symplectic dual. By default, C is interpreted as being in the compact format (a length n code over GF(q2)), but if ExtendedFormat is set to true, then it will be interpreted as being in extended format (a code of length 2n over GF(q)).

Example QECC_SymplecticEg (H167E17)

Vectors which are symplectically orthogonal to one another can be used to construct symplectic self-orthogonal codes.
> F<w> := GF(4);
> V5 := VectorSpace(F, 5);
> v := V5 ! [1,0,w,0,1];
> w := V5 ! [w,1,0,w,w];
> SymplecticInnerProduct(v,w);
0
> C := AdditiveCode<F, GF(2), 5 | v, w>;
> C;
[5, 1 : 2] GF(2)-Additive Code over GF(2^2)
Generator matrix:
[  1   0   w   0   1]
[  w   1   0   w   w]
> D := SymplecticDual(C);
> D;
[5, 4 : 8] GF(2)-Additive Code over GF(2^2)
Generator matrix:
[  1   0   0   0   1]
[  w   0   0   0   w]
[  0   1   0   0   0]
[  0   w   0   0   1]
[  0   0   1   0   w]
[  0   0   w   0   0]
[  0   0   0   1   1]
[  0   0   0   w   0]
> C subset D;
true
> Q := QuantumCode(C);
> Q;
[[5, 3]] Quantum code over GF(2^2), stabilised by:
[  1   0   w   0   1]
[  w   1   0   w   w]

Example QECC_symplecticselforthog (H167E18)

Any vector over GF(4) will be symplectically orthogonal to itself.
> V5 := VectorSpace(GF(4), 5);
> { SymplecticInnerProduct(v, v) : v in V5 };
{ 0 }
V2.28, 13 July 2023