Backend Interfaces
QPU
- class pulser.QPUBackend(sequence, connection)
Backend for sequence execution on a QPU.
- run(job_params=None, wait=False)
Runs the sequence on the remote QPU and returns the result.
- 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.
Emulators
Local
- class pulser_simulation.QutipBackend(sequence, config=EmulatorConfig(backend_options={}, sampling_rate=1.0, evaluation_times='Full', initial_state='all-ground', with_modulation=False, noise_model=NoiseModel(noise_types=(), runs=15, samples_per_run=5, state_prep_error=0.005, p_false_pos=0.01, p_false_neg=0.05, temperature=50.0, laser_waist=175.0, amp_sigma=0.05, dephasing_prob=0.05, depolarizing_prob=0.05, eff_noise_probs=[], eff_noise_opers=[])))
A backend for emulating the sequences using qutip.
- Parameters:
sequence (
Sequence
) – The sequence to emulate.config (
EmulatorConfig
, default:EmulatorConfig(backend_options={}, sampling_rate=1.0, evaluation_times='Full', initial_state='all-ground', with_modulation=False, noise_model=NoiseModel(noise_types=(), runs=15, samples_per_run=5, state_prep_error=0.005, p_false_pos=0.01, p_false_neg=0.05, temperature=50.0, laser_waist=175.0, amp_sigma=0.05, dephasing_prob=0.05, depolarizing_prob=0.05, eff_noise_probs=[], eff_noise_opers=[]))
) – The configuration for the Qutip emulator.
- run(progress_bar=False, **qutip_options)
Emulates the sequence using QuTiP’s solvers.
- Parameters:
progress_bar (
bool
, default:False
) – If True, the progress bar of QuTiP’s solver will be shown. If None or False, no text appears.options –
Used as arguments for qutip.Options(). If specified, will override SimConfig solver_options. If no max_step value is provided, an automatic one is calculated from the Sequence’s schedule (half of the shortest duration among pulses and delays). Refer to the QuTiP docs for an overview of the parameters.
- Returns:
In particular, returns NoisyResults if the noise model in EmulatorConfig requires it. Otherwise, returns CoherentResults.
- Return type:
SimulationResults
Remote
- class pulser_pasqal.EmuTNBackend(sequence, connection, config=None)
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 (pulser.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.
- class pulser_pasqal.EmuFreeBackend(sequence, connection, config=None)
An emulator backend using free Hamiltonian time evolution.
- Configurable fields in EmulatorConfig:
- backend_options:
with_noise (bool): Whether to add noise to the simulation. Defaults to False.
All other parameters should not be changed from their default values.
- Parameters:
sequence (pulser.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.
Remote backend connection
- class pulser_pasqal.PasqalCloud(username='', password='', project_id='', **kwargs)
Manager of the connection to PASQAL’s cloud platform.
The cloud connection enables to run sequences on simulators or on real QPUs.
- Parameters:
username (
str
, default:''
) – Your username in the PASQAL cloud platform.password (
str
, default:''
) – The password for your PASQAL cloud platform account.project_id (
str
, default:''
) – The project ID associated to the account.kwargs (
Any
) – Additional arguments to provide to the pasqal_cloud.SDK()