DynamicQubitReuse¶
- class guppyft.code.iceberg.encode.DynamicQubitReuse(*values)[source]¶
Configuration for how dynamic qubits are allocated or reused. Fresh qubits are from block allocations and have not yet been allocated. When dynamic qubits are freed, depending on the configuration, future dynamic qubit allocations can reset and reuse these qubits.
When all dynamic qubits from a logical block have been freed, the block itself is freed and becomes available to be reallocated.
- __format__(format_spec, /)¶
Return a formatted version of the string as described by format_spec.
- __new__(value)¶
- __str__()¶
Return str(self).
- disabled = 'disabled'¶
Only allocate fresh qubits from logical block allocations. Do not reset and reuse dynamic qubits.
- enabled = 'enabled'¶
Use available fresh qubits, then freed qubits, before preparing another block.
- if_necessary = 'if_necessary'¶
Prefer using fresh logical qubits. Only reuse logical qubits if no more blocks are available to be allocated.