Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -28,16 +28,20 @@ Pre-trained neural decoder checkpoints for rotated surface codes, based on the
|
|
| 28 |
- **Cross-attention readout** with learnable logical query tokens
|
| 29 |
- Trained with **progressive knowledge distillation** from MWPM pseudo-labels
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
Each checkpoint contains:
|
| 43 |
- `model_state` β OrderedDict of model weights
|
|
@@ -51,10 +55,10 @@ Each checkpoint contains:
|
|
| 51 |
import torch
|
| 52 |
from huggingface_hub import hf_hub_download
|
| 53 |
|
| 54 |
-
# Download checkpoint
|
| 55 |
ckpt_path = hf_hub_download(
|
| 56 |
repo_id="Dreamworldsmile/ntu-surface-code-decoder",
|
| 57 |
-
filename="d7.pth",
|
| 58 |
)
|
| 59 |
|
| 60 |
# Load into AlphaQubit V2
|
|
@@ -69,12 +73,12 @@ model.load_state_dict(
|
|
| 69 |
### With the official code
|
| 70 |
|
| 71 |
```bash
|
| 72 |
-
# Inference
|
| 73 |
python inference.py --hf_repo Dreamworldsmile/ntu-surface-code-decoder --d 7 --shots 100000
|
| 74 |
|
| 75 |
-
# Transfer learning
|
| 76 |
-
|
| 77 |
-
--
|
| 78 |
```
|
| 79 |
|
| 80 |
## Authors
|
|
|
|
| 28 |
- **Cross-attention readout** with learnable logical query tokens
|
| 29 |
- Trained with **progressive knowledge distillation** from MWPM pseudo-labels
|
| 30 |
|
| 31 |
+
## Repository Structure
|
| 32 |
|
| 33 |
+
```
|
| 34 |
+
ntu-surface-code-decoder/
|
| 35 |
+
βββ README.md
|
| 36 |
+
βββ surface/ β Surface code checkpoints (AlphaQubit V2)
|
| 37 |
+
β βββ d7.pth (~121 MB, scratch)
|
| 38 |
+
β βββ d11.pth (~121 MB, transfer from d7)
|
| 39 |
+
β βββ d15.pth (~121 MB, transfer from d11)
|
| 40 |
+
β βββ d19.pth (~121 MB, transfer from d15)
|
| 41 |
+
β βββ d23.pth (~121 MB, transfer from d19)
|
| 42 |
+
β βββ d25.pth (~122 MB, transfer from d23)
|
| 43 |
+
βββ bb/ β BB code checkpoints (coming soon)
|
| 44 |
+
```
|
| 45 |
|
| 46 |
Each checkpoint contains:
|
| 47 |
- `model_state` β OrderedDict of model weights
|
|
|
|
| 55 |
import torch
|
| 56 |
from huggingface_hub import hf_hub_download
|
| 57 |
|
| 58 |
+
# Download a surface code checkpoint
|
| 59 |
ckpt_path = hf_hub_download(
|
| 60 |
repo_id="Dreamworldsmile/ntu-surface-code-decoder",
|
| 61 |
+
filename="surface/d7.pth",
|
| 62 |
)
|
| 63 |
|
| 64 |
# Load into AlphaQubit V2
|
|
|
|
| 73 |
### With the official code
|
| 74 |
|
| 75 |
```bash
|
| 76 |
+
# Inference β auto-downloads surface/d{d}.pth
|
| 77 |
python inference.py --hf_repo Dreamworldsmile/ntu-surface-code-decoder --d 7 --shots 100000
|
| 78 |
|
| 79 |
+
# Transfer learning β specify full path within the repo
|
| 80 |
+
bash train.sh --mode transfer \
|
| 81 |
+
--hf_ckpt Dreamworldsmile/ntu-surface-code-decoder/surface/d7.pth --d 11 ...
|
| 82 |
```
|
| 83 |
|
| 84 |
## Authors
|