qiu_qiskit_aer_encore.simulator
¶
Aer simulators configured for the available hardware.
Classes:
-
AerDevice–The devices an Aer simulator can run on.
Functions:
-
available_aer_devices–Return the devices Aer can simulate on, e.g.
("CPU", "GPU"). -
aer_simulator–Return an Aer simulator on the requested device.
Attributes:
-
GPU_OPTIONS(dict[str, Any]) –The default options of simulators on GPUs, overridable per simulator.
GPU_OPTIONS
module-attribute
¶
GPU_OPTIONS: dict[str, Any] = {'cuStateVec_enable': True, 'blocking_enable': True, 'batched_shots_gpu': True}
The default options of simulators on GPUs, overridable per simulator.
AerDevice
¶
Bases: ExtendedEnum
The devices an Aer simulator can run on.
AUTO: a GPU if one is available, and the CPU otherwise.CPU: the CPU, which is always available.GPU: a GPU, raising an error if none is available.
Attributes:
available_aer_devices
cached
¶
Return the devices Aer can simulate on, e.g. ("CPU", "GPU").
The devices are detected once and cached.
Source code in packages/qiu-qiskit-aer-encore/src/qiu_qiskit_aer_encore/simulator.py
33 34 35 36 37 38 39 | |
aer_simulator
¶
Return an Aer simulator on the requested device.
Parameters:
-
device(AerDevice | str, default:AUTO) –The device to simulate on, see
AerDevice. -
**options(Any, default:{}) –Options of the
AerSimulator, e.g.method="statevector". On GPUs, they override the defaults ofGPU_OPTIONS.
Returns:
-
AerSimulator–The configured simulator.
Raises:
-
AerError–If a GPU is requested, but none is available.
Source code in packages/qiu-qiskit-aer-encore/src/qiu_qiskit_aer_encore/simulator.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |