← Quantum Store · Guides · Lessons · Glossary · Packages · About · Türkçe

Pasqal

Neutral atom quantum programming with Pulser

SoftwareQuantum hardwareLicence: Apache-2.0Version: 1.9.18.6 KB

Official source: pasqal-io/Pulser

Download ZIP (free)

Pulser, Pasqal's pulse-level programming library for neutral atom devices: a tested example that shows the Rydberg blockade between two atoms on the emulator.

What is Pulser?

Pulser is a library for quantum processors made of laser-trapped neutral atoms. Instead of gates you define the laser pulses directly: the positions of the atoms (the register), and the pulse's amplitude, frequency shift (detuning) and duration.

When to use it

The example in this package

notr_atom_dizisi.py excites two atoms 5 µm apart with the same pulse. Since the atoms are inside the Rydberg blockade radius, they cannot both be excited at the same time: in testing, the state 11 appeared in only 4 of 1000 samples. For comparison, move the atoms 15 µm apart and shorten the pulse to 500 ns (a π pulse): the atoms now behave independently and 11 appears in 1000 out of 1000 measurements. The same 500 ns pulse at 5 µm hardly ever produces 11 (3/1000 in testing).

Next steps

  1. Build a 9-atom square array with Register.square(3, spacing=6).
  2. Move on to the "maximum independent set" example in the Pulser tutorials.

Installation and running

pip install pulser
python notr_atom_dizisi.py

Tested with: pulser 1.9.1, Python 3.12.

Official source

Links

Package contents

Licence

The example code and the guide in this package were written by the Quantum Store editors and are MIT licensed. The project it uses is subject to its own licence (Apache-2.0).


Quantum Store — https://hakanerdogan.com/en

Example code

The example shipped in the package, run and checked. Comments and printed messages are in Turkish; the code is the same in any language. Everything is in the ZIP.

notr_atom_dizisi.py

"""Pulser ile nötr atom dizisi: kayıt (register), darbe dizisi ve emülasyon.

Birbirine yakın iki atom Rydberg ablukası nedeniyle aynı anda Rydberg
durumuna uyarılamaz. Bu örnek ablukayı emülatörde gösterir.

Çalıştırma:
    pip install pulser
    python notr_atom_dizisi.py
"""

import numpy as np
from pulser import Pulse, Register, Sequence
from pulser.devices import AnalogDevice
from pulser_simulation import QutipBackendV2

reg = Register({"a": (0, 0), "b": (5, 0)})  # 5 µm: abluka yarıçapının içinde
seq = Sequence(reg, AnalogDevice)
seq.declare_channel("rydberg", "rydberg_global")

omega = 2 * np.pi * 1.0  # rad/µs
duration = 1000  # ns
seq.add(Pulse.ConstantPulse(duration, omega, 0, 0), "rydberg")

results = QutipBackendV2(seq).run()
counts = results.final_bitstrings
shots = sum(counts.values())
print("Örneklenen durumlar:", dict(sorted(counts.items())))

both_excited = counts.get("11", 0)
print(f"{shots} örnekten iki atomun birlikte uyarıldığı: {both_excited}")
assert both_excited < 0.05 * shots, counts
print("Tamam: Rydberg ablukası gözlendi (11 durumu bastırıldı).")

← All packages

Share: X · LinkedIn