We're celebrating World Quantum Day 2022! Join us

cirq_google.devices.XmonDevice

THIS CLASS IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

XmonDevice will no longer be supported.

measurement_duration The maximum duration of a measurement.
exp_w_duration The maximum duration of an ExpW operation.
exp_11_duration The maximum duration of an ExpZ operation.
qubits Qubits on the device, identified by their x, y location.

metadata Return the metadata for this device

Methods

at

View source

Returns the qubit at the given position, if there is one, else None.

can_add_operation_into_moment

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

can_add_operation_into_moment will be removed in the future. Consider using device.validate_circuit instead.

Determines if it's possible to add an operation into a moment.

    For example, on the XmonDevice two CZs shouldn't be placed in the same
    moment if they are on adjacent qubits.

    Args:
        operation: The operation being added.
        moment: The moment being transformed.

    Returns:
        Whether or not the moment will validate after adding the operation.

col

View source

Returns the qubits in the given column, in ascending order.

decompose_operation

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

XmonDevice.decompose_operation is deprecated. Please use cirq.optimize_for_target_gateset() and cirq.CZTargetGateset.

duration_of

View source

is_supported_gate

View source

Returns true if the gate is allowed.

neighbors_of

View source

Returns the qubits that the given qubit can interact with.

qid_pairs

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

qubit coupling data can now be found in device.metadata if provided.

Returns a set of qubit edges on the device, if possible.

    This property can be overridden in child classes for special handling.
    The default handling is: GridQids and LineQids will have neighbors as
    edges, and others will be fully connected.

    Returns:
        If the device has a finite set of qubits, then a set of all edges
        on the device is returned.

        If the device has no well defined finite set of qubits (e.g.
        `cirq.UnconstrainedDevice` has this property), then `None` is
        returned.

qubit_set

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

Use metadata.qubit_set if applicable.

row

View source

Returns the qubits in the given row, in ascending order.

validate_circuit

View source

Raises an exception if a circuit is not valid.

Args
circuit The circuit to validate.

Raises
ValueError The circuit isn't valid for this device.

validate_gate

View source

Raises an error if the given gate isn't allowed.

Raises
ValueError Unsupported gate.

validate_moment

View source

Raises an exception if a moment is not valid.

Args
moment The moment to validate.

Raises
ValueError The moment isn't valid for this device.

validate_operation

View source

Raises an exception if an operation is not valid.

Args
operation The operation to validate.

Raises
ValueError The operation isn't valid for this device.

__eq__