Skip to content

Commit 84b6842

Browse files
committed
further progress on codebase cleanup and readme
1 parent eed6151 commit 84b6842

11 files changed

+174
-54
lines changed

README.md

Lines changed: 126 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# CircuitCompilation2xn
2-
CircuitCompilation2xn offers some tools to manipulate syndrome extracting circuits for better use on 2xn quantum dot hardwares. For more information please refer to the [paper](https://arxiv.org/abs/2501.09061) , and if one would desire to cite this tool, please cite the paper.
3-
## How to use this?
2+
CircuitCompilation2xn offers some tools to manipulate syndrome extracting circuits for better use on 2xn quantum dot hardwares. For more information please refer to our [paper](https://arxiv.org/abs/2501.09061) , and if one would desire to cite this tool, please cite the paper.
3+
4+
## Tutorial
45
First, we state that this work is closely integrated with [QuantumClifford.jl](https://github.com/QuantumSavory/QuantumClifford.jl)
56

67
To begin, we will need either a parity check matrix (or stabilizer tableau), or a `Vector{QuantumClifford.AbstractOperation}` containing the syndrome extracting circuit. Currently, we enforce the constraint that syndrome extracting circuit will always be of a form where the two qubit gates act one one qubit in the data qubit region and one in the ancilla region (i.e. there are two qubit gates that go between data or ancilla qubits).
@@ -9,6 +10,10 @@ To begin, we will need either a parity check matrix (or stabilizer tableau), or
910

1011
![Figure 3 from paper:](assets/images/syndrome_circuits.png)
1112

13+
From here on, this tutorial will contain a few examples, divided into sections below:
14+
- Naive syndrome circuits example
15+
- Shor syndrome circuits example
16+
1217
### Naive syndrome circuits example
1318
First we will need a error correction code, and while any will do, let's use one that's already defined within `QuantumClifford.jl`, and is quite pedagogical. Furthermore, one might want to consider the X and Z checks seperately to guarantee commutativity, however for this first example and for simplicity, we will consider them together. (This is addressed later in this README)
1419

@@ -63,6 +68,125 @@ Now we can use CircuitCompilation2xn to compile this circuit in different ways,
6368

6469
```
6570
using CircuitCompilation2xn
71+
non_mz, mz = CircuitCompilation2xn.two_qubit_sieve(scirc)
72+
```
73+
`two_qubit_sieve` splits the input circuit into two-qubit gates, and non two-quibit gates, which for both types of syndrome extraction currently available in `QuantumClifford.jl`, will just consist two qubit gates and measurements. If cat states are used in the syndrome extracting circuit, those will need to be removed prior to using `two_qubit_sieve`. This function now gives us with only the two qubit gates in the first item returned, in this example `non_mz`:
74+
75+
![Uncompiled naive Steane7 circuit's two qubit gates](assets/images/naive_steane_nonmz.png)
76+
77+
The `calculate_shifts` function is used to evaluate the required shuttling operations required carry out the provided circuit. It returns a vector of vectors, each corresponding to a subcircuit that can be run in parallel. The length of this is then the number of shuttles required. Unsurprisingly, not doing any compilation leads to a requirement of quite a few shuttle operations:
78+
```
79+
julia> CircuitCompilation2xn.calculate_shifts(non_mz)
80+
24-element Vector{Vector{QuantumClifford.AbstractOperation}}:
81+
[sXCX(4,8)]
82+
[sXCX(5,8)]
83+
[sXCX(6,8)]
84+
[sXCX(7,8)]
85+
[sXCX(2,9)]
86+
[sXCX(3,9)]
87+
[sXCX(6,9)]
88+
[sXCX(7,9)]
89+
[sXCX(1,10)]
90+
[sXCX(3,10)]
91+
[sXCX(5,10)]
92+
[sXCX(7,10)]
93+
[sCNOT(4,11)]
94+
[sCNOT(5,11)]
95+
[sCNOT(6,11)]
96+
[sCNOT(7,11)]
97+
[sCNOT(2,12)]
98+
[sCNOT(3,12)]
99+
[sCNOT(6,12)]
100+
[sCNOT(7,12)]
101+
[sCNOT(1,13)]
102+
[sCNOT(3,13)]
103+
[sCNOT(5,13)]
104+
[sCNOT(7,13)]
105+
```
106+
107+
We can trivially reduce this number by sorting the gates by their $\delta$ values as described in our [paper](https://arxiv.org/abs/2501.09061).
108+
109+
```
110+
julia> gate_shuffled_circ = CircuitCompilation2xn.gate_shuffle_circ(non_mz)
111+
julia> CircuitCompilation2xn.calculate_shifts(gate_shuffled_circ)
112+
11-element Vector{Vector{QuantumClifford.AbstractOperation}}:
113+
[sXCX(7,8)]
114+
[sXCX(6,8), sXCX(7,9)]
115+
[sXCX(5,8), sXCX(6,9), sXCX(7,10)]
116+
[sXCX(4,8), sCNOT(7,11)]
117+
[sXCX(5,10), sCNOT(6,11), sCNOT(7,12)]
118+
[sXCX(3,9), sCNOT(5,11), sCNOT(6,12), sCNOT(7,13)]
119+
[sXCX(2,9), sXCX(3,10), sCNOT(4,11)]
120+
[sCNOT(5,13)]
121+
[sXCX(1,10), sCNOT(3,12)]
122+
[sCNOT(2,12), sCNOT(3,13)]
123+
[sCNOT(1,13)]
124+
```
125+
126+
This circuit visualized with Quantikz:
127+
![Gate shuffled naive Steane7 circuit](assets/images/naive_steane_gate_shuffled.png)
128+
129+
To further compile this, we can use the block packing heuristics also called AHR in our [paper](https://arxiv.org/abs/2501.09061)
130+
131+
```
132+
julia> ahr_circ, ahr_order = CircuitCompilation2xn.ancil_reindex_pipeline(non_mz);
133+
julia> CircuitCompilation2xn.calculate_shifts(ahr_circ)
134+
9-element Vector{Vector{QuantumClifford.AbstractOperation}}:
135+
[sXCX(7,8)]
136+
[sCNOT(7,9)]
137+
[sXCX(7,10), sXCX(5,8)]
138+
[sXCX(6,10), sCNOT(7,11), sCNOT(5,9)]
139+
[sXCX(7,12), sXCX(3,8), sCNOT(6,11)]
140+
[sXCX(6,12), sCNOT(7,13), sCNOT(3,9)]
141+
[sXCX(5,12), sXCX(3,10), sXCX(1,8), sCNOT(6,13)]
142+
[sXCX(4,12), sXCX(2,10), sCNOT(5,13), sCNOT(3,11), sCNOT(1,9)]
143+
[sCNOT(4,13), sCNOT(2,11)]
144+
julia> ahr_circ
145+
```
146+
147+
![AHR naive Steane](assets/images/naive_steane_ahr.png)
148+
149+
The `ancil_reindex_pipeline` function returns first the reindexed circuit, and second a dictionary which was used to reindex the circuit. The function itself tries a variety of heurisitics and then picks the best one. Gate shuffling is also automatically applied. In the naive syndrome case, we won't need to relabel the measurement circuit (as they are all Z measurements), but for Shor syndrome extraction these dicitonaries will be needed to relabel the cat state generation. For thoroughness this is how one would generally finish up piecing the reindexed circuit back together:
150+
151+
```
152+
julia> new_mz = CircuitCompilation2xn.reindex_by_dict(mz, ahr_order)
153+
julia> vcat(ahr_circ, new_mz)
154+
```
155+
156+
![AHR naive Steane full](assets/images/naive_steane_ahr_full.png)
157+
158+
159+
Another thing to note: `ancil_reindex_pipeline` applies the `two_qubit_sieve` function automatically, and then reindexes the qubits in the non-qubit portions as well, so we just as well could have done:
160+
161+
```
162+
julia> scirc, _ = QuantumClifford.ECC.naive_syndrome_circuit(code);
163+
julia> code = Steane7();
164+
julia> ahr, _ = CircuitCompilation2xn.ancil_reindex_pipeline(scirc);
165+
julia> ahr
166+
```
167+
168+
While not mentioned in the paper, for in practice it never affected Shor-style syndrome extraction, on naive syndrome circuit one can instead fix the ancilla and reindex the data qubits instead to achieve a reduction in shuttles with the same simple heuristic techniques:
169+
170+
```
171+
julia> code = Steane7();
172+
julia> scirc, _ = QuantumClifford.ECC.naive_syndrome_circuit(code);
173+
julia> data_comp_circ, data_order = CircuitCompilation2xn.data_ancil_reindex(scirc, numQubits);
174+
julia> CircuitCompilation2xn.calculate_shifts(data_comp_circ)
175+
7-element Vector{Vector{QuantumClifford.AbstractOperation}}:
176+
[sXCX(4,8), sXCX(6,10)]
177+
[sCNOT(4,9), sCNOT(6,11), sXCX(3,8), sXCX(7,12), sXCX(5,10)]
178+
[sXCX(4,10), sXCX(6,12), sCNOT(3,9), sCNOT(7,13), sXCX(2,8), sCNOT(5,11)]
179+
[sCNOT(4,11), sCNOT(6,13), sCNOT(2,9), sXCX(1,8)]
180+
[sXCX(4,12), sXCX(2,10), sCNOT(1,9)]
181+
[sCNOT(4,13), sXCX(3,12), sCNOT(2,11)]
182+
[sCNOT(3,13)]
183+
julia> data_comp_circ
66184
```
185+
![Data compiled Steane circuit](assets/images/naive_steane_data.png)
67186

187+
Note that if using an encoding circuit for simulation, that will also need to be reindexed if you reindex the data qubits:
188+
```
189+
julia> ecirc = QuantumClifford.ECC.naive_encoding_circuit(code)
190+
```
191+
## Further information
68192
README under construction....

assets/images/naive_steane_ahr.png

127 KB
Loading
166 KB
Loading
168 KB
Loading
127 KB
Loading
127 KB
Loading

src/CircuitCompilation2xn.jl

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ using NPZ
1212
using LDPCDecoders
1313
using SparseArrays
1414

15-
threeRepCode = [sCNOT(1,4),sCNOT(2,4),sCNOT(2,5),sCNOT(3,5)]
16-
k4_example = [sCNOT(1,4),sCNOT(3,4),sCNOT(2,5),sCNOT(2,4),sCNOT(2,7),sCNOT(3,6),sCNOT(3,5)]
17-
example_that_broke_h1= [sCNOT(5,6), sCNOT(3,6),sCNOT(1,6),sCNOT(4,7),sCNOT(2,7),sCNOT(4,8)]
18-
1915
struct qblock
2016
elements::Vector{Int}
2117
ancil::Int
@@ -326,56 +322,56 @@ function ancil_reindex_pipeline(circuit, inverted=false)
326322
blocks = create_blocks(circuit)
327323

328324
h1_order = ancil_sort_h1(blocks)
329-
h1_circuit = perfect_reindex(circuit, h1_order)
325+
h1_circuit = reindex_by_dict(circuit, h1_order)
330326
h1_batches = gate_Shuffle(h1_circuit)
331327

332328
h2_order = ancil_sort_h2(blocks)
333-
h2_circuit = perfect_reindex(circuit, h2_order)
329+
h2_circuit = reindex_by_dict(circuit, h2_order)
334330
h2_batches = gate_Shuffle(h2_circuit)
335331

336332
h3_order = ancil_sort_h3(blocks)
337-
h3_circuit = perfect_reindex(circuit, h3_order)
333+
h3_circuit = reindex_by_dict(circuit, h3_order)
338334
h3_batches = gate_Shuffle(h3_circuit)
339335

340336
iden_order = identity_sort(blocks)
341-
iden_circuit = perfect_reindex(circuit, iden_order)
337+
iden_circuit = reindex_by_dict(circuit, iden_order)
342338
iden_batches = gate_Shuffle(iden_circuit)
343339

344340
# Returns the best reordered circuit
345341
if length(h1_batches)<=length(h2_batches) && length(h1_batches)<=length(iden_batches) && length(h1_batches)<=length(h3_batches)
346342
new_circuit = h1_circuit
347343
if !inverted
348-
new_mz = perfect_reindex(measurement_circuit,h1_order)
344+
new_mz = reindex_by_dict(measurement_circuit,h1_order)
349345
end
350346
order = h1_order
351-
println("H1")
347+
#println("H1")
352348
elseif length(h2_batches)<=length(h1_batches) && length(h2_batches)<=length(iden_batches) && length(h2_batches)<=length(h3_batches)
353349
new_circuit = h2_circuit
354350
if !inverted
355-
new_mz = perfect_reindex(measurement_circuit,h2_order)
351+
new_mz = reindex_by_dict(measurement_circuit,h2_order)
356352
end
357353
order = h2_order
358-
println("H2")
354+
#println("H2")
359355
elseif length(h3_batches)<=length(h1_batches) && length(h3_batches)<=length(iden_batches) && length(h3_batches)<=length(h2_batches)
360356
new_circuit = h3_circuit
361357
if !inverted
362-
new_mz = perfect_reindex(measurement_circuit,h3_order)
358+
new_mz = reindex_by_dict(measurement_circuit,h3_order)
363359
end
364360
order = h3_order
365-
println("H3")
361+
#println("H3")
366362
else
367363
new_circuit = iden_circuit
368364
if !inverted
369-
new_mz = perfect_reindex(measurement_circuit,iden_order)
365+
new_mz = reindex_by_dict(measurement_circuit,iden_order)
370366
end
371367
order = iden_order
372-
println("IDEN")
368+
#println("IDEN")
373369
end
374370

375371
if inverted
376372
new_mz = measurement_circuit
377373
end
378-
return vcat(gate_Shuffle!(new_circuit), new_mz), order
374+
return vcat(gate_shuffle_circ(new_circuit), new_mz), order
379375
end
380376

381377
"""Special case of the reindexing pipeline that exploits the structure of Shor syndrome circuits"""
@@ -389,13 +385,13 @@ function ancil_reindex_pipeline_shor_syndrome(scirc, extra_info=false)
389385
order = shor_syndrome_sort(blocks)
390386
end
391387

392-
new_circuit = perfect_reindex(scirc, order)
393-
new_mz = perfect_reindex(measurement_circuit, order)
388+
new_circuit = reindex_by_dict(scirc, order)
389+
new_mz = reindex_by_dict(measurement_circuit, order)
394390

395391
if extra_info
396-
return vcat(gate_Shuffle!(new_circuit), new_mz), order, chain_info
392+
return vcat(gate_shuffle_circ(new_circuit), new_mz), order, chain_info
397393
else
398-
return vcat(gate_Shuffle!(new_circuit), new_mz), order
394+
return vcat(gate_shuffle_circ(new_circuit), new_mz), order
399395
end
400396
end
401397

@@ -433,9 +429,8 @@ function gate_Shuffle(circuit)
433429
calculate_shifts(circuit)
434430
end
435431

436-
# TODO Absolutely horrible name
437-
"""Sorts by [`get_delta`](@ref) and then returns the circuirt. One needs to do circ = gate_Shuffle!(circ)"""
438-
function gate_Shuffle!(circuit) # TODO
432+
"""Sorts by [`get_delta`](@ref) and then returns the circuit. Legacy note, used to be called gate_Shuffle!"""
433+
function gate_shuffle_circ(circuit)
439434
non_mz, mz = two_qubit_sieve(circuit)
440435
new_circ = sort!(non_mz, by = x -> get_delta(x))
441436
return vcat(new_circ, mz)
@@ -479,7 +474,7 @@ function ancil_sort_h2(blockset, startAncil=nothing)
479474
return order
480475
end
481476

482-
"""Sorts first by total length of the block visualation and secondarily by the ghost length"""
477+
"""Sorts by the two norm of the total and ghost length"""
483478
function ancil_sort_h3(blockset, startAncil=nothing)
484479
if isnothing(startAncil)
485480
sort!(blockset, by = x -> (x.ancil), rev=false)
@@ -498,8 +493,8 @@ function ancil_sort_h3(blockset, startAncil=nothing)
498493
return order
499494
end
500495

501-
"""This function should replace all other reindexing functions, and should work on an entire circuit."""
502-
function perfect_reindex(circ, order::Dict)
496+
"""This function should replace all other reindexing functions, and should work on an entire circuit. Legacy Note: used to be called perfect_reindex"""
497+
function reindex_by_dict(circ, order::Dict)
503498
function new_index(index::Int)
504499
get(order,index,index)
505500
end
@@ -721,12 +716,13 @@ function shorNumbers(circuit)
721716
return shifts
722717
end
723718

724-
function randCircuit(n, wr, wc)
725-
H = LDPCDecoders.parity_check_matrix(n, wr, wc)
726-
checks = Stabilizer(H, zeros(Bool, size(H)))
727-
cat, scirc, _ = QuantumClifford.ECC.shor_syndrome_circuit(checks)
728-
return scirc
729-
end
719+
# TODO delete after ensuring this is never used
720+
# function randCircuit(n, wr, wc)
721+
# H = LDPCDecoders.parity_check_matrix(n, wr, wc)
722+
# checks = Stabilizer(H, zeros(Bool, size(H)))
723+
# cat, scirc, _ = QuantumClifford.ECC.shor_syndrome_circuit(checks)
724+
# return scirc
725+
# end
730726

731727
"""Returns a binary matrix, taking the OR of the X and Z matrices"""
732728
function get_matrix(checks::Stabilizer)

src/newQC_plotting_CC2xn.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function CSS_my_plot_both_synd(code::bootleg_CSS, p_shift=0.0001, p_wait=1-exp(-
187187

188188
# Circuit compilation
189189
new_circuit, order = CircuitCompilation2xn.ancil_reindex_pipeline(scirc)
190-
new_cat = CircuitCompilation2xn.perfect_reindex(cat, order)
190+
new_cat = CircuitCompilation2xn.reindex_by_dict(cat, order)
191191

192192
# Circuit comp - no gate noise
193193
post_ec_error_rates_MC_CA_shor = [CSS_evaluate_code_decoder_shor_syndrome(code, new_cat, new_circuit, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
@@ -207,7 +207,7 @@ function CSS_my_plot_both_synd(code::bootleg_CSS, p_shift=0.0001, p_wait=1-exp(-
207207
try
208208
# Special shor syndrome Compiled circuit
209209
shor_new_circuit, shor_order = CircuitCompilation2xn.ancil_reindex_pipeline_shor_syndrome(scirc)
210-
shor_cat = CircuitCompilation2xn.perfect_reindex(cat, shor_order)
210+
shor_cat = CircuitCompilation2xn.reindex_by_dict(cat, shor_order)
211211

212212
# Special Shor circuit Compilation - no gate noise
213213
post_ec_error_rates_MD_CA_shor = [CSS_evaluate_code_decoder_shor_syndrome(code, shor_cat, shor_new_circuit, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]

src/pf_evaluation.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function vary_shift_errors_plot_pf(checks::Stabilizer, name="")
262262
for i in n-k+1:n
263263
push!(encoding_locs, data_order[i])
264264
end
265-
renewed_ecirc = perfect_reindex(ecirc, data_order)
265+
renewed_ecirc = reindex_by_dict(ecirc, data_order)
266266

267267
dataQubits = n
268268
reverse_dict = Dict(value => key for (key, value) in data_order)
@@ -348,7 +348,7 @@ function vary_shift_errors_plot_shor_syndrome(code::AbstractECC, name=string(typ
348348

349349
# Anc Compiled circuit
350350
new_circuit, order = ancil_reindex_pipeline(scirc)
351-
new_cat = perfect_reindex(cat, order)
351+
new_cat = reindex_by_dict(cat, order)
352352
compiled_post_ec_error_rates_s0 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat, new_circuit, p, 0) for p in error_rates]
353353
compiled_post_ec_error_rates_s10 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat, new_circuit, p, p/10) for p in error_rates]
354354
compiled_post_ec_error_rates_s100 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat, new_circuit, p, p) for p in error_rates]
@@ -361,7 +361,7 @@ function vary_shift_errors_plot_shor_syndrome(code::AbstractECC, name=string(typ
361361

362362
# Special shor compilation
363363
shor_circuit, shorder = ancil_reindex_pipeline_shor_syndrome(scirc)
364-
shor_cat = perfect_reindex(cat, shorder)
364+
shor_cat = reindex_by_dict(cat, shorder)
365365
shor_post_ec_error_rates_s0 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, shor_cat, shor_circuit, p, 0) for p in error_rates]
366366
shor_post_ec_error_rates_s10 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, shor_cat, shor_circuit, p, p/10) for p in error_rates]
367367
shor_post_ec_error_rates_s100 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, shor_cat, shor_circuit, p, p) for p in error_rates]
@@ -374,8 +374,8 @@ function vary_shift_errors_plot_shor_syndrome(code::AbstractECC, name=string(typ
374374

375375
# Data + Anc Compiled circuit
376376
renewed_circuit, data_order = data_ancil_reindex(scirc, total_qubits)
377-
renewed_ecirc = perfect_reindex(ecirc, data_order)
378-
renewed_cat = perfect_reindex(cat, data_order)
377+
renewed_ecirc = reindex_by_dict(ecirc, data_order)
378+
renewed_cat = reindex_by_dict(cat, data_order)
379379

380380
# Data + Anc Compiled circuit
381381
s, n = size(checks)
@@ -480,7 +480,7 @@ function realistic_noise_logical_physical_error(code::AbstractECC, p_shift=0.000
480480

481481
# # Anc Compiled circuit
482482
# new_circuit, order = ancil_reindex_pipeline(scirc)
483-
# new_cat = perfect_reindex(cat, order)
483+
# new_cat = reindex_by_dict(cat, order)
484484
# compiled_post_ec_error_rates_s0 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat, add_two_qubit_gate_noise(new_circuit, p_gate), p, p_shift, p_wait, nframes=nframes) for p in error_rates]
485485
# compiled_post_ec_error_rates_s1 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat, add_two_qubit_gate_noise(new_circuit, p_gate*m), p, p_shift*m, 1-exp(-14.5*m/28_000), nframes=nframes) for p in error_rates]
486486
# compiled_x_error_s0 = [compiled_post_ec_error_rates_s0[i][1] for i in eachindex(compiled_post_ec_error_rates_s0)]
@@ -490,7 +490,7 @@ function realistic_noise_logical_physical_error(code::AbstractECC, p_shift=0.000
490490

491491
# Special shor syndrome Compiled circuit
492492
shor_new_circuit, shor_order = ancil_reindex_pipeline_shor_syndrome(scirc)
493-
shor_cat = perfect_reindex(cat, shor_order)
493+
shor_cat = reindex_by_dict(cat, shor_order)
494494
shor_post_ec_error_rates_s0 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, shor_cat, add_two_qubit_gate_noise(shor_new_circuit, p_gate), p, p_shift, p_wait, nframes=nframes) for p in error_rates]
495495
shor_post_ec_error_rates_s1 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, shor_cat, add_two_qubit_gate_noise(shor_new_circuit, p_gate*m), p, p_shift*m, 1-exp(-14.5*m/28_000), nframes=nframes) for p in error_rates]
496496
shor_x_error_s0 = [shor_post_ec_error_rates_s0[i][1] for i in eachindex(shor_post_ec_error_rates_s0)]
@@ -556,7 +556,7 @@ function realistic_noise_vary_params(code::AbstractECC, p_shift=0.01, p_wait=1-e
556556

557557
# Anc Compiled circuit
558558
new_circuit, order = ancil_reindex_pipeline(scirc)
559-
new_cat = perfect_reindex(cat, order)
559+
new_cat = reindex_by_dict(cat, order)
560560
compiled_post_ec_error_rates_s0 = [evaluate_code_decoder_shor_syndrome(checks, ecirc, new_cat,
561561
add_two_qubit_gate_noise(new_circuit, p_gate*m), 0, p_shift*m, p_wait*m, nframes=nframes) for m in error_rates]
562562

0 commit comments

Comments
 (0)