How to program Pasqal QPUs
Pasqal is a full-stack quantum computing company based in France, pioneering the use of Neutral Atoms (manipulated by optical tweezers) to build quantum processors.
Their technology is fundamentally different from superconducting circuits. Instead of fixed wires, Pasqal uses lasers to hold individual atoms (Rubidium or Strontium) in 2D or 3D arrays. This allows for arbitrary topology: you can arrange the qubits (atoms) in any shape (triangle, square, honeycombs) to match the geometry of the problem you are trying to solve.
Pasqal processors operate primarily in Analog Mode (applying pulses to the whole system to evolve the Hamiltonian), making them exceptionally powerful for quantum simulation and combinatorial optimization.
How to access Pasqal with Scaleway
The following example shows how to create a simple register, define a pulse, and send it to Fresnel QPU emulator.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account with a valid Project ID
- A Scaleway API Key (Secret Key)
- Python and Pulser installed on your local machine
-
Install the
pulser-scalewayprovider. Refer to the Pulser Scaleway GitHub repository for more information.pip install pulser-scaleway -
Create a file with the following computation script. Replace
$SCW_PROJECT_IDand$SCW_SECRET_KEYwith your Scaleway Project ID and secret key.from pulser import Pulse, Sequence, Register from pulser_scaleway import ScalewayProvider # 1. Initiate provider qaas_connection = ScalewayProvider( project_id="$SCW_PROJECT_ID", secret_key="$SCW_SECRET_KEY", ) # 2. Retrieve all QPU devices (emulated or real) and select the good one devices = qaas_connection.fetch_available_devices() fresnel_device = devices["EMU-FRESNEL-100PQ"] # 3. Create a register of trapped atoms before performing operation on them # and declare the sequence of pulses to perform on the register register = Register.square(5, 5).with_automatic_layout(fresnel_device) sequence = Sequence(register, fresnel_device) sequence.declare_channel("rydberg_global", "rydberg_global") t = sequence.declare_variable("t", dtype=int) amp_wf = BlackmanWaveform(t, np.pi) det_wf = RampWaveform(t, -5, 5) sequence.add(Pulse(amp_wf, det_wf, 0), "rydberg_global") # 4. Declare a backend based on the sequence and remote connection backend = QPUBackend(sequence=sequence, connection=qaas_connection) # 5. Run jobs with different arguments over the same sequence and register results = backend.run( job_params=[ {"runs": 100, "variables": {"t": 1000}}, {"runs": 20, "variables": {"t": 2000}}, ], wait=True, ) print("Results:", results) -
Save the script. In this example we save it as
pasqal.py. -
Run the script.
python ~/pasqal.py