Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
BackendTiming.round_pulse¶
- BackendTiming.round_pulse(*, time=None, samples=None)[source]¶
The number of samples giving the valid pulse duration closest to the input
The multiple of the pulse granularity giving the time closest to the input (either
time
orsamples
) is used. The returned value is always at least the backend’smin_length
.- Parameters:
time (
Optional
[float
]) – Nominal pulse duration in secondssamples (
Union
[int
,float
,None
]) – Nominal pulse duration in samples
- Return type:
int
- Returns:
The number of samples corresponding to the input
- Raises:
QiskitError – If either both
time
andsamples
are passed or neither is passed.QiskitError – The backend does not include a dt value.
QiskitError – If the algorithm used to calculate the pulse length produces a length that is not commensurate with the pulse or acquire alignment values. This should not happen unless the alignment constraints provided by the backend do not fit the assumptions that the algorithm makes.