More in-place ops
Z.copy() is needed since op is in-place now
This commit is contained in:
parent
5c7deedb70
commit
3bf56c16c1
@ -576,11 +576,14 @@ def eigsolve(
|
|||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Zt = numpy.empty(Z.shape[::-1])
|
||||||
|
AZ = numpy.empty(Z.shape)
|
||||||
|
|
||||||
for i in range(max_iters):
|
for i in range(max_iters):
|
||||||
Zt = Z.conj().T
|
Zt = numpy.conj(Z.T, out=Zt)
|
||||||
ZtZ = Zt @ Z
|
ZtZ = Zt @ Z
|
||||||
U = numpy.linalg.inv(ZtZ)
|
U = numpy.linalg.inv(ZtZ)
|
||||||
AZ = scipy_op @ Z
|
AZ = scipy_op @ Z.copy()
|
||||||
ZtAZ = Zt @ AZ
|
ZtAZ = Zt @ AZ
|
||||||
ZtAZU = ZtAZ @ U
|
ZtAZU = ZtAZ @ U
|
||||||
E_signed = real(trace(ZtAZU))
|
E_signed = real(trace(ZtAZU))
|
||||||
|
Loading…
Reference in New Issue
Block a user