cirq.IonDevice

class cirq.IonDevice(measurement_duration: cirq.DURATION_LIKE, twoq_gates_duration: cirq.DURATION_LIKE, oneq_gates_duration: cirq.DURATION_LIKE, qubits: Iterable[cirq.devices.line_qubit.LineQubit])[source]

A device with qubits placed on a line.

Qubits have all-to-all connectivity.

__init__(measurement_duration: cirq.DURATION_LIKE, twoq_gates_duration: cirq.DURATION_LIKE, oneq_gates_duration: cirq.DURATION_LIKE, qubits: Iterable[cirq.devices.line_qubit.LineQubit]) → None[source]

Initializes the description of an ion trap device.

Parameters
  • 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, y location.

Methods

at(position)

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

can_add_operation_into_moment(operation, moment)

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

decompose_circuit(circuit)

decompose_operation(operation)

Returns a device-valid decomposition for the given operation.

duration_of(operation)

neighbors_of(qubit)

Returns the qubits that the given qubit can interact with.

qubit_set()

Returns a set or frozenset of qubits on the device, if possible.

validate_circuit(circuit)

Raises an exception if a circuit is not valid.

validate_gate(gate)

validate_moment(moment)

Raises an exception if a moment is not valid.

validate_operation(operation)

Raises an exception if an operation is not valid.