Skip to content

Commit

Permalink
pauli error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
meandmytram committed Nov 29, 2024
1 parent 2330239 commit 31d1916
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/decoding/quantum_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def generate_errors(lattice_size, error_rate, num_experiments, error_model, seed


def run_experiment(
lattice_size, chi_max, error_rate, num_experiments, error_model, seed
lattice_size, chi_max, error_rate, num_experiments, error_model, seed, errors
):
"""Run the experiment consisting of multiple single experiments."""
logging.info(
Expand All @@ -151,9 +151,6 @@ def run_experiment(
)

failures = []
errors = generate_errors(
lattice_size, error_rate, num_experiments, error_model, seed
)

for l in tqdm(range(num_experiments)):
try:
Expand Down Expand Up @@ -200,13 +197,21 @@ def save_experiment_data(data, lattice_size, chi_max, error_rate, error_model, s
def main():
"""Main entry point."""
args = parse_arguments()
errors = generate_errors(
args.lattice_size,
args.error_rate,
args.num_experiments,
args.error_model,
args.seed,
)
experiment_data = run_experiment(
args.lattice_size,
args.bond_dim,
args.error_rate,
args.num_experiments,
args.error_model,
args.seed,
errors,
)
save_experiment_data(
experiment_data,
Expand Down

0 comments on commit 31d1916

Please sign in to comment.