cirq.circuits.circuit.Circuit, new_device: Union[, NoneType] = None, qubit_map: Callable[cirq.ops.raw_types.QubitId, cirq.devices.grid_qubit.GridQubit] = <function <lambda>>) → cirq.circuits.circuit.Circuit[source]

Optimizes a circuit with XmonDevice in mind.

Starts by converting the circuit’s operations to the xmon gate set, then begins merging interactions and rotations, ejecting pi-rotations and phasing operations, dropping unnecessary operations, and pushing operations earlier.

  • circuit – The circuit to optimize.
  • new_device – The device the optimized circuit should be targeted at. If set to None, the circuit’s current device is used.
  • qubit_map – Transforms the qubits (e.g. so that they are GridQubits).

The optimized circuit.