Serializes the given device information into a DeviceSpecification proto.
cirq_google.devices.grid_device.create_device_specification_proto(
*,
qubits: Collection[cirq.GridQubit],
pairs: Collection[Tuple[cirq.GridQubit, cirq.GridQubit]],
gateset: cirq.Gateset,
gate_durations: Optional[Dict['cirq.GateFamily', 'cirq.Duration']] = None,
out: Optional[cirq_google.api.v2.device_pb2.DeviceSpecification
] = None
) -> cirq_google.api.v2.device_pb2.DeviceSpecification
Args |
qubits
|
Collection of qubits available on the device.
|
pairs
|
Collection of bidirectional qubit couplings available on the device.
|
gateset
|
The gate set supported by the device.
|
gate_durations
|
Optional mapping from gates supported by the device to their timing
estimates. Not every gate is required to have an associated duration.
|
out
|
If set, device information will be serialized into this DeviceSpecification.
|
Raises |
ValueError
|
If a qubit in pairs is not part of qubits .
|
ValueError
|
If a pair contains two identical qubits.
|
ValueError
|
If gate_durations contains keys which are not in gateset .
|
ValueError
|
If gateset contains a gate which is not recognized by DeviceSpecification.
|