Skip to content
Pasqal Documentation

Results are limited to the current section : Pulser

QutipConfig

class pulser_simulation.QutipConfig(*, sampling_rate=1.0, solver=Solver.DEFAULT, print_progress=False, progress_bar=False, **backend_options)

Bases: EmulationConfig[QutipState]

The configuration of a QutipBackendV2.

Parameters:
  • observables – A sequence of observables to compute at specific evaluation times. The observables without specified evaluation times will use this configuration’s ‘default_evaluation_times’.

  • sampling_rate (float, default: 1.0) – The fraction of samples to extract from the pulse sequence for emulation.

  • default_evaluation_times – The default times at which observables are computed. Can be a sequence of relative times between 0 (the start of the sequence) and 1 (the end of the sequence). Can also be specified as “Full”, in which case every step in the emulation will also be an evaluation time.

  • initial_state – The initial state from which emulation starts. If specified, the state type needs to be compatible with the emulator backend. If left undefined, defaults to starting with all qudits in the ground state.

  • with_modulation – Whether to emulate the sequence with the programmed input or the expected output.

  • prefer_device_noise_model – If the sequence’s device has a default noise model, this option signals the backend to prefer it over the noise model given with this configuration.

  • noise_model – An optional noise model to emulate the sequence with. Ignored if the sequence’s device has default noise model and prefer_device_noise_model=True.

  • solver (Solver, default: <Solver.DEFAULT: 'default'>) –

    QuTiP solver selection. If the noise model has no collapse operators (i.e. no dephasing/relaxation/depolarizing/eff_noise terms), the simulation uses qutip.sesolve and the solver setting is ignored. If collapse operators are present, then:

    • Solver.DEFAULT: auto-select qutip.mcsolve for stochastic noise, otherwise qutip.mesolve.

    • Solver.MCSOLVER: use the Monte-Carlo solver qutip.mcsolve.

    • Solver.MESOLVER: use the master-equation solver qutip.mesolve.

  • print_progress (bool, default: False) – Whether to print which noise trajectory is being emulated.

  • progress_bar (bool, default: False) – Whether or not to display the progress of the run of a trajectory inside qutip.

See also

EmulationConfig: The base configuration class for an EmulatorBackend.

Attributes

sampling_rate

The fraction of sequence samples to extract for emulation.

callbacks

A sequence of callbacks that are not observables.

observables

A sequence of observables to compute at specific evaluation times.

default_evaluation_times

The default times at which observables are computed.

initial_state

A custom initial state from which emulation starts.

with_modulation

Whether to emulate the sequence with output modulation effects.

interaction_matrix

An interaction matrix to replace the Hamiltonian interaction terms.

prefer_device_noise_model

Whether to use the noise model of the sequence's Device.

noise_model

A custom noise model to emulate the sequence with.

n_trajectories

The number of trajectories to average over (when applicable).

default_num_shots

The default number of shots for BitStrings.

Methods

from_abstract_repr

Deserialize an EmulationConfig from an abstract JSON object.

is_evaluation_time

Assesses whether a relative time is an evaluation time.

is_time_in_evaluation_times

Checks if a time is within a collection of evaluation times.

to_abstract_repr

Serialize EmulationConfig to a JSON formatted str.

with_changes

Returns a copy of the config with the given changes.

Signatures

operator_type

alias of QutipOperator

state_type

alias of QutipState

classmethod from_abstract_repr(obj_str)

Deserialize an EmulationConfig from an abstract JSON object.

Parameters:

obj_str (str) – The JSON string representing the config encoded in the abstract JSON format.

Returns:

The EmulationConfig instance.

Return type:

EmulationConfig

is_evaluation_time(t, tol=1e-06)

Assesses whether a relative time is an evaluation time.

Return type:

bool

static is_time_in_evaluation_times(t, evaluation_times, tol=1e-06)

Checks if a time is within a collection of evaluation times.

Return type:

bool

to_abstract_repr(skip_validation=False)

Serialize EmulationConfig to a JSON formatted str.

Return type:

str

with_changes(**changes)

Returns a copy of the config with the given changes.

Return type:

TypeVar(Self, bound= BackendConfig)

callbacks: Sequence[Callback]

A sequence of callbacks that are not observables.

default_evaluation_times: np.ndarray | Literal['Full']

The default times at which observables are computed.

default_num_shots: int

The default number of shots for BitStrings.

initial_state: StateType | None

A custom initial state from which emulation starts.

interaction_matrix: pm.AbstractArray | None

An interaction matrix to replace the Hamiltonian interaction terms.

n_trajectories: int

The number of trajectories to average over (when applicable).

noise_model: NoiseModel

A custom noise model to emulate the sequence with.

observables: Sequence[Observable]

A sequence of observables to compute at specific evaluation times.

prefer_device_noise_model: bool

Whether to use the noise model of the sequence’s Device.

sampling_rate: float

The fraction of sequence samples to extract for emulation.

with_modulation: bool

Whether to emulate the sequence with output modulation effects.