scalerqec.Monte package

Submodules

scalerqec.Monte.monteLER module

scalerqec.Monte.monteLER.MAX_SAMPLE_GAP = 500000

Use stim and Monte Calo sampling method to estimate the logical error rate The sampler will finally decide how many samples to used. Shot is the initial guess of how many samples to used. We also need to estimate the uncertainty of the LER.

scalerqec.Monte.monteLER.count_logical_errors(circuit: Circuit, num_shots: int) int[source]
scalerqec.Monte.monteLER.format_with_uncertainty(value, std)[source]

Format a value and its standard deviation in the form: 1.23(±0.45)×10^k

class scalerqec.Monte.monteLER.MonteLERcalc(time_budget=10, samplebudget=100000, MIN_NUM_LE_EVENT=3)[source]

Bases: object

calculate_LER_from_StabCode(qeccirc: StabCode, noise_model: NoiseModel, repeat=1)[source]

Calculate the logical error rate from a StabCode object using Monte Carlo sampling.

calculate_LER_from_file(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_LER_from_file_sinter(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_LER_from_my_random_sampler(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_standard_error()[source]

Calculate the standard error of the LER.

get_sample_used()[source]

Module contents

class scalerqec.Monte.MonteLERcalc(time_budget=10, samplebudget=100000, MIN_NUM_LE_EVENT=3)[source]

Bases: object

calculate_LER_from_StabCode(qeccirc: StabCode, noise_model: NoiseModel, repeat=1)[source]

Calculate the logical error rate from a StabCode object using Monte Carlo sampling.

calculate_LER_from_file(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_LER_from_file_sinter(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_LER_from_my_random_sampler(samplebudget, filepath, pvalue, repeat=1)[source]
calculate_standard_error()[source]

Calculate the standard error of the LER.

get_sample_used()[source]