1# Pasqal Devices 2 3This section describes the devices in Cirq for Pasqal hardware devices and their usage. 4While our hardware is currently under development, this information should provide a 5better understanding of the capabilities of future Pasqal devices, where neutral atoms 6are controlled by lasers. Please contact Pasqal to obtain the latest information 7on devices that you plan to use. 8 9Currently, there are two devices to choose from: `cirq.pasqal.PasqalDevice` and `cirq.pasqal.PasqalVirtualDevice`. Let us look at the role each of them plays. 10 11## `PasqalDevice` 12 13The `cirq.pasqal.PasqalDevice` class represents the most general of Pasqal devices, enforcing only restrictions expected to be shared by all future devices. 14 15### Gate set 16One of the restrictions is on the supported gate set, which is composed of the following gates (all present in the `cirq.ops` module): 17 18 * Single-qubit gates: 19 20 * `IdentityGate` 21 * `MeasurementGate` 22 * `PhasedXPowGate` 23 * `XPowGate` 24 * `YPowGate` 25 * `ZPowGate` 26 * `HPowGate(exponent=1)` 27 28 * Multi-qubit gates 29 30 * `CNotPowGate(exponent=1)` 31 * `CZPowGate(exponent=1)` 32 * `CCXPowGate(exponent=1)` 33 * `CCZPowGate(exponent=1)` 34 35Any gate appended to a `cirq.Circuit` associated with `PasqalDevice` that is not within this gate set will be, whenever possible, decomposed by Cirq's decomposer or otherwise rejected. 36 37### Measurement limitation 38 39The other restriction is on the measurement operation, which has to occur only once, at the end of the circuit, and simultaneously on all the qubits of interest. It can correspond to a single `cirq.ops.GateOperation` with a `cirq.ops.MeasurementGate` applied on all the qubits of interest (recommended) or multiple measurement operations, as long as they are all in the same moment. 40 41### Usage 42 43The `PasqalDevice` is intended to serve as the parent class of future Pasqal devices' classes. However, it can also be used as the host of a nearly unconstrained quantum circuit. 44 45When using the `PasqalDevice` class as the device itself, the qubits have to be of the type `cirq.NamedQubit` and assumed to be all connected, the idea behind it being that after submission, all optimization and transpilation necessary for its execution on the specified device are handled internally by Pasqal. 46 47Therefore, when a `PasqalDevice` hosts a circuit, the user submits a quantum circuit that is intentionally unaffected by the physical limitations of the device, leaving it up to Pasqal's compiler to adapt it so that it can be executed. 48 49## `PasqalVirtualDevice` 50 51Contrary to `PasqalDevice`, `PasqalVirtualDevice` allows the user to create a circuit that is then executed without modification on a physical device. It achieves this by imposing the expected restrictions that come with designing a quantum circuit for execution on a physical device. The added restrictions are imposed throughout the creation of a circuit so that, at any point, it could be executed without any changes. 52 53 54### Qubit placement and connectivity 55 56Qubits on Pasqal devices can be in arbitrary positions, either in 1D, 2D or 3D, and can be 57created via the `cirq.pasqal.ThreeDQubit`, `cirq.pasqal.TwoDQubit`, `cirq.GridQubit` or `cirq.LineQubit` classes. 58 59```python 60from cirq.pasqal import TwoDQubit 61 62# An array of 9 Pasqal qubits on a square lattice in 2D 63p_qubits = [TwoDQubit(i, j) for i in range(3) for j in range(3)] 64 65# Equivalently, using one of Pasqal's qubit classes' static methods for qubit register creation 66p_qubits = TwoDQubit.square(3) # Initializes qubits in a square grid of side 3 67 68``` 69 70Connectivity is limited to qubits that are closer than a control radius. In the current 71version, the control radius can be chosen by the user and passed as a parameter of the 72`cirq.pasqal.PasqalVirtualDevice`; it is constrained to be at most three times the minimum 73distance between all qubits in the layout. 74 75```python 76from cirq.pasqal import PasqalVirtualDevice 77 78# A PasqalVirtualDevice with a control radius of 2.0 times the lattice spacing. 79p_device = PasqalVirtualDevice(control_radius=2.0, qubits=p_qubits) 80 81``` 82 83### Gate set restrictions 84 85To the gate set allowed by `PasqalDevice`, `PasqalVirtualDevice` removes the `CNotPowGate`, `CCXPowGate` and `CCZPowGate(exponent=1)`, which are not expected to be available in the first generation of devices. 86 87### Timing restrictions 88 89Currently, no parallelization is allowed by `PasqalVirtualDevice`, which means that each gate is forced to be the only one in its `Moment` (except for Measurement gates on different qubits, which have to coexist in the final `Moment` of the circuit). 90