Skip to main content

Azure quantum provider for Pulser

Azure quantum provider implementation to use neutral atoms based quantum computers.

Pulser Azure is a Python package to run quantum sequence on Azure Quantum infrastructure, providing access to Pasqal neutral atom quantum computers.

Installation

pip install pulser-azure

Getting started

To instantiate the AzureConnection, you need to provide a resource_id

from pulser_azure import AzureConnection

connection = AzureConnection(
    resource_id="/subscriptions/<your-subscription-id>/resourceGroups/<your-resource-group-name>/providers/Microsoft.Quantum/Workspaces/<your-workspace-name>",
)

Alternatively, the AzureConnection can discover your resource from environment variables:

export PULSER_AZURE_RESOURCE_ID="/subscriptions/<your-subscription-id>/resourceGroups/<your-resource-group-name>/providers/Microsoft.Quantum/Workspaces/<your-workspace-name>"

Then you can instantiate the provider without any arguments:

from pulser_azure import AzureConnection

connection = AzureConnection()

Now you have access to the supported backends and can design your pulse sequence. See the technical documentation on how to write a sequence.

from pulser_azure import AzureConnection
from pulser.pulse import Pulse
from pulser import QPUBackend, Sequence, Register

connection = AzureConnection()

# Retrieve all QPU devices
devices = connection.fetch_available_devices()
device = devices["pasqal.qpu.fresnel-can1"]

# Create a register of trapped atoms before performing operation on them
register = Register.square(5, 5).with_automatic_layout(device)

# Declare the sequence of pulses to perform on the register
sequence = Sequence(register, device)
sequence.declare_channel("rydberg", "rydberg_global")
omega_max = sequence.declare_variable("omega_max")

# Add a pulse to that channel with the amplitude omega_max
generic_pulse = Pulse.ConstantPulse(100, omega_max, 2, 0.0)
sequence.add(generic_pulse, "rydberg")

# Declare a backend based on the sequence and remote connection
backend = QPUBackend(sequence=sequence, connection=connection)

# Run jobs with different arguments over the same sequence and register
results = backend.run(
    job_params=[
        {"runs": 5, "variables": {"omega_max": 12}},
        {"runs": 10, "variables": {"omega_max": 6}},
    ],
    wait=True,
)

Contributing

Prerequisites

This project uses uv for dependency and environment management.

Setting up your environment

Clone the repository and sync the dev environment (this installs the project plus all dev dependencies into a local .venv):

git clone https://github.com/pasqal-io/pulser-azure.git
cd pulser-azure
uv sync

Running the test suite

uv run pytest

Linting and formatting

This project uses ruff for both linting and formatting:

uv run ruff check .          # lint
uv run ruff check . --fix    # lint and auto-fix
uv run ruff format .         # format

Pre-commit hooks

To automatically run ruff (and other checks) before each commit, install the pre-commit hooks:

uv run pre-commit install

You can run all hooks manually against the whole repo with:

uv run pre-commit run --all-files

Releasing

git tag -a v1.2.3 -m "Release 1.2.3"
git push origin v1.2.3

License

License Apache 2.0

Metadata

Release files for pulser-azure 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulser-azure 0.1.1
File Size Uploaded
pulser_azure-0.1.1.tar.gz 206.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pulser-azure 0.1.1
File Interpreter ABI Platform
pulser_azure-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 219.0 kB

Release files / pulser_azure-0.1.1.tar.gz

Download URL pulser_azure-0.1.1.tar.gz
Size 206.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6f24801ca097169f556938675b1d0e9d973e3743f84b832adfc80cbdf154467
BLAKE2b-256 checksum
How to use checksums
23a37540dff959f4a8a8a97d7d9fe543a34c0c1cbc382af7d8ba1ba631f84ada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pulser_azure-0.1.1-py3-none-any.whl

Download URL pulser_azure-0.1.1-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07d05be22a038064b6ffee56a1918f30abd3f0567b3087e3e5325ee945c40a31
BLAKE2b-256 checksum
How to use checksums
d184471a67028fe606410e651318d725aea03aeda5939b9ef69e3307626d8a1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page