From 1eb687ba396ff2c98cdc0b4b1ff3c2112479a6f0 Mon Sep 17 00:00:00 2001 From: meandmytram Date: Wed, 24 Apr 2024 20:16:49 +0000 Subject: [PATCH] update scripts --- examples/decoding/classical.py | 6 +++--- examples/decoding/decoding.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/decoding/classical.py b/examples/decoding/classical.py index 6cf76ced..56d328b2 100755 --- a/examples/decoding/classical.py +++ b/examples/decoding/classical.py @@ -53,9 +53,9 @@ parser = argparse.ArgumentParser( description="Launch calculations on Compute Canada clusters." ) -parser.add_argument("system_size", type=int, help="System size as the number of bits.") +parser.add_argument("--system_size", type=int, help="System size as the number of bits.") parser.add_argument( - "bond_dim", type=int, help="Maximum bond dimension to keep during contraction." + "--bond_dim", type=int, help="Maximum bond dimension to keep during contraction." ) args = parser.parse_args() @@ -125,7 +125,7 @@ chi_max=CHI_MAX_CONTRACTOR, renormalise=True, result_to_explicit=False, - strategy="Naive", + strategy="Optimized", silent=True, ) logging.info("Decoding the perturbed codeword state using DMRG.") diff --git a/examples/decoding/decoding.py b/examples/decoding/decoding.py index c7b270d0..60ff5963 100644 --- a/examples/decoding/decoding.py +++ b/examples/decoding/decoding.py @@ -714,6 +714,8 @@ def apply_constraints( entropies = [] bond_dims = [] + # Using matrix front minimization technique to optimize the order + # in which to apply the checks. if strategy == "Optimized": mpo_location_matrix = np.zeros((len(strings), mps.num_sites)) for row_idx, sublist in enumerate(strings): @@ -724,6 +726,7 @@ def apply_constraints( optimized_order = msro(mpo_location_matrix) strings = [strings[index] for index in optimized_order] + # Do not optimize the order in which to apply the checks. if strategy == "Naive": pass