PulseSimulator¶
- class PulseSimulator(configuration=None, provider=None)[source]¶
Pulse schedule simulator backend.
The
PulseSimulator
simulates continuous time Hamiltonian dynamics of a quantum system, with controls specified by pulseSchedule
objects, and the model of the physical system specified byPulseSystemModel
objects. Results are returned in the same format as when jobs are submitted to actual devices.Example
To use the simulator, first
assemble()
aPulseQobj
object from a list of pulseSchedule
objects, usingbackend=PulseSimulator()
. Call the simulator with thePulseQobj
and aPulseSystemModel
object representing the physical system.backend_sim = qiskit.providers.aer.PulseSimulator() # Assemble schedules using PulseSimulator as the backend pulse_qobj = assemble(schedules, backend=backend_sim) # Run simulation on a PulseSystemModel object results = backend_sim.run(pulse_qobj, system_model)
Supported PulseQobj parameters
qubit_lo_freq
: Local oscillator frequencies for eachDriveChannel
. Defaults to either the value given in thePulseSystemModel
, or is calculated directly from the Hamiltonian.meas_level
: Type of desired measurement output, in[1, 2]
.1
gives complex numbers (IQ values), and2
gives discriminated states|0>
and|1>
. Defaults to2
.meas_return
: Measurement type,'single'
or'avg'
. Defaults to'avg'
.shots
: Number of shots per experiment. Defaults to1024
.
Simulation details
The simulator uses the
zvode
differential equation solver method throughscipy
. Simulation is performed in the rotating frame of the diagonal of the drift Hamiltonian contained in thePulseSystemModel
. Measurements are performed in the dressed basis of the drift Hamiltonian.Other options
PulseSimulator.run()
takes an additionaldict
argumentbackend_options
for customization. Accepted keys:'ode_options'
: Adict
forzvode
solver options. Accepted keys are'atol'
,'rtol'
,'nsteps'
,'max_step'
,'num_cpus'
,'norm_tol'
, and'norm_steps'
.
Aer class for backends.
This method should initialize the module and its configuration, and raise an exception if a component of the module is not available.
- Parameters
controller (function) – Aer controller to be executed
configuration (BackendConfiguration) – backend configuration
provider (BaseProvider) – provider responsible for this backend
- Raises
FileNotFoundError if backend executable is not available. –
AerError – if there is no name in the configuration
Attributes
Methods
Return the backend configuration.
Return defaults.
Return the backend name.
Return the backend properties.
Return the backend Provider.
PulseSimulator.run
(qobj, system_model[, …])Run a qobj on system_model.
Return backend status.
Return the backend version.