Product and BB Codes
These constructors return ordinary quantum-code objects, so accessors such as X_stabilizers, Z_stabilizers, stabilizer_weights, and minimum_distance apply uniformly.
- Hypergraph product: [6]
- Generalized Shor: [7]
- Hyperbicycle: [8]
- Generalized bicycle: [8], [9], [10]
- Generalized hypergraph product: [10]
- Bias-tailored lifted product: [11]
- Bivariate bicycle (BB): [12]
- Coprime bivariate bicycle: [12]
InfiniteBBCode and Generalized3DToricCode retain algebraic family data before a finite lattice is selected. BBCode and FiniteGeneralized3DToricCode are finite CSS codes and support the standard quantum-code accessors, distance metadata, and solvers.
For example, the coprime univariate BB form can be constructed over a polynomial ring:
using Oscar
using CodingTheory
F = GF(2)
R, z = polynomial_ring(F, :z)
a = one(R) + z
b = one(R) + z^2
S = BBCode(a, b, 7)
(S.n, S.k)
is_CSS(S)
X_stabilizers(S)Finite BB matrices are evaluated lazily and cached on first access. Twisted two-dimensional lattices use the Laurent-polynomial constructor with two lattice vectors. The twisted property records which finite presentation was selected; use twist_vectors(S) to inspect those vectors.
Quantum Tanner codes are included here as well: like the product constructions, they build a quantum code out of classical ingredients placed on a graph, and their distance guarantees come from expansion of that graph.
CodingTheory.BBCode — Method
BBCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
l::Int64,
m::Int64
) -> BBCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return an untwisted finite BB code on an l by m torus.
CodingTheory.BBCode — Method
BBCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
a1::Tuple{Int64, Int64},
a2::Tuple{Int64, Int64}
) -> BBCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return a finite twisted BB code on the Laurent lattice generated by a1 and a2.
CodingTheory.BBCode — Method
BBCode(
a::AbstractAlgebra.PolyRingElem{<:AbstractAlgebra.FinFieldElem},
b::AbstractAlgebra.PolyRingElem{<:AbstractAlgebra.FinFieldElem},
N::Int64
) -> BBCode{_A, U, V} where {_A, U<:(AbstractAlgebra.PolyRingElem{<:AbstractAlgebra.FinFieldElem}), V<:(AbstractAlgebra.PolyRingElem{<:AbstractAlgebra.FinFieldElem})}
Return the coprime univariate form modulo z^N - 1.
CodingTheory.BBCode — Method
BBCode(
a::AbstractAlgebra.ResElem,
b::AbstractAlgebra.ResElem
) -> BBCode{_A, U, V} where {_A, U<:AbstractAlgebra.ResElem, V<:AbstractAlgebra.ResElem}
Return the coprime univariate form from elements of F[z]/(z^N - 1).
CodingTheory.BBCode — Method
BBCode(
a::Union{Oscar.MPolyQuoRingElem{Nemo.FqMPolyRingElem}, Oscar.MPolyQuoRingElem{Nemo.fpMPolyRingElem}},
b::Union{Oscar.MPolyQuoRingElem{Nemo.FqMPolyRingElem}, Oscar.MPolyQuoRingElem{Nemo.fpMPolyRingElem}}
) -> BBCode{T, U, V} where {T<:Union{Oscar.MPolyQuoRing{Nemo.FqMPolyRingElem}, Oscar.MPolyQuoRing{Nemo.fpMPolyRingElem}}, U<:Union{Oscar.MPolyQuoRingElem{Nemo.FqMPolyRingElem}, Oscar.MPolyQuoRingElem{Nemo.fpMPolyRingElem}}, V<:Union{Oscar.MPolyQuoRingElem{Nemo.FqMPolyRingElem}, Oscar.MPolyQuoRingElem{Nemo.fpMPolyRingElem}}}
Return a standard finite BB code from elements of F[x,y]/(x^l - 1, y^m - 1).
CodingTheory.InfiniteBBCode — Method
InfiniteBBCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}
) -> InfiniteBBCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return the algebraic bivariate-bicycle datum defined by Laurent polynomials a and b. A finite lattice must be supplied to BBCode before stabilizer matrices or finite code parameters exist.
CodingTheory.FiniteGeneralized3DToricCode — Method
FiniteGeneralized3DToricCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
l_x::Int64,
l_y::Int64,
l_z::Int64
) -> FiniteGeneralized3DToricCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return a finite, untwisted three-dimensional generalized toric code.
CodingTheory.FiniteGeneralized3DToricCode — Method
FiniteGeneralized3DToricCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
a1::Tuple{Int64, Int64},
a2::Tuple{Int64, Int64},
l_z::Int64
) -> FiniteGeneralized3DToricCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return a finite, twisted three-dimensional generalized toric code.
CodingTheory.Generalized3DToricCode — Method
Generalized3DToricCode(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}
) -> Generalized3DToricCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return the algebraic three-dimensional generalized toric-code datum defined by a and b. This object is not a finite stabilizer code.
CodingTheory.BBCode3D — Method
BBCode3D(
a::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}},
b::AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}
) -> Generalized3DToricCode{AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}, AbstractAlgebra.Generic.LaurentMPolyWrap{Nemo.fpFieldElem, Nemo.fpMPolyRingElem, AbstractAlgebra.Generic.LaurentMPolyWrapRing{Nemo.fpFieldElem, Nemo.fpMPolyRing}}}
Return the corresponding member of the generalized three-dimensional toric-code family. Two polynomial arguments construct the algebraic object; lattice arguments construct a FiniteGeneralized3DToricCode.
CodingTheory.Laurent_polynomial_ring — Method
Laurent_polynomial_ring(
S::Union{FiniteGeneralized3DToricCode, Generalized3DToricCode}
) -> Any
Return the three-variable Laurent polynomial ring of S.
CodingTheory.defining_polynomials — Method
defining_polynomials(
S::Union{FiniteGeneralized3DToricCode, Generalized3DToricCode}
) -> Tuple{Any, Any}
Return the pair of Laurent polynomials defining the generalized three-dimensional toric code S.
CodingTheory.maximum_dimension — Method
maximum_dimension(S::Generalized3DToricCode) -> Any
Return twice the vector-space dimension of the quotient by the defining polynomials, the maximum dimension of a finite member of the family. For a finite code, return its dimension.
CodingTheory.twist_vectors — Method
twist_vectors(
S::FiniteGeneralized3DToricCode
) -> Tuple{Tuple{Int64, Int64}, Tuple{Int64, Int64}}
Return the two integer vectors generating the finite code's periodic lattice in the $xy$ plane.
CodingTheory.HypergraphProductCode — Method
HypergraphProductCode(
C1::AbstractLinearCode,
C2::AbstractLinearCode;
char_vec,
logs_alg
) -> HypergraphProductCode
Return a lazy HypergraphProductCode. Computes parameters n, k, and bounds instantly without generating the quantum parity check matrices.
CodingTheory.Quintavalle_basis — Method
Quintavalle_basis(
C::HypergraphProductCode
) -> Tuple{Any, Any}
Return a symplectic canonical basis for the logical operators of C.
Note
- This implements https://doi.org/10.48550/arXiv.2204.10812.
CodingTheory.BaconCasaccinoConstruction — Method
BaconCasaccinoConstruction(
C1::AbstractLinearCode,
C2::AbstractLinearCode;
kwargs...
) -> GeneralizedShorCode
Return the Bacon–Casaccino subsystem code obtained from the classical codes C1 and C2, requiring $C1^\perp \subseteq C2$. Its $X$ gauge generators replicate checks of C1 across columns, and its $Z$ gauge generators replicate checks of C2 across rows.
CodingTheory.GeneralizedBicycleCode — Method
GeneralizedBicycleCode(
a::AbstractAlgebra.ResElem,
b::AbstractAlgebra.ResElem;
kwargs...
) -> GeneralizedBicycleCode{T} where T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat}
Return the generealized bicycle code determined by a and b.
Notes
l x lcirculant matrices are constructed using the coefficients of the polynomialsaandbinF_q[x]/(x^l - 1)(gcd(q, l) = 1) as the first column
CodingTheory.GeneralizedBicycleCode — Method
GeneralizedBicycleCode(
a::Hecke.GroupAlgebraElem{Nemo.fpFieldElem, Hecke.GroupAlgebra{Nemo.fpFieldElem, Hecke.FinGenAbGroup, Hecke.FinGenAbGroupElem}},
b::Hecke.GroupAlgebraElem{Nemo.fpFieldElem, Hecke.GroupAlgebra{Nemo.fpFieldElem, Hecke.FinGenAbGroup, Hecke.FinGenAbGroupElem}};
kwargs...
) -> GeneralizedBicycleCode{Nemo.fpMatrix}
Return the generealized bicycle code determined by a and b.
Notes
|G| x |G|circulant matrices are constructed using the coefficients of the elements in the group algebraFGas` the first column
CodingTheory.GeneralizedBicycleCode — Method
GeneralizedBicycleCode(
A::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
B::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec,
logs_alg
) -> GeneralizedBicycleCode{T} where T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat}
Return the generealized bicycle code given by A and B.
Example
[[254, 28, 14 ≤ d ≤ 20]] Generalized Bicycle Code from Appendix B, Example A1 of [10].
julia> using CodingTheory, Oscar;
julia> F = Oscar.Nemo.Native.GF(2);
julia> S, x = polynomial_ring(F, :x);
julia> l = 127;
julia> R, _ = residue_ring(S, x^l - 1);
julia> a = 1 + x^15 + x^20 + x^28 + x^66;
julia> b = 1 + x^58 + x^59 + x^100 + x^121;
julia> code = GeneralizedBicycleCode(R(a), R(b));
julia> length(code), dimension(code)
(254, 28)CodingTheory.BicycleCode — Method
BicycleCode(
a::AbstractAlgebra.ResElem;
char_vec,
logs_alg
) -> Union{GeneralizedBicycleCode{Nemo.FqMatrix}, GeneralizedBicycleCode{Nemo.fpMatrix}}
Return the lazy Bicycle code determined by the residue ring element a.
CodingTheory.BicycleCode — Method
BicycleCode(
a::Hecke.GroupAlgebraElem{Nemo.fpFieldElem, Hecke.GroupAlgebra{Nemo.fpFieldElem, Hecke.FinGenAbGroup, Hecke.FinGenAbGroupElem}};
char_vec,
logs_alg
) -> GeneralizedBicycleCode{Nemo.fpMatrix}
Return the lazy Bicycle code determined by the group algebra element a.
CodingTheory.BicycleCode — Method
BicycleCode(
A::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec,
logs_alg
) -> Union{GeneralizedBicycleCode{Nemo.FqMatrix}, GeneralizedBicycleCode{Nemo.fpMatrix}}
Return a lazy Bicycle code given by the square matrix A. This is equivalent to a Generalized Bicycle Code where B = A^T.
CodingTheory.HyperBicycleCode — Method
HyperBicycleCode(
a::Array{T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}, 1},
b::Array{T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}, 1},
χ::Int64;
char_vec,
logs_alg
) -> HyperBicycleCode
Return the hyperbicycle non-CSS code of a and b given χ.
Arguments
- a: A vector of length
cof binary matrices of the same dimensions. - b: A vector of length
cof binary matrices of the same dimensions, potentially different from those ofa. - χ: A strictly positive integer coprime with
c.
Example
[[289, 81, 5]] non-CSS Hyperbicycle Code from Example 13 of [9].
julia> using CodingTheory, Oscar;
julia> S, x = polynomial_ring(Oscar.Nemo.Native.GF(2), :x);
julia> l = 17; χ = 1;
julia> R, = residue_ring(S, x^l - 1);
julia> h = R(x^4 * (1 + x + x^3 + x^6 + x^8 + x^9));
julia> A = residue_polynomial_to_circulant_matrix(h);
julia> code = HyperBicycleCode([A], [A], χ);
julia> length(code), dimension(code)
(289, 81)CodingTheory.HyperBicycleCodeCSS — Method
HyperBicycleCodeCSS(
a::Array{T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}, 1},
b::Array{T<:Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}, 1},
χ::Int64;
char_vec,
logs_alg
) -> HyperBicycleCodeCSS
Return the hyperbicycle CSS code of a and b given χ.
Arguments
- a: A vector of length
cof binary matrices of the same dimensions. - b: A vector of length
cof binary matrices of the same dimensions, potentially different from those ofa. - χ: A strictly positive integer coprime with
c.
Example
[[900, 50, 14]] CSS Hyperbicycle Code from Example 6 of [9].
julia> S, x = polynomial_ring(Oscar.Nemo.Native.GF(2), :x);
julia> l = 30; χ = 1;
julia> R, = residue_ring(S, x^l - 1);
julia> h = R(1 + x + x^3 + x^5);
julia> A = residue_polynomial_to_circulant_matrix(h);
julia> a1 = A[1:15, 1:15];
julia> a2 = A[1:15, 16:30];
julia> code = HyperBicycleCodeCSS([a1, a2], [a1, a2], χ);
julia> length(code), dimension(code)
(900, 50)CodingTheory.GeneralizedHypergraphProductCode — Method
GeneralizedHypergraphProductCode(
A,
b;
kwargs...
) -> LiftedProductCode
Return the generalized hypergraph-product code obtained as the lifted-product code whose second matrix is the $1 \times 1$ matrix with entry b.
CodingTheory.SPCDFoldProductCode — Function
SPCDFoldProductCode(
D::Int64
) -> CodingTheory.SymmetricProductCode
SPCDFoldProductCode(
D::Int64,
s::Int64
) -> CodingTheory.SymmetricProductCode
Return the single-parity-check D-fold product code.
Note
- This is defined in https://arxiv.org/abs/2209.13474
Example
[512, 174, 8]] Symmetric 2-fold product CSS code from [13]
julia> using CodingTheory, Oscar;
julia> F = Oscar.Nemo.Native.GF(2);
julia> h = matrix(F, [1 1]);
julia> id = identity_matrix(F, 2);
julia> H_X = vcat(
h ⊗ h ⊗ h ⊗ id ⊗ id ⊗ id ⊗ id ⊗ id ⊗ id,
id ⊗ id ⊗ id ⊗ h ⊗ h ⊗ h ⊗ id ⊗ id ⊗ id,
id ⊗ id ⊗ id ⊗ id ⊗ id ⊗ id ⊗ h ⊗ h ⊗ h);
julia> H_Z = vcat(
h ⊗ id ⊗ id ⊗ h ⊗ id ⊗ id ⊗ h ⊗ id ⊗ id,
id ⊗ h ⊗ id ⊗ id ⊗ h ⊗ id ⊗ id ⊗ h ⊗ id,
id ⊗ id ⊗ h ⊗ id ⊗ id ⊗ h ⊗ id ⊗ id ⊗ h);
julia> code = SPCDFoldProductCode(3);
julia> length(code), dimension(code)
(512, 174)CodingTheory.SingleParityCheckDFoldProductCode — Function
SingleParityCheckDFoldProductCode(
D::Int64
) -> CodingTheory.SymmetricProductCode
SingleParityCheckDFoldProductCode(
D::Int64,
s::Int64
) -> CodingTheory.SymmetricProductCode
Return the single-parity-check $D$-fold product code with scale s.
CodingTheory.asymmetric_product — Method
asymmetric_product(
::IsCSS,
S1::AbstractSubsystemCode,
S2::AbstractSubsystemCode;
char_vec,
logs_alg
) -> CodingTheory.AsymmetricProductCode
Return the asymmetric 2-fold product quantum CSS code of the CSS codes S1 and S2.
Note
- This is defined in https://arxiv.org/abs/2209.13474
CodingTheory.symmetric_product — Method
symmetric_product(
::IsCSS,
vec_S::Array{T<:AbstractSubsystemCode, 1};
char_vec,
logs_alg
) -> CodingTheory.SymmetricProductCode
Return the symmetric D-fold product quantum CSS code, where D is the square-root of the length of the vector of CSS codes vec_S.
Note
- This is defined in https://arxiv.org/abs/2209.13474
CodingTheory.:⊠ — Method
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode;
...
) -> Any
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode,
U::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
...
) -> CodingTheory.HomologicalProductCode
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode,
U::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
V::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec,
logs_alg
) -> Any
⊠(S1::AbstractStabilizerCode, S2::AbstractStabilizerCode) = homological_product(S1, S2)Return the single-sector homological product code of S1 and S2.
Note
- This is the single-sector homological product. Use ⊗ for the more general product.
CodingTheory.homological_product — Function
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode;
...
) -> Any
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode,
U::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
...
) -> CodingTheory.HomologicalProductCode
homological_product(
S1::CodingTheory.AbstractStabilizerCode,
S2::CodingTheory.AbstractStabilizerCode,
U::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
V::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec,
logs_alg
) -> Any
⊠(S1::AbstractStabilizerCode, S2::AbstractStabilizerCode) = homological_product(S1, S2)Return the single-sector homological product code of S1 and S2.
Note
- This is the single-sector homological product. Use ⊗ for the more general product.
CodingTheory.random_homological_product_code — Method
random_homological_product_code(
n1::Int64,
k1::Int64,
n2::Int64,
k2::Int64
) -> StabilizerCodeCSS
Return a random homological product code.
Note
- This implements the construction in https://arxiv.org/abs/1311.0885.
CodingTheory.Tanner_graph — Method
Tanner_graph(S::AbstractSubsystemCode) -> Any
Return the SimpleGraph object representing the Tanner graph of the code S. Automatically generates a tripartite graph (4-tuple) for CSS codes and a bipartite graph (3-tuple) for non-CSS codes. Results are cached in S.cache[:Tanner_graph].
CodingTheory.Tanner_graph_X — Method
Tanner_graph_X(S::AbstractSubsystemCode) -> Any
Return (G, qubits, checks) for the $X$ sector of the CSS code S, where G is the bipartite SimpleGraph on the qubits and the $X$ checks and the other two entries are the vertex indices of each side.
Notes
- Throws an
ArgumentErrorfor a non-CSS code. - The result is cached on the code.
CodingTheory.Tanner_graph_Z — Method
Tanner_graph_Z(S::AbstractSubsystemCode) -> Any
Return (G, qubits, checks) for the $Z$ sector of the CSS code S, where G is the bipartite SimpleGraph on the qubits and the $Z$ checks and the other two entries are the vertex indices of each side.
Notes
- Throws an
ArgumentErrorfor a non-CSS code. - The result is cached on the code.