Pulser Connection with Pasqal Cloud QRMI - Python Example#
Prerequisites#
Python 3.11 or 3.12
Installation of QRMI primitives Python package (qiskit-qrmi-primitives)
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 |
|---|---|
|
Quantum resource names.
Comma-separated values,
e.g. |
|
Quantum resource types.
Comma-separated values
corresponding to each Quantum
resource name specified by
|
How to run this example#
SamplerV2#
Use Pulser’s QPUBackend with PulserQRMIConnection.
Run pulser_qrmi.py:
python pulser_qrmi.py