QutipConfig
- class pulser_simulation.qutip_config.QutipConfig(*, sampling_rate=1.0, **backend_options)
Bases:
EmulationConfig
[QutipState
]The configuration of a QutipBackend.
- 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.
See also
EmulationConfig: The base configuration class for an EmulatorBackend.
Attributes
sampling_rate
callbacks
observables
default_evaluation_times
initial_state
with_modulation
interaction_matrix
prefer_device_noise_model
noise_model
Methods
Deserialize an EmulationConfig from an abstract JSON object.
Assesses whether a relative time is an evaluation time.
Checks if a time is within a collection of evaluation times.
Serialize EmulationConfig to a JSON formatted str.
Signatures
- classmethod from_abstract_repr(obj_str)
Deserialize an EmulationConfig from an abstract JSON object.
- Parameters:
obj_str (str) – the JSON string representing the sequence encoded in the abstract JSON format.
- Returns:
The EmulationConfig instance.
- Return type:
- 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