Models

BasicModels

Qecsim.BasicModels.BasicCode — Type
BasicCode <: StabilizerCode

BasicCode(
    pauli_stabilizers::AbstractVector{<:AbstractString},
    pauli_logical_xs::AbstractVector{<:AbstractString},
    pauli_logical_zs::AbstractVector{<:AbstractString},
    nkd::Tuple{Integer,Integer,Union{Integer,Missing}}=nothing,
    label::AbstractString=nothing
)

Construct a basic code from string representations of stabilizers and logical operators.

Paulis are expressed as strings of capitalized I, X, Y, Z characters, with one character per physical qubit. Logical X and Z operators are in matching order, with one of each for each logical qubit. Optional nkd defaults to n and k evaluated and d missing. Optional label defaults to "Basic [n,k,d]".

Examples

julia> using Qecsim.BasicModels

julia> code = BasicCode(["ZZI", "IZZ"], ["XXX"], ["IIZ"])  # 3-qubit repetition
BasicCode(["ZZI", "IZZ"], ["XXX"], ["IIZ"], (3, 1, missing), "Basic [3,1,missing]")

julia> validate(code)  # no error indicates operators satisfy commutation relations

julia> nkd(code)  # default nkd
(3, 1, missing)

julia> label(code)  # default label
"Basic [3,1,missing]"
source

GenericModels

Qecsim.GenericModels.BitFlipErrorModel — Type
BitFlipErrorModel <: SimpleErrorModel

IID error model with probability vector: $(p_I, p_X, p_Y p_Z) = (1-p, p, 0, 0)$, where $p$ is the probability of an error on a single-qubit.

source
Qecsim.GenericModels.DepolarizingErrorModel — Type
DepolarizingErrorModel <: SimpleErrorModel

IID error model with probability vector: $(p_I, p_X, p_Y p_Z) = (1-p, p/3, p/3, p/3)$, where $p$ is the probability of an error on a single-qubit.

source
Qecsim.GenericModels.PhaseFlipErrorModel — Type
PhaseFlipErrorModel <: SimpleErrorModel

IID error model with probability vector: $(p_I, p_X, p_Y p_Z) = (1-p, 0, 0, p)$, where $p$ is the probability of an error on a single-qubit.

source
Qecsim.GenericModels.NaiveDecoder — Type
NaiveDecoder <: Decoder

NaiveDecoder([max_qubits=10])

Construct a naive decoder that iterates through all possible errors, in ascending weight, and resolves to the first error that matches the syndrome.

Note

This decoder is slow for even moderate numbers of qubits. By default, it is restricted to codes with a maximum of 10 qubits.

source