cirq.IonDevice

A device with qubits placed on a line.

Inherits From: Device

Qubits have all-to-all connectivity.

measurement_duration The maximum duration of a measurement.
twoq_gates_duration The maximum duration of a two qubit operation.
oneq_gates_duration The maximum duration of a single qubit operation.
qubits Qubits on the device, identified by their x location.

TypeError If not all the qubits supplied are cirq.LineQubits.

metadata Returns the associated Metadata with the device if applicable.

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.

decompose_circuit

View source

decompose_operation

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

Use cirq.ConvertToIonGates() instead to decompose operations.

duration_of

View source

neighbors_of

View source

Returns the qubits that the given qubit can interact with.

qid_pairs

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

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

Qubits have all-to-all connectivity, so returns all pairs.

    Returns:
        All qubit pairs on the device.

qubit_set

View source

THIS FUNCTION IS DEPRECATED.

IT WILL BE REMOVED IN cirq v0.15.

Use metadata.qubit_set if applicable.

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

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__

View source