Skip to content

Commit 02a885e

Browse files
authored
Remove scipy (microsoft#2110)
Scipy does not work on Windows ARM64 currently (see scipy/scipy#21562) which is a platform we support. This is the only sample that uses scipy, so removing that usage for the equivalent numpy usage. CC @msoeken and @aarthims
1 parent 4662f61 commit 02a885e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/estimation/df-chemistry/chemistry.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
import json
44
import math
55
import numpy as np
6+
import numpy.linalg as LA
67
import numpy.typing as npt
78
import qsharp
89
from argparse import ArgumentParser
910
from dataclasses import dataclass
10-
from scipy import linalg as LA
1111
from urllib.parse import urlparse
1212
from urllib.request import urlretrieve
1313

@@ -294,9 +294,9 @@ def eigen_decomp(
294294
matrix[np.tril_indices(dimension, 0)] = vector
295295

296296
# Compute the eigen decomposition of the lower triangular matrix
297-
evals, evecs = LA.eigh(matrix, lower=True)
298-
norm1 = np.linalg.norm(evals, 1)
299-
norm2 = np.linalg.norm(evals)
297+
evals, evecs = LA.eigh(matrix, UPLO="L")
298+
norm1 = LA.norm(evals, 1)
299+
norm2 = LA.norm(evals)
300300

301301
(rows, cols) = np.shape(evecs)
302302
evecs_1D = np.reshape(np.transpose(evecs), cols * rows)

0 commit comments

Comments
 (0)