IcebergBuilder¶
- class guppyft.code.iceberg.encode.IcebergBuilder(*, _options: _IcebergOptions = _IcebergOptions(_n_blocks=None, _block_size=None, _qed_policy=None, syndrome_during_measurement=False, state_factory_conf=RUSStateFactoryConf(size=1, max_attempts=3), dynamic_qubit_reuse=<DynamicQubitReuse.enabled: 'enabled'>))[source]¶
Iceberg architecture builder class for creating IcebergInstance objects.
- __eq__(other)¶
Return self==value.
- __init__(*, _options: _IcebergOptions = _IcebergOptions(_n_blocks=None, _block_size=None, _qed_policy=None, syndrome_during_measurement=False, state_factory_conf=RUSStateFactoryConf(size=1, max_attempts=3), dynamic_qubit_reuse=<DynamicQubitReuse.enabled: 'enabled'>)) None¶
- __repr__()¶
Return repr(self).
- build() IcebergInstance[source]¶
Build an IcebergInstance.
- classmethod from_params(params: dict[str, Any]) Self[source]¶
Produces a builder according to the given parameters.
- classmethod instance_from_params(params: dict[str, Any]) IcebergInstance[source]¶
Produces an instance with the builder according to the given parameters. To be used as the ‘inverse’ of IcebergInstance.annotate.
- classmethod new(*, n_blocks: int, block_size: int) Self[source]¶
Create a new builder with some initial options. Note that the builder configuration is not guaranteed to be complete yet.
- with_dynamic_qubit_reuse(conf: DynamicQubitReuse) Self[source]¶
Set whether dynamic qubits should be reset and reused.
- with_n_blocks(n_blocks: int) Self[source]¶
Set the number of logical blocks the architecture can use.
- with_qed_policy(qed_policy: IcebergQEDPolicy) Self[source]¶
Set the QED policy.
- with_state_factory_conf(conf: RUSStateFactoryConf) Self[source]¶
Set the configuration for the state factory producing Iceberg blocks.