QRMI Provider Example in C#
A unified example that works with any supported provider type
(ibm-quantum-compute-service, ibm-quantum-system, etc.). The resource
type is read from qrmi_config.json — no code changes needed when
switching between providers.
Prerequisites#
C compiler/linker, cmake and make
Build the QRMI Rust library
Config file#
Create a qrmi_config.json with an is_dynamic: true entry:
qrmi_config.json#
1{
2 "resources": [
3 {
4 "name": "ibm_inst1",
5 "type": "ibm-quantum-compute-service",
6 "is_dynamic": true,
7 "environment": {
8 "QRMI_IBM_QRS_ENDPOINT": "https://quantum.cloud.ibm.com/api/v1",
9 "QRMI_IBM_QRS_IAM_ENDPOINT": "https://iam.cloud.ibm.com",
10 "QRMI_IBM_QRS_IAM_APIKEY": "<your_api_key>",
11 "QRMI_IBM_QRS_SERVICE_CRN": "<your_service_crn>"
12 }
13 }
14 ]
15}
How to build this example#
mkdir build
cd build
cmake ..
make
How to run this example#
# No filter
./build/providers /path/to/qrmi_config.json ibm_inst1
# With filter
./build/providers /path/to/qrmi_config.json ibm_inst1 "num_qubits=127&name=ibm_*"