- Python3.9.12.
- Python libraries:
- Tensornetwork for manipulating tensor networks.
- Numpy for linear algebra computations.
- Qiskit for manipulating quantum circuits.
We recommend the users to use Conda to configure the Python environment.
- Follow the instructions of Miniconda Installation to install Miniconda.
- Clone this repository and cd to it.
git clone https://github.com/hmy98213/ApproximateQSIM.git && cd ApproximateQSIM
- Use Conda to create a new Conda environment:
conda create -n ApproximateQSIM python=3.9.12
- Activate the above environment and use pip to install required libraries in
requirements.txt
.conda activate ApproximateQSIM pip install -r requirements.txt
Running the following command to simulate noisy quantum circuits:
from my_cpu import *
tn.set_default_backend("pytorch")
folder_enum_test('<Benchmark_Folder>', '<Output_File>', error_num, enum)
- Benchmark_Folder: The folder containing the benchmark circuits.
- Output_File: The file to store the simulation results.
- error_num: The number of errors to be injected into the circuit.
- enum: The approximate level of approximate simulation.