Skip to content

Commit 41fd037

Browse files
authored
Create quick_test.py
1 parent e8df01c commit 41fd037

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

scripts/quick_test.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env python3
2+
import numpy as np
3+
from qector_decoder_v3 import UnionFindDecoder, BlossomDecoder, BatchDecoder
4+
5+
checks = [[0,1],[1,2],[2,3],[3,4]]
6+
syndrome = np.array([1,1,0,0], dtype=np.uint8)
7+
8+
print("UnionFind:", UnionFindDecoder(checks, 5).decode(syndrome))
9+
print("Blossom: ", BlossomDecoder(checks, 5).decode(syndrome))
10+
11+
batch = BatchDecoder(checks[:3], 4)
12+
print("Batch test OK")
13+
print("Quick test passed!")

0 commit comments

Comments
 (0)