EmulatorBuilder¶
- class guppylang.emulator.EmulatorBuilder(_name: str | None = None, _build_dir: Path | None = None, _verbose: bool = False, _planner: BuildPlanner | None = None, _utilities: Sequence[Utility] | None = None, _interface: QuantumInterface | None = None, _progress_bar: bool = False, _strict: bool = False, _save_planner: bool = False)[source]¶
A builder class for creating EmulatorInstance objects.
Supports configuration parameters for compilation of emulator instances.
- __delattr__(name)¶
Implement delattr(self, name).
- __eq__(other)¶
Return self==value.
- __hash__()¶
Return hash(self).
- __init__(_name: str | None = None, _build_dir: Path | None = None, _verbose: bool = False, _planner: BuildPlanner | None = None, _utilities: Sequence[Utility] | None = None, _interface: QuantumInterface | None = None, _progress_bar: bool = False, _strict: bool = False, _save_planner: bool = False) None ¶
- __repr__()¶
Return repr(self).
- __setattr__(name, value)¶
Implement setattr(self, name, value).
- build(package: Package, n_qubits: int) EmulatorInstance [source]¶
Build an EmulatorInstance from a compiled package.
- Args:
package: The compiled HUGR package to build the emulator from. n_qubits: The number of qubits to allocate for the emulator instance.
- Returns:
An EmulatorInstance that can be used to run the compiled program.
- property build_dir: Path | None¶
Directory to store intermediate build files and execution results. Defaults to None, in which case a temporary directory is used.