cirq.Duration

A time delta that supports symbols and picosecond accuracy.

Used in the notebooks

Used in the tutorials

value A value with a pre-specified time unit. Currently only supports 0 and datetime.timedelta instances.
picos A number of picoseconds to add to the time delta.
nanos A number of nanoseconds to add to the time delta.
micros A number of microseconds to add to the time delta.
millis A number of milliseconds to add to the time delta.

TypeError If the given value is not of a cirq.DURATION_LIKE type.

Methods

total_micros

View source

Returns the number of microseconds that the duration spans.

total_millis

View source

Returns the number of milliseconds that the duration spans.

total_nanos

View source

Returns the number of nanoseconds that the duration spans.

total_picos

View source

Returns the number of picoseconds that the duration spans.

__add__

View source

__bool__

View source

__eq__

View source

Return self==value.

__ge__

View source

Return self>=value.

__gt__

View source

Return self>value.

__le__

View source

Return self<=value.

__lt__

View source

Return self<value.

__mul__

View source

__ne__

View source

Return self!=value.

__radd__

View source

__rmul__

View source

__rsub__

View source

__sub__

View source

__truediv__

View source