|View source on GitHub|
Determines if two circuits have equivalent effects.
cirq.circuits.Circuit, atol: float ) -> None
The circuits can contain measurements, but the measurements must be at the end of the circuit. Circuits are equivalent if, for all possible inputs, their outputs (classical bits for lines terminated with measurement and qubits for lines without measurement) are observationally indistinguishable up to a tolerance. Note that under this definition of equivalence circuits that differ solely in the overall phase of the post-measurement state of measured qubits are considered equivalent.
For example, applying an extra Z gate to an unmeasured qubit changes the effect of a circuit. But inserting a Z gate operation just before a measurement does not.
||The circuit that was actually computed by some process.|
||A circuit with the correct function.|
||Absolute error tolerance.|