cirq.Timestamp

class cirq.Timestamp(*, picos: Union[int, float] = 0, nanos: Union[int, float] = 0)[source]

A location in time with picosecond accuracy.

Supports affine operations against Duration.

__init__(*, picos: Union[int, float] = 0, nanos: Union[int, float] = 0) → None[source]

Initializes a Timestamp with a time specified in ns and/or ps.

The time is relative to some unspecified “time zero”. If both picos and
nanos are specified, their contributions away from zero are added.
Parameters:
  • picos – How many picoseconds away from time zero?
  • nanos – How many nanoseconds away from time zero?

Methods

raw_picos() The timestamp’s location in picoseconds from arbitrary time zero.