Skip to content
Pasqal Documentation

Results are limited to the current section : pulser

EmuSVBackend

class pulser_pasqal.EmuSVBackend(sequence, connection, *, config=None, mimic_qpu=False)

Bases: RemoteEmulatorBackend

Backend for executing quantum programs using the EMU-SV emulator.

The config supports various fields. For a complete list of accepted parameters (passed as **kwargs), refer to the official EMU-SV documentation: https://pasqal-io.github.io/emulators/latest/emu_sv/api/#svconfig (external)

Parameters:
  • sequence (Sequence) – The quantum sequence to execute on the backend.

  • connection (PasqalCloud) – An open PasqalCloud connection.

  • config (EmulationConfig | None, default: None) – An EmulationConfig object to configure the backend. If not provided, the default configuration will be used.

  • mimic_qpu (bool, default: False) – Whether to mimic the validations required for execution on a QPU.

Attributes

default_config

Methods

open_batch

Creates an open batch within a context manager object.

run

Runs the sequence on this remote emulator and returns the result.

validate_config

Validates a given configuration for this backend.

validate_job_params

Validates a list of job parameters prior to submission.

validate_sequence

Validates a sequence prior to submission.

Signatures

config_type

alias of EmulationConfig

open_batch()

Creates an open batch within a context manager object.

Return type:

_OpenBatchContextManager

run(job_params=None, wait=False)

Runs the sequence on this remote emulator and returns the result.

Parameters:
  • job_params (list[JobParams] | None, default: None) – A list of parameters for each job to execute. If the sequence is parametrized, the values for all the variables necessary to build the sequence must be given for each job, under the ‘variables’ field. If not given, a single job is executed.

  • wait (bool, default: False) – Whether to wait until the results of the jobs become available. If set to False, the call is non-blocking and the obtained results’ status can be checked using their status property.

Warning

Unlike a ‘QPUBackend’, this backend does not expect a value for “runs” in each entry of ‘job_params’. If provided, this value is ignored. If you wish to set the total number of bitstring counts in the Results, please provide a ‘BitStrings’ observable with the desired ‘num_shots’ via this backend’s ‘config’ instead.”

Return type:

RemoteResults

Returns:

The results, which can be accessed once all sequences have been successfully executed.

classmethod validate_config(config)

Validates a given configuration for this backend.

Parameters:

config (EmulationConfig) – The configuration to validate.

Return type:

EmulationConfig

Returns:

The full configuration that will be used by the backend if the given configuration passes validation.

static validate_job_params(job_params, max_runs)

Validates a list of job parameters prior to submission.

Return type:

None

static validate_sequence(sequence, mimic_qpu=False)

Validates a sequence prior to submission.

Return type:

None