Artifact for the paper: QuCLEAR: Clifford Extraction and Absorption for Quantum Circuit Optimization
We recommend creating an Anaconda virtual environment before proceeding with the installation.
Anaconda Installation Guide
First, clone the QuCLEAR repository and navigate to its directory:
git clone https://github.com/revilooliver/QuCLEAR.git
cd QuCLEARIf you only wish to use QuCLEAR (without running the artifact evaluation against other tools), you can install the required dependencies with:
pip install -r requirements.txtYou may skip Sections 3 and 4 and instead refer to the examples in the tutorial folder.
For artifact evaluation, QuCLEAR is compared with several tools: Rustiq, Qiskit, Paulihedral, and pytket. To simplify installation and environment management, we provide an automated script, install_all.sh, located in the artifact_evaluation folder:
cd artifact_evaluation
./install_all.shThis script creates three Anaconda virtual environments:
QuCLEAR_env: Contains QuCLEAR, Qiskit, and pytket.PH_env: Contains Paulihedral.Tetris_env: Contains Tetris.
After setting up the environments, you will need to manually install Rust and Rustiq in the QuCLEAR_env.
-
Activate the QuCLEAR environment:
conda activate QuCLEAR_env
-
Install Rust:
Follow the installation instructions provided on the official Rust website:
Rust Installation GuideAfter installation, source your .bashrc file to enable Rust in your current session:
source ~/.bashrc
If you are working in a Conda environment, you may need to reactivate the environment to ensure the paths are properly configured:
conda deactivate conda activate QuCLEAR_env
-
Install Rustiq:
Clone and install Rustiq from its GitHub repository:
Rustiq Repository
Once these steps are complete, all required dependencies for artifact evaluation will be ready.
We provide a simple test script to validate the installation. It will compile the circuits for Hamiltonian simulation:
./test_experiments_fast.shWe also provide a simple test script to validate the experiments for mapping to hardware:
./test_mapping_experiments_fast.shThe experimental data can be validated by running the full experiment scripts:
cd artifact_evaluation
./test_experiments_full.sh
./test_mapping_experiments_full.shThe compilation results are saved as JSON files in the experiments/results_fullyconnected folder.
The hardware mapping results are also saved as JSON files in the experiments/results_ibm and experiments/results_google folder
For example:
test_quclear_LiH.jsoncontains results for QuCLEAR, Qiskit, and Rustiq for the LiH benchmark.
our_method: Results using QuCLEAR.combined_method: Results using QuCLEAR combined with Qiskit's optimization (reported in the paper).
To generate the experimental tables in our paper, use the provided Jupyter notebooks:
generate_table3.ipynb: Generates data for Table 3.generate_table4.ipynb: Generates data for Table 4.generate_figure9.ipynb: Generates data for Figure 9.generate_figure10.ipynb: Generates data for Figure 10.generate_figure11_google.ipynbandgenerate_figure11_ibm.ipynb: Generates data for Figure 11.
These notebooks process results stored in the experiments/results_fullyconnected folder. The notebooks for figure11 process results in the experiments/results_ibm and experiments/results_google folders.
We provide two example tutorials in the tutorial folder.
Run the VQE_observables.ipynb notebook to learn how to:
- Optimize quantum circuits.
- Calculate expectation values in variational quantum algorithms (e.g., VQE).
Run the QAOA_probabilities.ipynb notebook to see examples of:
- Absorbing CNOT networks.
- Optimizing circuits for QAOA.
This project is licensed under the Apache License 2.0