Pulser Connection with Pasqal Cloud QRMI - Python Example#


Prerequisites#

Install dependencies#

Assuming your Python virtual environment is located at ~/py311venv_qrmi_primitives/bin/activate:

source ~/py311venv_qrmi_primitives/bin/activate
pip install -r requirements.txt

Set environment variables#

Because QRMI is an environment variable driven software library, all configuration parameters must be specified in environment variables. The required environment variables are listed below. This example assumes that a .env file is available under the current directory.

Common#

When run as a job in a Slurm cluster, these environment variables are set by the SPANK plugin.

Environment variables

Descriptions

QRMI_JOB_QPU_RESOURCES

Quantum resource names. Comma-separated values, e.g. FRESNEL

QRMI_JOB_QPU_TYPES

Quantum resource types. Comma-separated values corresponding to each Quantum resource name specified by QRMI_JOB_QPU_RESOURCES. Supported types: pasqal-cloud

How to run this example#

SamplerV2#

Use Pulser’s QPUBackend with PulserQRMIConnection.

Run pulser_qrmi.py:

python pulser_qrmi.py