Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VQE-generated quantum circuit dataset

Dataset for quantum machine learning, generated by the VQE algorithm.

Table of Contents

Why we made VQE-generated quatnum circuit dataset

Quantum machine learning has the potential to computationally outperform classical machine learning. However, it is uncertain whether quantum machine learning will be practically useful for solving real-world problems. To explore this, we propose a machine learning task of clustering and classifying quantum circuits, which is expected to be a useful application of quantum methods. And, to support this task, we generated a dataset of quantum circuits optimized by the variational quantum eigensolver (VQE).

Get the Data

You can clone this GitHub repository; the dataset appears under data/qasm. This repo also contains ground state of the Hamiltonian under data/ground_state and some scripts for benchmark and visualization.

git clone git@github.com:Qulacs-Osaka/VQE-generated-dataset.git
Name Content Examples Size
data/qasm/04qubit 4-qubit quantum circuits 1,500 15 MBytes
data/qasm/08qubit 8-qubit quantum circuits 1,800 49 MBytes
data/qasm/12qubit 12-qubit quantum circuits 1,800 89 MBytes
data/qasm/16qubit 16-qubit quantum circuits 1,800 138 MBytes
data/qasm/20qubit 20-qubit quantum circuits 1,800 197 MBytes

Hamiltonian labels

Quantum circuits and ground state of Hamiltonian are assigned to one of the following Hamiltonian's labels:

Label Name Hamiltonian
0 1D transverse-field Ising model $$\sum_{n=1}^{N-1} Z_n Z_{n+1} + 2\sum_{n=1}^{N} X_n$$
1 1D Heisenberg model $$\sum_{n=1}^{N-1} (X_n X_{n+1} + Y_n Y_{n+1} + Z_n Z_{n+1}) + 2\sum_{n=1}^{N} Z_n$$
2 Su-Schrieffer-Heeger model $$\sum_{n=1}^{N-1}\left(1+\frac{3}{2}(-1)^{n-1}\right)\left(X_n X_{n+1}+Y_n Y_{n+1}+Z_n Z_{n+1}\right)$$
3 $J_1$ - $J_2$ model $$\sum_{n=1}^{N-1}\left(X_n X_{n+1}+Y_n Y_{n+1}+Z_n Z_{n+1}\right)+3\sum_{n=1}^{N-2}\left(X_n X_{n+2}+Y_n Y_{n+2}+Z_n Z_{n+2}\right)$$
4 1D Hubbard model $$-\sum_{j=1}^{N/2-1} \sum_{\sigma \in {\uparrow,\downarrow}}\left(a_{j, \sigma}^{\dagger} a_{j+1, \sigma}+\mathrm{H.c.}\right)+ \sum_{j=1}^{N/2}\left(a_{j, \uparrow}^\dagger a_{j, \uparrow}-\frac{1}{2}\right)\left(a_{j, \downarrow}^\dagger a_{j, \downarrow}-\frac{1}{2}\right)$$
5 2D Hubbard model $$-\sum_{\sigma \in {\uparrow,\downarrow}}\left(\sum_{j_x=1}^{N/4-1}\sum_{j_y=1}^2 a_{j_x,j_y, \sigma}^{\dagger} a_{j_x+1,j_y, \sigma}+\sum_{j_x=1}^{N/4}a_{j_x,1, \sigma}^{\dagger} a_{j_x,2, \sigma}+\mathrm{H.c.}\right)+ \sum_{j_x=1}^{N/4}\sum_{j_y=1}^2\left(a_{j_x,j_y, \uparrow}^\dagger a_{j_x,j_y, \uparrow}-\frac{1}{2}\right)\left(a_{j_x,j_y, \downarrow}^\dagger a_{j_x,j_y, \downarrow}-\frac{1}{2}\right)$$

Ansatz labels

Quantum circuits data is assigned to one of the following ansatz's labels:

Label ansatz type Mapping
0 Hamiltonian ansatz
1 Hardware-efficient ansatz Chain
2 Complete
3 Ladder
4 Cross-Ladder
5 1D brick-block ansatz Chain
6 Stair
7 Complete
8 Ladder
9 Cross-Ladder

See example/ansatz_plot.ipynb for a detailed implementation of ansatz with Qiskit.

Usage

Loading data with Python

Use utils/qc_reader.py in this repo:

from utils import qc_reader

# label_kind: {‘hamiltonian’, ‘ansatz’, ‘ansatz_reps’}, default=’hamiltonian’
qasm_str, label = qc_reader.load_qc(path="data/qasm", n_qubit=4, label_kind="hamiltonian")

Example code

Visualization

t-SNE on the dataset

tsne.jpg

MDS on the dataset

colored depending on their label

mds.jpg

colored depending on their fidelity with the ground state of each label’s Hamiltonian

mds_fidelity.jpg

Fidelity between each data and the ground state of each label’s Hamiltonian

data_fidelity.jpg

Citing VQE-generated quatnum circuit dataset

If you use the dataset in a scientific publication, we would appreciate references to the following paper:

VQE-generated Quatnum Circuit Dataset for Machine Learning. Akimoto Nakayama, Kosuke Mitarai, Leonardo Placidi, Takanori Sugimoto and Keisuke Fujii. VQE-generated Quantum Circuit Dataset for Machine Learning

Biblatex entry:

@misc{nakayama2023vqegenerated,
      title={VQE-generated Quantum Circuit Dataset for Machine Learning}, 
      author={Akimoto Nakayama and Kosuke Mitarai and Leonardo Placidi and Takanori Sugimoto and Keisuke Fujii},
      year={2023},
      eprint={2302.09751},
      archivePrefix={arXiv},
      primaryClass={quant-ph}
}

Changelog

[1.0] - 2023-02-21

The dataset was published.

[1.1] - 2023-06-01

Added or Changed

  • Added this changelog :)
  • The data for label 5 has been changed due to a change in the way the Hamiltonian is mapped to the qubits in label 5. See updated arxiv for details.
    • Updated ground state for label 5.
    • Updated visualization results.
  • Added 20-qubits dataset
  • Added an example implementation of ansatz

About

Dataset for quantum machine learning, generated by the VQE algorithm.

Resources

Stars

11 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages