Skip to content
Pasqal Documentation

EmuTNBackend

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

Bases: PasqalEmulator

An emulator backend using tensor network simulation.

Configurable fields in EmulatorConfig:
  • sampling_rate: Defaults to 0.1. This value must remain low to use this backend efficiently.

  • backend_options:
    • precision (str): The precision of the simulation. Can be “low”, “normal” or “high”. Defaults to “normal”.

    • max_bond_dim (int): The maximum bond dimension of the Matrix Product State (MPS). Defaults to 500.

All other parameters should not be changed from their default values.

Parameters:
  • sequence (Sequence) – The sequence to send to the backend.

  • connection (PasqalCloud) – An open PasqalCloud connection.

  • config (EmulatorConfig | None, default: None) – An EmulatorConfig to configure the backend. If not provided, the default configuration is used.

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

Attributes

configurable_fields

default_config

emulator

Methods

open_batch

Creates an open batch within a context manager object.

run

Executes on the emulator backend through the Pasqal Cloud.

validate_sequence

Validates a sequence prior to submission.

Signatures

open_batch()

Creates an open batch within a context manager object.

Return type:

_OpenBatchContextManager

run(job_params=None, wait=False)

Executes on the emulator backend through the Pasqal Cloud.

Parameters:
  • job_params (list[JobParams] | None, default: None) – A list of parameters for each job to execute. Each mapping must contain a defined ‘runs’ field specifying the number of times to run the same sequence. If the sequence is parametrized, the values for all the variables necessary to build the sequence must be given in it’s own mapping, for each job, under the ‘variables’ field.

  • 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.

Return type:

RemoteResults

Returns:

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

static validate_sequence(sequence, mimic_qpu=False)

Validates a sequence prior to submission.

Return type:

None