Skip to content

converged-computing/qrmi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qrmi-go

Go bindings for the QRMI C API

Go bindings for QRMI (Quantum Resource Management Interface), for use in the Fluxion-Quantum prototype. The package wraps QRMI's C API behind a small Go Resource interface so the rest of the project can be written and tested against an interface, with the native binding compiled in only when you ask for it. You can use the provided .devcontainer for an environment with qrmi.

Build & Test

Default build is pure Go and needs no native library:

make test
make build
# both
make

Live Test

To login I usually do:

curl -fsSL https://clis.cloud.ibm.com/install/linux | sudo sh
ibmcloud login --apikey <key>
# 12 for us-east
export QRMI_TEST_BACKEND=ibm_fez 
export QRMI_TEST_TYPE=qiskit-runtime-service
export IBM_CLOUD_TOKEN=<key>
export IBM_CLOUD_CRN=$(ibmcloud resource service-instances --service-name quantum-computing --output json | jq -r '.[] | {name: .name, crn: .crn}' | jq -r .crn)

# plus the backend env QRMI itself reads: QRMI_IBM_QRS_ENDPOINT / _IAM_APIKEY / _SERVICE_CRN ...
CGO_ENABLED=1 go test -tags 'cgo_qrmi integration' -run TestLive ./...
=== RUN   TestLiveIsAccessible
    qrmi_test.go:63: resource id: ibm_fez
    qrmi_test.go:69: ibm_fez accessible: true
--- PASS: TestLiveIsAccessible (1.82s)
PASS
ok      github.com/converged-computing/qrmi-go/pkg/qrmi 1.832s

This is just bindings to interact with qrmi. We will next test adding to fluxion-quantum.

License

This project is distributed under the terms of the MIT license. All new contributions must be made under this license.

See LICENSE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

About

Go bindings for the quantum resource management interface (qrmi)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors