You can download the dataset provided in this paper at this link. The format of the dataset is as follows:
.
├── task1
│ ├── datamatrix
│ └── figure
└── task2
├── 2bit_arbit
├── 3bit_arbit
├── 4bit_arbit
└── 5bit_arbit
We provide our source code for task1 and task2, containing our designed search algorithm, simulated annealing and genetic algorithm.
The code can be called as follows:
python task1/Genetic/Genetic.py --qubit_num 2 --layer_num 4 --matrix_path data/task1/1bit/matrix_dense1_task0.pkl --output_path result.pkl
python task1/Search/Search.py --qubit_num 2 --layer_num 4 --matrix_path data/task1/1bit/matrix_dense1_task0.pkl --output_path result.pkl
python task1/Anneal/Anneal.py --qubit_num 2 --layer_num 4 --matrix_path data/task1/1bit/matrix_dense1_task0.pkl --output_path result.pkl
The circuits and calculated losses will be saved in result.pkl
.
The code can be called as follows:
python task2/Search/Search.py --qubit_num 3 --layer_num 10 --matrix_path data/task2/3bit_arbit/0/0_train.pkl --output_path result.pkl --valid_path data/task2/3bit_arbit/0/0_valid.pkl
python task2/Genetic/Genetic.py --qubit_num 3 --layer_num 10 --matrix_path data/task2/3bit_arbit/0/0_train.pkl --output_path result.pkl --valid_path data/task2/3bit_arbit/0/0_valid.pkl
python task2/Anneal/Anneal.py --qubit_num 3 --layer_num 10 --matrix_path data/task2/3bit_arbit/0/0_train.pkl --output_path result.pkl --valid_path data/task2/3bit_arbit/0/0_valid.pkl
The circuits and calculated losses will be saved in result.pkl
.
Reinforcement Learning method is based on this link.
Hybrid Algorithm is based on this link.
Differentiable Algorithm is based on this link.
@inproceedings{lu2023qas,
title={QAS-bench: rethinking quantum architecture search and a benchmark},
author={Lu, Xudong and Pan, Kaisen and Yan, Ge and Shan, Jiaming and Wu, Wenjie and Yan, Junchi},
booktitle={International Conference on Machine Learning},
pages={22880--22898},
year={2023},
organization={PMLR}
}