The functions described in this section use the symplectic inner product defined for quantum codes.
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 used for quantum codes. 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.Let p be the characteristic of K. In extended format the intrinsic returns (Tr)K/GF(p)(ad - bc). In compact format K = GF(q2) and each coordinate is written as a + λ b with a, b ∈GF(q) (where λ is QuantumBasisElement(GF(q))); the product ad - bc is formed over GF(q) and the intrinsic returns (Tr)GF(q)/GF(p)(ad - bc), the trace from GF(q) rather than the absolute trace from GF(q2). In both cases the return value lies in the prime field GF(p) (for example GF(2) when K = GF(4)), not in K in general. For binary quantum codes whose compact format is over GF(4) this amounts to Trace(v1 ./line(v)2).
This product is an alternating GF(p)-bilinear form on K(n) regarded as a vector space over GF(p), but in general it is neither K-valued nor K-bilinear. To evaluate a K-valued alternating form attached to the K-space itself, attach the form to the space with SymplecticSpace (or VectorSpace(K,n,J)) and use InnerProduct; see Chapter POLAR SPACES.
> F<w> := GF(4); > V := VectorSpace(F,2); > v := V![1,0]; > x := V![1,w]; > coding := SymplecticInnerProduct(v,x); > coding; 0 > Parent(coding); Finite field of size 2 > J := Matrix(F,2,2,[0,1,-1,0]); > W := SymplecticSpace(J); > ordinary := InnerProduct(W![1,0],W![1,w]); > ordinary; w > Parent(ordinary); Finite field of size 2^2
> F<w> := GF(4); > V := VectorSpace(F, 2); > compact := SymplecticInnerProduct(V![w,0], V![1,0]); > compact; 1 > W := VectorSpace(GF(2), 4); > extended := SymplecticInnerProduct(W![0,0,1,0], W![1,0,0,0] : ExtendedFormat); > extended; 1 > compact eq extended; true
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)).
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)).
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)).
> 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]
> V5 := VectorSpace(GF(4), 5);
> { SymplecticInnerProduct(v, v) : v in V5 };
{ 0 }