Skip to content

Commit 12e6646

Browse files
committed
Rename IBM Direct Access API
1 parent 1a5318e commit 12e6646

File tree

6 files changed

+76
-64
lines changed

6 files changed

+76
-64
lines changed

demo/qrmi/etc/slurm/qrmi_config.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"resources": [
33
{
44
"name": "test_eagle",
5-
"type": "direct-access",
5+
"type": "ibm-quantum-system",
66
"environment": {
7-
"QRMI_IBM_DA_ENDPOINT": "http://localhost:8080",
8-
"QRMI_IBM_DA_IAM_ENDPOINT": "https://iam.test.cloud.ibm.com",
9-
"QRMI_IBM_DA_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
10-
"QRMI_IBM_DA_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
11-
"QRMI_IBM_DA_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
12-
"QRMI_IBM_DA_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
13-
"QRMI_IBM_DA_S3_ENDPOINT": "https://s3.us-east.cloud-object-storage.appdomain.cloud",
14-
"QRMI_IBM_DA_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
15-
"QRMI_IBM_DA_S3_REGION": "us-east"
7+
"QRMI_IBM_QS_ENDPOINT": "http://localhost:8080",
8+
"QRMI_IBM_QS_IAM_ENDPOINT": "https://iam.test.cloud.ibm.com",
9+
"QRMI_IBM_QS_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
10+
"QRMI_IBM_QS_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
11+
"QRMI_IBM_QS_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
12+
"QRMI_IBM_QS_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
13+
"QRMI_IBM_QS_S3_ENDPOINT": "https://s3.us-east.cloud-object-storage.appdomain.cloud",
14+
"QRMI_IBM_QS_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
15+
"QRMI_IBM_QS_S3_REGION": "us-east"
1616
}
1717
},
1818
{

demo/qrmi/slurm-docker-cluster/file.patch

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -304,17 +304,17 @@ diff -Naru slurm-docker-cluster.orig/qrmi_config.json slurm-docker-cluster/qrmi_
304304
+ "resources": [
305305
+ {
306306
+ "name": "test_eagle",
307-
+ "type": "direct-access",
307+
+ "type": "ibm-quantum-system",
308308
+ "environment": {
309-
+ "QRMI_IBM_DA_ENDPOINT": "http://",
310-
+ "QRMI_IBM_DA_IAM_ENDPOINT": "https://",
311-
+ "QRMI_IBM_DA_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
312-
+ "QRMI_IBM_DA_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
313-
+ "QRMI_IBM_DA_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
314-
+ "QRMI_IBM_DA_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
315-
+ "QRMI_IBM_DA_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
316-
+ "QRMI_IBM_DA_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
317-
+ "QRMI_IBM_DA_S3_REGION": "<YOUR S3 BUCKET REGION>"
309+
+ "QRMI_IBM_QS_ENDPOINT": "http://",
310+
+ "QRMI_IBM_QS_IAM_ENDPOINT": "https://",
311+
+ "QRMI_IBM_QS_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
312+
+ "QRMI_IBM_QS_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
313+
+ "QRMI_IBM_QS_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
314+
+ "QRMI_IBM_QS_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
315+
+ "QRMI_IBM_QS_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
316+
+ "QRMI_IBM_QS_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
317+
+ "QRMI_IBM_QS_S3_REGION": "<YOUR S3 BUCKET REGION>"
318318
+ }
319319
+ },
320320
+ {
@@ -344,17 +344,17 @@ diff -Naru slurm-docker-cluster.orig/qrmi_config.json.example slurm-docker-clust
344344
+ "resources": [
345345
+ {
346346
+ "name": "test_eagle",
347-
+ "type": "direct-access",
347+
+ "type": "quantum-system",
348348
+ "environment": {
349-
+ "QRMI_IBM_DA_ENDPOINT": "http://",
350-
+ "QRMI_IBM_DA_IAM_ENDPOINT": "https://",
351-
+ "QRMI_IBM_DA_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
352-
+ "QRMI_IBM_DA_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
353-
+ "QRMI_IBM_DA_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
354-
+ "QRMI_IBM_DA_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
355-
+ "QRMI_IBM_DA_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
356-
+ "QRMI_IBM_DA_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
357-
+ "QRMI_IBM_DA_S3_REGION": "<YOUR S3 BUCKET REGION>"
349+
+ "QRMI_IBM_QS_ENDPOINT": "http://",
350+
+ "QRMI_IBM_QS_IAM_ENDPOINT": "https://",
351+
+ "QRMI_IBM_QS_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
352+
+ "QRMI_IBM_QS_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
353+
+ "QRMI_IBM_QS_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
354+
+ "QRMI_IBM_QS_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
355+
+ "QRMI_IBM_QS_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
356+
+ "QRMI_IBM_QS_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
357+
+ "QRMI_IBM_QS_S3_REGION": "<YOUR S3 BUCKET REGION>"
358358
+ }
359359
+ },
360360
+ {

docs/overview.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Spank plugins for Slurm to support quantum resources
1313
- [Vendor-Specific Context: IBM](#vendor-specific-context-ibm)
1414
- [Vendor-Specific Definitions: IBM](#vendor-specific-definitions-ibm)
1515
- [IBM Quantum Platform](#ibm-quantum-platform)
16-
- [Direct Access API](#direct-access-api)
16+
- [Quantum System API](#quantum-system-api)
1717
- [High Level Structure](#high-level-structure)
1818
- [Quantum resource for workload management systems](#quantum-resource-for-workload-management-system)
1919
- [Quantum resource API](#quantum-resource-api)
@@ -62,8 +62,8 @@ Extension of the context overview of involved components, personas and backend s
6262
### IBM Quantum Platform
6363
Cloud-based quantum computing service providing access to IBM's fleet of quantum backends. Sometimes abbreviated as IQP.
6464

65-
### Direct Access API
66-
Local interface to am IBM Quantum Computer. Sometimes abbreviated as DA API. Below the Direct Access API, classical preparation of jobs prior to the actual quantum execution can run in parallel (called *lanes* in the API definition).
65+
### Quantum System API
66+
Local interface to a IBM Quantum Computer. Below the Quantum System API, classical preparation of jobs prior to the actual quantum execution can run in parallel (called *lanes* in the API definition).
6767

6868
## Vendor-Specific Definitions: Pasqal
6969

@@ -90,7 +90,7 @@ Additional resource definition might be needed depending on implementation from
9090

9191
![resource definition](./images/resource_definition.png)
9292

93-
The QPU resource definition does not expose individual parallelism abstracts. Each backend flavor can have specific qualifiers how to use backend specific capabilities (e.g. for common use case: if a user wants to exclusively use a backend, all parallel job preparation units will be available for use -- if not, several users could submit jobs and share these units. As execution lanes in DA API do not have any identities that could be managed explicitly, only quantities resp. exclusive/shared use should be user controlled).
93+
The QPU resource definition does not expose individual parallelism abstracts. Each backend flavor can have specific qualifiers how to use backend specific capabilities (e.g. for common use case: if a user wants to exclusively use a backend, all parallel job preparation units will be available for use -- if not, several users could submit jobs and share these units. As execution lanes in IBM Quantum System API do not have any identities that could be managed explicitly, only quantities resp. exclusive/shared use should be user controlled).
9494

9595
![resource mapping](./images/resource_mapping.png)
9696

docs/ux.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ HPC user experience, HPC developer experience and usage patterns
99
- [HPC user scope](#hpc-user-scope)
1010
- [HPC application scope](#hpc-application-scope)
1111
- [Backend specifics](#backend-specifics)
12-
- [IBM Direct Access API](#ibm-direct-access-api)
12+
- [IBM Quantum System API](#ibm-quantum-system-api)
1313
- [Qiskit Runtime Service](#qiskit-runtime-service)
1414
- [Examples](#examples)
1515
- [Running jobs with dependencies](#running-jobs-with-dependencies)
@@ -25,8 +25,8 @@ Slurm QPU resource definitions determine what physical resources can be used by
2525
User source code should be agnostic to specific backend instances and even backend types as far as possible.
2626
This keeps source code portable while the QPU selection criteria are part of the resource definition (which is considered configuration as opposed to source code).
2727
The source code does not have to take care resp. is not involved in resource reservation handling (that is done when Slurm jobs are assigned QPU resources and start running, if applicable on the backend) or execution modes like sessions (these are automatically in place while the job is running, if applicable on the backend).
28-
This makes the source code more portable between similar QPU resource types through different backend access methods (such as IBM's Direct Access API and IBM's Qiskit Runtime service through IBM Quantum Platform).
29-
All backend types (such as IBM's Direct Access API, IBM's Qiskit Runtime service, or Pasqal's backends) follow these principles.
28+
This makes the source code more portable between similar QPU resource types through different backend access methods (such as IBM's Quantum System API and IBM's Qiskit Runtime service through IBM Quantum Platform).
29+
All backend types (such as IBM's Quantum System API, IBM's Qiskit Runtime service, or Pasqal's backends) follow these principles.
3030

3131
## Connecting physical resources to Slurm resources and how to use them
3232

@@ -132,13 +132,13 @@ print(f">>> {result}")
132132
See [examples directory](https://github.com/qiskit-community/qrmi/tree/main/examples/qiskit_primitives/) for example files.
133133

134134
### Backend specifics
135-
#### IBM Direct Access API
135+
#### IBM Quantum System API
136136
##### HPC admin scope
137-
Configuration of Direct Access API backends (HPC admin scope) includes endpoints and credentials to the Direct Access endpoint, authentication services as well as the S3 endpoint.
137+
Configuration of Quantum System API backends (HPC admin scope) includes endpoints and credentials to the Quantum System endpoint, authentication services as well as the S3 endpoint.
138138
Specifically, this includes:
139139

140140
* IBM Cloud API key for creating bearer tokens
141-
* endpoint of Direct Access API
141+
* endpoint of Quantum System API
142142
* S3 bucket and access details
143143

144144
Access credentials should not be visible to HPC users or other non-privileged users on the system.

plugins/spank_qrmi/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,19 @@ The `resources` array contains a set of available Quantum Resources which can be
6868
| properties | descriptions |
6969
| ---- | ---- |
7070
| name | Quantum resource name. e.g. Quantum backend name. |
71-
| type | Resource type (`direct-access`, `qiskit-runtime-service` and `pasqal-cloud`) |
71+
| type | Resource type (`ibm-quantum-system`, `qiskit-runtime-service` and `pasqal-cloud`) |
7272
| environment | A set of environment variables to work with QRMI. Current implementations assume API endpoint and credentials are specified via environment variable setting. |
7373

7474
If a user specifies a resource with the --qpu option that is not defined in the qrmi_config.json file, the specification will be ignored.
7575

7676
If the user sets the necessary environment variables for job execution themselves, it is not required to specify them in this file. In this case, the environment property will be `{}`.
7777

78+
> [!IMPORTANT]
79+
> The IBM Direct Access API has been renamed to the IBM Quantum System API.
80+
> As part of this change, the previously available resource type name has been updated from `direct-access` to `ibm-quantum-system`.
81+
> During a transition period, both `direct-access` and `ibm-quantum-system` resource type names will be supported.
82+
> After the transition period ends, support for the `direct-access` resource type name will be discontinued.
83+
7884
> [!NOTE]
7985
> If you are using a QPU resource with the resource type `qiskit-runtime-service`, use an account that supports [opening a session](https://quantum.cloud.ibm.com/docs/en/guides/run-jobs-session#open-a-session), such as a Premium plan.
8086
> If you are using an account that does not support opening a session, such as an Open plan account, add `QRMI_IBM_QRS_SESSION_MODE="batch"` to the environment variable list in qrmi_config.json as workaround:
@@ -168,8 +174,8 @@ srun -vv python /shared/qrmi/examples/qiskit_primitives/ibm/sampler.py
168174
At runtime, each QRMI instance is linked to a single QPU resource. To enable the use of multiple Quantum resources within a single job script, this plugin sets environment variables with the resource name as a prefix. For example, if `--qpu=qpu1,qpu2` is specified, the environment variables will be set as follows:
169175
170176
```bash
171-
qpu1_QRMI_IBM_DA_ENDPOINT=http://test1
172-
qpu2_QRMI_IBM_DA_ENDPOINT=http://test2
177+
qpu1_QRMI_IBM_QS_ENDPOINT=http://test1
178+
qpu2_QRMI_IBM_QS_ENDPOINT=http://test2
173179
```
174180
175181
This ensures that each QRMI instance operates with the configuration parameters set for its respective resource during the execution of the Slurm job.
@@ -181,7 +187,13 @@ This plugin also set the following 2 environment variables which will be referre
181187
| environment varilables | descriptions |
182188
| ---- | ---- |
183189
| SLURM_JOB_QPU_RESOURCES | Comma separated list of QPU resources to use at runtime. Undocumented resources will be filtered out. For example, `qpu1,qpu2`. |
184-
| SLURM_JOB_QPU_TYPES | Comma separated list of Resource type (`direct-access`, `qiskit-runtime-service` and `pasqal-cloud`). For example, `direct-access,direct-access` |
190+
| SLURM_JOB_QPU_TYPES | Comma separated list of Resource type (`ibm-quantum-system`, `qiskit-runtime-service` and `pasqal-cloud`). For example, `ibm-quantum-system,ibm-quantum-system` |
191+
192+
> [!IMPORTANT]
193+
> The IBM Direct Access API has been renamed to the IBM Quantum System API.
194+
> As part of this change, the previously available resource type name has been updated from `direct-access` to `ibm-quantum-system`.
195+
> During a transition period, both `direct-access` and `ibm-quantum-system` resource type names will be supported.
196+
> After the transition period ends, support for the `direct-access` resource type name will be discontinued.
185197
186198
## License
187199

plugins/spank_qrmi/qrmi_config.json.example

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@
22
"resources": [
33
{
44
"name": "test_heron",
5-
"type": "direct-access",
5+
"type": "ibm-quantum-system",
66
"environment": {
7-
"QRMI_IBM_DA_ENDPOINT": "http://",
8-
"QRMI_IBM_DA_IAM_ENDPOINT": "https://",
9-
"QRMI_IBM_DA_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
10-
"QRMI_IBM_DA_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
11-
"QRMI_IBM_DA_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
12-
"QRMI_IBM_DA_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
13-
"QRMI_IBM_DA_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
14-
"QRMI_IBM_DA_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
15-
"QRMI_IBM_DA_S3_REGION": "<YOUR S3 BUCKET REGION>"
7+
"QRMI_IBM_QS_ENDPOINT": "http://",
8+
"QRMI_IBM_QS_IAM_ENDPOINT": "https://",
9+
"QRMI_IBM_QS_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
10+
"QRMI_IBM_QS_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
11+
"QRMI_IBM_QS_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
12+
"QRMI_IBM_QS_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
13+
"QRMI_IBM_QS_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
14+
"QRMI_IBM_QS_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
15+
"QRMI_IBM_QS_S3_REGION": "<YOUR S3 BUCKET REGION>"
1616
}
1717
},
1818
{
1919
"name": "test_eagle",
20-
"type": "direct-access",
20+
"type": "ibm-quantum-system",
2121
"environment": {
22-
"QRMI_IBM_DA_ENDPOINT": "http://",
23-
"QRMI_IBM_DA_IAM_ENDPOINT": "https://",
24-
"QRMI_IBM_DA_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
25-
"QRMI_IBM_DA_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
26-
"QRMI_IBM_DA_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
27-
"QRMI_IBM_DA_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
28-
"QRMI_IBM_DA_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
29-
"QRMI_IBM_DA_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
30-
"QRMI_IBM_DA_S3_REGION": "<YOUR S3 BUCKET REGION>"
22+
"QRMI_IBM_QS_ENDPOINT": "http://",
23+
"QRMI_IBM_QS_IAM_ENDPOINT": "https://",
24+
"QRMI_IBM_QS_IAM_APIKEY": "<YOUR IAM APIKEY FOR THIS BACKEND>",
25+
"QRMI_IBM_QS_SERVICE_CRN": "<YOUR DIRECT ACCESS INSTANCE CRN>",
26+
"QRMI_IBM_QS_AWS_ACCESS_KEY_ID": "<YOUR AWS ACCESS KEY TO ACCESS S3 BUCKET>",
27+
"QRMI_IBM_QS_AWS_SECRET_ACCESS_KEY": "<YOUR AWS SECRET ACCESS KEY TO ACCESS S3 BUCKET>",
28+
"QRMI_IBM_QS_S3_ENDPOINT": "<YOUR S3 ENDPOINT>",
29+
"QRMI_IBM_QS_S3_BUCKET": "<YOUR S3 BUCKET NAME>",
30+
"QRMI_IBM_QS_S3_REGION": "<YOUR S3 BUCKET REGION>"
3131
}
3232
},
3333
{

0 commit comments

Comments
 (0)