Subsystem Codes and Shared Accessors
A subsystem code is a stabilizer code in which some logical qubits are designated as gauge qubits and left unprotected. Because a stabilizer code is the special case with no gauge qubits, this file supplies the accessors used by every quantum code in the library, which is why the general accessors appear here rather than on the core API page.
The distinction that runs through this page is between the stabilizer group, the gauge group, and the logical operators. Bare logical operators commute with the entire gauge group; dressed logical operators need only commute with the stabilizer group, so they may be multiplied by gauge operators and can have lower weight. Functions come in bare and dressed forms wherever the two differ, and conflating them will give the wrong distance.
Operators are returned either as matrices in symplectic $[X \mid Z]$ form or as vectors of operator pairs, depending on the function; the docstrings say which. Signs are tracked separately through the character vector.
promote_gauges_to_logical and promote_logicals_to_gauge move qubits between the two roles, which is the usual way to trade protected qubits for a lower measurement weight. The ! forms modify the code in place.
CodingTheory.SubsystemCode — Method
SubsystemCode(
C::AbstractLinearCode,
F::AbstractAlgebra.FinField;
basis,
char_vec
) -> Union{StabilizerCode, StabilizerCodeCSS, SubsystemCode, SubsystemCodeCSS}
Return the subsystem code over F whose gauge space is the additive symplectic image of a linear code over the quadratic extension of F.
CodingTheory.SubsystemCode — Method
SubsystemCode(
S::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
L::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
G::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec
) -> Union{SubsystemCode, SubsystemCodeCSS}
Return the subsystem code whose stabilizers are given by S, (bare) logical operators by L, gauge operators (not including stabilizers) by G.
CodingTheory.SubsystemCode — Method
SubsystemCode(
G::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
char_vec
) -> Union{StabilizerCode, StabilizerCodeCSS, SubsystemCode, SubsystemCodeCSS}
Return the subsystem code whose gauge group is determined by G.
CodingTheory.SubsystemCode — Method
SubsystemCode(
S_Pauli::Array{T<:Union{String, Vector{Char}}, 1},
L_Pauli::Array{T<:Union{String, Vector{Char}}, 1},
G_Pauli::Array{T<:Union{String, Vector{Char}}, 1};
char_vec
) -> Union{SubsystemCode, SubsystemCodeCSS}
CodingTheory.SubsystemCode — Method
SubsystemCode(
G_Pauli::Array{T<:Union{String, Vector{Char}}, 1};
char_vec
) -> Union{StabilizerCode, StabilizerCodeCSS, SubsystemCode, SubsystemCodeCSS}
Return the subsystem code whose gauge group is determined by the vector of Pauli strings G_Pauli.
CodingTheory.SubsystemCodeCSS — Method
SubsystemCodeCSS(X_gauges, Z_gauges; char_vec=missing)
CSSSubsystemCode(X_gauges, Z_gauges; char_vec=missing)Return the CSS subsystem code defined by trimmed X- and Z-type gauge generators. The constructor may return a stabilizer code when the gauge group is abelian.
Base.length — Method
length(S::AbstractSubsystemCode)
num_qubits(S::AbstractSubsystemCode)Return the length of the code.
CodingTheory.CSSSubsystemCode — Method
CSSSubsystemCode(args...; kwargs...) -> Any
Return a CSS subsystem code from X- and Z-type gauge generators. This is an alias for SubsystemCodeCSS.
CodingTheory.X_metacheck — Method
X_metacheck(S::AbstractSubsystemCode) -> Any
Return the $X$-metacheck matrix of the CSS code S if it has been set and missing otherwise. This matrix annihilates the $X$ stabilizer matrix and so detects errors in the measured $X$ syndrome.
CodingTheory.X_signs — Method
X_signs(S::AbstractSubsystemCode) -> Any
Return the signs of the X stabilizers of the CSS code.
CodingTheory.X_stabilizers — Method
X_stabilizers(S::AbstractSubsystemCode) -> Any
Return the X-stabilizer matrix of the CSS code.
CodingTheory.X_syndrome — Method
X_syndrome(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return the $X$ syndrome of the vector v with respect to the CSS code S.
Notes
vmay be given either as the length-$n$ $Z$ component or as a full symplectic $[X \mid Z]$ vector of length $2n$, since the $X$ checks detect $Z$ errors.
CodingTheory.Z_metacheck — Method
Z_metacheck(S::AbstractSubsystemCode) -> Any
Return the $Z$-metacheck matrix of the CSS code S if it has been set and missing otherwise. This matrix annihilates the $Z$ stabilizer matrix and so detects errors in the measured $Z$ syndrome.
CodingTheory.Z_signs — Method
Z_signs(S::AbstractSubsystemCode) -> Any
Return the signs of the Z stabilizers of the CSS code.
CodingTheory.Z_stabilizers — Method
Z_stabilizers(S::AbstractSubsystemCode) -> Any
Return the Z-stabilizer matrix of the CSS code.
CodingTheory.Z_syndrome — Method
Z_syndrome(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return the $Z$ syndrome of the vector v with respect to the CSS code S.
Notes
vmay be given either as the length-$n$ $X$ component or as a full symplectic $[X \mid Z]$ vector of length $2n$, since the $Z$ checks detect $X$ errors.
CodingTheory.are_equivalent — Method
are_equivalent(
S1::AbstractSubsystemCode,
S2::AbstractSubsystemCode
) -> Any
CodingTheory.bare — Method
bare(S::AbstractSubsystemCode) -> Any
Return the bare logical generators as a vector of symplectic operator pairs. This is an alias for logicals.
CodingTheory.bare_X_minimum_distance_lower_bound — Method
bare_X_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the bare X-minimum distance.
CodingTheory.bare_X_minimum_distance_upper_bound — Method
bare_X_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the bare X-minimum distance.
CodingTheory.bare_Z_minimum_distance_lower_bound — Method
bare_Z_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the bare Z-minimum distance.
CodingTheory.bare_Z_minimum_distance_upper_bound — Method
bare_Z_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the bare Z-minimum distance.
CodingTheory.bare_logicals — Method
bare_logicals(S::AbstractSubsystemCode) -> Any
Return the bare logical generators as a vector of symplectic operator pairs. Each operator commutes with the gauge group. This is an alias for logicals.
CodingTheory.bare_minimum_distance_lower_bound — Method
bare_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the bare minimum distance.
CodingTheory.bare_minimum_distance_upper_bound — Method
bare_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the bare minimum distance.
CodingTheory.bare_normalizer_matrix — Method
bare_normalizer_matrix(S::AbstractSubsystemCode) -> Any
Return a row basis in symplectic $[X \mid Z]$ form for the centralizer of the gauge group. This is an alias for gauge_centralizer_matrix.
CodingTheory.cardinality — Method
cardinality(S::AbstractSubsystemCode) -> Any
Return the cardinality of the stabilizer group of the code.
CodingTheory.character_vector — Method
character_vector(S::AbstractSubsystemCode) -> Any
Return the character vector of the code.
CodingTheory.dressed — Method
dressed(S::AbstractSubsystemCode)
dressed_operators(S::AbstractSubsystemCode
dressed_logicals(S::AbstractSubsystemCode)Return a vector of pairs generators for the dressed operators of S.
Notes
- Here, the dressed operators are the logicals and the gauge operators.
CodingTheory.dressed_X_minimum_distance_lower_bound — Method
dressed_X_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the dressed X-minimum distance.
CodingTheory.dressed_X_minimum_distance_upper_bound — Method
dressed_X_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the dressed X-minimum distance.
CodingTheory.dressed_Z_minimum_distance_lower_bound — Method
dressed_Z_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the dressed Z-minimum distance.
CodingTheory.dressed_Z_minimum_distance_upper_bound — Method
dressed_Z_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the dressed Z-minimum distance.
CodingTheory.dressed_logicals — Method
dressed_logicals(S::AbstractSubsystemCode) -> Any
Return the dressed logical generators as the union of the bare logical and gauge operator pairs. These operators commute with the stabilizer group but need not commute with the gauge group. This is an alias for dressed.
CodingTheory.dressed_minimum_distance_lower_bound — Method
dressed_minimum_distance_lower_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored lower bound on the dressed minimum distance.
CodingTheory.dressed_minimum_distance_upper_bound — Method
dressed_minimum_distance_upper_bound(
S::AbstractSubsystemCode
) -> Any
Return the currently stored upper bound on the dressed minimum distance.
CodingTheory.dressed_operators — Method
dressed_operators(S::AbstractSubsystemCode) -> Any
Return the dressed logical generators as the union of the bare logical and gauge operator pairs. These operators commute with the stabilizer group but need not commute with the gauge group. This is an alias for dressed.
CodingTheory.fix_all_gauges — Method
fix_all_gauges(
S::AbstractSubsystemCode;
choice
) -> Union{StabilizerCode, StabilizerCodeCSS}
Return the stabilizer code obtained by promoting one commuting half of every gauge pair to stabilizers.
CodingTheory.fix_gauge — Method
fix_gauge(
S::AbstractSubsystemCode,
pair::Int64,
which::Symbol
) -> AbstractSubsystemCode
CodingTheory.gauge_centralizer_matrix — Method
gauge_centralizer_matrix(S)
bare_normalizer_matrix(S)Return a row basis for the symplectic centralizer of the gauge group.
CodingTheory.gauge_generators_matrix — Method
gauge_generators_matrix(S::AbstractSubsystemCode) -> Any
Return a possibly overcomplete symplectic $[X \mid Z]$ generator matrix for the gauge group. This is an alias for gauge_group.
CodingTheory.gauge_group — Method
gauge_group(S::AbstractSubsystemCode)
gauge_group_matrix(S::AbstractSubsystemCode)
gauge_generators_matrix(S::AbstractSubsystemCode)
gauge_group_generators_matrix(S::AbstractSubsystemCode)Return a matrix giving a (maybe overcomplete) basis for the gauge group.
CodingTheory.gauge_group_generators_matrix — Method
gauge_group_generators_matrix(
S::AbstractSubsystemCode
) -> Any
Return a possibly overcomplete symplectic $[X \mid Z]$ generator matrix for the gauge group. This is an alias for gauge_group.
CodingTheory.gauge_group_matrix — Method
gauge_group_matrix(S::AbstractSubsystemCode) -> Any
Return a possibly overcomplete symplectic $[X \mid Z]$ generator matrix for the gauge group. This is an alias for gauge_group.
CodingTheory.gauge_operators — Method
gauge_operators(S::AbstractSubsystemCode) -> Any
Return the gauge generators as a vector of symplectic operator pairs. This is an alias for gauges.
CodingTheory.gauge_operators_matrix — Method
gauge_operators_matrix(S::AbstractSubsystemCode) -> Any
Return the gauge operator pairs as a vertically concatenated symplectic $[X \mid Z]$ matrix. This is an alias for gauges_matrix.
CodingTheory.gauges — Method
gauges(S::AbstractSubsystemCode)
gauge_operators(S::AbstractSubsystemCode)Return a vector of gauge operator generator pairs for S.
CodingTheory.gauges_matrix — Method
gauges_matrix(S::AbstractSubsystemCode)
gauge_operators_matrix(S::AbstractSubsystemCode)Return the result of gauges(S) as a vertically concatenated matrix.
CodingTheory.is_CSS — Method
is_CSS(S::AbstractSubsystemCode) -> Bool
Return true if S is CSS.
CodingTheory.is_bare_logical — Method
is_bare_logical(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return whether v is a nontrivial bare logical: it centralizes the gauge group but is not a stabilizer.
CodingTheory.is_bare_normalizer — Method
is_bare_normalizer(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return whether v commutes with the full gauge group.
CodingTheory.is_gauge — Method
is_gauge(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
CodingTheory.is_logical — Method
is_logical(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
CodingTheory.is_normalizer — Method
is_normalizer(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return whether v commutes with every stabilizer.
CodingTheory.is_overcomplete — Method
is_overcomplete(S::AbstractSubsystemCode) -> Any
Return true if S has an overcomplete set of stabilizers.
CodingTheory.is_stabilizer — Method
is_stabilizer(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return whether v belongs to the row space of the stabilizer generators.
CodingTheory.logical_operators — Method
logical_operators(S::AbstractSubsystemCode) -> Any
Return the logical operator generators as a vector of symplectic operator pairs. For subsystem codes these are bare logicals, which commute with the gauge group. This is an alias for logicals.
CodingTheory.logicals — Method
logicals(S::AbstractSubsystemCode)
logical_operators(S::AbstractSubsystemCode)
bare_logicals(S::AbstractSubsystemCode)
bare(S::AbstractSubsystemCode)Return a vector of logical operator generator pairs for S.
CodingTheory.logicals_matrix — Method
logicals_matrix(S::AbstractSubsystemCode) -> Any
Return the result of logicals(S) as a vertically concatenated matrix.
CodingTheory.logicals_standard_form — Method
logicals_standard_form(S::AbstractSubsystemCode) -> Any
Return a matrix of logical operators as determined by the stabilizers in standard form.
CodingTheory.metacheck — Method
metacheck(S::AbstractSubsystemCode) -> Any
Return the metacheck matrix of S if it has been set and missing otherwise.
Notes
- A metacheck matrix $M$ satisfies $M H = 0$ for the stabilizer matrix $H$, so it detects errors in the measured syndrome itself and is what makes single-shot decoding possible.
- For a CSS code use
X_metacheckorZ_metacheckinstead.
CodingTheory.minimum_gauge_weight — Method
minimum_gauge_weight(S::AbstractSubsystemCode; alg) -> Any
Return the minimum Pauli weight of a nonidentity element of the gauge group.
CodingTheory.minimum_stabilizer_weight — Method
minimum_stabilizer_weight(
S::AbstractSubsystemCode;
alg
) -> Any
Return the minimum Pauli weight of a nonidentity stabilizer. For CSS codes this uses the classical minimum-distance machinery on each sector. General symplectic groups are enumerated exactly.
CodingTheory.normalizer_matrix — Method
normalizer_matrix(S)
stabilizer_centralizer_matrix(S)Return a row basis for the symplectic centralizer (Pauli normalizer) of the stabilizer group.
CodingTheory.num_X_stabs — Method
num_X_stabs(S::AbstractSubsystemCode) -> Any
Return the number of X stabilizers of the CSS code.
CodingTheory.num_Z_stabs — Method
num_Z_stabs(S::AbstractSubsystemCode) -> Any
Return the number of Z stabilizers of the CSS code.
CodingTheory.num_qubits — Method
num_qubits(S::AbstractSubsystemCode) -> Any
Return the number of physical qubits or qudits in S.
CodingTheory.permute_code! — Method
permute_code(S::AbstractSubsystemCode, σ::Union{PermGroupElem, Perm{Int}, Vector{Int}})
permute_code!(S::AbstractSubsystemCode, σ::Union{PermGroupElem, Perm{Int}, Vector{Int}})CodingTheory.promote_gauges_to_logical! — Method
promote_gauges_to_logical!(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
)
CodingTheory.promote_gauges_to_logical — Method
promote_gauges_to_logical(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
) -> AbstractSubsystemCode
Return a copy of S with the selected gauge pairs promoted to bare logical pairs, leaving S unchanged.
CodingTheory.promote_logicals_to_gauge! — Method
promote_logicals_to_gauge!(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
)
CodingTheory.promote_logicals_to_gauge — Method
promote_logicals_to_gauge(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
) -> AbstractSubsystemCode
Return a copy of S with the selected logical pairs promoted to gauge pairs, leaving S unchanged.
CodingTheory.random_subsystem_code — Method
random_subsystem_code(
rng::Random.AbstractRNG,
F::AbstractAlgebra.FinField,
n::Int64,
k::Union{Int64, Rational},
r::Int64;
char_vec
) -> Union{StabilizerCode, StabilizerCodeCSS, SubsystemCode, SubsystemCodeCSS}
Return a random, not necessarily uniformly sampled, $[[n, k, r]]$ subsystem code over F.
CodingTheory.rate — Method
rate(S::AbstractSubsystemCode) -> Any
Return the rate, R = k/n, of the code.
CodingTheory.relative_distance — Method
relative_distance(S::AbstractSubsystemCode) -> Any
Return the relative minimum distance, δ = d / n of the code if d is known, otherwise errors.
CodingTheory.set_X_metacheck! — Method
set_X_metacheck!(
S::AbstractSubsystemCode,
M::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
)
Set the $X$-metacheck matrix of the CSS code S to M and return nothing. Throws an error unless M annihilates the $X$ stabilizer matrix.
CodingTheory.set_X_stabilizers! — Method
set_X_stabilizers!(
S::AbstractSubsystemCode,
X_stabs::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
trimmed
)
CodingTheory.set_X_stabilizers — Method
set_X_stabilizers(
S::AbstractSubsystemCode,
X_stabs::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
trimmed
) -> AbstractSubsystemCode
Return a copy of the CSS code S using the equivalent X-stabilizer presentation X_stabs, leaving S unchanged. If trimmed is false, X_stabs must be a symplectic $[X \mid 0]$ matrix.
CodingTheory.set_Z_metacheck! — Method
set_Z_metacheck!(
S::AbstractSubsystemCode,
M::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
)
Set the $Z$-metacheck matrix of the CSS code S to M and return nothing. Throws an error unless M annihilates the $Z$ stabilizer matrix.
CodingTheory.set_Z_stabilizers! — Method
set_Z_stabilizers!(
S::AbstractSubsystemCode,
Z_stabs::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
trimmed
)
CodingTheory.set_Z_stabilizers — Method
set_Z_stabilizers(
S::AbstractSubsystemCode,
Z_stabs::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
trimmed
) -> AbstractSubsystemCode
Return a copy of the CSS code S using the equivalent Z-stabilizer presentation Z_stabs, leaving S unchanged. If trimmed is false, Z_stabs must be a symplectic $[0 \mid Z]$ matrix.
CodingTheory.set_bare_X_minimum_distance! — Method
set_bare_X_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_bare_Z_minimum_distance! — Method
set_bare_Z_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_bare_minimum_distance! — Method
set_bare_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_dressed_X_minimum_distance! — Method
set_dressed_X_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_dressed_Z_minimum_distance! — Method
set_dressed_Z_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_dressed_minimum_distance! — Method
set_dressed_minimum_distance!(
S::AbstractSubsystemCode,
d::Int64
)
CodingTheory.set_logicals! — Method
set_logicals!(
S::AbstractSubsystemCode,
L::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
)
CodingTheory.set_metacheck! — Method
set_metacheck!(
S::AbstractSubsystemCode,
M::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
)
Set the metacheck matrix of S to M and return nothing.
Notes
- Throws an error unless $M H = 0$ for the stabilizer matrix $H$.
- For a CSS code use
set_X_metacheck!orset_Z_metacheck!instead.
CodingTheory.set_signs! — Method
set_signs(S::AbstractSubsystemCode, char_vec::Vector{zzModRingElem})
set_signs!(S::AbstractSubsystemCode, char_vec::Vector{zzModRingElem})Set the character vector of S to char_vec and update the signs.
CodingTheory.set_stabilizers! — Method
set_stabilizers(S::AbstractSubsystemCode, stabs::CTMatrixTypes)
set_stabilizers!(S::AbstractSubsystemCode, stabs::CTMatrixTypes)Set the stabilizers of S to stabs.
CodingTheory.set_stabilizers — Method
set_stabilizers(
S::AbstractSubsystemCode,
stabs::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> AbstractSubsystemCode
Return a copy of S using the equivalent stabilizer presentation stabs, leaving S unchanged. The input must span the current stabilizer group.
CodingTheory.signs — Method
signs(S::AbstractSubsystemCode) -> Any
Return the signs of the stabilizers of the code. Lazily computes them if a non-trivial character vector exists.
CodingTheory.stabilizer_centralizer_matrix — Method
stabilizer_centralizer_matrix(
S::AbstractSubsystemCode
) -> Any
Return a row basis in symplectic $[X \mid Z]$ form for the centralizer of the stabilizer group. This is an alias for normalizer_matrix.
CodingTheory.stabilizers — Method
stabilizers(S::AbstractSubsystemCode; standform) -> Any
Return the stabilizer matrix of the code. Computes the unified matrix for CSS codes if missing.
Notes
- If the optional parameter
standformis set totrue, the standard form of the stabilizer matrix is returned instead (computed densely, stored sparsely if applicable).
CodingTheory.standard_form_A — Method
standard_form_A(S::AbstractSubsystemCode) -> Any
Return the named matrix A from the standard form of the stabilizer matrix.
CodingTheory.standard_form_A1 — Method
standard_form_A1(S::AbstractSubsystemCode) -> Any
Return the named matrix A1 from the standard form of the stabilizer matrix.
CodingTheory.standard_form_A2 — Method
standard_form_A2(S::AbstractSubsystemCode) -> Any
Return the named matrix A2 from the standard form of the stabilizer matrix.
CodingTheory.standard_form_B — Method
standard_form_B(S::AbstractSubsystemCode) -> Any
Return the named matrix B from the standard form of the stabilizer matrix.
CodingTheory.standard_form_C1 — Method
standard_form_C1(S::AbstractSubsystemCode) -> Any
Return the named matrix C1 from the standard form of the stabilizer matrix.
CodingTheory.standard_form_C2 — Method
standard_form_C2(S::AbstractSubsystemCode) -> Any
Return the named matrix C2 from the standard form of the stabilizer matrix.
CodingTheory.standard_form_D — Method
standard_form_D(S::AbstractSubsystemCode) -> Any
Return the named matrix D from the standard form of the stabilizer matrix.
CodingTheory.standard_form_E — Method
standard_form_E(S::AbstractSubsystemCode) -> Any
Return the named matrix E from the standard form of the stabilizer matrix.
CodingTheory.standard_form_permutation — Method
standard_form_permutation(S::AbstractSubsystemCode) -> Any
Return the permutation matrix required to permute the columns of the code matrices to have the same row space as the matrices in standard form. Returns missing if no such permutation is required.
CodingTheory.swap_X_Z_gauge_operators! — Method
swap_X_Z_gauge_operators!(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
)
CodingTheory.swap_X_Z_logicals! — Method
swap_X_Z_logicals!(
S::AbstractSubsystemCode,
pairs::Vector{Int64}
)
CodingTheory.symplectic_weight — Method
symplectic_weight(
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Return the Pauli weight of a symplectic vector, counting a nonzero X or Z component on a coordinate once.
CodingTheory.syndrome — Method
syndrome(
S::AbstractSubsystemCode,
v::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Any
Hecke.dimension — Method
dimension(S::AbstractSubsystemCode) -> Any
Return the dimension of the code.
Hecke.is_pure — Method
is_pure(S; distance=missing, alg=:auto)
is_degenerate(S; distance=missing, alg=:auto)Return true if the minimum stabilizer-group weight (for a stabilizer code) or gauge-group weight (for a subsystem code) is at least the exact code distance; otherwise, return false. This does not require a full weight enumerator, but the minimum-group-weight computation can still be exponential.
Oscar.field — Method
field(S::AbstractSubsystemCode) -> Any
Return the base ring of the code.