cirq.Circuit.with_device

Circuit.with_device(new_device: cirq.devices.device.Device, qubit_mapping: Callable[cirq.ops.raw_types.Qid, cirq.ops.raw_types.Qid] = <function Circuit.<lambda>>) → cirq.circuits.circuit.Circuit[source]

Maps the current circuit onto a new device, and validates.

Parameters:
  • new_device – The new device that the circuit should be on.
  • qubit_mapping – How to translate qubits from the old device into qubits on the new device.
Returns:

The translated circuit.