From 0efedbb5b81f0c241d67806fb67bd8f946f91e58 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 13:30:44 -0400 Subject: [PATCH 1/3] Bump jinja2 from 3.1.2 to 3.1.3 (#240) * Bump jinja2 from 3.1.2 to 3.1.3 Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.2...3.1.3) --- updated-dependencies: - dependency-name: jinja2 dependency-type: indirect ... Signed-off-by: dependabot[bot] * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Aleksandr (Sasha) Berezutskii --- poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index b16c8f0c..dc46293a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "alabaster" From 1eb687ba396ff2c98cdc0b4b1ff3c2112479a6f0 Mon Sep 17 00:00:00 2001 From: meandmytram Date: Wed, 24 Apr 2024 20:16:49 +0000 Subject: [PATCH 2/3] 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 From 174db7306238dd81b3f33bfb6ab5365277fdfe43 Mon Sep 17 00:00:00 2001 From: meandmytram Date: Wed, 24 Apr 2024 20:21:42 +0000 Subject: [PATCH 3/3] formatting --- examples/decoding/classical.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/decoding/classical.py b/examples/decoding/classical.py index 56d328b2..226e9841 100755 --- a/examples/decoding/classical.py +++ b/examples/decoding/classical.py @@ -53,7 +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." )