Sign inSign up

qbraid/qir-runner

By qbraid

Updated almost 2 years ago

QIR bytecode runner: Rust-based sparse quantum state simulator with qBraid Runtime Python wrapper.

Image
Languages & frameworks
Developer tools
0

948

qbraid/qir-runner repository overview

QIR Runner Docker Container

This Docker image provides an environment for testing and executing Quantum Intermediate Representation (QIR) bytecode programs with the qir-runner package.

Pull the QIR Runner Image

To pull the latest QIR runner image, run:

docker pull qbraid/qir-runner:latest

Start the Container

To start the container in the background, use the following command:

docker run --platform linux/amd64 --name <container_name> -d qbraid/qir-runner tail -f /dev/null > /dev/null 2>&1

Access the Container

To open an interactive shell inside the running container:

docker exec -it <container_name> /bin/bash

Verify Setup with Bell Circuit example

Once inside the running container, activate the Python virtual environment that contains qbraid-qir by running:

source /work/venv/bin/activate

Next, run one of the example scripts to verify the setup:

python3 /work/examples/cirq_bell.py

This should output something similar to:

Cirq Circuit: 
0: ───H───@───M───
          │   │
1: ───────X───M───

Running on: QirRunner(seed=None, exec_path=/opt/qir-runner/target/release/qir-runner, version=0.7.4)

Result: {...,'measurementCounts': {'00': 5, '11': 5}, 'runnerVersion': '0.7.4', 'runnerSeed': None}

Or, look for a similar output with the OpenQASM 3 example using:

python3 /work/examples/qasm3_bell.py

Tag summary

Content type

Image

Digest

sha256:9dee95e40

Size

1.7 GB

Last updated

almost 2 years ago

docker pull qbraid/qir-runner