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