This service takes a workflow fragment realizing a hybrid algorithm as input and generates a Qiskit Runtime program to benefit from speedups and reduced queuing times. Additionally, an agent is generated which handles the transfer of input/output parameters between the Qiskit Runtime program and a workflow.
The qiskit-runtime-handler can be used in conjunction with the QuantME Transformation Framework. Please have a look at the corresponding documentation. Furthermore, a use case showing the analysis and rewrite of quantum workflows using the qiskit-runtime-handler is available here.
- Clone the repository:
git clone https://github.com/UST-QuAntiL/qiskit-runtime-handler.git
- Start the containers using the docker-compose file:
docker-compose pull
docker-compose up
Now the qiskit-runtime-handler is available on http://localhost:8889/.
Start Redis, e.g., using Docker:
docker run -p 5040:5040 redis --port 5040
Before starting the Qiskit Runtime handler, define the following environment variables:
FLASK_RUN_PORT=8889
REDIS_URL=redis://$DOCKER_ENGINE_IP:5040
Thereby, please replace $DOCKER_ENGINE_IP with the actual IP of the Docker engine you started the Redis container.
- Install SQLite DB, e.g., as described here
- Create a
data
folder in theapp
folder - Setup the results table with the following commands:
flask db migrate -m "results table"
flask db upgrade
Start a worker for the request queue:
rq worker --url redis://$DOCKER_ENGINE_IP:5040 qiskit-runtime-handler
Finally, start the Flask application, e.g., using PyCharm or the command line.