cirq.neutral_atoms.NeutralAtomDevice

A device with qubits placed on a grid.

Inherits From: Device

Used in the notebooks

Used in the tutorials

measurement_duration the maximum duration of a measurement.
gate_duration the maximum duration of a gate
control_radius the maximum distance between qubits for a controlled gate. Distance is measured in units of the indices passed into the GridQubit constructor.
max_parallel_z The maximum number of qubits that can be acted on in parallel by a Z gate
max_parallel_xy The maximum number of qubits that can be acted on in parallel by a local XY gate
max_parallel_c the maximum number of qubits that can be acted on in parallel by a controlled gate. Must be less than or equal to the lesser of max_parallel_z and max_parallel_xy
qubits Qubits on the device, identified by their x, y location. Must be of type GridQubit

ValueError if the wrong qubit type is provided or if invalid parallel parameters are provided

Methods

can_add_operation_into_moment

View source

Determines if it's possible to add an operation into a moment. An operation can be added if the moment with the operation added is valid

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

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

Raises
ValueError If either of the given moment or operation is invalid

decompose_operation

View source

Returns a device-valid decomposition for the given operation.

This method is used when adding operations into circuits with a device specified, to avoid spurious failures due to e.g. using a Hadamard gate that must be decomposed into native gates.

distance

View source

duration_of

View source

Provides the duration of the given operation on this device.

Args
operation the operation to get the duration of

Returns
The duration of the given operation on this device

Raises
ValueError If the operation provided doesn't correspond to a native gate

neighbors_of

View source

Returns the qubits that the given qubit can interact with.

qubit_list

View source

qubit_set

View source

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

Returns
If the device has a finite set of qubits, then a set or frozen set of all qubits 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.

validate_circuit

View source

Raises an error if the given circuit is invalid on this device. A circuit is invalid if any of its moments are invalid or if there is a non-empty moment after a moment with a measurement.

Args
circuit The circuit to validate

Raises
ValueError If the given circuit can't be run on this device

validate_gate

View source

Raises an error if the provided gate isn't part of the native gate set.

Args
gate the gate to validate

Raises
ValueError If the given gate is not part of the native gate set.

validate_moment

View source

Raises an error if the given moment is invalid on this device

Args
moment The moment to validate

Raises
ValueError If the given moment is invalid

validate_operation

View source

Raises an error if the given operation is invalid on this device.

Args
operation the operation to validate

Raises
ValueError If the operation is not valid

__eq__

View source

__ne__

View source