Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,47 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- physics
|
5 |
+
- diffusion-model
|
6 |
+
- quantum-information
|
7 |
+
- quantum-circuits
|
8 |
+
- genQC
|
9 |
+
---
|
10 |
+
|
11 |
+
# Unitary compilation 3 qubits
|
12 |
+
|
13 |
+
Paper: ["Quantum circuit synthesis with diffusion models"](https://arxiv.org/abs/2311.02041).
|
14 |
+
|
15 |
+
![](https://github.com/FlorianFuerrutter/genQC/blob/main/src/assets/inference.png?raw=true)
|
16 |
+
|
17 |
+
|
18 |
+
## Key Features and limitations
|
19 |
+
|
20 |
+
- Unitary compilation on **3 qubits**
|
21 |
+
- Quantum circuits up to **12 gates**
|
22 |
+
- Training details in the [\[paper-arxiv\]](https://arxiv.org/abs/2311.02041)
|
23 |
+
- Prompt formatting: `prompt="Compile using: ['h', 'cx', 'z', 'x', 'ccx', 'swap']"`
|
24 |
+
- Gate set: `['h', 'cx', 'z', 'x', 'ccx', 'swap']`
|
25 |
+
|
26 |
+
## Usage
|
27 |
+
|
28 |
+
The pre-trained model pipeline can be loaded with [`genQC`](https://github.com/FlorianFuerrutter/genQC). First install or upgrade [`genQC`](https://github.com/FlorianFuerrutter/genQC) using
|
29 |
+
|
30 |
+
``` sh
|
31 |
+
pip install -U genQC
|
32 |
+
```
|
33 |
+
|
34 |
+
Then the model can be loaded by calling
|
35 |
+
|
36 |
+
``` python
|
37 |
+
from genQC.pipeline.diffusion_pipeline import DiffusionPipeline
|
38 |
+
pipeline = DiffusionPipeline.from_pretrained("Floki00/qc_unitary_3qubit", "cpu")
|
39 |
+
```
|
40 |
+
|
41 |
+
A guide on how to use this model can be found in the example notebook `2_unitary_compilation`[\[doc\]](https://florianfuerrutter.github.io/genQC/examples/unitary_compilation.html) [\[notebook\]](https://github.com/FlorianFuerrutter/genQC/blob/main/src/examples/2_unitary_compilation.ipynb) on the GitHub repository of [`genQC`](https://github.com/FlorianFuerrutter/genQC).
|
42 |
+
|
43 |
+
## License
|
44 |
+
|
45 |
+
The model weights in this repository are licensed under the [Apache
|
46 |
+
License
|
47 |
+
2.0](https://github.com/FlorianFuerrutter/genQC/blob/main/LICENSE.txt).
|