Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CHY-i/qecGPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

GenerativeDecoder

Training a autoregressive network to do quantum error correction.

Link to the article: https://doi.org/10.48550/arXiv.2307.09025

Generate Surface Code d=3 k=1:

python code_generator.py --d 3 --k 1 --seed 0 -c_type 'sur'

if k> k' , where k' is the number of logical qubits, will remove stabilizers randomly from origin code.

Training a MADE or TraDE and save the network

MADE

python training.py -save True -n_type 'made' -c_type 'sur' -d 3 -k 1 -seed 0 -er 0.189 -device 'cuda:0' -batch 10000 -epoch 50000 -depth 3 -width 20

TraDE

python training.py -save True -n_type 'trade' -c_type 'sur' -d 3 -k 1 -seed 0 -er 0.189 -device 'cuda:0' -batch 10000 -epoch 50000 -d_model 128 -n_heads 4 -d_ff 512 -n_layers 2 

Correction

Loading network and forward to do error correction and save the logical error rate

depolarized

python forward_decoding.py -save True -c_type 'sur' -d 3 -k 1 -seed 0  -device 'cuda:0' -n_type 'trade' -e_model 'dep' -trials 10000 -er 0.189

About

Decoding Quantum Error Correction codes with Generative Pre-trained Transformers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages