/neutral-atom-toolkit:noise-emulate [sequence-description-or-file]from neutral-atom-toolkit
Emulates a neutral-atom Pulser sequence under a live Rydberg device noise model, producing noiseless and noisy trajectory curves with quantile envelopes. Supports local, GPU cluster, or Pasqal Cloud execution.
Ships in neutral-atom-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Emulate a Pulser sequence's time evolution with the target device's noise model (fetched live from the Pasqal Cloud — includes SPAM, amplitude, dephasing, detuning, Doppler, relaxation).
Choosing the device — all modes accept --device-name (default FRESNEL_CAN1):
--device-name SA1 and set PASQAL_REGION=sa (SA1 lives in the
sa cloud region and is invisible without it); your project must have SA1
access. Verify the exact device key with sdk.get_device_specs_dict().keys().AnalogDevice
constraints instead, and submit through submit-to-cea.The user never needs to touch the Python scripts: this skill reads their sequence, writes the builder, runs everything, and shows the result.
Not even under "just run the noise study". Ask, recommend, and wait:
--noise-source)After about three failed attempts at the same obstacle — a builder that will not import, jobs that keep erroring, an out-of-memory at every χ — stop. Report what was tried, what failed and what is known, then offer a smaller system, a different mode, or abandoning the study. It is a diagnostic, not a gate: "we could not run this affordably" is an acceptable outcome, and a better one than a week of GPU time.
Beside the experiment they belong to, as they are produced:
experiments/<name>/results/noise/ .npz or .json data, logs, run figures
experiments/<name>/figures/ figures made for the report
experiments/<name>/analysis/ any script you write to read these files
experiments/<name>/NOTEBOOK.md one appended block per run
Each script prints where it runs as its first line (RUNS ON: …) — say the same
to the user before starting, because "the envelope is ±0.03" means one thing
from 40 GPU trajectories and another from 5 cloud batches.
Paths like support/… below are relative to this skill's directory —
expand them to the skill's absolute location when running commands from your
project directory (keep outputs like --out-dir in your project, not the plugin).
support/
run_noise_emu.py ← MPS trajectory runner (local + cluster modes)
plot_noise_emu.py ← trajectory envelope figure
submit_slurm.sh ← turnkey SLURM launcher (one GPU job per trajectory)
run_noise_emu_cloud.py ← Pasqal Cloud EMU_MPS runner (cloud mode)
plot_noise_emu_cloud.py ← cloud results figure
requirements.txt ← Python dependencies (local/cluster modes)
spec_noise.py ← the source's own noise model, if it has one (shared)
batch_tags.py ← the labels every batch carries (shared, do not edit here)
pasqal_auth.py ← credentials, projects and credits (shared, do not edit here)
Always ask this first. Present the three options as a choice — use your harness's interactive question mechanism if it has one, plain text otherwise — with the recommended option marked:
Where should the emulation run?
- Locally — on this machine. Fine for small systems / quick tests; a CUDA GPU helps a lot. Trajectories run sequentially in one process.
- On a GPU cluster (recommended) — one GPU job per trajectory, all trajectories in parallel. By far the fastest for full 40-trajectory envelopes. Requires
sbatchon the current machine.- Via Pasqal Cloud — runs on the Pasqal Cloud EMU_MPS emulator fleet. No GPU or cluster needed, only Pasqal Cloud credentials. Best when you have no local compute; queue times apply and quality degrades for large registers (N ≳ 60–100).
Quick heuristics if the user has no preference: which sbatch succeeds → cluster;
otherwise a CUDA GPU present (nvidia-smi) → local; otherwise → cloud.
Users arrive with a register size and expect the emulator to either handle it or
refuse. It does neither: it runs whatever it is given, and how much of the answer
is real depends on --max-chi. Explain the three knobs before agreeing to a run,
because they trade against each other:
| Knob | What it costs | What too little looks like |
|---|---|---|
N (atoms) | bond dimension needed grows with entanglement, not with N alone | nothing — the failure shows up as χ being too small |
--max-chi (χ) | memory and time, steeply | a smooth, plausible, wrong curve |
--n-traj | linear; each trajectory is an independent GPU job on SLURM | a noise band too jagged to read |
χ is an accuracy knob, not a size knob. Lowering it to fit 60 atoms on one GPU does not trade size for a coarser answer, it trades size for an answer whose error is invisible: MPS truncation does not warn, it just returns a state that cannot hold the entanglement the dynamics generated. An adiabatic sweep through a transition is the worst case, since that is where entanglement peaks.
Do not go hunting for the right χ. It is the most tempting way to burn a week here, and it does not converge on an answer: at a size where χ matters, no χ this GPU can hold is ever large enough, and each attempt costs more than the last. The decision has two branches and no search:
--max-chi default of 128 was validated against χ=200 for S(π,π), local and
two-point observables on systems up to 6×6, agreeing to ~0.05% (t_fall sweep,
2026-06). That class of observable, at that size, needs nothing further.One step up in χ, if the user asks for it, is fine. A sweep over χ is not: it answers a question the QPU is going to answer anyway, and a curve defended by "we tried several χ and picked the one that looked stable" is not defensible.
Which observable is asked for decides which branch you are in: ⟨n⟩, S(K) and correlators need far less χ than entanglement entropy, full bitstring distributions or higher moments — those leave the calibrated envelope immediately, whatever N is.
--n-traj 5 --max-chi 64 stays useful as a smoke test, whose curve nobody
should quote.
Then read the user's sequence carefully:
Pasqal Cloud credentials (needed in every mode — the noise model is fetched live).
Each field is resolved independently: environment variables first, then the
system keyring (password only), then ~/.pasqal_credentials.json.
export PASQAL_USERNAME=... PASQAL_PASSWORD=... PASQAL_PROJECT_ID=...
On a shared machine or in a cluster job script, prefer the environment variables —
they are the only option that keeps the password off disk. Alternatively run
any of the scripts below in a terminal with nothing configured: it offers a
one-time setup that puts the password in the OS keyring and only the username
and project ID in ~/.pasqal_credentials.json (chmod 600). Storing the
password in that file works too, and the scripts will warn you that it is
plaintext.
Python environment (local and cluster modes):
python3 -m venv ~/pulser-venv
source ~/pulser-venv/bin/activate
pip install -r support/requirements.txt
CI pins pulser 1.9.0 and checks that sequences build and observables are correct
against it. The full local stack — emu-mps 2.7.5, torch 2.9.0, pasqal-cloud
0.22.0 — was last exercised end-to-end in 2026-06 against pulser 1.8.0, and has
not been re-run since; treat a failure on a newer pulser as a version problem
before assuming your sequence is wrong.
For GPU, install PyTorch for your CUDA version from pytorch.org first.
If a suitable venv already exists, point the skill at it with export PULSER_VENV=<path>.
Cloud mode only needs pulser, pulser-pasqal and pasqal-cloud (no emu-mps/torch).
Write seq_builder.py with this signature (fully built, not parametric):
def build_sequence(
N: int = 6,
hx: float = 4.0,
t: int = 4000, # pulse duration in ns
omega_offset: float = 1.0, # multiplicative Ω scale
delta_offset: float = 0.0, # additive δ in MHz
R_offset: float = 1.0, # multiplicative lattice spacing scale
**kwargs,
) -> pulser.Sequence: ...
Use AnalogDevice for emulation; call with_automatic_layout(AnalogDevice) if
spacing < 10 µm. For EOM/quench sequences use the mean-field detuning at the
central site:
import numpy as np, pulser
from pulser import Sequence
from pulser.devices import AnalogDevice
from pulser.register.special_layouts import SquareLatticeLayout
def build_sequence(N=6, hx=4.0, t=4000,
omega_offset=1.0, delta_offset=0.0, R_offset=1.0, **kwargs):
omega = 2 * np.pi * 2.0
C6 = AnalogDevice.interaction_coeff
R = (hx * 2 * C6 / (4 * omega)) ** (1/6)
coords = SquareLatticeLayout(N, N, R * R_offset).coords
register = pulser.Register.from_coordinates(coords, prefix="q")
if R * R_offset < 10:
register = register.with_automatic_layout(AnalogDevice)
ci = (N//2)*N + N//2
dist = np.linalg.norm(coords - coords[ci], axis=-1); dist[ci] = np.inf
delta = C6 * np.sum(1.0 / dist**6) + 2 * np.pi * delta_offset
seq = Sequence(register, AnalogDevice)
seq.declare_channel("ising", "rydberg_global")
seq.enable_eom_mode("ising", amp_on=omega*omega_offset, detuning_on=delta)
seq.add_eom_pulse("ising", duration=t, phase=0.0)
seq.disable_eom_mode("ising")
return seq
The cloud runner follows the spec-to-sequence contract instead: the file must
export build_sequence(device=None, **params) (observation time in ns as a
kwarg, default name t) and compute_observable(counts) -> float. If the
user brings a raw sequence, wrap it into this contract; default to mean Rydberg
density if no observable is specified, and say so.
source "${PULSER_VENV:-$HOME/pulser-venv}/bin/activate"
python support/run_noise_emu.py \
--seq-file experiments/<name>/<name>_sequence.py \
--fn-name build_sequence \
--seq-kwargs '{"N": 6, "hx": 4.0, "t": 4000}' \
--n-traj 40 \
--max-chi 128 \
--n-times 75 \
--out-dir experiments/<name>/results/noise/ \
--cal-offsets '{"omega_offset": 0.03, "delta_offset": 0.2, "R_offset": 0.01}' \
[--spec experiments/<name>/<name>_spec.json --noise-source device|paper]
Free and local: no batch is submitted and nothing is billed — the one cloud call
reads the device's noise model. Pass --spec if the source described its own
noise model: the script prints the difference against the device's field by
field, and --noise-source paper runs the source's instead. It never
substitutes it silently.
--cal-offsets adds a sensitivity band: ±3% on ω, ±0.2 MHz on δ, ±1% on R
(6 extra noiseless runs). If a QPU manifest from qpu-submit exists, ask the
user whether to add --qpu-manifest <path> — this runs the noisy trajectories
at the measured calibrated parameters for a fair comparison with QPU data.
Typical runtime on one A100: 3–8 min per noisy trajectory, so a full 40+1 run is
hours — run it with nohup/background for large systems, or use --n-traj 5 --max-chi 64 for quick tests. The last printed line is the output .npz path.
SEQFILE=experiments/<name>/<name>_sequence.py \
SEQKWARGS='{"N":6,"hx":4.0,"t":4000}' \
OUTDIR=experiments/<name>/results/noise \
NTRAJ=40 CHI=128 \
PARTITION=<your_partition> GRES=gpu:a100:1 ACCOUNT=<your_account> \
bash support/submit_slurm.sh
The launcher (1) fetches the noise model once on the login node (compute nodes
are usually offline) → OUTDIR/noise_model.json, (2) submits a SLURM array
0..NTRAJ — one GPU per trajectory, id 0 = noiseless — and (3) submits a
dependent merge+plot job. Set PARTITION/GRES/ACCOUNT/TIME to your
site's values; on a shared cluster cap concurrency with ARRAY_MAX=10.
Watch with squeue -u $USER | grep nemu; figure appears at OUTDIR/noise_plot.png.
Wall time per trajectory (N=6, χ=128, dt=10): ~8–14 min on A100; the whole array
finishes in roughly one trajectory's wall time when GPUs are free. For larger N
or entanglement/full-distribution observables, raise CHI (200+) and re-validate
convergence at the longest evolution time.
python support/pasqal_auth.py --whoami # free, read-only: account, projects, credits
python support/run_noise_emu_cloud.py \
--seq-file experiments/<name>/<name>_sequence.py \
--spec experiments/<name>/<name>_spec.json \
--seq-kwargs '{"N": 5, "hx": 6.0}' \
--t-max 4000 \
--n-times 15 \
--shots 500 \
--project-id <the project the user picked> \
--out-dir experiments/<name>/results/noise/ \
[--tag "envelope run 2"] [--noise-source device|paper]
Emulator time is billed to a project, so the user picks it. --whoami is
free and read-only: it prints which account was found, where each credential came
from, and the QPU and EMU credits each of their projects has left — no password,
no token. Show it, ask which project pays, and pass --project-id. The script
refuses without it: the id in PASQAL_PROJECT_ID is the last one somebody
exported, not a decision.
--spec is optional but worth passing: it supplies the batch labels
(exp:<name>, stage:noise-emulate, backend:…, t:…, noise:…, plus your
--tags) and, if the source described its own noise model, it is what
--noise-source paper switches to. Without it the labels fall back to the
sequence file's name and only the device's model is available.
The cloud can't sample mid-evolution states, so this builds one sequence per
observation time (what the real QPU does) and submits noiseless + noisy
EMU_MPS batches per point. Batch budget = n_times × (2 + n_envelope); warn the
user beyond ~100 batches. --n-envelope K adds K independent noisy batches per
point for a client-side quantile band. Batch IDs are saved immediately; if the
session dies mid-poll, re-run with --resume and the same --out-dir; a
re-run without --resume into a directory that already records batches is
refused.
NOISE=experiments/<name>/results/noise
# local / cluster (.npz):
python support/plot_noise_emu.py \
--result $NOISE/FCAN1_*.npz --out $NOISE/noise_plot.png --coverage 0.75
# cloud (.json):
python support/plot_noise_emu_cloud.py \
--results $NOISE/noise_emu_cloud.json \
--out $NOISE/noise_emu_cloud.png
Save figures as .png only, next to the data they came from. A figure you make
for the report — annotated, or comparing two runs — goes in
experiments/<name>/figures/, never in the working directory's root.
--cal-offsets was used and the calibration band is much wider than the
stochastic band, flag that calibration precision matters more than noise.validate-emu NO-GO, the next step is the protocol change
the envelope suggests, then re-running validate-emu — its cloud verdict is
still the only thing that gates a QPU submission.NOTEBOOK.md block.| Issue | Fix |
|---|---|
Pasqal Cloud credentials incomplete | See First-time setup above; the message names the missing fields |
<device> not in available devices | Cloud SDK connection failed or device hidden from the project (for SA1: is PASQAL_REGION=sa set?); retry / check project |
build_sequence not found | Pass --fn-name <name> |
| Builder returned a parametric sequence | Call .build(...) inside the builder |
| GPU OOM (local/cluster) | Reduce N, not χ. Lowering --max-chi to make it fit buys a curve whose truncation error is invisible, and no χ that fits will settle it — emulate a sub-system that stays inside the calibrated envelope instead |
emu_mps not found | Wrong virtualenv; install from requirements.txt |
partial_*.npz missing after SLURM job | Check the .err log: time limit, OOM, or missing venv |
| Cloud batches stuck PENDING | Queue congestion — normal; re-poll later with --resume |
| Cloud batch ERROR on large N | Cloud EMU_MPS degrades for N ≳ 60–100; reduce N or use the cluster or local mode |
experiments/<name>/results/noise/
# local / cluster
FCAN1_<kwargs>_ntraj40_chi128_<timestamp>.npz ← raw data (self-documenting:
noise_plot.png embeds noise model + kwargs)
# cloud
batch_ids.json ← submitted batches, their labels (for --resume)
noise_emu_cloud.json ← per-time records
noise_emu_cloud.png
Then append the block to experiments/<name>/NOTEBOOK.md: where it ran, the
budget actually used (N, χ, trajectories, time points), which noise model, the
files written, and what the envelope says. A .npz whose provenance lives only
in a chat log is a file nobody will trust in a month.
support/batch_tags.py (opens in a new tab)support/pasqal_auth.py (opens in a new tab)support/plot_noise_emu.py (opens in a new tab)support/plot_noise_emu_cloud.py (opens in a new tab)support/requirements.txt (opens in a new tab)support/run_noise_emu.py (opens in a new tab)support/run_noise_emu_cloud.py (opens in a new tab)support/spec_noise.py (opens in a new tab)support/submit_slurm.sh (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pasqal-io/agent-marketplace --plugin neutral-atom-toolkit11 skills in this plugin
/application-to-ideaScope a rough problem or application into a first technical idea for a neutral-atom (Rydberg) QPU: which documented Pulser method could serve it — MIS, QUBO, an Ising or XY simulation, a graph kernel — what would be measured, at what size, or an honest no-fit. Writes a note for idea-to-spec; use idea-to-spec when a protocol or paper exists. Triggered by phrases like "can neutral atoms do anything with my problem", "is this a fit for a Rydberg QPU", "I don't know what to measure on the QPU"./apply-genci-tgcc-ceaApply for QPU hours on Ruby (Pasqal Orion), the analogue neutral-atom machine at GENCI/CEA TGCC - via the French eDARI portal or the EuroHPC Quantum Access Pilot call - then get the TGCC computing account. For requests such as "apply for TGCC hours", "eDARI application", "apply for Ruby/Pasqal QPU allocation", "EuroHPC quantum hours", "Quantum Access Pilot", or "attach to a project / rattachement". Access only, not running experiments. Unsure which route fits? Use choose-access-method./choose-access-methodDecide which neutral-atom QPU access route to pursue - free CEA/GENCI/ EuroHPC access to Ruby (weeks of lead time, specific eligibility) versus Pasqal Cloud pay-as-you-go (today, any country, a card). For requests such as "how do I get QPU access", "which account should I use", "Pasqal Cloud vs CEA", "do I qualify for free QPU time", or "fastest way to real hardware". Hands off to create-pasqal-cloud-account or apply-genci-tgcc-cea: this skill is the decision, not the sign-up flow./create-pasqal-cloud-accountGet access to Pasqal Cloud - create the account on portal.pasqal.cloud and optionally couple it to Google Cloud Marketplace, which is what makes real QPUs and the advanced emulators available. For requests such as "create a Pasqal Cloud account", "I need a PASQAL_PROJECT_ID", "subscribe to Pasqal on GCP Marketplace", "how do I run on FRESNEL", or "my project only shows EMU_FREE". Access only, not running experiments. Unsure which route fits? Use choose-access-method./harvest-and-analyzeCollect neutral-atom QPU bitstrings by batch ID once a submission has run, correct them for detection error, compute the target observable, compare it to the emulated baseline from validate-emu, and return an accept/reject verdict. Runs after a submission, never instead of one. Triggered by phrases like "collect the QPU results", "harvest these batch IDs", "compare the QPU data to the emulation", "is the QPU data consistent with the noise model"./idea-to-specTurn a source describing a neutral-atom (Rydberg) experiment — a paper, a patent, a PDF, an arXiv ID, an idea note, or a protocol described in conversation — into a structured experiment_spec.json: register, drive, scan, observable, open questions. The spec is the input contract for spec-to-sequence, validate-emu, qpu-submit and harvest-and-analyze. Triggered by phrases like "turn this paper into a neutral-atom experiment spec", "extract the Rydberg protocol", "idea to spec".Other plugins' skills for the same job