cirq.Duration¶
-
class
cirq.Duration(*, picos: Union[int, float] = 0, nanos: Union[int, float] = 0)[source]¶ A time delta that supports picosecond accuracy.
-
__init__(*, picos: Union[int, float] = 0, nanos: Union[int, float] = 0) → None[source]¶ Initializes a Duration with a time specified in ns and/or ps.
If both picos and nanos are specified, their contributions are added.
Parameters: - picos – A number of picoseconds to add to the time delta.
- nanos – A number of nanoseconds to add to the time delta.
Methods
total_nanos()Returns the number of nanoseconds that the duration spans. total_picos()Returns the number of picoseconds that the duration spans. -