AQTOptions#
- pydantic model qiskit_aqt_provider.aqt_options.AQTOptions[source]#
Bases:
BaseModel
,Mapping
[str
,Any
]Options for AQT resources.
This is a typed drop-in replacement for
qiskit.providers.Options
.Options can be set on a backend globally or on a per-job basis. To update an option globally, set the corresponding attribute in the backend’s
options
attribute:>>> import qiskit >>> from qiskit_aqt_provider import AQTProvider >>> >>> backend = AQTProvider("").get_backend("offline_simulator_no_noise") >>> >>> qc = qiskit.QuantumCircuit(1) >>> _ = qc.rx(3.14, 0) >>> _ = qc.measure_all() >>> qc = qiskit.transpile(qc, backend) >>> >>> backend.options.shots = 50 >>> result = backend.run(qc).result() >>> sum(result.get_counts().values()) 50
Option overrides can also be applied on a per-job basis, as keyword arguments to
AQTResource.run
orAQTDirectAccessResource.run
:>>> backend.options.shots 50 >>> result = backend.run(qc, shots=100).result() >>> sum(result.get_counts().values()) 100
- Config:
extra: str = forbid
validate_assignment: bool = True
- field memory: bool = False#
Whether to return the sequence of memory states (readout) for each shot.
See
qiskit.result.Result.get_memory()
for details.
- field query_period_seconds: float = 1.0#
Elapsed time between queries to the cloud portal when waiting for results, in seconds.
- Constraints:
ge = 0.1
- field query_timeout_seconds: float | None = None#
Maximum time to wait for results of a single job, in seconds.
- field with_progress_bar: bool = True#
Whether to display a progress bar when waiting for results from a single job.
When enabled, the progress bar is written to
sys.stderr
.
- pydantic model qiskit_aqt_provider.aqt_options.AQTDirectAccessOptions[source]#
Bases:
AQTOptions
Options for AQT direct-access resources.
- Config:
extra: str = forbid
validate_assignment: bool = True