-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
3,999 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
permissions: | ||
contents: write | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
with: | ||
key: mkdocs-material-${{ env.cache_id }} | ||
path: .cache | ||
restore-keys: | | ||
mkdocs-material- | ||
- run: python -m pip install -e . --no-deps | ||
- run: pip install mkdocstrings pymdown-extensions mkdocs-material mkdocstrings-python | ||
- run: mkdocs gh-deploy --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Architecture | ||
|
||
## Rydberg System | ||
$$ | ||
\hat{H}_{\mathrm{Rydberg}} = | ||
\sum_{i < j} \frac{C_6}{\lVert \mathbf{r}_i - \mathbf{r}_j \rVert} \hat{n}_i \hat{n}_j - \delta \sum_{i} \hat{n}_i - \frac{\Omega}{2} \sum_{i} \hat{\sigma}_i^{(x)}, | ||
$$ | ||
|
||
$$ | ||
C_6 = \Omega \left( \frac{R_b}{a} \right)^6, \quad V_{ij} = \frac{a^6}{\lVert \mathbf{r}_i - \mathbf{r}_j \rVert^6} | ||
$$ | ||
|
||
- $V_{ij}$ = blockade interaction between atoms $i$ and $j$ | ||
- $a$ = Lattice spacing | ||
- $R_b$ = Rydberg blockade radius | ||
- $\mathbf{r}_i$ = the position of atom $i$ | ||
- $\hat{n}_i$ = number operator at ion $i$ | ||
- $\delta$ = detuning at atom $i$ | ||
- $\Omega$ = Rabi frequency at atom $i$ | ||
|
||
## Transformer | ||
|
||
Vanilla transformer architecture taken from [Attention is All You Need](https://arxiv.org/pdf/1706.03762.pdf). | ||
|
||
![Architecture](resource/architectureV1.jpg) | ||
|
||
$$ | ||
H_i = \mathrm{GraphNN}(\mathrm{edges} = V_{ij} \ ; \mathrm{nodes}=\Omega_i, \Delta_i, R_b, \beta) | ||
= \text{Hamiltonian parameters encoded in a sequence by a graph neural network,} | ||
$$ | ||
|
||
$$ | ||
\sigma_i = \text{one-hot encoding of measured spin of qubit $i$} | ||
$$ | ||
|
||
$$ | ||
P_i = P(\sigma_i | \sigma_{< i}) = \text{conditional probability distribution of spin $i$} | ||
$$ | ||
|
||
$$ | ||
i = \text{sequence index (either $T$ or $S$ axis shown in the architecture diagram).} | ||
$$ | ||
|
||
The transformer encoder represents the Rydberg Hamiltonian with a sequence. <br/> | ||
The transformer decoder represents the corresponding ground state wavefunction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Data | ||
|
||
Consider setting $\Omega = 1$ and varying the other Hamiltonian parameters independently : | ||
|
||
$$ | ||
L = [5, 6, 11, 12, 15, 16, 19, 20] | ||
$$ | ||
$$ | ||
\delta / \Omega = [-0.36, -0.13, 0.93, 1.05, 1.17, 1.29, 1.52, 1.76, 2.94, 3.17] | ||
$$ | ||
$$ | ||
R_b / a = [1.05, 1.15, 1.3] | ||
$$ | ||
$$ | ||
\beta \Omega = [0.5, 1, 2, 4, 8, 16, 32, 48, 64] | ||
$$ | ||
There are a total of `8 x 10 x 3 x 9 = 2160` configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# RydbergGPT | ||
A large language model (LLM) for Rydberg atom array physics. | ||
|
||
## Acknowledgements | ||
|
||
We sincerely thank the authors of the following very helpful codebases we used when building this repository : | ||
|
||
- Transformer tutorials: | ||
- [Annotated Transformer](https://github.com/harvardnlp/annotated-transformer/) | ||
- [Illustrated Transformer](https://jalammar.github.io/illustrated-transformer/) | ||
- Transformer quantum state: | ||
- [Predicting Properties of Quantum Systems with Conditional Generative Models](https://github.com/PennyLaneAI/generative-quantum-states) | ||
- [Transformer Quantum State](https://github.com/yuanhangzhang98/transformer_quantum_state) | ||
|
||
|
||
## References | ||
|
||
```bib | ||
@inproceedings{46201, | ||
title = {Attention is All You Need}, | ||
author = {Ashish Vaswani and Noam Shazeer and Niki Parmar and Jakob Uszkoreit and Llion Jones and Aidan N. Gomez and Lukasz Kaiser and Illia Polosukhin}, | ||
year = {2017}, | ||
URL = {https://arxiv.org/pdf/1706.03762.pdf} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Installation | ||
|
||
Clone the repository using the following command : | ||
```bash | ||
git clone https://github.com/PIQuIL/RydbergGPT | ||
``` | ||
Install with pip : | ||
```bash | ||
cd RydbergGPT | ||
pip install . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: rydberggpt.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: rydberggpt.models.graph_embedding |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
::: rydberggpt.models.rydberg_decoder_wavefunction | ||
|
||
::: rydberggpt.models.rydberg_encoder_decoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: rydberggpt.models.transformer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: rydberggpt.observables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
::: rydberggpt.training |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
::: rydberggpt.utils | ||
|
||
::: rydberggpt.utils_ckpt |
Oops, something went wrong.