Cause: This error occurs when accessing IBM Quantum backends using an Open Plan account on IBM Quantum Platform.
What to check:
- Setup
python3.11 -m venv ~/{your_pyenv}
source ~/{your_pyenv}/bin/activate
pip install qiskit-ibm-runtime- Create
test.py
Replace SERVICE_CRN and API_KEY values with your credentials, with your backend name.
"""A testcase to check if Qiskit Session can be created with the given credentials"""
from qiskit_ibm_runtime import QiskitRuntimeService, Session
SERVICE_CRN="YOUR_SERVICE_CRN"
API_KEY="YOUR_APIKEY"
service = QiskitRuntimeService(
channel="ibm_cloud",
instance=SERVICE_CRN,
token=API_KEY,
)
backend = service.backend("<your backend name>")
with Session(backend=backend, max_time=1) as session:
print("Succeeded in obtaining a Qiskit Session")- Run this testcase
python test.pyThis will fail due to the error like:
You are not authorized to run a session when using the open plan.How to resolve:
- Use a Premium Plan account, or
- Use Batch execution mode
- Add
QRMI_IBM_QRS_SESSION_MODEenvironment variable with "batch" in your qrmi_config.json
- Add
{
"name": "ibm_brisbane",
"type": "qiskit-runtime-service",
"environment": {
...
"QRMI_IBM_QRS_SESSION_MODE": "batch"
}
}Note
Linux only.
Every build of QRMI embeds its own crate version and git commit hash directly into the compiled artifact (shared library, static library, or any binary that links it), so you can check it without running the code.
$ strings /path/to/libqrmi.so | grep QRMI_BUILD_VERSION
QRMI_BUILD_VERSION:0.24.0;QRMI_GIT_HASH:0dac1793b013
$ readelf -p .version_info /path/to/libqrmi.so
String dump of section '.version_info':
[ 4f] QRMI_BUILD_VERSION:0.24.0;QRMI_GIT_HASH:0dac1793b013
(The exact offset shown after [ ] will vary depending on what else is
linked into the same .version_info section — see below.)
| Field | Meaning |
|---|---|
QRMI_BUILD_VERSION |
QRMI's crate version, from CARGO_PKG_VERSION (i.e. the version field in Cargo.toml) at the time it was built. |
QRMI_GIT_HASH |
The exact git commit QRMI was built from, resolved via git rev-parse --short=12 HEAD in build.rs. Useful when the consuming project pins a moving branch (e.g. main) rather than a fixed release tag. |
This is especially useful when diagnosing issues caused by a version mismatch between a deployed binary that links QRMI (such as the spank_qrmi Slurm plugin) and the QRMI Python package used by client workloads — you can confirm exactly which QRMI build is present without rebuilding or adding logging.
spank_qrmi.so embeds its own version/git-hash marker alongside QRMI's, in
the same .version_info section:
$ strings /path/to/spank_qrmi.so | grep -E "SPANK_QRMI|QRMI_BUILD"
SPANK_QRMI_BUILD_VERSION=0.11.0;SPANK_QRMI_GIT_HASH=0dac1793b013
QRMI_BUILD_VERSION:0.24.0;QRMI_GIT_HASH:0dac1793b013
$ readelf -p .version_info /path/to/spank_qrmi.so
String dump of section '.version_info':
[ 0] SPANK_QRMI_BUILD_VERSION=0.11.0;SPANK_QRMI_GIT_HASH=3845dd911381
[ 3b] QRMI_BUILD_VERSION:0.24.0;QRMI_GIT_HASH:7a9573703ac4
The two are independent: SPANK_QRMI_* describes the plugin binary
itself, QRMI_BUILD_VERSION/QRMI_GIT_HASH describes the QRMI crate it was
linked against. See the spank_qrmi plugin's own FAQ for details on the
former.
- If
QRMI_GIT_HASHshowsunknown, QRMI was most likely built from a source tree without a.gitdirectory (e.g. an extracted release tarball, or a local checkout pointed at viaQRMI_ROOTin the consuming project's build). - If neither
stringsnorreadelfshow a.version_infosection (or it only shows aSPANK_QRMI_*entry with noQRMI_BUILD_VERSION), the binary may have been built before this feature was introduced, or the section may have been removed by a fullstrip -spass in the deployment pipeline. Re-runstrip --strip-debuginstead, or add--keep-section=.version_infoto thestrip/objcopyinvocation, to preserve it. - This works the same way regardless of whether QRMI was linked as a
shared library (
cdylib) or a static library (staticlib) — the marker survives static linking as long as at least one other QRMI symbol is referenced by the final binary.