loqs.codepacks.codepack_7_1_3_quantinuum2021¶
A LoQS QEC codepack for the [[7,1,3]] color code.
This implementation is based on the 2021 implementation from Quantinuum in [ryananderson_realizing_2021].
We require three auxiliary qubits for stabilizer checks. Thus, we will have 10 qubits total: 7 data and 3 auxiliary.
Functions¶
create_ideal_model ¶
create_ideal_model(qubits: Sequence[str], model_backend: type[BaseNoiseModel] = PyGSTiNoiseModel, gaterep: type[GateRep] = QSimSuperopGateRep, instrep: type[InstrumentRep] = ZBasisProjectionInstrumentRep)
Create an ideal (i.e. noiseless) model for the [[7,1,3]] code.
This model will contain all the instructions needed to run the
physical circuits in the QECCode returned by create_qec_code().
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qubits
|
Sequence[str]
|
List of qubit labels to use. It should be have 10 entries, and the first three qubits should be the auxiliary qubits. |
required |
model_backend
|
type[BaseNoiseModel]
|
The model backend to use when generating operations.
Currently, only |
PyGSTiNoiseModel
|
gaterep
|
type[GateRep]
|
Gate representation class to use. Default is |
QSimSuperopGateRep
|
instrep
|
type[InstrumentRep]
|
Instrument representation class to use. Default is |
ZBasisProjectionInstrumentRep
|
Returns:
| Type | Description |
|---|---|
BaseNoiseModel
|
A noiseless model for the |
create_qec_code ¶
create_qec_code(ft_state_prep_max_repeats: int = 100, include_idles: bool = False, gate_durations: dict[str, int | float] | None = None, idle_gates: dict[int | float, str] | None = None, circuit_backend: type[BasePhysicalCircuit] = PyGSTiPhysicalCircuit)
Create a QECCode implementing the [[7,1,3]] code.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ft_state_prep_max_repeats
|
int
|
The number of max repeats to include in the repeat-until-success fault-tolerant state prep instruction. Default is 100. |
100
|
include_idles
|
bool
|
Whether to include (True) or not (False, default) idle gates in physical circuits. |
False
|
gate_durations
|
dict[str, int | float] | None
|
Mapping from gate names to durations. Defaults to None, which uses
dummy values 1, 2, 3 for 1Q gates, 2Q gates, and mid-circuit
measurements, respectively.
See |
None
|
idle_gates
|
dict[int | float, str] | None
|
Mapping from gate duration to idle gate names. Defaults to None,
which maps the dummy values from |
None
|
circuit_backend
|
type[BasePhysicalCircuit]
|
The circuit backend to use when generating physical circuits.
Default is |
PyGSTiPhysicalCircuit
|
Returns:
| Type | Description |
|---|---|
QECCode
|
A |