iqm.pulla.pulla.Pulla#

class iqm.pulla.pulla.Pulla(station_control_url, *, get_token_callback=None)#

Bases: object

Pulse level access library for IQM’s circuit-to-pulse compiler and Station Control API. Conceptually, represents a connection to a remote quantum computer, and a provider of calibration data. Can create a compiler instance ready to be used with the connected quantum computer.

Parameters:
  • station_control_url (str) – URL to a Station Control instance.

  • get_token_callback (Callable[[], str] | None) – An optional function that returns an authentication token for the Station Control API.

Methods

_get_station_control_settings()

Returns the Station Control settings node that was fetched from the IQM server during Pulla initialization.

execute(playlist, context, settings[, verbose])

Executes a quantum circuit on the remote quantum computer.

fetch_calibration_set_by_id(calibration_set_id)

Fetches a specific calibration set from the server, and returns its decoded representation.

fetch_latest_calibration_set()

Fetches the latest default calibration set from the server, and returns its decoded representation and UUID.

get_channel_properties()

Control channel properties from Station Control controller settings.

get_chip_label()

Returns the chip label of the current quantum computer.

get_chip_topology()

Returns chip topology that was fetched from the IQM server during Pulla initialization.

get_standard_compiler([calibration_set, ...])

Returns a new instance of the compiler with the default calibration set and standard stages.

get_standard_compiler(calibration_set=None, circuit_execution_options=None)#

Returns a new instance of the compiler with the default calibration set and standard stages.

Parameters:
  • calibration_set (dict[str, bool | str | int | float | complex | ndarray] | None) – Calibration set to use. If None, the default calibration set will be used.

  • circuit_execution_options (CircuitExecutionOptions | dict | None) – circuit execution options to use for the compiler. If a CircuitExecutionOptions object is provided, the compiler use it as is. If a dict is provided, the default values will be overridden for the present keys in that dict. If left None, the default options will be used.

Returns:

The compiler object.

Return type:

Compiler

fetch_latest_calibration_set()#

Fetches the latest default calibration set from the server, and returns its decoded representation and UUID.

Return type:

tuple[dict[str, bool | str | int | float | complex | ndarray], UUID]

fetch_calibration_set_by_id(calibration_set_id)#

Fetches a specific calibration set from the server, and returns its decoded representation. All calibration sets are cached in-memory, so if the calibration set with the given id has already been fetched, it will be returned immediately.

Parameters:

calibration_set_id (UUID) – UUID of the calibration set to fetch.

Return type:

dict[str, bool | str | int | float | complex | ndarray]

get_chip_label()#

Returns the chip label of the current quantum computer. The chip label is fetched from the Station Control API.

Return type:

str

get_chip_topology()#

Returns chip topology that was fetched from the IQM server during Pulla initialization.

Return type:

ChipTopology

get_channel_properties()#

Control channel properties from Station Control controller settings.

Returns:

Mapping from channel names to their properties. component_to_channel: Mapping from chip component names to functions to channel names.

For example, ‘QB1’ -> ‘drive’ -> ‘QB1__drive.awg’

Return type:

channel_properties

execute(playlist, context, settings, verbose=True)#

Executes a quantum circuit on the remote quantum computer.

Parameters:
  • playlist (Playlist) – Final schedule to be executed.

  • context (dict[str, Any]) – Context object of the successful compiler run, containing the readout mappings.

  • settings (SettingNode) – Station settings.

  • verbose (bool) – Whether to print results.

Returns:

results of the execution

Return type:

StationControlResult