EmulationConfig
- class pulser.backend.EmulationConfig(*, observables=(), default_evaluation_times=(1.0,), initial_state=None, with_modulation=False, interaction_matrix=None, prefer_device_noise_model=False, noise_model=NoiseModel(noise_types=()), **backend_options)
Bases:
BackendConfig,Generic[StateType]Configures an emulation on a backend.
- Parameters:
observables (Sequence[Observable], default:
()) – A sequence of observables to compute at specific evaluation times. The observables without specified evaluation times will use this configuration’s ‘default_evaluation_times’.default_evaluation_times (Sequence[SupportsFloat] | Literal[‘Full’], default:
(1.0,)) – The default times at which observables are computed. Can be a sequence of unique relative times between 0 (the start of the sequence) and 1 (the end of the sequence), in ascending order. Can also be specified as “Full”, in which case every step in the emulation will also be an evaluation time.initial_state (StateType | None, default:
None) – 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 (bool, default:
False) – Whether to emulate the sequence with the programmed input or the expected output.interaction_matrix (ArrayLike | None, default:
None) – An optional interaction matrix to replace the interaction terms in the Hamiltonian. For an N-qudit system, must be an NxN symmetric matrix where entry (i, j) dictates the interaction coefficient between qudits i and j, ie it replaces the C_n/r_{ij}^n term.prefer_device_noise_model (bool, default:
False) – If True, uses the noise model of the sequence’s device (if the sequence’s device has one), regardless of the noise model given with this configuration.noise_model (NoiseModel, default:
NoiseModel(noise_types=())) – 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.
Attributes
observablesdefault_evaluation_timesinitial_statewith_modulationinteraction_matrixprefer_device_noise_modelnoise_modelMethods
Assesses whether a relative time is an evaluation time.
Checks if a time is within a collection of evaluation times.
Signatures
- 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