Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

PulseSimulator

class PulseSimulator(configuration=None, provider=None)

GitHub

Pulse schedule simulator backend.

The PulseSimulator simulates continuous time Hamiltonian dynamics of a quantum system, with controls specified by pulse Schedule objects, and the model of the physical system specified by PulseSystemModel objects. Results are returned in the same format as when jobs are submitted to actual devices.

Example

To use the simulator, first assemble() a PulseQobj object from a list of pulse Schedule objects, using backend=PulseSimulator(). Call the simulator with the PulseQobj and a PulseSystemModel 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 each DriveChannel. Defaults to either the value given in the PulseSystemModel, or is calculated directly from the Hamiltonian.
  • meas_level: Type of desired measurement output, in [1, 2]. 1 gives complex numbers (IQ values), and 2 gives discriminated states |0> and |1>. Defaults to 2.
  • meas_return: Measurement type, 'single' or 'avg'. Defaults to 'avg'.
  • shots: Number of shots per experiment. Defaults to 1024.

Simulation details

The simulator uses the zvode differential equation solver method through scipy. Simulation is performed in the rotating frame of the diagonal of the drift Hamiltonian contained in the PulseSystemModel. Measurements are performed in the dressed basis of the drift Hamiltonian.

Other options

PulseSimulator.run() takes an additional dict argument backend_options for customization. Accepted keys:

  • 'ode_options': A dict for zvode 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

DEFAULT_CONFIGURATION

Default value: {'backend_name': 'pulse_simulator', 'backend_version': '0.5.2', 'basis_gates': [], 'conditional': True, 'coupling_map': None, 'description': 'A pulse-based Hamiltonian simulator for Pulse Qobj files', 'gates': [], 'local': True, 'max_shots': 1000000, 'meas_levels': [0, 1, 2], 'memory': False, 'n_qubits': 20, 'open_pulse': True, 'simulator': True, 'url': 'https://github.com/Qiskit/qiskit-aer'}


Methods

configuration

PulseSimulator.configuration()

Return the backend configuration.

Returns

the configuration for the backend.

Return type

BackendConfiguration

defaults

PulseSimulator.defaults()

Return defaults.

Returns

object for passing assemble.

Return type

PulseDefaults

name

PulseSimulator.name()

Return the backend name.

Returns

the name of the backend.

Return type

str

properties

PulseSimulator.properties()

Return the backend properties.

Returns

the configuration for the backend. If the backend does not support properties, it returns None.

Return type

BackendProperties

provider

PulseSimulator.provider()

Return the backend Provider.

Returns

the Provider responsible for the backend.

Return type

BaseProvider

run

PulseSimulator.run(qobj, system_model, backend_options=None, validate=False)

Run a qobj on system_model.

Parameters

  • qobj (PulseQobj) – Qobj for pulse Schedules to run
  • system_model (PulseSystemModel) – Physical model to run simulation on
  • backend_options (dict) – Other options
  • validate (bool) – Flag for validation checks

Returns

results of simulation

Return type

Result

status

PulseSimulator.status()

Return backend status.

Returns

the status of the backend.

Return type

BackendStatus

version

PulseSimulator.version()

Return the backend version.

Returns

the X.X.X version of the backend.

Return type

str

Was this page helpful?
Report a bug or request content on GitHub.