QECPolicy¶
- class guppyft.code.steane.encode.QECPolicy(style=QECStyle.Steane, threshold=1, costs=<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).
- threshold¶
Threshold at which a QEC cycle is triggered.
- costs¶
See QECPolicy.OperationCosts.
- class OperationCosts(prep_zero=0.0, prep_t=0.0, x=0.0, y=0.0, z=0.0, h=0.0, s=0.0, sdg=0.0, inject_t=0.0, inject_tdg=0.0, cx=0.0, cz=0.0)[source]¶
Configuration for operation costs. Used e.g. for applying QEC cycles.
- __init__(prep_zero=0.0, prep_t=0.0, x=0.0, y=0.0, z=0.0, h=0.0, s=0.0, sdg=0.0, inject_t=0.0, inject_tdg=0.0, cx=0.0, cz=0.0)¶
- __init__(style=QECStyle.Steane, threshold=1, costs=<factory>)¶