deltakit.decode.noise_sources.StimNoise#
- class deltakit.decode.noise_sources.StimNoise(before_gate_noise_profile: Callable[[NoiseContext], PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax | Iterable[PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax]] | Iterable[Callable[[NoiseContext], PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax | Iterable[PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax]]] | None = None, after_gate_noise_profile: Callable[[NoiseContext], PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax | Iterable[PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax]] | Iterable[Callable[[NoiseContext], PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax | Iterable[PauliXError[T] | PauliYError[T] | PauliZError[T] | PauliChannel1[T] | PauliChannel2[T] | Depolarise1[T] | Depolarise2[T] | CorrelatedError[T] | ElseCorrelatedError[T] | Leakage | Relax]]] | None = None, gate_replacement_policy: Mapping[type[I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP] | I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP, Callable[[I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP], I | X | Y | Z | H | S | S_DAG | SQRT_X | SQRT_X_DAG | SQRT_Y | SQRT_Y_DAG | H_XY | H_YZ | C_XYZ | C_ZYX | CX | CXSWAP | CY | CZ | CZSWAP | ISWAP | ISWAP_DAG | SQRT_XX | SQRT_XX_DAG | SQRT_YY | SQRT_YY_DAG | SQRT_ZZ | SQRT_ZZ_DAG | SWAP | XCX | XCY | XCZ | YCX | YCY | YCZ | RZ | RX | RY | MX | MY | MZ | MRX | MRY | MRZ | HERALD_LEAKAGE_EVENT | MPP]] | None = None, batch_size=1024)#
Bases:
MonteCarloNoise[Circuit,tuple[OrderedSyndrome,tuple[bool, …]]]A noise model that takes a set of noise profiles that can be applied to a lestim circuit. These noise profiles should be defined as callables that will be processed by deltakit_circuit.
- Parameters:
before_gate_noise_profile (Optional[sp.NoiseProfile | Iterable[sp.NoiseProfile]],)
optional – Profile of noise to run before gates, by default None.
after_gate_noise_profile (Optional[sp.NoiseProfile | Iterable[sp.NoiseProfile]],)
optional – Profile of noise to run after gates, by default None.
gate_replacement_policy (Optional[sp.GateReplacementPolicy], optional) – Rules to apply noise by replacing specific gates, by default None.
batch_size (int, optional) – Number of syndromes to generate in a parallel batch, by default 1024.
Methods#
Return the equivalent exhaustive model for this noise model. |
|
Given some representation of a code, return a generator of batches of errors for that code. |
|
Given some representation of a code, return num_splits number of batch generators of errors for that code and the respective sizes for those generators. |
|
Given some representation of a code, return a generator of errors for that code. |
|
Return the values of data that characterises this noise model. |
|
Return a numpy random number generator, using the member data seed. |
|
Expresses the independent error distribution as a statistical mixture of other error distributions. |
|
Apply noise to a lestim circuit |
|
Given some representation of a code, return num_splits number of generators of errors for that code and the respective sizes for those generators. |