You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Nice to have functions for quick data collection
238
+
If one is only interested in obtaining the number of shuttling operations required for different levels of compilation (and doesn't need the compiled circuit) for a given syndrome circuit, a function is provided for this for bot Shor and naive syndrome extraction. The last two numbers are related to the minimum number of shuttles, if allowing blank qubits in the array. This number wasn't optimized, and is computed by just counting the number of gaps in the chains. Refer to the paper for more information on this.
24 is the uncompiled number of shuttles, 11 is gate shuffled, 9 is ancillary reindexing, and 7 is ancillary + data reindexing.
238
274
239
275
## How to do simulations with this software
276
+
`src/plotting_CC2xn.jl` contains some lines at the bottom that can be commented or uncommented to generate various plots that appear in the paper. For example
post_ec_error_rates_MS_CA = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, gate_shuffle_circ, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
57
+
post_ec_error_rates_MS_CA = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, gate_shuffled_circ, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
58
58
x_error_MS_CA = [post_ec_error_rates_MS_CA[i][1] for i in eachindex(post_ec_error_rates_MS_CA)]
59
59
z_error_MS_CA = [post_ec_error_rates_MS_CA[i][2] for i in eachindex(post_ec_error_rates_MS_CA)]
60
60
61
61
# Gate shuffle- gate noise== init noise
62
-
post_ec_error_rates_MS_CB = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, gate_shuffle_circ, p, p_shift, p_wait, gate_noise, nsamples=nsamples) for p in error_rates]
62
+
post_ec_error_rates_MS_CB = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, gate_shuffled_circ, p, p_shift, p_wait, gate_noise, nsamples=nsamples) for p in error_rates]
63
63
x_error_MS_CB = [post_ec_error_rates_MS_CB[i][1] for i in eachindex(post_ec_error_rates_MS_CB)]
64
64
z_error_MS_CB = [post_ec_error_rates_MS_CB[i][2] for i in eachindex(post_ec_error_rates_MS_CB)]
65
65
@@ -147,15 +147,15 @@ function my_plot_both_synd(code::AbstractECC, decoder::AbstractSyndromeDecoder,
147
147
z_error_MB_CB_shor = [post_ec_error_rates_MB_CB_shor[i][2] for i in eachindex(post_ec_error_rates_MB_CB_shor)]
post_ec_error_rates_MS_CA_shor = [evaluate_code_decoder_shor_syndrome(checks, decoder, ecirc, cat, gate_shuffle_circ, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
153
+
post_ec_error_rates_MS_CA_shor = [evaluate_code_decoder_shor_syndrome(checks, decoder, ecirc, cat, gate_shuffled_circ, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
154
154
x_error_MS_CA_shor = [post_ec_error_rates_MS_CA_shor[i][1] for i in eachindex(post_ec_error_rates_MS_CA_shor)]
155
155
z_error_MS_CA_shor = [post_ec_error_rates_MS_CA_shor[i][2] for i in eachindex(post_ec_error_rates_MS_CA_shor)]
156
156
157
157
# Gate shuffle- gate noise== init noise
158
-
post_ec_error_rates_MS_CB_shor = [evaluate_code_decoder_shor_syndrome(checks, decoder, ecirc, cat, gate_shuffle_circ, p, p_shift, p_wait, gate_noise, nsamples=nsamples) for p in error_rates]
158
+
post_ec_error_rates_MS_CB_shor = [evaluate_code_decoder_shor_syndrome(checks, decoder, ecirc, cat, gate_shuffled_circ, p, p_shift, p_wait, gate_noise, nsamples=nsamples) for p in error_rates]
159
159
x_error_MS_CB_shor = [post_ec_error_rates_MS_CB_shor[i][1] for i in eachindex(post_ec_error_rates_MS_CB_shor)]
160
160
z_error_MS_CB_shor = [post_ec_error_rates_MS_CB_shor[i][2] for i in eachindex(post_ec_error_rates_MS_CB_shor)]
161
161
@@ -279,158 +279,6 @@ function my_plot_both_synd(code::AbstractECC, decoder::AbstractSyndromeDecoder,
279
279
return f
280
280
end
281
281
282
-
######## Legacy code for plotting the LDPC codes given to me
283
-
function LDPC_plot(code::AbstractECC, decoder::AbstractSyndromeDecoder, p_shift=0.0001, p_wait=1-exp(-14.5/28_000); name=string(typeof(code)))
284
-
title = name*" Code - Naive Syndrome Circuit"
285
-
checks = parity_checks(code)
286
-
scirc, _ = naive_syndrome_circuit(checks)
287
-
288
-
#ecirc = naive_encoding_circuit(code)
289
-
ecirc =nothing
290
-
291
-
nsamples =10
292
-
gate_fidelity =0.9995
293
-
m =10# improvment factor
294
-
gate_noise =1- gate_fidelity
295
-
296
-
error_rates = exp10.(range(-4,-0.5,length=30))
297
-
298
-
# All to all connectivty - no gate noise
299
-
post_ec_error_rates_MA_CA = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, scirc, p, 0, 0, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
300
-
x_error_MA_CA = [post_ec_error_rates_MA_CA[i][1] for i in eachindex(post_ec_error_rates_MA_CA)]
301
-
z_error_MA_CA = [post_ec_error_rates_MA_CA[i][2] for i in eachindex(post_ec_error_rates_MA_CA)]
302
-
303
-
# All to all connectivty - gate noise == init noise
304
-
post_ec_error_rates_MA_CB= [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, scirc, p, 0, 0, gate_noise, nsamples=nsamples) for p in error_rates]
305
-
x_error_MA_CB = [post_ec_error_rates_MA_CB[i][1] for i in eachindex(post_ec_error_rates_MA_CB)]
306
-
z_error_MA_CB = [post_ec_error_rates_MA_CB[i][2] for i in eachindex(post_ec_error_rates_MA_CB)]
307
-
308
-
# Circuit compilation
309
-
new_circuit, order = CircuitCompilation2xn.ancil_reindex_pipeline(scirc)
310
-
311
-
# Circuit comp - no gate noise
312
-
post_ec_error_rates_MC_CA = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, new_circuit, p, p_shift*p*m, p_wait*p*m, gate_noise*p*m, nsamples=nsamples) for p in error_rates]
313
-
x_error_MC_CA = [post_ec_error_rates_MC_CA[i][1] for i in eachindex(post_ec_error_rates_MC_CA)]
314
-
z_error_MC_CA = [post_ec_error_rates_MC_CA[i][2] for i in eachindex(post_ec_error_rates_MC_CA)]
315
-
316
-
# Circuit Comp gate noise == init noise
317
-
post_ec_error_rates_MC_CB = [evaluate_code_decoder_naive_syndrome(checks, decoder, ecirc, new_circuit, p, p_shift, p_wait, gate_noise, nsamples=nsamples) for p in error_rates]
318
-
x_error_MC_CB = [post_ec_error_rates_MC_CB[i][1] for i in eachindex(post_ec_error_rates_MC_CB)]
319
-
z_error_MC_CB = [post_ec_error_rates_MC_CB[i][2] for i in eachindex(post_ec_error_rates_MC_CB)]
0 commit comments