qec 0.2.9__py3-none-any.whl → 0.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,28 +7,24 @@
7
7
  "x_code_distance": 3,
8
8
  "z_code_distance": 3,
9
9
  "x_stabilizer_matrix": {
10
- "data": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
11
10
  "indices": [0, 3, 5, 6, 1, 3, 4, 6, 2, 4, 5, 6],
12
11
  "indptr": [0, 4, 8, 12],
13
12
  "shape": [3, 7]
14
13
  },
15
14
  "z_stabilizer_matrix": {
16
- "data": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
17
15
  "indices": [0, 3, 5, 6, 1, 3, 4, 6, 2, 4, 5, 6],
18
16
  "indptr": [0, 4, 8, 12],
19
17
  "shape": [3, 7]
20
18
  },
21
19
  "x_logical_operator_basis": {
22
- "data": [1, 1, 1],
23
20
  "indices": [0, 1, 3],
24
21
  "indptr": [0, 3],
25
22
  "shape": [1, 7]
26
23
  },
27
24
  "z_logical_operator_basis": {
28
- "data": [1, 1, 1],
29
25
  "indices": [0, 1, 3],
30
26
  "indptr": [0, 3],
31
27
  "shape": [1, 7]
32
28
  },
33
- "notes": "this is a test note"
29
+ "notes": "This is the standard Steane code constructed by setting both Hx and Hz to be the rank 3 Hamming Code."
34
30
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "notes": "Code source: https://arxiv.org/abs/2005.07016. This code is the hypergraph product of two seed codes that have been designed to have minimum-girth 6.",
3
+ "class_name": "HypergraphProductCode",
4
+ "name": "Hypergraph product code",
5
+ "physical_qubit_count": 400,
6
+ "logical_qubit_count": 16,
7
+ "code_distance": 6,
8
+ "x_code_distance": 6,
9
+ "z_code_distance": 6,
10
+ "seed_matrix_1": {
11
+ "indices": [0, 1, 4, 5, 2, 6, 7, 12, 3, 4, 6, 13, 5, 8, 9, 15, 1, 7, 8, 11, 8, 12, 13, 14, 0, 7, 13, 15, 3, 5, 10, 12, 2, 3, 11, 15, 4, 9, 10, 11, 1, 6, 10, 14, 0, 2, 9, 14],
12
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48],
13
+ "shape": [12, 16]
14
+ },
15
+ "seed_matrix_2": {
16
+ "indices": [0, 1, 4, 5, 2, 6, 7, 12, 3, 4, 6, 13, 5, 8, 9, 15, 1, 7, 8, 11, 8, 12, 13, 14, 0, 7, 13, 15, 3, 5, 10, 12, 2, 3, 11, 15, 4, 9, 10, 11, 1, 6, 10, 14, 0, 2, 9, 14],
17
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48],
18
+ "shape": [12, 16]
19
+ },
20
+ "x_logical_operator_basis": {
21
+ "indices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 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, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79],
22
+ "indptr": [0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256],
23
+ "shape": [16, 400]
24
+ },
25
+ "z_logical_operator_basis": {
26
+ "indices": [0, 16, 32, 64, 80, 96, 112, 128, 176, 192, 1, 17, 33, 65, 81, 97, 113, 129, 177, 193, 3, 19, 35, 67, 83, 99, 115, 131, 179, 195, 4, 20, 36, 68, 84, 100, 116, 132, 180, 196, 0, 32, 80, 96, 128, 160, 176, 208, 1, 33, 81, 97, 129, 161, 177, 209, 3, 35, 83, 99, 131, 163, 179, 211, 4, 36, 84, 100, 132, 164, 180, 212, 0, 16, 32, 112, 128, 144, 176, 224, 1, 17, 33, 113, 129, 145, 177, 225, 3, 19, 35, 115, 131, 147, 179, 227, 4, 20, 36, 116, 132, 148, 180, 228, 16, 48, 80, 96, 112, 240, 17, 49, 81, 97, 113, 241, 19, 51, 83, 99, 115, 243, 20, 52, 84, 100, 116, 244],
27
+ "indptr": [0, 10, 20, 30, 40, 48, 56, 64, 72, 80, 88, 96, 104, 110, 116, 122, 128],
28
+ "shape": [16, 400]
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "notes": "Code source: https://arxiv.org/abs/2005.07016. This code is the hypergraph product of two seed codes that have been designed to have minimum-girth 6.",
3
+ "class_name": "HypergraphProductCode",
4
+ "name": "Hypergraph product code",
5
+ "physical_qubit_count": 625,
6
+ "logical_qubit_count": 25,
7
+ "code_distance": 8,
8
+ "x_code_distance": 8,
9
+ "z_code_distance": 8,
10
+ "seed_matrix_1": {
11
+ "indices": [3, 4, 17, 19, 1, 6, 14, 19, 5, 9, 15, 16, 2, 6, 13, 16, 8, 9, 11, 18, 4, 10, 14, 15, 7, 9, 12, 17, 1, 2, 3, 12, 5, 8, 12, 14, 7, 10, 11, 16, 3, 5, 7, 18, 0, 11, 13, 19, 0, 4, 6, 18, 0, 2, 8, 15, 1, 10, 13, 17],
12
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60],
13
+ "shape": [15, 20]
14
+ },
15
+ "seed_matrix_2": {
16
+ "indices": [3, 4, 17, 19, 1, 6, 14, 19, 5, 9, 15, 16, 2, 6, 13, 16, 8, 9, 11, 18, 4, 10, 14, 15, 7, 9, 12, 17, 1, 2, 3, 12, 5, 8, 12, 14, 7, 10, 11, 16, 3, 5, 7, 18, 0, 11, 13, 19, 0, 4, 6, 18, 0, 2, 8, 15, 1, 10, 13, 17],
17
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60],
18
+ "shape": [15, 20]
19
+ },
20
+ "x_logical_operator_basis": {
21
+ "indices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 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, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 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, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],
22
+ "indptr": [0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500],
23
+ "shape": [25, 625]
24
+ },
25
+ "z_logical_operator_basis": {
26
+ "indices": [0, 40, 100, 120, 140, 160, 220, 240, 280, 300, 1, 41, 101, 121, 141, 161, 221, 241, 281, 301, 2, 42, 102, 122, 142, 162, 222, 242, 282, 302, 3, 43, 103, 123, 143, 163, 223, 243, 283, 303, 4, 44, 104, 124, 144, 164, 224, 244, 284, 304, 0, 20, 60, 80, 140, 160, 180, 260, 280, 320, 1, 21, 61, 81, 141, 161, 181, 261, 281, 321, 2, 22, 62, 82, 142, 162, 182, 262, 282, 322, 3, 23, 63, 83, 143, 163, 183, 263, 283, 323, 4, 24, 64, 84, 144, 164, 184, 264, 284, 324, 0, 40, 60, 100, 120, 180, 200, 220, 280, 340, 1, 41, 61, 101, 121, 181, 201, 221, 281, 341, 2, 42, 62, 102, 122, 182, 202, 222, 282, 342, 3, 43, 63, 103, 123, 183, 203, 223, 283, 343, 4, 44, 64, 104, 124, 184, 204, 224, 284, 344, 0, 20, 100, 160, 180, 200, 220, 240, 280, 360, 1, 21, 101, 161, 181, 201, 221, 241, 281, 361, 2, 22, 102, 162, 182, 202, 222, 242, 282, 362, 3, 23, 103, 163, 183, 203, 223, 243, 283, 363, 4, 24, 104, 164, 184, 204, 224, 244, 284, 364, 0, 20, 40, 60, 120, 140, 200, 240, 280, 380, 1, 21, 41, 61, 121, 141, 201, 241, 281, 381, 2, 22, 42, 62, 122, 142, 202, 242, 282, 382, 3, 23, 43, 63, 123, 143, 203, 243, 283, 383, 4, 24, 44, 64, 124, 144, 204, 244, 284, 384],
27
+ "indptr": [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250],
28
+ "shape": [25, 625]
29
+ }
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "notes": "Code source: https://arxiv.org/abs/2005.07016. This code is the hypergraph product of two seed codes that have been designed to have minimum-girth 6.",
3
+ "class_name": "HypergraphProductCode",
4
+ "name": "Hypergraph product code",
5
+ "physical_qubit_count": 900,
6
+ "logical_qubit_count": 36,
7
+ "code_distance": 10,
8
+ "x_code_distance": 10,
9
+ "z_code_distance": 10,
10
+ "seed_matrix_1": {
11
+ "indices": [1, 14, 15, 18, 6, 7, 15, 22, 3, 8, 19, 23, 2, 11, 13, 23, 9, 11, 16, 19, 5, 8, 17, 22, 0, 1, 7, 16, 5, 12, 13, 14, 0, 10, 18, 23, 4, 16, 21, 22, 1, 4, 6, 11, 3, 7, 14, 17, 8, 10, 20, 21, 0, 4, 19, 20, 2, 5, 6, 10, 9, 13, 18, 21, 2, 12, 15, 17, 3, 9, 12, 20],
12
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72],
13
+ "shape": [18, 24]
14
+ },
15
+ "seed_matrix_2": {
16
+ "indices": [1, 14, 15, 18, 6, 7, 15, 22, 3, 8, 19, 23, 2, 11, 13, 23, 9, 11, 16, 19, 5, 8, 17, 22, 0, 1, 7, 16, 5, 12, 13, 14, 0, 10, 18, 23, 4, 16, 21, 22, 1, 4, 6, 11, 3, 7, 14, 17, 8, 10, 20, 21, 0, 4, 19, 20, 2, 5, 6, 10, 9, 13, 18, 21, 2, 12, 15, 17, 3, 9, 12, 20],
17
+ "indptr": [0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72],
18
+ "shape": [18, 24]
19
+ },
20
+ "x_logical_operator_basis": {
21
+ "indices": [0, 1, 4, 7, 9, 12, 14, 15, 16, 18, 1, 3, 4, 5, 6, 9, 11, 13, 15, 16, 17, 19, 1, 2, 3, 4, 5, 8, 9, 12, 13, 14, 16, 20, 0, 2, 4, 5, 6, 7, 10, 13, 17, 21, 0, 1, 3, 4, 6, 8, 9, 10, 11, 13, 14, 22, 1, 2, 7, 8, 9, 10, 11, 12, 13, 15, 17, 23, 24, 25, 28, 31, 33, 36, 38, 39, 40, 42, 25, 27, 28, 29, 30, 33, 35, 37, 39, 40, 41, 43, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 40, 44, 24, 26, 28, 29, 30, 31, 34, 37, 41, 45, 24, 25, 27, 28, 30, 32, 33, 34, 35, 37, 38, 46, 25, 26, 31, 32, 33, 34, 35, 36, 37, 39, 41, 47, 48, 49, 52, 55, 57, 60, 62, 63, 64, 66, 49, 51, 52, 53, 54, 57, 59, 61, 63, 64, 65, 67, 49, 50, 51, 52, 53, 56, 57, 60, 61, 62, 64, 68, 48, 50, 52, 53, 54, 55, 58, 61, 65, 69, 48, 49, 51, 52, 54, 56, 57, 58, 59, 61, 62, 70, 49, 50, 55, 56, 57, 58, 59, 60, 61, 63, 65, 71, 72, 73, 76, 79, 81, 84, 86, 87, 88, 90, 73, 75, 76, 77, 78, 81, 83, 85, 87, 88, 89, 91, 73, 74, 75, 76, 77, 80, 81, 84, 85, 86, 88, 92, 72, 74, 76, 77, 78, 79, 82, 85, 89, 93, 72, 73, 75, 76, 78, 80, 81, 82, 83, 85, 86, 94, 73, 74, 79, 80, 81, 82, 83, 84, 85, 87, 89, 95, 96, 97, 100, 103, 105, 108, 110, 111, 112, 114, 97, 99, 100, 101, 102, 105, 107, 109, 111, 112, 113, 115, 97, 98, 99, 100, 101, 104, 105, 108, 109, 110, 112, 116, 96, 98, 100, 101, 102, 103, 106, 109, 113, 117, 96, 97, 99, 100, 102, 104, 105, 106, 107, 109, 110, 118, 97, 98, 103, 104, 105, 106, 107, 108, 109, 111, 113, 119, 120, 121, 124, 127, 129, 132, 134, 135, 136, 138, 121, 123, 124, 125, 126, 129, 131, 133, 135, 136, 137, 139, 121, 122, 123, 124, 125, 128, 129, 132, 133, 134, 136, 140, 120, 122, 124, 125, 126, 127, 130, 133, 137, 141, 120, 121, 123, 124, 126, 128, 129, 130, 131, 133, 134, 142, 121, 122, 127, 128, 129, 130, 131, 132, 133, 135, 137, 143],
22
+ "indptr": [0, 10, 22, 34, 44, 56, 68, 78, 90, 102, 112, 124, 136, 146, 158, 170, 180, 192, 204, 214, 226, 238, 248, 260, 272, 282, 294, 306, 316, 328, 340, 350, 362, 374, 384, 396, 408],
23
+ "shape": [36, 900]
24
+ },
25
+ "z_logical_operator_basis": {
26
+ "indices": [0, 24, 96, 168, 216, 288, 336, 360, 384, 432, 1, 25, 97, 169, 217, 289, 337, 361, 385, 433, 2, 26, 98, 170, 218, 290, 338, 362, 386, 434, 3, 27, 99, 171, 219, 291, 339, 363, 387, 435, 4, 28, 100, 172, 220, 292, 340, 364, 388, 436, 5, 29, 101, 173, 221, 293, 341, 365, 389, 437, 24, 72, 96, 120, 144, 216, 264, 312, 360, 384, 408, 456, 25, 73, 97, 121, 145, 217, 265, 313, 361, 385, 409, 457, 26, 74, 98, 122, 146, 218, 266, 314, 362, 386, 410, 458, 27, 75, 99, 123, 147, 219, 267, 315, 363, 387, 411, 459, 28, 76, 100, 124, 148, 220, 268, 316, 364, 388, 412, 460, 29, 77, 101, 125, 149, 221, 269, 317, 365, 389, 413, 461, 24, 48, 72, 96, 120, 192, 216, 288, 312, 336, 384, 480, 25, 49, 73, 97, 121, 193, 217, 289, 313, 337, 385, 481, 26, 50, 74, 98, 122, 194, 218, 290, 314, 338, 386, 482, 27, 51, 75, 99, 123, 195, 219, 291, 315, 339, 387, 483, 28, 52, 76, 100, 124, 196, 220, 292, 316, 340, 388, 484, 29, 53, 77, 101, 125, 197, 221, 293, 317, 341, 389, 485, 0, 48, 96, 120, 144, 168, 240, 312, 408, 504, 1, 49, 97, 121, 145, 169, 241, 313, 409, 505, 2, 50, 98, 122, 146, 170, 242, 314, 410, 506, 3, 51, 99, 123, 147, 171, 243, 315, 411, 507, 4, 52, 100, 124, 148, 172, 244, 316, 412, 508, 5, 53, 101, 125, 149, 173, 245, 317, 413, 509, 0, 24, 72, 96, 144, 192, 216, 240, 264, 312, 336, 528, 1, 25, 73, 97, 145, 193, 217, 241, 265, 313, 337, 529, 2, 26, 74, 98, 146, 194, 218, 242, 266, 314, 338, 530, 3, 27, 75, 99, 147, 195, 219, 243, 267, 315, 339, 531, 4, 28, 76, 100, 148, 196, 220, 244, 268, 316, 340, 532, 5, 29, 77, 101, 149, 197, 221, 245, 269, 317, 341, 533, 24, 48, 168, 192, 216, 240, 264, 288, 312, 360, 408, 552, 25, 49, 169, 193, 217, 241, 265, 289, 313, 361, 409, 553, 26, 50, 170, 194, 218, 242, 266, 290, 314, 362, 410, 554, 27, 51, 171, 195, 219, 243, 267, 291, 315, 363, 411, 555, 28, 52, 172, 196, 220, 244, 268, 292, 316, 364, 412, 556, 29, 53, 173, 197, 221, 245, 269, 293, 317, 365, 413, 557],
27
+ "indptr": [0, 10, 20, 30, 40, 50, 60, 72, 84, 96, 108, 120, 132, 144, 156, 168, 180, 192, 204, 214, 224, 234, 244, 254, 264, 276, 288, 300, 312, 324, 336, 348, 360, 372, 384, 396, 408],
28
+ "shape": [36, 900]
29
+ }
30
+ }
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: qec
3
- Version: 0.2.9
3
+ Version: 0.3.2
4
4
  Summary: Python Tools for Quantum Error Correction
5
5
  Author-email: Joschka Roffe <joschka@roffe.eu>, Tamas Noszko <T.K.Noszko@sms.ed.ac.uk>, Liam Veeder-Sweeney <L.D.Veeder-Sweeney@sms.ed.ac.uk>
6
6
  License: MIT License
@@ -34,13 +34,12 @@ Requires-Dist: numpy>=1.24.0
34
34
  Requires-Dist: scipy>=1.9.3
35
35
  Requires-Dist: requests
36
36
  Requires-Dist: beautifulsoup4
37
+ Dynamic: license-file
38
+
39
+ ![qec_banner](https://github.com/user-attachments/assets/9f54ed76-f606-44ed-aa15-275695e45ea0)
37
40
 
38
- <h1>
39
- <p align="center">
40
- <br>QEC
41
- </h1>
42
41
  <p align="center">
43
- Python Tools for Quantum Error Correction
42
+ QEC: Python Tools for Quantum Error Correction
44
43
  <br />
45
44
  <a href="https://qec.codes/">Website</a>
46
45
  ·
@@ -54,8 +53,8 @@ Requires-Dist: beautifulsoup4
54
53
 
55
54
  # Features
56
55
 
57
- ## Code constructions and fundamental analysis
58
- We currently provide the construction methods for the stabilizer generators of the QEC code families below, along with optimized methods to obtain their fundamental properties. All the classes allow to:
56
+ ## Base functionality: code constructions and "fundamental" analysis
57
+ We currently provide the construction methods for the stabilizer generators of the QEC code families below, along with optimized methods to obtain their fundamental properties. All the classes allow you to:
59
58
 
60
59
  - obtain the physical qubit count
61
60
  - obtain the logical qubit count
@@ -63,11 +62,18 @@ We currently provide the construction methods for the stabilizer generators of t
63
62
  - estimate the minimum code distance
64
63
  - obtain a logical basis
65
64
 
66
- The classes (along with their extre methods) are:
65
+ The classes (along with their extra methods) are:
67
66
 
68
67
  - Hyperprgarph Product (HGP) codes, with methods:
69
68
  - construct the x and z stabiliser matrices from the seed codes
70
69
  - obtain the canonical basis (work in progress)
70
+
71
+ - Surface codes
72
+ - Unrotated Surface code
73
+ - Periodic Surface XZZX code
74
+ - Rotated Surface XZZX code
75
+
76
+ - Toric code
71
77
 
72
78
  - Calderbank-Shor-Steane (CSS) codes
73
79
  - check that the seed codes satisfy the CSS criteria
@@ -75,8 +81,24 @@ The classes (along with their extre methods) are:
75
81
  - Stabiliser codes
76
82
  - check that the input stabiliser matrix is valid
77
83
 
78
- ## Circuit compilation
79
- Work in progress.
84
+ ## Circuit compilation
85
+
86
+ >
87
+ > _Note:_ this functionality is still work in progress. The corresponding code is not part of the `main` branch - you can find it on the `circuit_compilation` branch to play around.
88
+ >
89
+
90
+ Currently we only support circuit compilation for memory experiments of:
91
+
92
+ - HGP codes with:
93
+ - "coloration circuit" stabilizer schedule (twice the depth of the most optimal "cardinal circuit" method)
94
+ - _under development:_ "cardinal circuit" stabilizer schedule
95
+
96
+ One can either compile noisy or noisless circuits (for further compilation to one's own needs). To create a nosiy circuit one needs to construct their own noise model, or use one of the available presets:
97
+ - `uniform_depolarizing_noise`
98
+ - `non_uniform_depolarizing_noise` under development
99
+ - `phenomenological_noise`
100
+
101
+ For a more detailed example please see the `demo.ipynb` [notebook](https://github.com/qec-codes/qec/blob/circuit_compilation/demo/demo.ipynb), inside the `demo/` folder of the `circuit_compilation` branch.
80
102
 
81
103
  # Installation
82
104
 
@@ -98,18 +120,10 @@ Finally, install the package:
98
120
  pip install -e .
99
121
  ```
100
122
 
101
- You are all set! To import the package use:
102
-
103
- ```python
104
- In [1]: import qec
105
-
106
- In [2]: qec.__version__
107
- Out [2]: '0.1.0'
108
-
109
- ```
110
-
111
123
  # Examples
112
124
 
125
+ ## Base functionality:
126
+
113
127
  In this example we are going to create the Steane code, and obtain its fundamental code properties. We start by initialising its seed matrices (the [7, 4, 3] Hamming code):
114
128
  ```python
115
129
  In [1]: import numpy as np
@@ -125,11 +139,13 @@ as the Steane code is part of the CSS code family, we can use the `CSSCode` clas
125
139
  In [4]: steane_code = CSSCode(x_stabilizer_matrix = hamming_code,
126
140
  z_stabilizer_matrix = hamming_code,
127
141
  name = "Steane")
128
- In [5]: print(steane_code)
129
- Out [6]: Steane Code: [[N=7, K=1, dx<=3, dz<=3]]
142
+ In [5]: steane_code.compute_exact_code_distance()
143
+ In [6]: print(steane_code)
144
+
145
+ Out [7]: Steane Code: [[N=7, K=1, dx<=3, dz<=3]]
130
146
  ```
131
147
 
132
- we can see that all the fundamental properties (N - physical qubit number, K - logical qubit number, dx - X distance, dz - Z distance) are pre-calculated for us. We can continue our analysis by taking a look at the x and z logical basis of the code:
148
+ we can see that all the fundamental properties (N - physical qubit number, K - logical qubit number, dx - X distance, dz - Z distance). We can continue our analysis by taking a look at the x and z logical basis of the code:
133
149
 
134
150
  ```python
135
151
  In [7]: print(steane_code.x_logical_operator_basis.toarray())
@@ -138,6 +154,21 @@ In [9]: print(steane_code.z_logical_operator_basis.toarray())
138
154
  Out [10]: [[1 1 0 1 0 0 0]]
139
155
  ```
140
156
 
157
+ ## Circuit compilation:
158
+
159
+ ```python
160
+ In [10]: from qec.code_constructions import HypergraphProductCode
161
+ In [11]: from qec.circuit_compilation import MemoryExperiment
162
+
163
+ In [12]: hgp_example_code = HypergraphProductCode(hamming_code, hamming_code)
164
+
165
+ In [12]: hgp_memory_example = MemoryExperiment(hgp_example_code)
166
+
167
+ In [13]: hgp_X_mem_circuit = hgp_memory_example.circuit(basis = 'X', rounds = 1, noise = False)
168
+ ```
169
+
170
+ To see the output circuit and a more detailed example (including a simulation) see the `demo.ipynb` [notebook](https://github.com/qec-codes/qec/blob/circuit_compilation/demo/demo.ipynb), inside the `demo/` folder of the `circuit_compilation` branch.
171
+
141
172
 
142
173
 
143
174
 
@@ -0,0 +1,10 @@
1
+ qec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ qec/code_instances/saved_codes/1.json,sha256=PEErxvbeDupmZ4woHxC6EGAaRxfZ34fb4cOpBkfHvrs,850
3
+ qec/code_instances/saved_codes/2.json,sha256=Dwp5XT65s9Wu51WFJjzNzkP5WYLcVPkVoIpfLb92PMM,2920
4
+ qec/code_instances/saved_codes/3.json,sha256=3FeCj54tl708TeEsaChb_qqr92kw4_9S1wf4VASN-5U,4687
5
+ qec/code_instances/saved_codes/4.json,sha256=H4ktJy02VGPxqSAZkjam1HMlPex2KjmbcG9CBdP4NhI,5452
6
+ qec-0.3.2.dist-info/licenses/LICENSE,sha256=1b_xwNz1znYBfEaCL6pN2gNBAn8pQIjDRs_UhDp1EJI,1066
7
+ qec-0.3.2.dist-info/METADATA,sha256=dXPczwlUgmEfniM9ImiaDIRhIKgGtUH65ycJcMrg_Ek,6392
8
+ qec-0.3.2.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
9
+ qec-0.3.2.dist-info/top_level.txt,sha256=d8l_7pJ5u9uWdviNp0FUK-j8VPZqywkDek7qa4NDank,4
10
+ qec-0.3.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1 +0,0 @@
1
- {"hello": "world"}
@@ -1,8 +0,0 @@
1
- qec/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- qec/code_instances/saved_codes/steane.json,sha256=Hx6TqeE8KHOL189fJG4eIekiuQvVLcltjbOCsN1mEPQ,930
3
- qec/code_instances/saved_codes/test.json,sha256=X48E9qOokqqrvdts8nOJRJN3OWDUoyWxBf7kbu9DBPE,18
4
- qec-0.2.9.dist-info/LICENSE,sha256=1b_xwNz1znYBfEaCL6pN2gNBAn8pQIjDRs_UhDp1EJI,1066
5
- qec-0.2.9.dist-info/METADATA,sha256=y8EmiZQnfE0myLnEs3yAb4XKw_JSLmBYFMgJMy8Nipw,4611
6
- qec-0.2.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
7
- qec-0.2.9.dist-info/top_level.txt,sha256=d8l_7pJ5u9uWdviNp0FUK-j8VPZqywkDek7qa4NDank,4
8
- qec-0.2.9.dist-info/RECORD,,