From 7a344e268a1a2a8c91c05161d9e38fb18769f3b5 Mon Sep 17 00:00:00 2001 From: Johnnie Gray Date: Mon, 6 Jan 2025 15:29:10 -0800 Subject: [PATCH] ensure "linalg.expm" -> "scipy.linalg.expm" (fixes #275) --- quimb/tensor/decomp.py | 5 ++--- quimb/tensor/tensor_arbgeom_tebd.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/quimb/tensor/decomp.py b/quimb/tensor/decomp.py index 93a08eb5..6492415f 100644 --- a/quimb/tensor/decomp.py +++ b/quimb/tensor/decomp.py @@ -1,5 +1,4 @@ -"""Functions for decomposing and projecting matrices. -""" +"""Functions for decomposing and projecting matrices.""" import functools import operator @@ -999,7 +998,7 @@ def isometrize_exp(x, backend): "pad", x, [[0, d - m], [0, d - n]], "constant", constant_values=0.0 ) x = x - dag(x) - Q = do("linalg.expm", x) + Q = do("scipy.linalg.expm", x) return Q[:m, :n] diff --git a/quimb/tensor/tensor_arbgeom_tebd.py b/quimb/tensor/tensor_arbgeom_tebd.py index 6c2c7feb..97efd0a0 100644 --- a/quimb/tensor/tensor_arbgeom_tebd.py +++ b/quimb/tensor/tensor_arbgeom_tebd.py @@ -261,7 +261,7 @@ def _expm_cached(self, G, x): range(ndim_G // 2, ndim_G), ) - U = do("linalg.expm", G * x) + U = do("scipy.linalg.expm", G * x) if need_to_reshape: U = do("reshape", U, shape_orig)