- Make a virtual environment and install required packages:
conda create -n qc_virt python=3.8.5
conda deactivate && conda activate qc_virt
pip install numpy matplotlib pillow pydot termcolor
pip install qiskit==0.24.0
conda config --add channels http://conda.anaconda.org/gurobi
conda install gurobi
- Set up a Gurobi license: https://www.gurobi.com.
- Install Intel compiler: Included in Intel oneAPI HPC Toolkit (https://software.intel.com/content/www/us/en/develop/tools/oneapi/hpc-toolkit.html)
- Install Intel MKL(https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html) Via anaconda:
conda install -c intel mkl
- After installation, do (file location may vary depending on installation):
source /opt/intel/oneapi/setvars.sh intel64
- Start a MongoDB. Here is a Docker Compose File.
- Configure the API to use the database in the following file.
- Customize the
config.json
in the root directory (If it is not present, it will be generated at the first startup) - Run:
python -m api
- Send requests to http://localhost:5000
This script sends requests to the API.
Import the Virtual_Execution_Environment and initialize it as follows:
import config.load_config as cfg
import ibmq_account
from virtualization import Virtual_Execution_Environment
config = cfg.load_or_create()
provider = ibmq_account.get_provider(config)
vee = Virtual_Execution_Environment(provider, config)
vee.start()
input_queue = vee.input
output_queue = vee.output
error_queue = vee.errors
The evaluation data for all visualizations used in the thesis is included in the repository. To create the visualizations, run the following two scripts:
python read_rb_files.py
python read_eval_files_circ.py
The generation and visualization of new data work as follows.
Randomized benchmarking of the QPUs with the aggregated quantum circuits: randomized_benchmarking.py
Evaluation of the randomized benchmarking results and their visualization: read_rb_files.py
Generate evaluation data for different aggregated quantum circuits: eval_agg_circuits.py
Evaluation of the results and their visualization: read_eval_files_circ.py
Generate evaluation data for one partitioned quantum circuit with one specific cut: eval_partition_pipeline.py
Generate evaluation data for different partitioned quantum circuits with various cuts: eval_part_circuits.py
Evaluation of the results and their visualization: read_eval_files_circ.py
The self-produced code is available under the Apache-2.0 License.
This project includes parts from third-party libraries. Their use is subject to their license terms. The implementation used the following third-party libraries:
-
Tang, Wei. (2020). CutQC: Using Small Quantum Computers for Large Quantum Circuit Evaluations. Presented at the Architectural Support for Programming Languages and Operating Systems (ASPLOS), Zenodo. http://doi.org/10.5281/zenodo.4329804
The library is licensed under the Creative Commons Attribution 4.0 International License
The following directories include parts of the library: cutqc and qiskit_helper_functions -
quantum-circuit-generator Copyright (c) 2021 Teague Tomesh
The library is licensed under the MIT License
The following directory includes the library: quantum_circuit_generator