From 64cd68634db1a26dce8d1ee510f9929ca3b64c0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:08:29 +0000 Subject: [PATCH 1/2] Bump idna from 3.6 to 3.7 Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index a136d179..e2f94c11 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -900,13 +900,13 @@ socks = ["socksio (==1.*)"] [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] From 71fe313694cc82924a3f087f9f539a795d25db5e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:09:12 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mdopt/mps/explicit.py | 4 +--- tests/mps/test_explicit.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mdopt/mps/explicit.py b/mdopt/mps/explicit.py index 0b86b05c..3099eb28 100644 --- a/mdopt/mps/explicit.py +++ b/mdopt/mps/explicit.py @@ -345,9 +345,7 @@ def entanglement_entropy(self) -> np.ndarray: singular_values = self.singular_values[bond].copy() singular_values = np.array(singular_values) # type: ignore singular_values[singular_values < self.tolerance] = 0 # type: ignore - singular_values2 = [ - singular_value**2 for singular_value in singular_values - ] + singular_values2 = [singular_value**2 for singular_value in singular_values] entropy[bond] = -1 * np.sum( np.fromiter((xlogy(s, s) for s in singular_values2), dtype=float) ) diff --git a/tests/mps/test_explicit.py b/tests/mps/test_explicit.py index 863aa5ab..ba4d6828 100644 --- a/tests/mps/test_explicit.py +++ b/tests/mps/test_explicit.py @@ -360,9 +360,7 @@ def test_explicit_density_mpo(): density_matrix_mpo = density_matrix_mpo.transpose(correct_order) # Reshaping to the matrix form. - density_matrix_mpo = density_matrix_mpo.reshape( - (2**num_sites, 2**num_sites) - ) + density_matrix_mpo = density_matrix_mpo.reshape((2**num_sites, 2**num_sites)) # Original density matrix. density_matrix = np.tensordot(psi, np.conjugate(psi), 0)