QECPolicy¶
- class guppyft.code.steane.encode.QECPolicy(style: ~guppyft.code.steane.encode.QECStyle = QECStyle.Steane, threshold: int = 1, costs: ~guppyft.code.steane.encode.QECPolicy.OperationCosts = <factory>)[source]¶
Policy to determine when QEC cycles are injected.
Each logical block accumulates a cost based on costs. Once a block’s accumulated cost reaches threshold, a QEC cycle of the given style is performed on that block and its counter is reset.
- style¶
The style of syndrome extraction to use (see QECStyle).
- costs¶
See OperationCosts.
- class OperationCosts(prep_zero: float = 0.0, prep_t: float = 0.0, x: float = 0.0, y: float = 0.0, z: float = 0.0, h: float = 0.0, s: float = 0.0, sdg: float = 0.0, inject_t: float = 0.0, inject_tdg: float = 0.0, cx: float = 0.0, cz: float = 0.0)[source]¶
Configuration for operation costs. Used e.g. for applying QEC cycles.
- __eq__(other)¶
Return self==value.
- __init__(prep_zero: float = 0.0, prep_t: float = 0.0, x: float = 0.0, y: float = 0.0, z: float = 0.0, h: float = 0.0, s: float = 0.0, sdg: float = 0.0, inject_t: float = 0.0, inject_tdg: float = 0.0, cx: float = 0.0, cz: float = 0.0) None¶
- __repr__()¶
Return repr(self).
- __eq__(other)¶
Return self==value.
- __init__(style: ~guppyft.code.steane.encode.QECStyle = QECStyle.Steane, threshold: int = 1, costs: ~guppyft.code.steane.encode.QECPolicy.OperationCosts = <factory>) None¶
- __repr__()¶
Return repr(self).