Quantum Weight Reduction

Weight reduction rewrites a quantum code so that its stabilizer generators and qubit degrees meet a target, at the cost of extra qubits and checks. The classical Hastings procedure is a composition of four steps, each exposed separately here: copying splits a high-degree qubit into several, gauging splits a high-weight check, thickening adds layers and chooses heights, and coning removes the resulting high-weight checks along a cone. copying and gauging also have formulations as instances of coning, which are provided for comparison and testing.

quantum_weight_reduction runs the full pipeline. Note that weight reduction preserves the number of logical qubits but generally reduces the relative distance, so the reduced code is not a free improvement; see the weight reduction tutorial for the trade-offs.

CodingTheory.coning — Method
coning(
    H_X::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    H_Z::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    row_indices::AbstractVector{Int64};
    rng
) -> Tuple{Any, Any}

Return the result of coning on H_X and H_Z by reducing the Z stabilizers in row_indices. The optional argument rng can be used to make the output of this function reproducible.

source
CodingTheory.coning — Method
coning(
    S::AbstractStabilizerCode,
    row_indices::AbstractVector{Int64};
    rng
) -> StabilizerCodeCSS

Return the result of coning on S by reducing the Z stabilizers in row_indices. The optional argument rng can be used to make the output of this function reproducible.

source
CodingTheory.copying — Method
copying(
    S::AbstractStabilizerCode;
    method,
    target_q_X
) -> StabilizerCodeCSS

Return the result of copying on S using either the Hastings, reduced, or targeted methods.

source
CodingTheory.copying_as_coning — Method
copying_as_coning(
    S::AbstractStabilizerCode;
    method,
    target_q_X,
    rng
) -> StabilizerCodeCSS

Return the result of copying on S using either the Hastings, reduced, or targeted methods by using the mapping cone.

source
CodingTheory.copying_as_coning — Method
copying_as_coning(
    H_X::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    H_Z::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
    method,
    target_q_X,
    rng
) -> Tuple{Any, Any}

Return the result of copying on H_X and H_Z using either the Hastings, reduced, or targeted methods by using the mapping cone.

source
CodingTheory.gauging — Method
gauging(
    H_X::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    H_Z::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC}
) -> Tuple{Any, Any}

Return the result of gauging on H_X and H_Z.

source
CodingTheory.gauging_as_coning — Method
gauging_as_coning(
    S::AbstractStabilizerCode;
    rng
) -> StabilizerCodeCSS

Return the result of gauging on S by using the mapping cone.

source
CodingTheory.gauging_as_coning — Method
gauging_as_coning(
    H_X::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    H_Z::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC};
    target_w_X,
    permute,
    rng
) -> Tuple{Any, Any}

Return the result of gauging on H_X and H_Z by using the mapping cone.

source
CodingTheory.quantum_weight_reduction — Method
quantum_weight_reduction(
    S::AbstractStabilizerCode,
    l1::Int64,
    heights::Vector{Int64};
    copying_type,
    copying_target,
    l2,
    rng
) -> StabilizerCodeCSS

Return the weight-reduced CSS code of S.

source
CodingTheory.thickening_and_choose_heights — Method
thickening_and_choose_heights(
    H_X::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    H_Z::Union{Nemo.FqMatrix, Nemo.fpMatrix, Hecke.SMat, SparseArrays.SparseMatrixCSC},
    l::Integer,
    heights::Vector{Int64}
) -> Tuple{Any, Any}

Return the result of thickening and choosing heights on H_X and H_Z.

source