SequenceSamples
- class pulser.sampler.SequenceSamples(channels, samples_list, _ch_objs, _basis_ref=<factory>, _slm_mask=<factory>, _magnetic_field=None, _measurement=None)
Bases:
object
Gather samples for each channel in a sequence.
Attributes
Mapping between the channel name and its samples.
The basis of eigenstates used for simulation.
The maximum duration among the channel samples.
The bases with non-zero pulses.
channels
samples_list
Methods
Extend the duration of each samples to a new duration.
Format in the nested dictionary form.
Signatures
- extend_duration(new_duration)
Extend the duration of each samples to a new duration.
- Return type:
- to_nested_dict(all_local=False, samples_type='array')
Format in the nested dictionary form.
This is the format expected by pulser_simulation.QutipEmulator().
- Parameters:
all_local (
bool
, default:False
) – Forces all samples to be distributed by their individual targets, even when applied by a global channel.samples_type (
Literal
['abstract'
,'array'
,'tensor'
], default:'array'
) – The array type to return the samples in. Can be “array” (the default), “tensor” or “abstract”.
- Return type:
dict
- Returns:
A nested dictionary splitting the samples according to their addressing (‘Global’ or ‘Local’), the targeted basis and, in the ‘Local’ case, the targeted qubit.
- property channel_samples: dict[str, ChannelSamples]
Mapping between the channel name and its samples.
- property eigenbasis: list[Literal['u', 'd', 'r', 'g', 'h', 'x']]
The basis of eigenstates used for simulation.
- property max_duration: int
The maximum duration among the channel samples.
- property used_bases: set[str]
The bases with non-zero pulses.