diff --git a/FEATURES.md b/FEATURES.md index 32aa32e4..933c360c 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -4,6 +4,7 @@ - Density matrices - Brueckner orbital calculations - Frozen and active space constraints +- Single- and mixed-precision calculations The following table summarises the available methods and routines for the ansatz currently treated by code generation, in the three spin cases: diff --git a/ebcc/brueckner.py b/ebcc/brueckner.py index 007a3e9d..01f11dc1 100644 --- a/ebcc/brueckner.py +++ b/ebcc/brueckner.py @@ -2,11 +2,13 @@ import dataclasses -import numpy as np import scipy.linalg from pyscf import lib -from ebcc import NullLogger, util +from ebcc import NullLogger +from ebcc import numpy as np +from ebcc import util +from ebcc.precision import types @dataclasses.dataclass @@ -111,8 +113,8 @@ def get_rotation_matrix(self, u_tot=None, diis=None, t1=None): t1_block = np.block( [ - [np.zeros((self.cc.space.ncocc, self.cc.space.ncocc)), -t1], - [t1.T, np.zeros((self.cc.space.ncvir, self.cc.space.ncvir))], + [np.zeros((self.cc.space.ncocc, self.cc.space.ncocc), dtype=types[float]), -t1], + [t1.T, np.zeros((self.cc.space.ncvir, self.cc.space.ncvir), dtype=types[float])], ] ) @@ -352,14 +354,34 @@ def get_rotation_matrix(self, u_tot=None, diis=None, t1=None): [ np.block( [ - [np.zeros((self.cc.space[0].ncocc, self.cc.space[0].ncocc)), -t1.aa], - [t1.aa.T, np.zeros((self.cc.space[0].ncvir, self.cc.space[0].ncvir))], + [ + np.zeros( + (self.cc.space[0].ncocc, self.cc.space[0].ncocc), dtype=types[float] + ), + -t1.aa, + ], + [ + t1.aa.T, + np.zeros( + (self.cc.space[0].ncvir, self.cc.space[0].ncvir), dtype=types[float] + ), + ], ] ), np.block( [ - [np.zeros((self.cc.space[1].ncocc, self.cc.space[1].ncocc)), -t1.bb], - [t1.bb.T, np.zeros((self.cc.space[1].ncvir, self.cc.space[1].ncvir))], + [ + np.zeros( + (self.cc.space[1].ncocc, self.cc.space[1].ncocc), dtype=types[float] + ), + -t1.bb, + ], + [ + t1.bb.T, + np.zeros( + (self.cc.space[1].ncvir, self.cc.space[1].ncvir), dtype=types[float] + ), + ], ] ), ] diff --git a/ebcc/codegen/GCC2.py b/ebcc/codegen/GCC2.py index 56cbd3ab..078713ab 100644 --- a/ebcc/codegen/GCC2.py +++ b/ebcc/codegen/GCC2.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -17,32 +18,32 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x1 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x1, (4, 0, 1, 3), (4, 2)) * 0.5 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(v.ovvv, (0, 1, 2, 3), x2, (0, 4, 2, 3), (4, 1)) * 0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(f.ov, (0, 1), (0, 1)) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) t1new += einsum(x3, (0, 1), t2, (2, 0, 3, 1), (2, 3)) del x3 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(f.oo, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) x5 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) @@ -50,33 +51,33 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x2 t1new += einsum(t1, (0, 1), x5, (0, 2), (2, 1)) * -1.0 del x5 - x6 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x6 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new += einsum(t1, (0, 1), x6, (2, 3, 4, 1), (0, 2, 4, 3)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) t2new += einsum(x7, (0, 1, 2, 3), (1, 0, 2, 3)) t2new += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x7 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x9 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(t1, (0, 1), x9, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x9 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), x10, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x10 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(f.oo, (0, 1), (0, 1)) x12 += einsum(x4, (0, 1), (0, 1)) del x4 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(x12, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x8, (0, 1, 2, 3), (0, 1, 3, 2)) del x8 x14 += einsum(x11, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -86,27 +87,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(x14, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t1, (0, 1), x16, (2, 3, 4, 1), (2, 0, 3, 4)) * -1.0 del x16 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x15, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x15 x18 += einsum(x17, (0, 1, 2, 3), (2, 1, 0, 3)) del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t1, (0, 1), x18, (0, 2, 3, 4), (2, 3, 1, 4)) del x18 t2new += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x19, (0, 1, 2, 3), (1, 0, 3, 2)) del x19 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), x20, (2, 0, 3, 4), (2, 3, 1, 4)) del x20 t2new += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -114,11 +115,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x21, (0, 1, 2, 3), (1, 0, 3, 2)) del x21 - x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x22 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(t1, (0, 1), x0, (2, 3, 4, 1), (4, 3, 0, 2)) * -1.0 del x0 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x23 += einsum(t1, (0, 1), x22, (0, 2, 3, 4), (3, 4, 2, 1)) del x22 @@ -129,54 +130,54 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) l1new += einsum(l1, (0, 1), v.ovov, (2, 0, 1, 3), (3, 2)) * -1.0 - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(v.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 5, 0, 1), (4, 5, 2, 3)) * 0.5 - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l1new += einsum(v.ooov, (0, 1, 2, 3), x0, (4, 2, 0, 1), (3, 4)) * -0.25 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) l1new += einsum(v.ovov, (0, 1, 2, 3), x1, (4, 2, 0, 1), (3, 4)) * -1.0 l2new += einsum(v.ovvv, (0, 1, 2, 3), x1, (4, 5, 0, 1), (2, 3, 4, 5)) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (3, 2, 4, 0)) l1new += einsum(v.ooov, (0, 1, 2, 3), x2, (4, 2, 0, 1), (3, 4)) * -0.5 l2new += einsum(v.oovv, (0, 1, 2, 3), x2, (4, 5, 1, 0), (2, 3, 5, 4)) * 0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x3, (0, 1), x4, (2, 0), (1, 2)) * -1.0 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) l1new += einsum(v.ovvv, (0, 1, 2, 3), x5, (4, 0, 1, 3), (2, 4)) * -1.0 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new += einsum(x1, (0, 1, 2, 3), x6, (1, 2, 3, 4), (4, 0)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x8 += einsum(x7, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(f.ov, (0, 1), (0, 1)) x9 += einsum(x3, (0, 1), (0, 1)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x10 += einsum(x6, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x11 += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 - x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x12 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x12 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (4, 5, 0, 1)) * -1.0 x12 += einsum(t1, (0, 1), x11, (2, 3, 4, 1), (3, 2, 0, 4)) * -4.0 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x13 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 5, 2, 3), (4, 0, 1, 5)) * -0.5 x13 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 3), (5, 0, 4, 2)) * 2.0 @@ -187,19 +188,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x12 l1new += einsum(l2, (0, 1, 2, 3), x13, (4, 2, 3, 1), (0, 4)) * 0.5 del x13 - x14 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x14 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(t1, (0, 1), v.vvvv, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 l1new += einsum(l2, (0, 1, 2, 3), x14, (3, 4, 0, 1), (4, 2)) * -0.5 del x14 - x15 = np.zeros((nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc), dtype=types[float]) x15 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x0 x16 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x2 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) * 2.0 x17 += einsum(t1, (0, 1), x15, (2, 3), (2, 0, 3, 1)) * 2.0 x17 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 0, 5, 2)) * -4.0 @@ -207,16 +208,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x16 l1new += einsum(v.oovv, (0, 1, 2, 3), x17, (4, 0, 1, 3), (2, 4)) * 0.25 del x17 - x18 = np.zeros((nvir, nvir), dtype=np.float64) + x18 = np.zeros((nvir, nvir), dtype=types[float]) x18 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 x18 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) l1new += einsum(x18, (0, 1), v.ovvv, (2, 0, 3, 1), (3, 2)) * 0.5 del x18 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum(x4, (0, 1), (0, 1)) x19 += einsum(x15, (0, 1), (0, 1)) * 0.5 l1new += einsum(x19, (0, 1), v.ooov, (2, 1, 0, 3), (3, 2)) - x20 = np.zeros((nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), (0, 1)) * -1.0 x20 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) * -1.0 x20 += einsum(t2, (0, 1, 2, 3), x1, (1, 0, 4, 3), (4, 2)) * 0.5 @@ -224,16 +225,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x19 l1new += einsum(x20, (0, 1), v.oovv, (2, 0, 3, 1), (3, 2)) * -1.0 del x20 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x22 = np.zeros((nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir), dtype=types[float]) x22 += einsum(f.vv, (0, 1), (0, 1)) x22 += einsum(x21, (0, 1), (0, 1)) * -1.0 l1new += einsum(l1, (0, 1), x22, (0, 2), (2, 1)) del x22 - x23 = np.zeros((nocc, nocc), dtype=np.float64) + x23 = np.zeros((nocc, nocc), dtype=types[float]) x23 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x24 = np.zeros((nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc), dtype=types[float]) x24 += einsum(f.oo, (0, 1), (0, 1)) x24 += einsum(x23, (0, 1), (1, 0)) x24 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) * 0.5 @@ -241,25 +242,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x9 l1new += einsum(l1, (0, 1), x24, (1, 2), (0, 2)) * -1.0 del x24 - x25 = np.zeros((nocc, nocc), dtype=np.float64) + x25 = np.zeros((nocc, nocc), dtype=types[float]) x25 += einsum(x4, (0, 1), (0, 1)) * 2.0 x25 += einsum(x15, (0, 1), (0, 1)) del x15 l1new += einsum(f.ov, (0, 1), x25, (2, 0), (1, 2)) * -0.5 del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(f.ov, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(x21, (0, 1), l2, (2, 0, 3, 4), (3, 4, 2, 1)) del x21 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x3, (0, 1), x1, (2, 3, 0, 4), (2, 3, 4, 1)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(l1, (0, 1), x8, (1, 2, 3, 4), (2, 3, 4, 0)) del x8 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(x26, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x26 x31 += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -273,11 +274,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x31, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x31, (0, 1, 2, 3), (3, 2, 0, 1)) del x31 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(l1, (0, 1), v.ovvv, (2, 0, 3, 4), (1, 2, 3, 4)) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x32 x34 += einsum(x33, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -285,19 +286,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x34, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(x34, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x34 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(v.ooov, (0, 1, 2, 3), x1, (4, 2, 1, 5), (4, 0, 5, 3)) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(x1, (0, 1, 2, 3), x7, (0, 4, 2, 5), (1, 4, 3, 5)) * -1.0 del x1, x7 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x37 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(l2, (0, 1, 2, 3), x37, (3, 4, 1, 5), (4, 2, 5, 0)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) x39 += einsum(l1, (0, 1), x3, (2, 3), (1, 2, 0, 3)) x39 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -311,26 +312,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x39, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new += einsum(x39, (0, 1, 2, 3), (3, 2, 1, 0)) del x39 - x40 = np.zeros((nocc, nocc), dtype=np.float64) + x40 = np.zeros((nocc, nocc), dtype=types[float]) x40 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(x40, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(x4, (0, 1), v.oovv, (2, 1, 3, 4), (0, 2, 3, 4)) del x4 - x43 = np.zeros((nocc, nocc), dtype=np.float64) + x43 = np.zeros((nocc, nocc), dtype=types[float]) x43 += einsum(t1, (0, 1), x3, (2, 1), (0, 2)) del x3 - x44 = np.zeros((nocc, nocc), dtype=np.float64) + x44 = np.zeros((nocc, nocc), dtype=types[float]) x44 += einsum(x23, (0, 1), (0, 1)) del x23 x44 += einsum(x43, (0, 1), (1, 0)) del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x44, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) * -1.0 del x44 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(x41, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x41 x46 += einsum(x42, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -340,7 +341,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x46, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x46, (0, 1, 2, 3), (3, 2, 1, 0)) del x46 - x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x47 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x47 += einsum(t1, (0, 1), x11, (2, 3, 4, 1), (4, 0, 3, 2)) * -1.0 del x11 @@ -353,27 +354,27 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) rdm1_f_ov += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) * 0.5 rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -1.0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm1_f_oo += einsum(x1, (0, 1), (1, 0)) * -0.5 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x2, (0, 1, 4, 3), (4, 2)) * 0.5 del x2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(x0, (0, 1), (0, 1)) * 2.0 del x0 x3 += einsum(x1, (0, 1), (0, 1)) @@ -389,69 +390,69 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) * 0.5 - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (0, 3, 1, 2)) * -0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (0, 3, 2, 1)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (3, 0, 1, 2)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (3, 0, 2, 1)) * -0.5 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 2, 1)) * -1.0 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x5, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x5, (0, 1, 2, 3), (2, 1, 3, 0)) - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - x7 = np.zeros((nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(x4, (0, 1), (0, 1)) x8 += einsum(x3, (0, 1), (0, 1)) * 0.5 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(t1, (0, 1), x8, (0, 2), (2, 1)) - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(x6, (0, 1), (0, 1)) * -1.0 del x6 x10 += einsum(x7, (0, 1), (0, 1)) * 0.5 @@ -462,9 +463,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_ooov += einsum(delta.oo, (0, 1), x10, (2, 3), (2, 0, 1, 3)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x10, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x10, (2, 3), (2, 0, 3, 1)) * -1.0 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x12 += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x12 += einsum(t1, (0, 1), x8, (2, 3), (0, 2, 3, 1)) @@ -474,23 +475,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (2, 0, 3, 1)) del x12 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x0 x13 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x2 rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), x13, (0, 1, 4, 5), (5, 4, 2, 3)) * 0.25 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), x13, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x13 rdm2_f_ooov += einsum(x14, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x14, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovv += einsum(t1, (0, 1), x14, (0, 2, 3, 4), (3, 2, 4, 1)) del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t1, (0, 1), x11, (0, 2, 3, 4), (2, 3, 1, 4)) del x11 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x16 += einsum(t1, (0, 1), x10, (2, 3), (0, 2, 1, 3)) @@ -500,13 +501,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x16, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x16, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(x4, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) del x4 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(x3, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) del x3 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 x19 += einsum(x18, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 @@ -514,22 +515,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x5, (0, 2, 3, 4), (2, 3, 1, 4)) del x5 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(x21, (0, 1), t2, (2, 3, 4, 0), (2, 3, 4, 1)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_ovov += einsum(x23, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovvo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_voov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_vovo += einsum(x23, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x23, (1, 4, 3, 5), (0, 4, 2, 5)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x25 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -539,15 +540,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x25, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x26, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ovvo += einsum(x26, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x26, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x26, (0, 1, 2, 3), (2, 1, 3, 0)) - x27 = np.zeros((nvir, nvir), dtype=np.float64) + x27 = np.zeros((nvir, nvir), dtype=types[float]) x27 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x28 = np.zeros((nvir, nvir), dtype=np.float64) + x28 = np.zeros((nvir, nvir), dtype=types[float]) x28 += einsum(x27, (0, 1), (0, 1)) * 2.0 x28 += einsum(x21, (0, 1), (0, 1)) rdm2_f_ovov += einsum(delta.oo, (0, 1), x28, (2, 3), (0, 2, 1, 3)) * 0.5 @@ -555,34 +556,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 1, 3)) * -0.5 rdm2_f_vovo += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 3, 1)) * 0.5 del x28 - x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x29 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(x29, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) del x29 - x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 rdm2_f_ovvv += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 rdm2_f_vovv += einsum(x30, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.5 del x30 - x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x31 += einsum(t1, (0, 1), x26, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x26 rdm2_f_ovvv += einsum(x31, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x31, (0, 1, 2, 3), (1, 0, 3, 2)) del x31 - x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x23, (0, 2, 3, 4), (2, 3, 1, 4)) del x23 - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum(x27, (0, 1), (0, 1)) del x27 x33 += einsum(x21, (0, 1), (0, 1)) * 0.5 del x21 - x34 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x34 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x32 x34 += einsum(t1, (0, 1), x33, (2, 3), (0, 2, 1, 3)) @@ -592,11 +593,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x34, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) del x34 - x35 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x35, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x35, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvv += einsum(t1, (0, 1), x35, (0, 2, 3, 4), (2, 3, 1, 4)) del x35 diff --git a/ebcc/codegen/GCC3.py b/ebcc/codegen/GCC3.py index 7dc53703..5bbc2d2b 100644 --- a/ebcc/codegen/GCC3.py +++ b/ebcc/codegen/GCC3.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -17,79 +18,79 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 0, 1, 5, 2, 3), (4, 5)) * 0.25 t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(f.ov, (0, 1), (0, 1)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x1 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 0, 3), (4, 2)) * -0.5 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(v.ovvv, (0, 1, 2, 3), x2, (0, 4, 3, 2), (4, 1)) * -0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(x3, (0, 1), (0, 1)) del x3 t1new += einsum(x4, (0, 1), t2, (2, 0, 3, 1), (2, 3)) t2new += einsum(x4, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum(f.oo, (0, 1), (0, 1)) * 2.0 x7 += einsum(x5, (0, 1), (0, 1)) * 2.0 x7 += einsum(x6, (0, 1), (0, 1)) * 2.0 x7 += einsum(v.oovv, (0, 1, 2, 3), x2, (1, 4, 2, 3), (0, 4)) * -1.0 t1new += einsum(t1, (0, 1), x7, (0, 2), (2, 1)) * -0.5 del x7 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 0, 6, 2, 3), (4, 5, 6, 1)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), x9, (4, 1, 5, 3), (4, 0, 5, 2)) del x9 - x11 = np.zeros((nvir, nvir), dtype=np.float64) + x11 = np.zeros((nvir, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x12 = np.zeros((nvir, nvir), dtype=np.float64) + x12 = np.zeros((nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x13 = np.zeros((nvir, nvir), dtype=np.float64) + x13 = np.zeros((nvir, nvir), dtype=types[float]) x13 += einsum(x11, (0, 1), (0, 1)) del x11 x13 += einsum(x12, (0, 1), (0, 1)) * 0.5 del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x13, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x13 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 1, 6, 2, 3), (4, 5, 0, 6)) - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(v.ovvv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 4, 5, 1)) * 0.5 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(x4, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x15, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.5 del x15 x18 += einsum(x16, (0, 1, 2, 3), (0, 2, 1, 3)) del x16 x18 += einsum(x17, (0, 1, 2, 3), (2, 1, 0, 3)) del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t1, (0, 1), x18, (0, 2, 3, 4), (2, 3, 4, 1)) del x18 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x8 x20 += einsum(x10, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -101,28 +102,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x20, (0, 1, 2, 3), (0, 1, 3, 2)) del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x22, (4, 1, 5, 3), (4, 0, 2, 5)) * -1.0 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 0, 5, 2)) - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) del x25 x27 += einsum(x26, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x26 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(t1, (0, 1), x27, (2, 0, 3, 4), (2, 3, 4, 1)) del x27 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x21 x29 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -134,11 +135,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) del x29 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(x30, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x30 x32 += einsum(x31, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -146,37 +147,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) del x32 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (4, 2, 5, 6)) - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(x0, (0, 1, 2, 3), t3, (4, 2, 1, 5, 6, 3), (0, 4, 5, 6)) - x36 = np.zeros((nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc), dtype=types[float]) x36 += einsum(t1, (0, 1), x4, (2, 1), (0, 2)) del x4 - x37 = np.zeros((nocc, nocc), dtype=np.float64) + x37 = np.zeros((nocc, nocc), dtype=types[float]) x37 += einsum(f.oo, (0, 1), (0, 1)) x37 += einsum(x36, (0, 1), (0, 1)) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(x37, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x37 - x39 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x39 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(x2, (0, 1, 2, 3), x39, (4, 0, 1, 5), (4, 5, 2, 3)) * 0.5 - x41 = np.zeros((nocc, nocc), dtype=np.float64) + x41 = np.zeros((nocc, nocc), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x42 = np.zeros((nocc, nocc), dtype=np.float64) + x42 = np.zeros((nocc, nocc), dtype=types[float]) x42 += einsum(x6, (0, 1), (0, 1)) del x6 x42 += einsum(x41, (0, 1), (1, 0)) * 0.5 del x41 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x42, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) * -1.0 del x42 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(x33, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x33 x44 += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 @@ -192,48 +193,48 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) del x44 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x45 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x45, (4, 5, 2, 3), (5, 4, 0, 1)) * -1.0 del x45 - x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x46 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x46 += einsum(v.oovv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 1, 5, 4)) * -0.5 t2new += einsum(x2, (0, 1, 2, 3), x46, (0, 1, 4, 5), (4, 5, 3, 2)) * -0.5 del x2, x46 - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 += einsum(f.ov, (0, 1), t1, (0, 2), (1, 2)) - x48 = np.zeros((nvir, nvir), dtype=np.float64) + x48 = np.zeros((nvir, nvir), dtype=types[float]) x48 += einsum(f.vv, (0, 1), (0, 1)) x48 += einsum(x47, (0, 1), (0, 1)) * -1.0 del x47 - x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x49 += einsum(x48, (0, 1), t3, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x48 - t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) t3new += einsum(x49, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) t3new += einsum(x49, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -1.0 t3new += einsum(x49, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x49 - x50 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 3, 5, 6), (0, 1, 4, 2, 5, 6)) - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x52 += einsum(t1, (0, 1), x0, (2, 3, 4, 1), (2, 0, 4, 3)) - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(t1, (0, 1), x52, (2, 3, 4, 0), (2, 3, 4, 1)) del x52 - x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x54 += einsum(x51, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x51 x54 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) del x53 - x55 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x55 += einsum(t2, (0, 1, 2, 3), x54, (4, 5, 1, 6), (4, 5, 0, 6, 2, 3)) * -1.0 del x54 - x56 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x56 += einsum(x50, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 del x50 x56 += einsum(x55, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 @@ -248,18 +249,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x56 - x57 = np.zeros((nocc, nocc), dtype=np.float64) + x57 = np.zeros((nocc, nocc), dtype=types[float]) x57 += einsum(f.oo, (0, 1), (0, 1)) x57 += einsum(x5, (0, 1), (0, 1)) del x5 - x58 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x58 += einsum(x57, (0, 1), t3, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) del x57 t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * -1.0 t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) del x58 - x59 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 6), (4, 0, 5, 2, 3, 6)) del x24 t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -281,9 +282,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x59 - x60 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 6, 3), (0, 1, 4, 6, 2, 5)) - x61 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x61 += einsum(t1, (0, 1), x60, (2, 3, 0, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x60 t3new += einsum(x61, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -305,18 +306,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x61, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new += einsum(x61, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x61 - x62 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x62 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) - x63 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(t2, (0, 1, 2, 3), x0, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) del x0 - x64 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(t1, (0, 1), x63, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x63 - x65 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x65 += einsum(t1, (0, 1), x64, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 1, 6)) * -1.0 del x64 - x66 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x66 += einsum(x62, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) del x62 x66 += einsum(x65, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) @@ -331,20 +332,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x66, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x66, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x66 - x67 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x68 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(t1, (0, 1), x67, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 1, 6)) del x67 - x69 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x69 += einsum(t1, (0, 1), x68, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 1, 6)) * -1.0 del x68 - x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x70 += einsum(t1, (0, 1), x22, (2, 3, 4, 1), (2, 0, 3, 4)) * -1.0 - x71 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), x70, (4, 5, 1, 6), (5, 4, 0, 2, 3, 6)) * -1.0 del x70 - x72 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x72 += einsum(x69, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x69 x72 += einsum(x71, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -359,10 +360,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x72 - x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(t2, (0, 1, 2, 3), x22, (4, 5, 6, 3), (4, 0, 1, 5, 2, 6)) * -1.0 del x22 - x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x74 += einsum(t1, (0, 1), x73, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x73 t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) @@ -384,17 +385,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) del x74 - x75 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x75 += einsum(t1, (0, 1), v.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x76 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x76 += einsum(t2, (0, 1, 2, 3), x75, (4, 5, 1, 6), (0, 4, 5, 6, 2, 3)) * -1.0 del x75 - x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x78 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x78 += einsum(t2, (0, 1, 2, 3), x77, (4, 5, 6, 3), (4, 0, 1, 2, 5, 6)) * -1.0 del x77 - x79 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x79 += einsum(x76, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) del x76 x79 += einsum(x78, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -409,10 +410,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x79, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x79, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x79 - x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x80 += einsum(t1, (0, 1), x39, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x39 - x81 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x81 += einsum(t2, (0, 1, 2, 3), x80, (4, 1, 5, 6), (4, 0, 5, 6, 2, 3)) * -1.0 del x80 t3new += einsum(x81, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) diff --git a/ebcc/codegen/GCCD.py b/ebcc/codegen/GCCD.py index 05eb037d..3dfcdd70 100644 --- a/ebcc/codegen/GCCD.py +++ b/ebcc/codegen/GCCD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy @@ -12,24 +13,24 @@ def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # T amplitudes - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 5, 2, 3), (0, 1, 4, 5)) * 0.5 t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) t2new += einsum(x0, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x0, (0, 1, 2, 3), (0, 1, 3, 2)) t2new += einsum(x0, (0, 1, 2, 3), (1, 0, 2, 3)) t2new += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) del x2 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(x1, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x1 x4 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 @@ -37,22 +38,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) t2new += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) t2new += einsum(x5, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x5 - x6 = np.zeros((nvir, nvir), dtype=np.float64) + x6 = np.zeros((nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(x6, (0, 1), t2, (2, 3, 4, 1), (2, 3, 4, 0)) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 3), (4, 0, 5, 2)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x7 x10 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -60,7 +61,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x10, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x10 - x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x11 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x11 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (4, 5, 0, 1)) * 0.5 t2new += einsum(t2, (0, 1, 2, 3), x11, (0, 1, 4, 5), (4, 5, 2, 3)) * 0.5 @@ -70,20 +71,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs): # L amplitudes - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 5, 0, 1), (4, 5, 2, 3)) * 0.5 l2new += einsum(v.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l2new += einsum(v.oovv, (0, 1, 2, 3), x0, (4, 5, 0, 1), (2, 3, 4, 5)) * 0.25 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) del x1 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(l2, (0, 1, 2, 3), x2, (3, 4, 1, 5), (2, 4, 0, 5)) del x2 l2new += einsum(x3, (0, 1, 2, 3), (2, 3, 0, 1)) @@ -91,24 +92,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new += einsum(x3, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new += einsum(x3, (0, 1, 2, 3), (3, 2, 1, 0)) del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) l2new += einsum(x4, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x6 = np.zeros((nvir, nvir), dtype=np.float64) + x6 = np.zeros((nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(x6, (0, 1), l2, (2, 0, 3, 4), (3, 4, 2, 1)) del x6 - x8 = np.zeros((nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir), dtype=types[float]) x8 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1), v.oovv, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) del x5 x10 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -118,17 +119,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new += einsum(x10, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(x10, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x10 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1), l2, (2, 3, 4, 0), (4, 1, 2, 3)) del x11 - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x13, (0, 1), v.oovv, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x13 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(x12, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 del x12 x15 += einsum(x14, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 @@ -136,7 +137,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new += einsum(x15, (0, 1, 2, 3), (3, 2, 0, 1)) l2new += einsum(x15, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x15 - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x16 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (0, 1, 4, 5)) * 0.5 l2new += einsum(l2, (0, 1, 2, 3), x16, (3, 2, 4, 5), (0, 1, 4, 5)) * -0.5 @@ -148,13 +149,13 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) rdm1_f_oo += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (4, 2)) * -0.5 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) * 0.5 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f = np.block([[rdm1_f_oo, rdm1_f_ov], [rdm1_f_vo, rdm1_f_vv]]) @@ -164,49 +165,49 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) * 0.5 - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), x0, (0, 1, 4, 5), (5, 4, 2, 3)) * -0.25 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 1, 2)) * -0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 2, 1)) * -0.5 - x2 = np.zeros((nvir, nvir), dtype=np.float64) + x2 = np.zeros((nvir, nvir), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(delta.oo, (0, 1), x2, (2, 3), (0, 2, 1, 3)) * 0.5 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(delta.oo, (0, 1), x2, (2, 3), (0, 2, 3, 1)) * -0.5 - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(delta.oo, (0, 1), x2, (2, 3), (2, 0, 1, 3)) * -0.5 - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(delta.oo, (0, 1), x2, (2, 3), (2, 0, 3, 1)) * 0.5 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1), t2, (2, 3, 4, 0), (2, 3, 4, 1)) del x2 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_ovov += einsum(x4, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovvo += einsum(x4, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_voov += einsum(x4, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_vovo += einsum(x4, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 3, 5), (4, 0, 5, 2)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x3 x6 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -214,20 +215,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_oovv += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x6, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(x1, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) del x1 rdm2_f_oovv += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 rdm2_f_oovv += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 del x7 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f = pack_2e(rdm2_f_oooo, rdm2_f_ooov, rdm2_f_oovo, rdm2_f_ovoo, rdm2_f_vooo, rdm2_f_oovv, rdm2_f_ovov, rdm2_f_ovvo, rdm2_f_voov, rdm2_f_vovo, rdm2_f_vvoo, rdm2_f_ovvv, rdm2_f_vovv, rdm2_f_vvov, rdm2_f_vvvo, rdm2_f_vvvv) diff --git a/ebcc/codegen/GCCSD.py b/ebcc/codegen/GCCSD.py index 5a223b21..66ea8405 100644 --- a/ebcc/codegen/GCCSD.py +++ b/ebcc/codegen/GCCSD.py @@ -1,13 +1,14 @@ # Code generated by qwick. -import numpy as np +from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -17,67 +18,67 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x1 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x1, (4, 0, 1, 3), (4, 2)) * 0.5 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(v.ovvv, (0, 1, 2, 3), x2, (0, 4, 2, 3), (4, 1)) * 0.5 t2new += einsum(v.vvvv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (5, 4, 0, 1)) * -0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(x3, (0, 1), (0, 1)) del x3 t1new += einsum(x4, (0, 1), t2, (2, 0, 3, 1), (2, 3)) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(f.oo, (0, 1), (0, 1)) x6 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) x6 += einsum(x5, (0, 1), (0, 1)) x6 += einsum(v.oovv, (0, 1, 2, 3), x2, (1, 4, 2, 3), (0, 4)) * -0.5 t1new += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(t1, (0, 1), x4, (2, 1), (0, 2)) - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum(f.oo, (0, 1), (0, 1)) x9 += einsum(x8, (0, 1), (0, 1)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x9, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x9 - x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x11 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1, 2, 3), x2, (1, 2, 4, 5), (0, 3, 4, 5)) * 0.5 del x11 - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(x5, (0, 1), (0, 1)) del x5 x14 += einsum(x13, (0, 1), (1, 0)) * 0.5 del x13 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(x14, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) * -1.0 del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x7 x16 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -89,31 +90,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x16, (0, 1, 2, 3), (1, 0, 2, 3)) del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 1, 5, 3), (4, 0, 2, 5)) * -1.0 del x18 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 0, 5, 2)) del x0 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x23 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 x23 += einsum(x22, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x22 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t1, (0, 1), x23, (2, 0, 3, 4), (2, 3, 4, 1)) del x23 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x17 x25 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -125,11 +126,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x25, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x25, (0, 1, 2, 3), (1, 0, 3, 2)) del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(x26, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x26 x28 += einsum(x27, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -137,37 +138,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x28, (0, 1, 2, 3), (0, 1, 3, 2)) del x28 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x29, (4, 1, 5, 3), (4, 0, 5, 2)) del x29 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x32 = np.zeros((nvir, nvir), dtype=np.float64) + x32 = np.zeros((nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum(x31, (0, 1), (0, 1)) del x31 x33 += einsum(x32, (0, 1), (0, 1)) * 0.5 del x32 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x33, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x33 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(v.ovvv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 4, 5, 1)) * 0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(x4, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x4 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(x35, (0, 1, 2, 3), (0, 2, 1, 3)) del x35 x37 += einsum(x36, (0, 1, 2, 3), (2, 1, 0, 3)) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t1, (0, 1), x37, (0, 2, 3, 4), (2, 3, 4, 1)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x30 x39 += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -177,7 +178,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) del x39 - x40 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x40 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x40 += einsum(v.oovv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 1, 5, 4)) * -0.5 t2new += einsum(x2, (0, 1, 2, 3), x40, (0, 1, 4, 5), (4, 5, 3, 2)) * -0.5 @@ -187,55 +188,55 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(l1, (0, 1), v.ovov, (2, 0, 1, 3), (3, 2)) * -1.0 l1new += einsum(f.ov, (0, 1), (1, 0)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 5, 0, 1), (4, 5, 2, 3)) * 0.5 l2new += einsum(v.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l1new += einsum(v.ooov, (0, 1, 2, 3), x0, (4, 2, 0, 1), (3, 4)) * -0.25 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) l1new += einsum(v.ovov, (0, 1, 2, 3), x1, (4, 2, 0, 1), (3, 4)) * -1.0 l2new += einsum(v.ovvv, (0, 1, 2, 3), x1, (4, 5, 0, 1), (2, 3, 4, 5)) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) l1new += einsum(v.ooov, (0, 1, 2, 3), x2, (4, 2, 0, 1), (3, 4)) * -0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x3, (0, 1), x4, (2, 0), (1, 2)) * -1.0 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) l1new += einsum(v.ovvv, (0, 1, 2, 3), x5, (4, 0, 1, 3), (2, 4)) * -1.0 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new += einsum(x1, (0, 1, 2, 3), x6, (1, 2, 3, 4), (4, 0)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x8 += einsum(x7, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(f.ov, (0, 1), (0, 1)) x9 += einsum(x3, (0, 1), (0, 1)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x10 += einsum(x6, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (0, 1, 4, 5)) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x12 += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x13 += einsum(x11, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 x13 += einsum(t1, (0, 1), x12, (2, 3, 4, 1), (3, 2, 0, 4)) * -4.0 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -0.5 x14 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 5, 2, 3), (4, 0, 1, 5)) * -0.25 x14 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 3), (5, 0, 4, 2)) @@ -246,20 +247,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x13 l1new += einsum(l2, (0, 1, 2, 3), x14, (4, 2, 3, 1), (0, 4)) del x14 - x15 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x15 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x15 += einsum(t1, (0, 1), v.vvvv, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 l1new += einsum(l2, (0, 1, 2, 3), x15, (3, 4, 0, 1), (4, 2)) * -0.5 del x15 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) - x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x17 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x0 x17 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x2 l2new += einsum(v.oovv, (0, 1, 2, 3), x17, (4, 5, 0, 1), (2, 3, 5, 4)) * 0.25 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) * 2.0 x18 += einsum(t1, (0, 1), x16, (2, 3), (2, 0, 3, 1)) * 2.0 x18 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 0, 5, 2)) * -4.0 @@ -267,43 +268,43 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x17 l1new += einsum(v.oovv, (0, 1, 2, 3), x18, (4, 0, 1, 3), (2, 4)) * 0.25 del x18 - x19 = np.zeros((nvir, nvir), dtype=np.float64) + x19 = np.zeros((nvir, nvir), dtype=types[float]) x19 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x20 = np.zeros((nvir, nvir), dtype=np.float64) + x20 = np.zeros((nvir, nvir), dtype=types[float]) x20 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x20 += einsum(x19, (0, 1), (0, 1)) * 0.5 l1new += einsum(x20, (0, 1), v.ovvv, (2, 0, 3, 1), (3, 2)) del x20 - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum(x4, (0, 1), (0, 1)) x21 += einsum(x16, (0, 1), (0, 1)) * 0.5 l1new += einsum(f.ov, (0, 1), x21, (2, 0), (1, 2)) * -1.0 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum(t1, (0, 1), (0, 1)) * -1.0 x22 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) * -1.0 x22 += einsum(t2, (0, 1, 2, 3), x1, (1, 0, 4, 3), (4, 2)) * 0.5 x22 += einsum(t1, (0, 1), x21, (0, 2), (2, 1)) l1new += einsum(x22, (0, 1), v.oovv, (2, 0, 3, 1), (3, 2)) * -1.0 del x22 - x23 = np.zeros((nocc, nocc), dtype=np.float64) + x23 = np.zeros((nocc, nocc), dtype=types[float]) x23 += einsum(x4, (0, 1), (0, 1)) * 2.0 del x4 x23 += einsum(x16, (0, 1), (0, 1)) del x16 l1new += einsum(x23, (0, 1), v.ooov, (2, 1, 0, 3), (3, 2)) * 0.5 del x23 - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x25 = np.zeros((nvir, nvir), dtype=np.float64) + x25 = np.zeros((nvir, nvir), dtype=types[float]) x25 += einsum(f.vv, (0, 1), (0, 1)) x25 += einsum(x24, (0, 1), (0, 1)) * -1.0 l1new += einsum(l1, (0, 1), x25, (0, 2), (2, 1)) del x25 - x26 = np.zeros((nocc, nocc), dtype=np.float64) + x26 = np.zeros((nocc, nocc), dtype=types[float]) x26 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x27 = np.zeros((nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc), dtype=types[float]) x27 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x28 = np.zeros((nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc), dtype=types[float]) x28 += einsum(f.oo, (0, 1), (0, 1)) x28 += einsum(x26, (0, 1), (1, 0)) x28 += einsum(x27, (0, 1), (0, 1)) * 0.5 @@ -311,27 +312,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x9 l1new += einsum(l1, (0, 1), x28, (1, 2), (0, 2)) * -1.0 del x28 - x29 = np.zeros((nocc, nocc), dtype=np.float64) + x29 = np.zeros((nocc, nocc), dtype=types[float]) x29 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(x29, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) del x29 - x31 = np.zeros((nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc), dtype=types[float]) x31 += einsum(t1, (0, 1), x3, (2, 1), (0, 2)) - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 += einsum(x26, (0, 1), (0, 1)) del x26 x32 += einsum(x27, (0, 1), (1, 0)) * 0.5 del x27 x32 += einsum(x31, (0, 1), (1, 0)) del x31 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(x32, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) * -1.0 del x32 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x21, (0, 1), v.oovv, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x21 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) del x30 x35 += einsum(x33, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -341,23 +342,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x35, (0, 1, 2, 3), (3, 2, 0, 1)) l2new += einsum(x35, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x35 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(v.ooov, (0, 1, 2, 3), x1, (4, 2, 1, 5), (4, 0, 5, 3)) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(x1, (0, 1, 2, 3), x7, (0, 4, 2, 5), (1, 4, 3, 5)) * -1.0 del x7 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x39 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 x39 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(l2, (0, 1, 2, 3), x39, (3, 4, 1, 5), (4, 2, 5, 0)) del x39 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) x41 += einsum(l1, (0, 1), x3, (2, 3), (1, 2, 0, 3)) x41 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -371,30 +372,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x41, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new += einsum(x41, (0, 1, 2, 3), (3, 2, 1, 0)) del x41 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(f.ov, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(x19, (0, 1), v.oovv, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x19 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x3, (0, 1), x1, (2, 3, 0, 4), (2, 3, 4, 1)) del x1, x3 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 += einsum(x24, (0, 1), (0, 1)) del x24 x47 += einsum(x46, (0, 1), (0, 1)) * 0.5 del x46 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(x47, (0, 1), l2, (2, 0, 3, 4), (3, 4, 1, 2)) * -1.0 del x47 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(l1, (0, 1), x8, (1, 2, 3, 4), (2, 3, 4, 0)) del x8 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(x42, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x42 x50 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -410,11 +411,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x50, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x50, (0, 1, 2, 3), (3, 2, 0, 1)) del x50 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(l1, (0, 1), v.ovvv, (2, 0, 3, 4), (1, 2, 3, 4)) - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(x51, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x51 x53 += einsum(x52, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -422,7 +423,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x53, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(x53, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x53 - x54 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x54 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x54 += einsum(x11, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.25 del x11 @@ -437,27 +438,27 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) rdm1_f_ov += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) rdm1_f_vv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) * 0.5 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -0.5 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x2, (0, 1, 4, 3), (4, 2)) * 0.5 del x2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 x3 += einsum(x0, (0, 1), (0, 1)) @@ -473,69 +474,69 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) * 0.5 - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (0, 3, 1, 2)) * -0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (0, 3, 2, 1)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (3, 0, 1, 2)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x3, (2, 3), (3, 0, 2, 1)) * -0.5 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 2, 1)) * -1.0 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x5, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x5, (0, 1, 2, 3), (2, 1, 3, 0)) - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - x7 = np.zeros((nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(x4, (0, 1), (0, 1)) x8 += einsum(x3, (0, 1), (0, 1)) * 0.5 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(t1, (0, 1), x8, (0, 2), (2, 1)) - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(x6, (0, 1), (0, 1)) * -1.0 del x6 x10 += einsum(x7, (0, 1), (0, 1)) * 0.5 @@ -546,9 +547,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_ooov += einsum(delta.oo, (0, 1), x10, (2, 3), (2, 0, 1, 3)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x10, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x10, (2, 3), (2, 0, 3, 1)) * -1.0 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x12 += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x12 += einsum(t1, (0, 1), x8, (2, 3), (0, 2, 3, 1)) @@ -558,23 +559,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (2, 0, 3, 1)) del x12 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x0 x13 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x2 rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), x13, (0, 1, 4, 5), (5, 4, 2, 3)) * 0.25 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), x13, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x13 rdm2_f_ooov += einsum(x14, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x14, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovv += einsum(t1, (0, 1), x14, (0, 2, 3, 4), (3, 2, 4, 1)) del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t1, (0, 1), x11, (0, 2, 3, 4), (2, 3, 1, 4)) del x11 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x16 += einsum(t1, (0, 1), x10, (2, 3), (0, 2, 1, 3)) @@ -584,13 +585,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x16, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x16, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(x4, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) del x4 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(x3, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) del x3 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 x19 += einsum(x18, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 @@ -598,22 +599,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x5, (0, 2, 3, 4), (2, 3, 1, 4)) del x5 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(x21, (0, 1), t2, (2, 3, 4, 0), (2, 3, 4, 1)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_ovov += einsum(x23, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovvo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_voov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_vovo += einsum(x23, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x23, (1, 4, 3, 5), (4, 0, 5, 2)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x25 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -623,15 +624,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x25, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x26, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ovvo += einsum(x26, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x26, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x26, (0, 1, 2, 3), (2, 1, 3, 0)) - x27 = np.zeros((nvir, nvir), dtype=np.float64) + x27 = np.zeros((nvir, nvir), dtype=types[float]) x27 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x28 = np.zeros((nvir, nvir), dtype=np.float64) + x28 = np.zeros((nvir, nvir), dtype=types[float]) x28 += einsum(x27, (0, 1), (0, 1)) * 2.0 x28 += einsum(x21, (0, 1), (0, 1)) rdm2_f_ovov += einsum(delta.oo, (0, 1), x28, (2, 3), (0, 2, 1, 3)) * 0.5 @@ -639,34 +640,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 1, 3)) * -0.5 rdm2_f_vovo += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 3, 1)) * 0.5 del x28 - x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(x29, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.5 del x29 - x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), x26, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x26 rdm2_f_ovvv += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x30, (0, 1, 2, 3), (1, 0, 3, 2)) del x30 - x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x31 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x31, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x31, (0, 1, 2, 3), (1, 0, 3, 2)) del x31 - x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x23, (0, 2, 3, 4), (2, 3, 1, 4)) del x23 - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum(x27, (0, 1), (0, 1)) del x27 x33 += einsum(x21, (0, 1), (0, 1)) * 0.5 del x21 - x34 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x34 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x32 x34 += einsum(t1, (0, 1), x33, (2, 3), (0, 2, 1, 3)) @@ -676,11 +677,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x34, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) del x34 - x35 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x35, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x35, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvv += einsum(t1, (0, 1), x35, (0, 2, 3, 4), (2, 3, 1, 4)) del x35 @@ -695,12 +696,12 @@ def make_ip_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - ket2_o = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - ket1_o = np.zeros((nocc, nocc), dtype=np.float64) + ket2_o = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + ket1_o = np.zeros((nocc, nocc), dtype=types[float]) ket1_o += einsum("ij->ji", delta_oo) - ket1_v = np.zeros((nocc, nvir), dtype=np.float64) + ket1_v = np.zeros((nocc, nvir), dtype=types[float]) ket1_v += einsum("ia->ia", t1) - ket2_v = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + ket2_v = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) ket2_v -= einsum("ijab->jiba", t2) ket1 = np.concatenate([ket1_o, ket1_v], axis=1) @@ -712,12 +713,12 @@ def make_ea_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - ket2_v = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - ket1_o = np.zeros((nvir, nocc), dtype=np.float64) + ket2_v = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + ket1_o = np.zeros((nvir, nocc), dtype=types[float]) ket1_o -= einsum("ia->ai", t1) - ket1_v = np.zeros((nvir, nvir), dtype=np.float64) + ket1_v = np.zeros((nvir, nvir), dtype=types[float]) ket1_v += einsum("ab->ba", delta_vv) - ket2_o = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + ket2_o = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) ket2_o += einsum("ijab->baji", t2) ket1 = np.concatenate([ket1_o, ket1_v], axis=1) @@ -729,17 +730,17 @@ def make_ip_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - bra1_o = np.zeros((nocc, nocc), dtype=np.float64) + bra1_o = np.zeros((nocc, nocc), dtype=types[float]) bra1_o += einsum("abij,kjab->ki", l2, t2) * -0.5 bra1_o += einsum("ij->ji", delta_oo) bra1_o -= einsum("ai,ja->ji", l1, t1) - bra1_v = np.zeros((nvir, nocc), dtype=np.float64) + bra1_v = np.zeros((nvir, nocc), dtype=types[float]) bra1_v += einsum("ai->ai", l1) - bra2_o = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + bra2_o = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) bra2_o -= einsum("ia,bajk->ikjb", t1, l2) bra2_o += einsum("ij,ak->jika", delta_oo, l1) bra2_o -= einsum("ij,ak->jkia", delta_oo, l1) - bra2_v = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + bra2_v = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) bra2_v += einsum("abij->bjia", l2) bra1 = np.concatenate([bra1_o, bra1_v], axis=0) @@ -751,15 +752,15 @@ def make_ea_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - bra1_o = np.zeros((nocc, nvir), dtype=np.float64) + bra1_o = np.zeros((nocc, nvir), dtype=types[float]) bra1_o -= einsum("ai->ia", l1) - bra1_v = np.zeros((nvir, nvir), dtype=np.float64) + bra1_v = np.zeros((nvir, nvir), dtype=types[float]) bra1_v += einsum("ab->ba", delta_vv) bra1_v -= einsum("ai,ib->ba", l1, t1) bra1_v += einsum("abij,ijcb->ca", l2, t2) * -0.5 - bra2_o = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + bra2_o = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) bra2_o -= einsum("abij->jbai", l2) - bra2_v = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + bra2_v = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) bra2_v -= einsum("ia,bcji->acbj", t1, l2) bra2_v += einsum("ab,ci->baci", delta_vv, l1) bra2_v -= einsum("ab,ci->bcai", delta_vv, l1) @@ -770,66 +771,66 @@ def make_ea_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= return bra1, bra2 def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): - x0 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x0 += einsum("i,jiab->jab", r1, v.oovv) - x47 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x47 += einsum("ia,jba->ijb", t1, x0) - x48 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x48 += einsum("ija,kjba->ikb", x47, t2) - x60 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x60 += einsum("ija->ija", x48) del x48 - x63 = np.zeros((nocc, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc), dtype=types[float]) x63 += einsum("ia,jka->kij", t1, x47) del x47 - r1new = np.zeros((nocc), dtype=np.float64) + r1new = np.zeros((nocc), dtype=types[float]) r1new += einsum("iab,jiab->j", x0, t2) * 0.5 del x0 - x1 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ija->ija", r2) x1 += einsum("i,ja->ija", r1, t1) * 2 - x6 = np.zeros((nvir), dtype=np.float64) + x6 = np.zeros((nvir), dtype=types[float]) x6 += einsum("ija,jiab->b", x1, v.oovv) * 0.5 - x7 = np.zeros((nvir), dtype=np.float64) + x7 = np.zeros((nvir), dtype=types[float]) x7 += einsum("a->a", x6) del x6 - x61 = np.zeros((nvir, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nvir, nvir, nvir), dtype=types[float]) x61 += einsum("ija,jibc->acb", x1, v.oovv) * 0.5 r1new += einsum("ija,jika->k", x1, v.ooov) * 0.5 del x1 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("ia,jiba->jb", t1, v.oovv) - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("ia->ia", x2) - x50 = np.zeros((nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nvir), dtype=types[float]) x50 += einsum("ia->ia", x2) del x2 x3 += einsum("ia->ia", f.ov) - x4 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ija->ija", r2) x4 += einsum("ija->jia", r2) * -1 - x30 = np.zeros((nocc, nocc, nocc), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc), dtype=types[float]) x30 += einsum("ija,ikla->klj", x4, v.ooov) - x31 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x31 += einsum("ia,ijk->kja", t1, x30) * 0.5 del x30 - x40 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x40 += einsum("ija->ija", x31) del x31 r1new += einsum("ia,ija->j", x3, x4) * -0.5 del x3 del x4 - x5 = np.zeros((nvir), dtype=np.float64) + x5 = np.zeros((nvir), dtype=types[float]) x5 += einsum("i,ia->a", r1, f.ov) x7 += einsum("a->a", x5) del x5 r1new += einsum("a,ia->i", x7, t1) * -1 - r2new = np.zeros((nocc, nocc, nvir), dtype=np.float64) + r2new = np.zeros((nocc, nocc, nvir), dtype=types[float]) r2new += einsum("a,ijab->jib", x7, t2) del x7 - x8 = np.zeros((nvir, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir, nvir), dtype=types[float]) x8 += einsum("i,iabc->abc", r1, v.ovvv) - x9 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x9 += einsum("ia,bca->ibc", t1, x8) r2new -= einsum("ia,jba->ijb", t1, x9) del x9 @@ -837,109 +838,109 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x8 r2new += einsum("abc,ijbc->jia", x61, t2) * -0.5 del x61 - x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x10 += einsum("ia,jkla->ijkl", t1, v.ooov) - x11 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x11 -= einsum("ija,kjil->kla", r2, x10) del x10 x40 += einsum("ija->ija", x11) * 0.5 del x11 - x12 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ija->ija", r2) * -1 x12 += einsum("ija->jia", r2) - x16 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x16 += einsum("ija,jkab->ikb", x12, v.oovv) - x32 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x32 += einsum("ij,ika->kja", f.oo, x12) * 0.5 x40 += einsum("ija->jia", x32) * -1 del x32 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum("ijab->jiab", x13) * -1 del x13 x14 += einsum("iajb->ijab", v.ovov) - x15 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ija,jkba->ikb", x12, x14) * 0.5 del x14 x40 += einsum("ija->ija", x15) * -1 del x15 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum("ijab->jiba", t2) x17 += einsum("ia,jb->ijba", t1, t1) * -1 - x18 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x18 += einsum("ija,jkab->ikb", x16, x17) * -0.5 del x16 del x17 x40 += einsum("ija->ija", x18) * -1 del x18 - x19 = np.zeros((nvir, nvir), dtype=np.float64) + x19 = np.zeros((nvir, nvir), dtype=types[float]) x19 += einsum("ia,ib->ab", f.ov, t1) - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum("ab->ba", x19) del x19 - x20 = np.zeros((nvir, nvir), dtype=np.float64) + x20 = np.zeros((nvir, nvir), dtype=types[float]) x20 -= einsum("ia,ibac->bc", t1, v.ovvv) x23 += einsum("ab->ab", x20) - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 -= einsum("ab->ab", x20) del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum("ijab->jiba", t2) x21 += einsum("ia,jb->ijab", t1, t1) * 2 - x22 = np.zeros((nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir), dtype=types[float]) x22 += einsum("ijab,ijac->cb", v.oovv, x21) * 0.5 x23 += einsum("ab->ab", x22) del x22 - x27 = np.zeros((nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc), dtype=types[float]) x27 += einsum("ijab,ikab->kj", v.oovv, x21) * 0.5 del x21 - x28 = np.zeros((nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc), dtype=types[float]) x28 += einsum("ij->ji", x27) del x27 x23 += einsum("ab->ab", f.vv) * -1 - x24 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x24 += einsum("ab,ijb->ija", x23, r2) * 0.5 del x23 x40 += einsum("ija->ija", x24) del x24 - x25 = np.zeros((nocc, nocc), dtype=np.float64) + x25 = np.zeros((nocc, nocc), dtype=types[float]) x25 += einsum("ia,ja->ij", f.ov, t1) x28 += einsum("ij->ij", x25) del x25 - x26 = np.zeros((nocc, nocc), dtype=np.float64) + x26 = np.zeros((nocc, nocc), dtype=types[float]) x26 -= einsum("ia,ijka->jk", t1, v.ooov) x28 += einsum("ij->ij", x26) - x29 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x29 += einsum("ij,kia->kja", x28, x12) * 0.5 del x12 del x28 x40 += einsum("ija->ija", x29) * -1 del x29 - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum("ij->ij", x26) del x26 - x33 = np.zeros((nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nvir), dtype=types[float]) x33 += einsum("ijab,jcab->ic", t2, v.ovvv) - x39 = np.zeros((nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nvir), dtype=types[float]) x39 += einsum("ia->ia", x33) del x33 - x34 = np.zeros((nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc), dtype=types[float]) x34 -= einsum("ijab,jkab->ik", t2, v.oovv) - x35 = np.zeros((nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nvir), dtype=types[float]) x35 += einsum("ia,ji->ja", t1, x34) del x34 x39 += einsum("ia->ia", x35) del x35 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ia,jkba->ijkb", t1, v.oovv) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum("ijka->ikja", x36) * -1 - x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x62 += einsum("ia,jkla->lkij", t1, x36) * -1 del x36 x37 += einsum("ijka->kjia", v.ooov) - x38 = np.zeros((nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nvir), dtype=types[float]) x38 += einsum("ijab,kija->kb", t2, x37) del x37 x39 += einsum("ia->ia", x38) @@ -949,58 +950,58 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new += einsum("ija->ija", x40) * -1 r2new += einsum("ija->jia", x40) del x40 - x41 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x41 += einsum("i,iajb->jab", r1, v.ovov) - x42 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x42 += einsum("ia,jba->ijb", t1, x41) del x41 x60 -= einsum("ija->ija", x42) del x42 - x43 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x43 += einsum("i,jika->jka", r1, v.ooov) - x44 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x44 -= einsum("ija,kiba->kjb", x43, t2) x60 -= einsum("ija->ija", x44) del x44 - x45 = np.zeros((nocc, nocc, nocc), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc), dtype=types[float]) x45 += einsum("ia,jka->ijk", t1, x43) del x43 - x46 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x46 -= einsum("ia,jik->jka", t1, x45) del x45 x60 += einsum("ija->ija", x46) del x46 - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum("ia,ibja->jb", t1, v.ovov) - x57 = np.zeros((nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir), dtype=types[float]) x57 += einsum("ia->ia", x49) del x49 x50 += einsum("ia->ia", f.ov) - x51 = np.zeros((nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir), dtype=types[float]) x51 += einsum("ia,ijab->jb", x50, t2) x57 -= einsum("ia->ia", x51) del x51 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum("ia,ja->ji", t1, x50) del x50 x55 += einsum("ij->ij", x54) del x54 - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ia,ij->ja", t1, x55) del x55 x57 += einsum("ia->ia", x56) del x56 x52 += einsum("ab->ab", f.vv) - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia,ba->ib", t1, x52) del x52 x57 -= einsum("ia->ia", x53) del x53 x60 += einsum("i,ja->ija", r1, x57) del x57 - x58 = np.zeros((nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir), dtype=types[float]) x58 += einsum("ij,ia->ja", f.oo, t1) - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 -= einsum("ia->ia", x58) del x58 x59 += einsum("ai->ia", f.vo) @@ -1023,111 +1024,111 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): r2 = -r2 - x0 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x0 += einsum("a,ijba->ijb", r1, v.oovv) - x12 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ija,kiba->kjb", x0, t2) - x13 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x13 += einsum("ija->jia", x12) del x12 - r1new = np.zeros((nvir), dtype=np.float64) + r1new = np.zeros((nvir), dtype=types[float]) r1new += einsum("ija,ijba->b", x0, t2) * 0.5 del x0 - x1 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x1 += einsum("a,ib->iab", r1, t1) * 2 x1 += einsum("abi->iab", r2) * -1 - x6 = np.zeros((nocc), dtype=np.float64) + x6 = np.zeros((nocc), dtype=types[float]) x6 += einsum("iab,ijba->j", x1, v.oovv) * 0.5 - x7 = np.zeros((nocc), dtype=np.float64) + x7 = np.zeros((nocc), dtype=types[float]) x7 += einsum("i->i", x6) del x6 r1new += einsum("iab,icba->c", x1, v.ovvv) * 0.5 del x1 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("ia,jiba->jb", t1, v.oovv) - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("ia->ia", x2) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x2) del x2 x3 += einsum("ia->ia", f.ov) - x4 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x4 += einsum("abi->iab", r2) x4 += einsum("abi->iba", r2) * -1 r1new += einsum("ia,iba->b", x3, x4) * -0.5 del x3 del x4 - x5 = np.zeros((nocc), dtype=np.float64) + x5 = np.zeros((nocc), dtype=types[float]) x5 += einsum("a,ia->i", r1, f.ov) x7 += einsum("i->i", x5) del x5 r1new += einsum("i,ia->a", x7, t1) * -1 - r2new = np.zeros((nvir, nvir, nocc), dtype=np.float64) + r2new = np.zeros((nvir, nvir, nocc), dtype=types[float]) r2new += einsum("i,ijab->baj", x7, t2) del x7 - x8 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x8 += einsum("a,ibca->ibc", r1, v.ovvv) - x9 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x9 -= einsum("iab,jicb->jca", x8, t2) - x27 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x27 -= einsum("iab->iab", x9) del x9 - x11 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x11 -= einsum("ia,jba->ijb", t1, x8) del x8 x13 += einsum("ija->jia", x11) del x11 - x10 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x10 += einsum("a,ibja->ijb", r1, v.ovov) x13 -= einsum("ija->ija", x10) del x10 - x14 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x14 += einsum("ia,ijb->jba", t1, x13) del x13 x27 += einsum("iab->iba", x14) del x14 - x15 = np.zeros((nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nvir), dtype=types[float]) x15 += einsum("ia,ibja->jb", t1, v.ovov) - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 += einsum("ia->ia", x15) del x15 - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 -= einsum("ia,ibac->bc", t1, v.ovvv) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia,ba->ib", t1, x16) x24 += einsum("ia->ia", x17) del x17 - x42 = np.zeros((nvir, nvir), dtype=np.float64) + x42 = np.zeros((nvir, nvir), dtype=types[float]) x42 += einsum("ab->ab", x16) del x16 x18 += einsum("ia->ia", f.ov) - x19 = np.zeros((nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir), dtype=types[float]) x19 += einsum("ia,ijab->jb", x18, t2) x24 -= einsum("ia->ia", x19) del x19 - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum("ia,ja->ji", t1, x18) del x18 - x22 = np.zeros((nocc, nocc), dtype=np.float64) + x22 = np.zeros((nocc, nocc), dtype=types[float]) x22 += einsum("ij->ij", x21) del x21 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 -= einsum("ia,ijka->jk", t1, v.ooov) x22 += einsum("ij->ij", x20) - x46 = np.zeros((nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc), dtype=types[float]) x46 += einsum("ij->ij", x20) del x20 x22 += einsum("ij->ij", f.oo) - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("ia,ij->ja", t1, x22) del x22 x24 += einsum("ia->ia", x23) del x23 x27 += einsum("a,ib->iab", r1, x24) del x24 - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum("ab,ib->ia", f.vv, t1) - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ia->ia", x25) del x25 x26 += einsum("ai->ia", f.vo) @@ -1136,93 +1137,93 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new -= einsum("iab->abi", x27) r2new += einsum("iab->bai", x27) del x27 - x28 = np.zeros((nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir), dtype=types[float]) x28 += einsum("abi,jcab->ijc", r2, v.ovvv) - x29 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x29 += einsum("ia,jib->jab", t1, x28) del x28 - x54 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x54 += einsum("iab->iab", x29) * 0.5 del x29 - x30 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x30 += einsum("abi->iab", r2) * -1 x30 += einsum("abi->iba", r2) - x37 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x37 += einsum("iab,ijbc->jac", x30, v.oovv) - x38 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x38 += einsum("iab,ijbc->jac", x37, t2) * -0.5 del x37 x54 += einsum("iab->iab", x38) * -1 del x38 - x48 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x48 += einsum("ab,icb->ica", f.vv, x30) * 0.5 x54 += einsum("iab->iba", x48) * -1 del x48 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum("ijab->ijab", x31) del x31 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum("ia,jkba->ijkb", t1, v.oovv) - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum("ijka->ikja", x32) * -1 del x32 x33 += einsum("ijka->kjia", v.ooov) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum("ia,jikb->jkba", t1, x33) x35 += einsum("ijab->ijba", x34) del x34 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ijab,kija->kb", t2, x33) del x33 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia->ia", x52) del x52 x35 += einsum("iajb->jiab", v.ovov) * -1 - x36 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x36 += einsum("iab,jicb->jac", x30, x35) * 0.5 del x35 x54 += einsum("iab->iab", x36) del x36 - x39 = np.zeros((nvir, nvir), dtype=np.float64) + x39 = np.zeros((nvir, nvir), dtype=types[float]) x39 += einsum("ia,ib->ab", f.ov, t1) x42 += einsum("ab->ba", x39) del x39 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ijab->jiba", t2) x40 += einsum("ia,jb->ijab", t1, t1) * 2 - x41 = np.zeros((nvir, nvir), dtype=np.float64) + x41 = np.zeros((nvir, nvir), dtype=types[float]) x41 += einsum("ijab,ijac->cb", v.oovv, x40) * 0.5 x42 += einsum("ab->ab", x41) del x41 - x43 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x43 += einsum("ab,icb->ica", x42, x30) * 0.5 del x42 del x30 x54 += einsum("iab->iab", x43) * -1 del x43 - x45 = np.zeros((nocc, nocc), dtype=np.float64) + x45 = np.zeros((nocc, nocc), dtype=types[float]) x45 += einsum("ijab,ikab->kj", v.oovv, x40) * 0.5 x46 += einsum("ij->ji", x45) del x45 - x44 = np.zeros((nocc, nocc), dtype=np.float64) + x44 = np.zeros((nocc, nocc), dtype=types[float]) x44 += einsum("ia,ja->ij", f.ov, t1) x46 += einsum("ij->ij", x44) del x44 x46 += einsum("ij->ij", f.oo) - x47 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ij,abi->jab", x46, r2) * 0.5 del x46 x54 += einsum("iab->iab", x47) del x47 - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum("ijab,jcab->ic", t2, v.ovvv) x53 += einsum("ia->ia", x49) del x49 - x50 = np.zeros((nocc, nocc), dtype=np.float64) + x50 = np.zeros((nocc, nocc), dtype=types[float]) x50 -= einsum("ijab,jkab->ik", t2, v.oovv) - x51 = np.zeros((nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir), dtype=types[float]) x51 += einsum("ia,ji->ja", t1, x50) del x50 x53 += einsum("ia->ia", x51) @@ -1232,10 +1233,10 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new += einsum("iab->abi", x54) r2new += einsum("iab->bai", x54) * -1 del x54 - x55 = np.zeros((nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir, nvir), dtype=types[float]) x55 += einsum("abi->iab", r2) x55 += einsum("a,ib->iba", r1, t1) * 2 - x56 = np.zeros((nocc, nocc, nocc), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc), dtype=types[float]) x56 += einsum("iab,jkab->kji", x55, v.oovv) * -0.5 r2new += einsum("iab,cdab->dci", x55, v.vvvv) * 0.5 del x55 @@ -1252,28 +1253,28 @@ def make_ee_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - ketee1_oo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + ketee1_oo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) ketee1_oo -= einsum("ij,ka->jaki", delta_oo, t1) - ketee1_ov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + ketee1_ov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) ketee1_ov -= einsum("ia,jb->iajb", t1, t1) ketee1_ov += einsum("ijab->jbia", t2) - ketee1_vo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + ketee1_vo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) ketee1_vo += einsum("ab,ij->jbai", delta_vv, delta_oo) - ketee1_vv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + ketee1_vv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) ketee1_vv += einsum("ab,ic->ibac", delta_vv, t1) - ketee2_oo = np.zeros((nocc, nocc, nvir, nvir, nocc, nocc), dtype=np.float64) + ketee2_oo = np.zeros((nocc, nocc, nvir, nvir, nocc, nocc), dtype=types[float]) ketee2_oo += einsum("ij,klab->jlbaki", delta_oo, t2) ketee2_oo -= einsum("ij,klab->ljbaki", delta_oo, t2) - ketee2_ov = np.zeros((nocc, nocc, nvir, nvir, nocc, nvir), dtype=np.float64) + ketee2_ov = np.zeros((nocc, nocc, nvir, nvir, nocc, nvir), dtype=types[float]) ketee2_ov += einsum("ia,jkbc->ikcbja", t1, t2) ketee2_ov -= einsum("ia,jkbc->kicbja", t1, t2) ketee2_ov += einsum("ia,jkbc->kjacib", t1, t2) ketee2_ov -= einsum("ia,jkbc->kjcaib", t1, t2) - ketee2_vv = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + ketee2_vv = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) ketee2_vv -= einsum("ab,ijcd->jibdac", delta_vv, t2) ketee2_vv += einsum("ab,ijcd->jidbac", delta_vv, t2) - ketee2_vo = np.zeros((nocc, nocc, nvir, nvir, nvir, nocc), dtype=np.float64) + ketee2_vo = np.zeros((nocc, nocc, nvir, nvir, nvir, nocc), dtype=types[float]) ketee1 = np.concatenate([np.concatenate([ketee1_oo, ketee1_ov], axis=-1), np.concatenate([ketee1_vo, ketee1_vv], axis=-1)], axis=-2) ketee2 = np.concatenate([np.concatenate([ketee2_oo, ketee2_ov], axis=-1), np.concatenate([ketee2_vo, ketee2_vv], axis=-1)], axis=-2) @@ -1284,35 +1285,35 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_oo = np.eye(nocc) delta_vv = np.eye(nvir) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,bajk->jkib", t1, l2) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 -= einsum("ijka->jika", x0) - braee1_oo = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + braee1_oo = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) braee1_oo -= einsum("ijka->kjia", x0) del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("ijab->jiba", t2) x1 -= einsum("ia,jb->ijba", t1, t1) - braee1_ov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + braee1_ov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) braee1_ov += einsum("abij,ikac->kcjb", l2, x1) del x1 - x2 = np.zeros((nvir, nvir), dtype=np.float64) + x2 = np.zeros((nvir, nvir), dtype=types[float]) x2 += einsum("ab->ba", delta_vv) * -2 x2 += einsum("ai,ib->ab", l1, t1) * 2 x2 += einsum("abij,ijcb->ac", l2, t2) braee1_ov += einsum("ij,ab->jbia", delta_oo, x2) * -0.5 del x2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("ai,ja->ij", l1, t1) * 2 x3 += einsum("abij,kjab->ik", l2, t2) braee1_ov += einsum("ab,ij->jbia", delta_vv, x3) * -0.5 del x3 - x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x4 += einsum("ia,bcji->jbca", t1, l2) - braee1_vv = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + braee1_vv = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) braee1_vv += einsum("iabc->bcia", x4) - braee2_ov = np.zeros((nocc, nvir, nocc, nocc, nvir, nvir), dtype=np.float64) + braee2_ov = np.zeros((nocc, nvir, nocc, nocc, nvir, nvir), dtype=types[float]) braee2_ov -= einsum("ij,kabc->icjkba", delta_oo, x4) braee2_ov += einsum("ij,kabc->ickjba", delta_oo, x4) del x4 @@ -1324,19 +1325,19 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= braee1_oo += einsum("ij,ak->jika", delta_oo, l1) braee1_oo -= einsum("ij,ak->jkia", delta_oo, l1) braee1_ov += einsum("ai,jb->jbia", l1, t1) - braee1_vo = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + braee1_vo = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) braee1_vo += einsum("abij->bjia", l2) braee1_vv += einsum("ab,ci->cbia", delta_vv, l1) - braee2_oo = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + braee2_oo = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) braee2_oo += einsum("ij,abkl->jilkba", delta_oo, l2) braee2_oo -= einsum("ij,abkl->jlikba", delta_oo, l2) braee2_oo += einsum("ij,abkl->jlkiba", delta_oo, l2) braee2_ov += einsum("ia,bcjk->iakjcb", t1, l2) - braee2_vv = np.zeros((nvir, nvir, nocc, nocc, nvir, nvir), dtype=np.float64) + braee2_vv = np.zeros((nvir, nvir, nocc, nocc, nvir, nvir), dtype=types[float]) braee2_vv += einsum("ab,cdij->dbjiac", delta_vv, l2) braee2_vv -= einsum("ab,cdij->dbjica", delta_vv, l2) - braee2_vo = np.zeros((nvir, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + braee2_vo = np.zeros((nvir, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) braee1 = np.concatenate([np.concatenate([braee1_oo, braee1_ov], axis=1), np.concatenate([braee1_vo, braee1_vv], axis=1)], axis=0) braee2 = np.concatenate([np.concatenate([braee2_oo, braee2_ov], axis=1), np.concatenate([braee2_vo, braee2_vv], axis=1)], axis=0) @@ -1344,125 +1345,125 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= return braee1, braee2 def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("ijab->ijab", r2) x0 += einsum("ijab->jiab", r2) * -1 - x105 = np.zeros((nocc, nocc), dtype=np.float64) + x105 = np.zeros((nocc, nocc), dtype=types[float]) x105 += einsum("ijab,ikab->jk", v.oovv, x0) - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum("ij,ikab->kjab", x105, t2) * 0.25 del x105 - x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x107 += einsum("ijab->jiba", x106) del x106 - ree1new = np.zeros((nocc, nvir), dtype=np.float64) + ree1new = np.zeros((nocc, nvir), dtype=types[float]) ree1new += einsum("iabc,ijbc->ja", v.ovvv, x0) * 0.25 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("ijab->ijab", r2) * -1 x1 += einsum("ijab->ijba", r2) - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum("ab,ijcb->ijac", f.vv, x1) * 0.25 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum("ijab->ijab", x87) * -1 del x87 ree1new += einsum("ijka,jiba->kb", v.ooov, x1) * -0.25 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum("ijab->ijab", r2) x2 += einsum("ijab->ijba", r2) * -1 x2 += einsum("ijab->jiab", r2) * -1 x2 += einsum("ijab->jiba", r2) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum("ijab,kiac->jkbc", v.oovv, x2) - x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x78 += einsum("ia,jkab->ikjb", t1, x3) * -1 - x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x79 += einsum("ijka->kjia", x78) del x78 ree1new += einsum("ia,ijab->jb", t1, x3) * -0.25 del x3 - x83 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x83 += einsum("iabc,jibd->jacd", v.ovvv, x2) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ia,jbac->ijcb", t1, x83) * 0.25 del x83 x94 += einsum("ijab->jiab", x84) del x84 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("ijab->ijab", r2) * -1 x4 += einsum("ijab->ijba", r2) x4 += einsum("ijab->jiab", r2) x4 += einsum("ijab->jiba", r2) * -1 - x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x76 += einsum("ijka,ilba->jklb", v.ooov, x4) x79 += einsum("ijka->ikja", x76) * -1 del x76 ree1new += einsum("ia,ijba->jb", f.ov, x4) * 0.25 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum("ijab,jkbc->ikac", t2, v.oovv) - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 -= einsum("ijab->jiab", x5) - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ijab->ijab", x5) - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("ijab->ijab", x5) - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("ijab->ijab", x5) del x5 x6 += einsum("iajb->ijab", v.ovov) - x55 = np.zeros((nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir), dtype=types[float]) x55 += einsum("ia,ijba->jb", t1, x6) - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ia->ia", x55) del x55 ree1new -= einsum("ia,ijba->jb", r1, x6) del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 -= einsum("ia,ijka->jk", r1, v.ooov) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x7) - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 -= einsum("ij,kiab->kjab", x7, t2) del x7 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 -= einsum("ijab->ijba", x58) del x58 - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum("ia,ijab->jb", r1, v.oovv) - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 -= einsum("ia,ja->ij", t1, x8) x13 += einsum("ij->ji", x9) * -1 - x63 = np.zeros((nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc), dtype=types[float]) x63 -= einsum("ij->ij", x9) del x9 - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 -= einsum("ia,jkba->jkib", x8, t2) del x8 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 -= einsum("ia,jkib->jkab", t1, x26) del x26 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("ijab->ijab", x27) del x27 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum("ijab->ijab", r2) * -1 x10 += einsum("ijab->jiab", r2) x13 += einsum("ijab,kiab->jk", v.oovv, x10) * 0.25 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum("ij,ikab->jkab", f.oo, x10) * 0.25 x94 += einsum("ijab->ijab", x88) * -1 del x88 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia,ijab->jb", t1, v.oovv) - x12 = np.zeros((nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nvir), dtype=types[float]) x12 += einsum("ia->ia", x11) - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum("ia->ia", x11) - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum("ia,ja->ij", t1, x11) del x11 - x54 = np.zeros((nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir), dtype=types[float]) x54 += einsum("ia,ji->ja", t1, x53) del x53 x56 += einsum("ia->ia", x54) @@ -1471,95 +1472,95 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x13 += einsum("ia,ja->ji", r1, x12) ree1new += einsum("ia,ij->ja", t1, x13) * -1 del x13 - x22 = np.zeros((nocc, nocc), dtype=np.float64) + x22 = np.zeros((nocc, nocc), dtype=types[float]) x22 += einsum("ia,ja->ij", t1, x12) - x23 = np.zeros((nocc, nocc), dtype=np.float64) + x23 = np.zeros((nocc, nocc), dtype=types[float]) x23 += einsum("ij->ji", x22) - x85 = np.zeros((nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc), dtype=types[float]) x85 += einsum("ij->ji", x22) del x22 - x77 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x77 += einsum("ia,jkba->jkib", x12, x1) del x1 del x12 x79 += einsum("ijka->kija", x77) * -1 del x77 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum("ia,ijkb->jkab", t1, x79) * 0.25 del x79 x94 += einsum("ijab->ijba", x80) del x80 - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 -= einsum("ia,ibac->bc", r1, v.ovvv) - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 += einsum("ab->ab", x14) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 -= einsum("ab,ijcb->ijca", x14, t2) del x14 x38 += einsum("ijab->ijab", x25) del x25 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum("ijab->ijab", r2) x15 += einsum("ijab->ijba", r2) * -1 x16 += einsum("ijab,jiac->cb", v.oovv, x15) * -0.25 ree1new += einsum("ia,ba->ib", t1, x16) * -1 del x16 - x114 = np.zeros((nvir, nvir), dtype=np.float64) + x114 = np.zeros((nvir, nvir), dtype=types[float]) x114 += einsum("ijab,jiac->bc", v.oovv, x15) - x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x115 += einsum("ab,ijac->ijcb", x114, t2) * -0.25 del x114 - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum("ijab->jiba", x115) del x115 - x17 = np.zeros((nvir, nvir), dtype=np.float64) + x17 = np.zeros((nvir, nvir), dtype=types[float]) x17 -= einsum("ia,ibac->bc", t1, v.ovvv) - x19 = np.zeros((nvir, nvir), dtype=np.float64) + x19 = np.zeros((nvir, nvir), dtype=types[float]) x19 += einsum("ab->ab", x17) - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ia,ba->ib", t1, x17) x56 += einsum("ia->ia", x52) del x52 - x81 = np.zeros((nvir, nvir), dtype=np.float64) + x81 = np.zeros((nvir, nvir), dtype=types[float]) x81 += einsum("ab->ab", x17) del x17 - x18 = np.zeros((nvir, nvir), dtype=np.float64) + x18 = np.zeros((nvir, nvir), dtype=types[float]) x18 -= einsum("ijab,ijbc->ac", t2, v.oovv) x19 += einsum("ab->ab", x18) * 0.5 x81 += einsum("ab->ab", x18) * 0.5 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ab,ijbc->ijca", x81, x15) * 0.25 del x81 del x15 x94 += einsum("ijab->ijab", x82) * -1 del x82 - x91 = np.zeros((nocc, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nvir), dtype=types[float]) x91 += einsum("ia,ba->ib", t1, x18) del x18 - x93 = np.zeros((nocc, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nvir), dtype=types[float]) x93 += einsum("ia->ia", x91) del x91 x19 += einsum("ab->ab", f.vv) * -1 ree1new += einsum("ia,ba->ib", r1, x19) * -1 del x19 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 -= einsum("ia,ijka->jk", t1, v.ooov) x23 += einsum("ij->ij", x20) x85 += einsum("ij->ij", x20) - x123 = np.zeros((nocc, nocc), dtype=np.float64) + x123 = np.zeros((nocc, nocc), dtype=types[float]) x123 += einsum("ij->ij", x20) del x20 - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 -= einsum("ijab,jkab->ik", t2, v.oovv) x23 += einsum("ij->ji", x21) * 0.5 x85 += einsum("ij->ji", x21) * 0.5 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum("ij,kiab->kjab", x85, x10) * 0.25 del x10 del x85 x94 += einsum("ijab->ijab", x86) * -1 del x86 - x92 = np.zeros((nocc, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nvir), dtype=types[float]) x92 += einsum("ia,ji->ja", t1, x21) del x21 x93 += einsum("ia->ia", x92) @@ -1567,53 +1568,53 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x23 += einsum("ij->ij", f.oo) ree1new += einsum("ia,ij->ja", r1, x23) * -1 del x23 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 -= einsum("ijab,jikl->klab", r2, v.oooo) - ree2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + ree2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) ree2new += einsum("ijab->jiab", x24) * -0.25 ree2new += einsum("ijab->jiba", x24) * 0.25 del x24 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 -= einsum("ia,jbac->ijbc", t1, v.ovvv) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 -= einsum("ia,jkba->jikb", t1, x28) - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ijka->kjia", x29) del x29 x48 += einsum("ijab->ijab", x28) del x28 x30 += einsum("ia->ia", f.ov) - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum("ia,jkab->jkib", x30, t2) x36 += einsum("ijka->kjia", x31) del x31 - x62 = np.zeros((nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc), dtype=types[float]) x62 += einsum("ia,ja->ij", r1, x30) del x30 x63 += einsum("ij->ij", x62) del x62 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum("ij,jkab->kiab", x63, t2) del x63 x69 += einsum("ijab->jiba", x64) del x64 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 -= einsum("ia,jkab->ijkb", t1, v.oovv) - x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x33 += einsum("ia,jkla->jilk", t1, x32) - x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x34 -= einsum("ijkl->klji", x33) del x33 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum("ijka->kjia", x32) del x32 x34 += einsum("ijkl->jilk", v.oooo) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ia,ijkl->jkla", t1, x34) del x34 x36 += einsum("ijka->ikja", x35) del x35 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("ia,ijkb->jkab", r1, x36) del x36 x38 -= einsum("ijab->jiab", x37) @@ -1621,47 +1622,47 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->ijab", x38) ree2new -= einsum("ijab->ijba", x38) del x38 - x39 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x39 -= einsum("ijab,jcbd->iacd", t2, v.ovvv) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ia,jbca->ijbc", r1, x39) del x39 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 -= einsum("ijab->ijab", x40) del x40 - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 -= einsum("ijab,jklb->ikla", t2, v.ooov) - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum("ijka->ijka", x41) del x41 - x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x42 += einsum("ia,jkla->ijkl", t1, v.ooov) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 -= einsum("ia,jikl->jkla", t1, x42) del x42 x46 -= einsum("ijka->ijka", x43) del x43 x44 -= einsum("iajb->jiab", v.ovov) - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum("ia,jkba->ijkb", t1, x44) del x44 x46 -= einsum("ijka->ikja", x45) del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ia,jikb->jkab", r1, x46) del x46 x57 -= einsum("ijab->ijab", x47) del x47 x48 -= einsum("iajb->jiab", v.ovov) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum("ia,jkba->ijkb", r1, x48) del x48 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ia,jkib->jkab", t1, x49) del x49 x57 += einsum("ijab->ijab", x50) del x50 - x51 = np.zeros((nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir), dtype=types[float]) x51 += einsum("ia,jiba->jb", f.ov, t2) x56 -= einsum("ia->ia", x51) del x51 @@ -1672,25 +1673,25 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->jiab", x57) ree2new -= einsum("ijab->jiba", x57) del x57 - x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x59 -= einsum("ia,bcad->ibcd", t1, v.vvvv) - x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x60 += einsum("iabc->ibac", x59) del x59 x60 -= einsum("abic->ibac", v.vvov) - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ia,jbca->ijbc", r1, x60) del x60 x69 += einsum("ijab->ijba", x61) del x61 x65 -= einsum("ijka->jika", v.ooov) - x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x66 += einsum("ia,jkla->ijkl", r1, x65) del x65 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 -= einsum("ia,jkil->jkla", t1, x66) del x66 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 -= einsum("ia,jikb->jkab", t1, x67) del x67 x69 -= einsum("ijab->ijab", x68) @@ -1698,32 +1699,32 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->ijab", x69) ree2new -= einsum("ijab->jiab", x69) del x69 - x70 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x70 -= einsum("ijab,jikc->kabc", r2, v.ooov) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum("ia,jbca->ijbc", t1, x70) del x70 x94 += einsum("ijab->ijab", x71) * 0.25 del x71 - x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x72 += einsum("ijab,kcab->ijkc", r2, v.ovvv) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ia,jkib->jkab", t1, x72) del x72 x94 += einsum("ijab->ijab", x73) * 0.25 del x73 x74 += einsum("iajb->jiab", v.ovov) * -1 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ijab,kjca->ikbc", x2, x74) * 0.25 del x2 del x74 x94 += einsum("ijab->ijab", x75) del x75 - x89 = np.zeros((nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nvir), dtype=types[float]) x89 += einsum("ijab,ijkb->ka", t2, v.ooov) x93 += einsum("ia->ia", x89) del x89 - x90 = np.zeros((nocc, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nvir), dtype=types[float]) x90 += einsum("ijab,jcab->ic", t2, v.ovvv) x93 += einsum("ia->ia", x90) del x90 @@ -1734,37 +1735,37 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->jiab", x94) ree2new += einsum("ijab->jiba", x94) * -1 del x94 - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum("ijab,cdab->ijcd", r2, v.vvvv) x107 += einsum("ijab->ijba", x95) * -0.25 del x95 - x96 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x96 += einsum("ijab,klab->ijkl", r2, v.oovv) - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum("ijab,klij->klab", t2, x96) x107 += einsum("ijab->ijba", x97) * -0.125 del x97 - x98 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x98 -= einsum("ia,jkil->jkla", t1, x96) del x96 - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 -= einsum("ia,jkib->jkba", t1, x98) del x98 x107 += einsum("ijab->ijba", x99) * -0.25 del x99 - x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum("ijab,ijkc->kabc", t2, v.ooov) - x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x103 += einsum("iabc->ibac", x100) * -1 del x100 - x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x101 += einsum("ijab,ijcd->abcd", t2, v.oovv) - x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x102 -= einsum("ia,bcad->ibcd", t1, x101) del x101 x103 += einsum("iabc->ibac", x102) del x102 - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum("ia,jbca->ijbc", r1, x103) * 0.5 del x103 x107 += einsum("ijab->ijba", x104) @@ -1772,38 +1773,38 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->ijab", x107) ree2new += einsum("ijab->jiab", x107) * -1 del x107 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum("ia,ibjk->jkab", r1, v.ovoo) ree2new += einsum("ijab->jiab", x108) ree2new -= einsum("ijab->jiba", x108) del x108 - x109 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x109 += einsum("ijab,klab->ijkl", t2, v.oovv) - x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x110 += einsum("ijab,klji->lkab", r2, x109) x120 += einsum("ijab->ijab", x110) * 0.125 del x110 - x117 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x117 -= einsum("ia,jkil->jkla", t1, x109) del x109 - x118 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x118 += einsum("ijka->ijka", x117) * -1 del x117 - x111 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x111 -= einsum("ijab,jicd->abcd", r2, v.oovv) - x112 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x112 -= einsum("ia,bcad->ibcd", t1, x111) del x111 - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum("ia,jbca->ijbc", t1, x112) del x112 x120 += einsum("ijab->ijab", x113) * 0.25 del x113 - x116 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x116 += einsum("ijab,kcab->ijkc", t2, v.ovvv) x118 += einsum("ijka->jika", x116) * -1 del x116 - x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum("ia,jkib->jkab", r1, x118) * 0.5 del x118 x120 += einsum("ijab->jiab", x119) @@ -1811,17 +1812,17 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new += einsum("ijab->ijab", x120) ree2new += einsum("ijab->ijba", x120) * -1 del x120 - x121 = np.zeros((nocc, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nvir), dtype=types[float]) x121 += einsum("ab,ib->ia", f.vv, t1) - x125 = np.zeros((nocc, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nvir), dtype=types[float]) x125 -= einsum("ia->ia", x121) del x121 - x122 = np.zeros((nocc, nocc), dtype=np.float64) + x122 = np.zeros((nocc, nocc), dtype=types[float]) x122 += einsum("ia,ja->ij", f.ov, t1) x123 += einsum("ij->ij", x122) del x122 x123 += einsum("ij->ij", f.oo) - x124 = np.zeros((nocc, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nvir), dtype=types[float]) x124 += einsum("ia,ij->ja", t1, x123) del x123 x125 += einsum("ia->ia", x124) diff --git a/ebcc/codegen/GCCSDT.py b/ebcc/codegen/GCCSDT.py index 2ae4a7e1..f7c26061 100644 --- a/ebcc/codegen/GCCSDT.py +++ b/ebcc/codegen/GCCSDT.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -17,74 +18,74 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 0, 1, 5, 2, 3), (4, 5)) * 0.25 t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x1 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 0, 3), (4, 2)) * -0.5 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(v.ovvv, (0, 1, 2, 3), x2, (0, 4, 2, 3), (4, 1)) * 0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(x3, (0, 1), (0, 1)) del x3 t1new += einsum(x4, (0, 1), t2, (2, 0, 3, 1), (2, 3)) t2new += einsum(x4, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum(v.oovv, (0, 1, 2, 3), x2, (1, 4, 2, 3), (4, 0)) * -1.0 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(f.oo, (0, 1), (0, 1)) * 2.0 x8 += einsum(x5, (0, 1), (0, 1)) * 2.0 x8 += einsum(x6, (0, 1), (0, 1)) * 2.0 x8 += einsum(x7, (0, 1), (1, 0)) t1new += einsum(t1, (0, 1), x8, (0, 2), (2, 1)) * -0.5 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (4, 2, 5, 6)) - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(x0, (0, 1, 2, 3), t3, (4, 2, 1, 5, 6, 3), (0, 4, 5, 6)) - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(t1, (0, 1), x4, (2, 1), (2, 0)) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(f.oo, (0, 1), (0, 1)) x13 += einsum(x12, (0, 1), (1, 0)) del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x13, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 del x13 - x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x15 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x15, (0, 1, 2, 3), x2, (1, 2, 4, 5), (0, 3, 4, 5)) * 0.5 - x17 = np.zeros((nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x18 = np.zeros((nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc), dtype=types[float]) x18 += einsum(x6, (0, 1), (0, 1)) x18 += einsum(x17, (0, 1), (1, 0)) * 0.5 del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x18, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x18 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(x9, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x9 x20 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 @@ -100,11 +101,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x21 x23 += einsum(x22, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -112,39 +113,39 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) del x23 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 0, 6, 2, 3), (4, 5, 6, 1)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x25, (4, 1, 5, 3), (0, 4, 2, 5)) - x27 = np.zeros((nvir, nvir), dtype=np.float64) + x27 = np.zeros((nvir, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x28 = np.zeros((nvir, nvir), dtype=np.float64) + x28 = np.zeros((nvir, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x29 = np.zeros((nvir, nvir), dtype=np.float64) + x29 = np.zeros((nvir, nvir), dtype=types[float]) x29 += einsum(x27, (0, 1), (0, 1)) x29 += einsum(x28, (0, 1), (0, 1)) * 0.5 del x28 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(x29, (0, 1), t2, (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 del x29 - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 1, 6, 2, 3), (4, 5, 0, 6)) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(v.ovvv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 4, 5, 1)) * 0.5 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(x4, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(x31, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.5 x34 += einsum(x32, (0, 1, 2, 3), (0, 2, 1, 3)) del x32 x34 += einsum(x33, (0, 1, 2, 3), (2, 1, 0, 3)) del x33 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), x34, (0, 2, 3, 4), (2, 3, 4, 1)) del x34 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x24 x36 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -156,26 +157,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) del x36 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x38, (4, 1, 5, 3), (4, 0, 2, 5)) * -1.0 - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 0, 5, 2)) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(x42, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t1, (0, 1), x43, (2, 0, 3, 4), (2, 3, 4, 1)) del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x37 x45 += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -187,19 +188,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x45, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x45, (0, 1, 2, 3), (1, 0, 3, 2)) del x45 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x46 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x46, (4, 5, 2, 3), (5, 4, 0, 1)) * -1.0 del x46 - x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x47 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x47 += einsum(v.oovv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 t2new += einsum(x2, (0, 1, 2, 3), x47, (0, 1, 4, 5), (4, 5, 3, 2)) * -0.25 del x47 - x48 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x48 += einsum(x15, (0, 1, 2, 3), t3, (4, 1, 2, 5, 6, 7), (0, 4, 3, 5, 6, 7)) - t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) t3new += einsum(x48, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.5 t3new += einsum(x48, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.5 t3new += einsum(x48, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -0.5 @@ -207,22 +208,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x48, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 0.5 t3new += einsum(x48, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -0.5 del x48 - x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x49 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 1), (4, 5, 0, 6, 7, 3)) - x50 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x50 += einsum(v.ooov, (0, 1, 2, 3), x2, (0, 1, 4, 5), (2, 3, 4, 5)) - x51 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x51 += einsum(t2, (0, 1, 2, 3), x50, (4, 3, 5, 6), (0, 1, 4, 2, 6, 5)) * 0.5 del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * 2.0 x52 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(v.ovvv, (0, 1, 2, 3), x52, (4, 5, 2, 3), (0, 4, 5, 1)) - x54 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x54 += einsum(t2, (0, 1, 2, 3), x53, (1, 4, 5, 6), (0, 5, 4, 2, 3, 6)) * 0.5 del x53 - x55 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x55 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x49 x55 += einsum(x51, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -1.0 @@ -239,36 +240,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x55, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x55, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x55 - x56 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x56 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (4, 5, 6, 2)) - x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x57 += einsum(x4, (0, 1), t2, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x4 - x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x58 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) x58 += einsum(x56, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x56 x58 += einsum(x57, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x57 - x59 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x58, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) * -1.0 del x58 - x60 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) - x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x61 += einsum(v.oovv, (0, 1, 2, 3), x52, (4, 5, 2, 3), (0, 1, 4, 5)) del x52 - x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(t2, (0, 1, 2, 3), x61, (4, 1, 5, 6), (0, 6, 5, 4, 2, 3)) * -0.5 - x63 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(x60, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 del x60 x63 += einsum(x62, (0, 1, 2, 3, 4, 5), (2, 1, 3, 0, 5, 4)) * -1.0 del x62 - x64 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x64 += einsum(t1, (0, 1), x63, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) del x63 - x65 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x65 += einsum(x59, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) * -1.0 del x59 x65 += einsum(x64, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 @@ -283,13 +284,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x65, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x65, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x65 - x66 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x66 += einsum(x6, (0, 1), t3, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * -1.0 del x6 - x67 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x67 += einsum(x61, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 7), (4, 3, 2, 5, 6, 7)) * -0.25 del x61 - x68 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x68 += einsum(x66, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x66 x68 += einsum(x67, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 @@ -298,18 +299,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x68, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 t3new += einsum(x68, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x68 - x69 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x69 += einsum(t2, (0, 1, 2, 3), x41, (4, 1, 5, 6), (0, 4, 5, 2, 3, 6)) del x41 - x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x70 += einsum(x40, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x40 x70 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) del x42 - x71 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), x70, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -1.0 del x70 - x72 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x72 += einsum(x69, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x69 x72 += einsum(x71, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -333,10 +334,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x72 - x73 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x73 += einsum(t1, (0, 1), x15, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x15 - x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x74 += einsum(t2, (0, 1, 2, 3), x73, (4, 1, 5, 6), (4, 0, 5, 6, 2, 3)) * -1.0 del x73 t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -358,9 +359,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x74 - x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 0, 7, 1)) - x76 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x76 += einsum(t1, (0, 1), x75, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x75 t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 @@ -370,22 +371,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.5 t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -0.5 del x76 - x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum(x38, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 7, 2)) * -1.0 - x78 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x78 += einsum(x0, (0, 1, 2, 3), x2, (1, 2, 4, 5), (0, 3, 4, 5)) del x0 - x79 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x79 += einsum(t2, (0, 1, 2, 3), x78, (4, 3, 5, 6), (0, 1, 4, 2, 6, 5)) * 0.5 del x78 - x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x80 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x80 += einsum(x31, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x31 - x81 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x81 += einsum(t2, (0, 1, 2, 3), x80, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -1.0 del x80 - x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x82 += einsum(x77, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) del x77 x82 += einsum(x79, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) @@ -402,15 +403,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x82, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x82, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x82 - x83 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x83 += einsum(x27, (0, 1), t3, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) * -1.0 del x27 - x84 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x84 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 0, 1, 7)) - x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x85 += einsum(x2, (0, 1, 2, 3), x84, (4, 5, 6, 0, 1, 7), (4, 5, 6, 2, 3, 7)) * 0.25 del x84 - x86 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x86 += einsum(x83, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x83 x86 += einsum(x85, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -419,22 +420,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 t3new += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x86 - x87 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x87 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 3), (0, 2, 4, 5)) - x88 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x88 += einsum(t2, (0, 1, 2, 3), x87, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) del x87 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x89 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) del x25 - x90 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(t2, (0, 1, 2, 3), x89, (4, 5, 6, 3), (0, 1, 4, 5, 2, 6)) * -1.0 del x89 - x91 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x91 += einsum(t1, (0, 1), x90, (2, 3, 4, 0, 5, 6), (3, 2, 4, 5, 6, 1)) * -1.0 del x90 - x92 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x92 += einsum(x88, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x88 x92 += einsum(x91, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -1.0 @@ -458,10 +459,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x92, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x92, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) del x92 - x93 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(t2, (0, 1, 2, 3), x38, (4, 5, 6, 3), (4, 0, 1, 5, 2, 6)) * -1.0 del x38 - x94 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum(t1, (0, 1), x93, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x93 t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) @@ -483,23 +484,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) del x94 - x95 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum(v.vvvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 7, 0, 1)) - x96 = np.zeros((nvir, nvir), dtype=np.float64) + x96 = np.zeros((nvir, nvir), dtype=types[float]) x96 += einsum(f.ov, (0, 1), t1, (0, 2), (1, 2)) - x97 = np.zeros((nvir, nvir), dtype=np.float64) + x97 = np.zeros((nvir, nvir), dtype=types[float]) x97 += einsum(v.oovv, (0, 1, 2, 3), x2, (0, 1, 3, 4), (4, 2)) * -1.0 del x2 - x98 = np.zeros((nvir, nvir), dtype=np.float64) + x98 = np.zeros((nvir, nvir), dtype=types[float]) x98 += einsum(f.vv, (0, 1), (0, 1)) * -2.0 x98 += einsum(x96, (0, 1), (0, 1)) * 2.0 del x96 x98 += einsum(x97, (0, 1), (1, 0)) del x97 - x99 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum(x98, (0, 1), t3, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) * 0.5 del x98 - x100 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum(x95, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -0.5 del x95 x100 += einsum(x99, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -1.0 @@ -508,26 +509,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x100, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 t3new += einsum(x100, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x100 - x101 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x101 += einsum(t1, (0, 1), v.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x102 += einsum(t2, (0, 1, 2, 3), x101, (4, 5, 1, 6), (0, 4, 5, 6, 2, 3)) * -1.0 del x101 - x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x103 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x104 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(t2, (0, 1, 2, 3), x103, (4, 5, 6, 3), (4, 0, 1, 2, 5, 6)) * -1.0 del x103 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x105 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -0.99999999999999 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum(v.oovv, (0, 1, 2, 3), x105, (1, 4, 3, 5), (0, 4, 2, 5)) del x105 - x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(x106, (0, 1, 2, 3), t3, (4, 5, 0, 6, 7, 2), (4, 5, 1, 6, 7, 3)) * 1.00000000000001 del x106 - x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(x102, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) del x102 x108 += einsum(x104, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -544,18 +545,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x108, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x108, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x108 - x109 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x109 += einsum(v.oooo, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 7), (4, 0, 1, 5, 6, 7)) - x110 = np.zeros((nocc, nocc), dtype=np.float64) + x110 = np.zeros((nocc, nocc), dtype=types[float]) x110 += einsum(f.oo, (0, 1), (0, 1)) * 2.0 x110 += einsum(x5, (0, 1), (0, 1)) * 2.0 del x5 x110 += einsum(x7, (0, 1), (1, 0)) del x7 - x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x111 += einsum(x110, (0, 1), t3, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * 0.5 del x110 - x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x112 += einsum(x109, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.5 del x109 x112 += einsum(x111, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * -1.0 @@ -569,19 +570,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l1=None, l2=None, l3=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(l2, (0, 1, 2, 3), v.ovvv, (3, 4, 0, 1), (4, 2)) * -0.5 l1new += einsum(f.ov, (0, 1), (1, 0)) l1new += einsum(l1, (0, 1), v.ovov, (2, 0, 1, 3), (3, 2)) * -1.0 - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(v.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 5, 0, 1), (4, 5, 2, 3)) * 0.5 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) l1new += einsum(x0, (0, 1), x1, (1, 2), (2, 0)) * -1.0 - l3new = np.zeros((nvir, nvir, nvir, nocc, nocc, nocc), dtype=np.float64) + l3new = np.zeros((nvir, nvir, nvir, nocc, nocc, nocc), dtype=types[float]) l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (2, 3, 1, 4, 5, 0)) l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (2, 1, 3, 4, 5, 0)) * -1.0 l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (1, 2, 3, 4, 5, 0)) @@ -591,51 +592,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (2, 3, 1, 0, 4, 5)) l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (2, 1, 3, 0, 4, 5)) * -1.0 l3new += einsum(x1, (0, 1), l2, (2, 3, 4, 5), (1, 2, 3, 0, 4, 5)) - x2 = np.zeros((nvir, nvir), dtype=np.float64) + x2 = np.zeros((nvir, nvir), dtype=types[float]) x2 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 1, 2), (0, 6)) l1new += einsum(x2, (0, 1), v.ovvv, (2, 0, 3, 1), (3, 2)) * 0.08333333333333 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 0, 1, 2), (3, 6)) l1new += einsum(x3, (0, 1), v.ooov, (2, 1, 0, 3), (3, 2)) * 0.08333333333333 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x5 += einsum(x4, (0, 1, 2, 3), (2, 1, 0, 3)) - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x8 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) x8 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(f.ov, (0, 1), (0, 1)) x9 += einsum(x1, (0, 1), (0, 1)) - x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (0, 1, 4, 5)) - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x11 += einsum(x4, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 - x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x12 += einsum(t1, (0, 1), x11, (2, 3, 4, 1), (0, 2, 3, 4)) * 4.0 del x11 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x13 += einsum(x10, (0, 1, 2, 3), (3, 2, 1, 0)) x13 += einsum(x12, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x14 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 0, 1, 7)) l2new += einsum(l3, (0, 1, 2, 3, 4, 5), x14, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 0.08333333333333 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x15 += einsum(x4, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x16 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(x14, (0, 1, 2, 3, 4, 5), (0, 1, 4, 3, 2, 5)) * 0.16666666666666 del x14 x16 += einsum(t2, (0, 1, 2, 3), x15, (4, 5, 6, 3), (0, 1, 6, 5, 4, 2)) - x17 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (0, 4, 5, 6, 7, 1)) * 0.66666666666664 x17 += einsum(x5, (0, 1, 2, 3), t3, (4, 5, 0, 6, 7, 3), (1, 4, 2, 5, 6, 7)) * -2.0 x17 += einsum(t2, (0, 1, 2, 3), x8, (4, 5, 6, 3), (5, 0, 4, 1, 2, 6)) * -4.0 @@ -646,28 +647,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x16 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x17, (6, 3, 4, 5, 2, 1), (0, 6)) * -0.125 del x17 - x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) l2new += einsum(x18, (0, 1, 2, 3), x5, (4, 5, 0, 3), (1, 2, 5, 4)) * -0.5 - x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x19 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) * 2.0 x19 += einsum(x18, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new += einsum(v.vvvv, (0, 1, 2, 3), x19, (4, 3, 2, 1), (0, 4)) * -0.25 del x19 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 5, 2, 3), (0, 1, 4, 5)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 1, 6, 2, 3), (4, 5, 0, 6)) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x15, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x23 += einsum(x6, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x24 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x24 += einsum(x10, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 x24 += einsum(x12, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x25 += einsum(x20, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 x25 += einsum(x21, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.5 @@ -679,35 +680,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x24 l1new += einsum(l2, (0, 1, 2, 3), x25, (4, 2, 3, 1), (0, 4)) * 0.5 del x25 - x26 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x27 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), x26, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) x30 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 l2new += einsum(v.ovvv, (0, 1, 2, 3), x30, (4, 5, 0, 1), (2, 3, 4, 5)) * -1.0 - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) - x32 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x32 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x33 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) - x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x34 += einsum(x31, (0, 1, 2, 3), (1, 0, 3, 2)) * -3.00000000000012 x34 += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) x34 += einsum(t1, (0, 1), x33, (2, 3, 4, 1), (2, 3, 0, 4)) * -6.00000000000024 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) - x36 = np.zeros((nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc), dtype=types[float]) x36 += einsum(x35, (0, 1), (0, 1)) x36 += einsum(x3, (0, 1), (0, 1)) * 0.16666666666666 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) x37 += einsum(l2, (0, 1, 2, 3), t3, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) * 0.5 x37 += einsum(t3, (0, 1, 2, 3, 4, 5), x26, (6, 1, 2, 7, 5, 4), (6, 0, 7, 3)) * -0.5 @@ -720,31 +721,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x36 l1new += einsum(v.oovv, (0, 1, 2, 3), x37, (4, 0, 1, 3), (2, 4)) * 0.5 del x37 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), x26, (4, 0, 1, 5, 3, 6), (4, 5, 6, 2)) - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x39 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 l1new += einsum(v.ovov, (0, 1, 2, 3), x39, (0, 4, 2, 3), (1, 4)) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x40 += einsum(t1, (0, 1), x39, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 l1new += einsum(v.ovvv, (0, 1, 2, 3), x40, (4, 0, 1, 3), (2, 4)) del x40 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 l1new += einsum(v.ovvv, (0, 1, 2, 3), x43, (4, 0, 1, 3), (2, 4)) * -1.0 del x43 - x44 = np.zeros((nocc, nocc), dtype=np.float64) + x44 = np.zeros((nocc, nocc), dtype=types[float]) x44 += einsum(x0, (0, 1), (0, 1)) * 12.00000000000048 x44 += einsum(x35, (0, 1), (0, 1)) * 6.00000000000024 x44 += einsum(x3, (0, 1), (0, 1)) - x45 = np.zeros((nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir), dtype=types[float]) x45 += einsum(t1, (0, 1), (0, 1)) * -1.0 x45 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) * -1.0 x45 += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 0, 1), (4, 5)) * -0.25 @@ -753,39 +754,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x45 += einsum(t1, (0, 1), x44, (0, 2), (2, 1)) * 0.08333333333333 l1new += einsum(x45, (0, 1), v.oovv, (2, 0, 3, 1), (3, 2)) * -1.0 del x45 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x47 += einsum(x46, (0, 1), (0, 1)) * 0.5 l1new += einsum(x47, (0, 1), v.ovvv, (2, 0, 3, 1), (3, 2)) del x47 - x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x48 += einsum(x31, (0, 1, 2, 3), (1, 0, 3, 2)) * 3.00000000000012 x48 += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 l1new += einsum(v.ooov, (0, 1, 2, 3), x48, (2, 4, 0, 1), (3, 4)) * 0.08333333333333 del x48 - x49 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x49 += einsum(t1, (0, 1), x33, (2, 3, 4, 1), (3, 2, 4, 0)) l1new += einsum(v.ooov, (0, 1, 2, 3), x49, (4, 2, 0, 1), (3, 4)) * -0.5 del x49 - x50 = np.zeros((nocc, nocc), dtype=np.float64) + x50 = np.zeros((nocc, nocc), dtype=types[float]) x50 += einsum(x0, (0, 1), (0, 1)) * 2.0 x50 += einsum(x35, (0, 1), (0, 1)) l1new += einsum(x50, (0, 1), v.ooov, (2, 1, 0, 3), (3, 2)) * 0.5 del x50 - x51 = np.zeros((nvir, nvir), dtype=np.float64) + x51 = np.zeros((nvir, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 += einsum(f.vv, (0, 1), (0, 1)) x52 += einsum(x51, (0, 1), (0, 1)) * -1.0 l1new += einsum(l1, (0, 1), x52, (0, 2), (2, 1)) del x52 - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum(f.oo, (0, 1), (0, 1)) * 2.0 x55 += einsum(x53, (0, 1), (1, 0)) * 2.0 x55 += einsum(x54, (0, 1), (0, 1)) @@ -793,7 +794,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x9 l1new += einsum(l1, (0, 1), x55, (1, 2), (0, 2)) * -0.5 del x55 - x56 = np.zeros((nocc, nocc), dtype=np.float64) + x56 = np.zeros((nocc, nocc), dtype=types[float]) x56 += einsum(x0, (0, 1), (0, 1)) * 2.0 del x0 x56 += einsum(x35, (0, 1), (0, 1)) @@ -802,18 +803,18 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x3 l1new += einsum(f.ov, (0, 1), x56, (2, 0), (1, 2)) * -0.5 del x56 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x58 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 3), (0, 2, 4, 5)) - x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x60 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (4, 5, 6, 2)) - x61 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), x5, (0, 1, 4, 5), (4, 2, 3, 5)) * 0.5 del x5 - x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x62 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x62 += einsum(x58, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x58 @@ -823,54 +824,54 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x60 x62 += einsum(x61, (0, 1, 2, 3), (0, 2, 1, 3)) del x61 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(x62, (0, 1, 2, 3), l3, (4, 1, 2, 5, 6, 0), (5, 6, 4, 3)) * -0.5 del x62 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x65 += einsum(x64, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 del x64 x65 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(x65, (0, 1, 2, 3), x26, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) del x65 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(t1, (0, 1), x4, (2, 3, 0, 4), (2, 3, 1, 4)) - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) x68 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(x68, (0, 1, 2, 3), x26, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) del x68 - x70 = np.zeros((nvir, nvir), dtype=np.float64) + x70 = np.zeros((nvir, nvir), dtype=types[float]) x70 += einsum(x46, (0, 1), (0, 1)) del x46 x70 += einsum(x2, (0, 1), (0, 1)) * 0.16666666666666 del x2 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(x70, (0, 1), v.oovv, (2, 3, 4, 1), (2, 3, 0, 4)) * -0.5 del x70 - x72 = np.zeros((nvir, nvir), dtype=np.float64) + x72 = np.zeros((nvir, nvir), dtype=types[float]) x72 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x73 = np.zeros((nvir, nvir), dtype=np.float64) + x73 = np.zeros((nvir, nvir), dtype=types[float]) x73 += einsum(x51, (0, 1), (0, 1)) del x51 x73 += einsum(x72, (0, 1), (0, 1)) * 0.5 del x72 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum(x73, (0, 1), l2, (2, 0, 3, 4), (3, 4, 2, 1)) * -1.0 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(l1, (0, 1), x15, (1, 2, 3, 4), (2, 3, 0, 4)) del x15 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(f.ov, (0, 1), x39, (2, 3, 0, 4), (2, 3, 4, 1)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(x1, (0, 1), x39, (2, 3, 0, 4), (2, 3, 4, 1)) del x39 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(x57, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x57 x78 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -892,13 +893,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x78, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x78, (0, 1, 2, 3), (3, 2, 0, 1)) del x78 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(x28, (0, 1, 2, 3), x4, (0, 4, 2, 5), (1, 4, 3, 5)) * -1.0 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(v.ovvv, (0, 1, 2, 3), x18, (4, 5, 1, 3), (4, 0, 5, 2)) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(t1, (0, 1), x29, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x41 x82 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.49999999999998 @@ -907,19 +908,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x38 x82 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) del x81 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(v.oovv, (0, 1, 2, 3), x82, (4, 1, 5, 3), (4, 0, 5, 2)) * 0.5 del x82 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x84 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(l2, (0, 1, 2, 3), x84, (3, 4, 1, 5), (2, 4, 0, 5)) del x84 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(v.ooov, (0, 1, 2, 3), x30, (4, 2, 1, 5), (0, 4, 3, 5)) * -1.0 del x30 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) x87 += einsum(l1, (0, 1), x1, (2, 3), (1, 2, 0, 3)) x87 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -937,27 +938,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x87, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new += einsum(x87, (0, 1, 2, 3), (3, 2, 1, 0)) del x87 - x88 = np.zeros((nocc, nocc), dtype=np.float64) + x88 = np.zeros((nocc, nocc), dtype=types[float]) x88 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(x88, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x90 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x90 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(x90, (0, 1, 2, 3), l3, (4, 5, 3, 6, 2, 1), (0, 6, 4, 5)) del x90 - x92 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x92 += einsum(x1, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x93 += einsum(x6, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x94 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x94 += einsum(t1, (0, 1), x93, (2, 3, 4, 1), (0, 2, 3, 4)) * 2.0 del x93 - x95 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x95 += einsum(t1, (0, 1), x13, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x13 - x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x96 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x96 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 del x20 @@ -971,24 +972,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x94 x96 += einsum(x95, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x95 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(x96, (0, 1, 2, 3), l3, (4, 5, 3, 6, 0, 1), (6, 2, 4, 5)) * -0.5 del x96 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(x44, (0, 1), v.oovv, (2, 1, 3, 4), (0, 2, 3, 4)) * -0.08333333333333 del x44 - x99 = np.zeros((nocc, nocc), dtype=np.float64) + x99 = np.zeros((nocc, nocc), dtype=types[float]) x99 += einsum(t1, (0, 1), x1, (2, 1), (0, 2)) - x100 = np.zeros((nocc, nocc), dtype=np.float64) + x100 = np.zeros((nocc, nocc), dtype=types[float]) x100 += einsum(x53, (0, 1), (0, 1)) del x53 x100 += einsum(x54, (0, 1), (1, 0)) * 0.5 del x54 x100 += einsum(x99, (0, 1), (1, 0)) del x99 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x100, (0, 1), l2, (2, 3, 4, 1), (4, 0, 2, 3)) * -1.0 - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum(x89, (0, 1, 2, 3), (0, 1, 3, 2)) del x89 x102 += einsum(x91, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 @@ -1002,11 +1003,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x102, (0, 1, 2, 3), (3, 2, 0, 1)) l2new += einsum(x102, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x102 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum(l1, (0, 1), v.ovvv, (2, 0, 3, 4), (1, 2, 3, 4)) - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(x103, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x103 x105 += einsum(x104, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1014,14 +1015,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x105, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(x105, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x105 - x106 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x106 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x106 += einsum(x10, (0, 1, 2, 3), (1, 0, 3, 2)) del x10 x106 += einsum(x12, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 del x12 l2new += einsum(l2, (0, 1, 2, 3), x106, (2, 3, 4, 5), (0, 1, 4, 5)) * 0.25 - x107 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x107 += einsum(x31, (0, 1, 2, 3), (1, 0, 3, 2)) del x31 x107 += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.33333333333332 @@ -1030,17 +1031,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x33 l2new += einsum(v.oovv, (0, 1, 2, 3), x107, (4, 5, 0, 1), (2, 3, 5, 4)) * -0.25 del x107 - x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(x106, (0, 1, 2, 3), l3, (4, 5, 6, 7, 0, 1), (7, 2, 3, 4, 5, 6)) * -0.25 del x106 - x109 = np.zeros((nocc, nocc), dtype=np.float64) + x109 = np.zeros((nocc, nocc), dtype=types[float]) x109 += einsum(f.oo, (0, 1), (0, 1)) x109 += einsum(x88, (0, 1), (1, 0)) del x88 - x110 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x110 += einsum(x109, (0, 1), l3, (2, 3, 4, 5, 6, 0), (5, 6, 1, 2, 3, 4)) del x109 - x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x111 += einsum(x108, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x108 x111 += einsum(x110, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) @@ -1049,27 +1050,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x111, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 0, 2)) l3new += einsum(x111, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -1.0 del x111 - x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x112 += einsum(x100, (0, 1), l3, (2, 3, 4, 5, 6, 1), (5, 6, 0, 2, 3, 4)) del x100 l3new += einsum(x112, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) l3new += einsum(x112, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 l3new += einsum(x112, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) del x112 - x113 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x113 += einsum(v.ooov, (0, 1, 2, 3), x26, (4, 2, 5, 1, 6, 7), (4, 5, 0, 6, 7, 3)) * -1.0 - x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x114 += einsum(x4, (0, 1, 2, 3), x26, (0, 4, 5, 2, 6, 7), (5, 4, 1, 6, 7, 3)) * -1.0 - x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x115 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x115 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 x115 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 del x7 - x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x116 += einsum(x115, (0, 1, 2, 3), l3, (4, 5, 2, 6, 7, 0), (6, 7, 1, 4, 5, 3)) del x115 - x117 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x117 += einsum(x113, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x113 x117 += einsum(x114, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -1086,25 +1087,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x117, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 l3new += einsum(x117, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) * -1.0 del x117 - x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x118 += einsum(f.vv, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x119 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x119 += einsum(f.ov, (0, 1), x26, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) - x120 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x120 += einsum(v.vvvv, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 7), (5, 6, 7, 4, 0, 1)) - x121 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x121 += einsum(v.ovvv, (0, 1, 2, 3), x26, (4, 5, 6, 0, 7, 1), (4, 5, 6, 7, 2, 3)) * -1.0 - x122 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x122 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) - x123 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x123 += einsum(x122, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x122 x123 += einsum(x27, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x27 - x124 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x124 += einsum(v.oovv, (0, 1, 2, 3), x123, (4, 5, 6, 0, 1, 7), (4, 5, 6, 7, 2, 3)) * 0.25 del x123 - x125 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x125 += einsum(x118, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 del x118 x125 += einsum(x119, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -1119,13 +1120,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x125, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) l3new += einsum(x125, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 del x125 - x126 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x126 += einsum(x1, (0, 1), x26, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) del x1, x26 - x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x127 += einsum(x73, (0, 1), l3, (2, 3, 0, 4, 5, 6), (4, 5, 6, 2, 3, 1)) del x73 - x128 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x128 += einsum(x126, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x126 x128 += einsum(x127, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) @@ -1134,12 +1135,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x128, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -1.0 l3new += einsum(x128, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 del x128 - x129 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x129 += einsum(l2, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 6), (2, 3, 4, 0, 5, 6)) - x130 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x130 += einsum(v.oovv, (0, 1, 2, 3), x29, (4, 5, 1, 6), (5, 4, 0, 6, 2, 3)) del x29 - x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x131 += einsum(x129, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 del x129 x131 += einsum(x130, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -0.5 @@ -1154,12 +1155,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x131, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) l3new += einsum(x131, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * -1.0 del x131 - x132 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x132 += einsum(l2, (0, 1, 2, 3), v.ooov, (4, 5, 3, 6), (2, 4, 5, 0, 1, 6)) - x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x133 += einsum(v.oovv, (0, 1, 2, 3), x18, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) del x18 - x134 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x134 += einsum(x132, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) del x132 x134 += einsum(x133, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 0.5 @@ -1174,7 +1175,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x134, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -1.0 l3new += einsum(x134, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 del x134 - x135 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x135 += einsum(f.ov, (0, 1), l2, (2, 3, 4, 5), (0, 4, 5, 1, 2, 3)) x135 += einsum(l1, (0, 1), v.oovv, (2, 3, 4, 5), (1, 2, 3, 0, 4, 5)) l3new += einsum(x135, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) @@ -1187,7 +1188,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x135, (0, 1, 2, 3, 4, 5), (4, 3, 5, 1, 2, 0)) * -1.0 l3new += einsum(x135, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) del x135 - x136 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x136 += einsum(l2, (0, 1, 2, 3), x4, (3, 4, 5, 6), (2, 5, 4, 0, 1, 6)) * -1.0 del x4 l3new += einsum(x136, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * -1.0 @@ -1200,7 +1201,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x136, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 l3new += einsum(x136, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) del x136 - x137 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x137 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x137 += einsum(v.oovv, (0, 1, 2, 3), x28, (4, 5, 1, 6), (4, 5, 0, 6, 2, 3)) del x28 l3new += einsum(x137, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) @@ -1220,37 +1221,37 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) rdm1_f_ov += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 0, 1), (4, 5)) * 0.25 rdm1_f_ov += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 1, 2), (0, 6)) * 0.08333333333333 rdm1_f_vv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) * 0.5 rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -0.5 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 0, 1, 2), (3, 6)) rdm1_f_oo += einsum(x2, (0, 1), (1, 0)) * -0.08333333333333 - x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) rdm1_f_ov += einsum(t3, (0, 1, 2, 3, 4, 5), x3, (0, 1, 2, 6, 5, 4), (6, 3)) * 0.08333333333333 del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) x4 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) * 0.5 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x4, (0, 1, 4, 3), (4, 2)) * 0.5 del x4 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(x1, (0, 1), (0, 1)) del x1 x5 += einsum(x0, (0, 1), (0, 1)) * 0.5 @@ -1268,59 +1269,59 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(l1, (0, 1), t3, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) * 0.5 rdm2_f_vvvv += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 0.16666666666667 - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (2, 3, 1, 0)) * -0.16666666666667 - x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) - x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x3 += einsum(t1, (0, 1), x2, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) rdm2_f_ovoo += einsum(x4, (0, 1, 2, 3), (2, 3, 1, 0)) * -0.5 rdm2_f_vooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(t1, (0, 1), x4, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (2, 3, 1, 0)) * -0.5 rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 1, 0)) * 0.5 - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 0, 1), (2, 4)) - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 0, 1, 2), (3, 6)) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(x6, (0, 1), (0, 1)) x8 += einsum(x7, (0, 1), (0, 1)) * 0.16666666666666 rdm2_f_oooo += einsum(delta.oo, (0, 1), x8, (2, 3), (0, 3, 1, 2)) * -0.5 @@ -1328,54 +1329,54 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x8, (2, 3), (3, 0, 1, 2)) * 0.5 rdm2_f_oooo += einsum(delta.oo, (0, 1), x8, (2, 3), (3, 0, 2, 1)) * -0.5 del x8 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x9, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x9, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x9, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x9, (2, 3), (3, 0, 2, 1)) * -1.0 - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x10, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x10, (0, 1, 2, 3), (2, 1, 3, 0)) - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), t3, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) rdm2_f_ooov += einsum(x11, (0, 1, 2, 3), (1, 2, 0, 3)) * 0.5 rdm2_f_oovo += einsum(x11, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.5 - x12 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x12, (0, 1, 2, 3), (1, 2, 0, 3)) * 0.5 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x12, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.5 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), x12, (4, 3, 2, 5), (4, 0, 1, 5)) * -1.0 rdm2_f_ooov += einsum(x13, (0, 1, 2, 3), (1, 2, 0, 3)) * 0.25 rdm2_f_oovo += einsum(x13, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.25 - x14 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x15 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(t1, (0, 1), x14, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(t2, (0, 1, 2, 3), x15, (4, 1, 0, 5, 6, 3), (4, 6, 5, 2)) rdm2_f_ooov += einsum(x16, (0, 1, 2, 3), (1, 2, 0, 3)) * 0.5 rdm2_f_oovo += einsum(x16, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.5 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t3, (0, 1, 2, 3, 4, 5), x14, (6, 1, 2, 7, 4, 5), (6, 7, 0, 3)) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(t1, (0, 1), x5, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x19 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x19, (1, 4, 5, 3), (4, 5, 0, 2)) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum(x9, (0, 1), (0, 1)) * 12.00000000000048 x21 += einsum(x6, (0, 1), (0, 1)) * 6.00000000000024 x21 += einsum(x7, (0, 1), (0, 1)) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x22 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.25 x22 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 @@ -1388,18 +1389,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 0, 3, 1)) del x22 - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum(l1, (0, 1), t2, (2, 1, 3, 0), (2, 3)) - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 0, 1), (4, 5)) - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum(t3, (0, 1, 2, 3, 4, 5), x14, (0, 1, 2, 6, 4, 5), (6, 3)) - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x19, (0, 1, 4, 3), (4, 2)) * -0.5 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), x21, (0, 2), (2, 1)) * 0.08333333333333 del x21 - x28 = np.zeros((nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir), dtype=types[float]) x28 += einsum(x23, (0, 1), (0, 1)) * -1.0 del x23 x28 += einsum(x24, (0, 1), (0, 1)) * -0.25 @@ -1414,50 +1415,50 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_ooov += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 1, 3)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x28, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x28, (2, 3), (2, 0, 3, 1)) * -1.0 - x29 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x29 += einsum(x1, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x29 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x29 += einsum(x0, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.33333333333334 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), x29, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x29 rdm2_f_ooov += einsum(x30, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x30, (0, 1, 2, 3), (2, 1, 3, 0)) del x30 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) rdm2_f_ovov += einsum(x31, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_ovvo += einsum(x31, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.25 rdm2_f_voov += einsum(x31, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.25 rdm2_f_vovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), x31, (1, 4, 3, 5), (0, 4, 2, 5)) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 0, 5, 6, 3), (4, 5, 6, 2)) rdm2_f_ovov += einsum(x33, (0, 1, 2, 3), (1, 2, 0, 3)) * 0.5 rdm2_f_ovvo += einsum(x33, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.5 rdm2_f_voov += einsum(x33, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.5 rdm2_f_vovo += einsum(x33, (0, 1, 2, 3), (2, 1, 3, 0)) * 0.5 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(t1, (0, 1), x4, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) x35 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) del x34 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(t2, (0, 1, 2, 3), x35, (1, 4, 3, 5), (4, 0, 5, 2)) * 0.5 del x35 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x2, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) del x37 x38 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x17 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(t1, (0, 1), x38, (0, 2, 3, 4), (2, 3, 1, 4)) del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 del x32 x40 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1471,12 +1472,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x40, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x40, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x40 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(x7, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) del x7 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(x4, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (2, 4, 5, 6)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.08333333333333 del x41 x43 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 @@ -1484,27 +1485,27 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) del x43 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_ovov += einsum(x44, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovvo += einsum(x44, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_voov += einsum(x44, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_vovo += einsum(x44, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t2, (0, 1, 2, 3), x44, (1, 4, 3, 5), (4, 0, 5, 2)) - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(x12, (0, 1, 2, 3), t3, (4, 5, 0, 6, 1, 2), (4, 5, 3, 6)) - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 1), (0, 4)) - x48 = np.zeros((nvir, nvir), dtype=np.float64) + x48 = np.zeros((nvir, nvir), dtype=types[float]) x48 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 1, 2), (0, 6)) - x49 = np.zeros((nvir, nvir), dtype=np.float64) + x49 = np.zeros((nvir, nvir), dtype=types[float]) x49 += einsum(x47, (0, 1), (0, 1)) x49 += einsum(x48, (0, 1), (0, 1)) * 0.16666666666666 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(x49, (0, 1), t2, (2, 3, 4, 0), (2, 3, 1, 4)) * -0.5 del x49 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x10, (0, 1, 2, 3), (0, 2, 1, 3)) del x10 x51 += einsum(x11, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 @@ -1513,10 +1514,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x13 x51 += einsum(x16, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x16 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t1, (0, 1), x51, (0, 2, 3, 4), (2, 3, 1, 4)) del x51 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) del x45 x53 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 @@ -1528,21 +1529,21 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x53, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x53 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(x9, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) del x9 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(x2, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 3), (2, 4, 5, 6)) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x6, (0, 1), t2, (2, 0, 3, 4), (2, 1, 3, 4)) del x6 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * 2.0 x57 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(x5, (0, 1, 2, 3), x57, (0, 1, 4, 5), (2, 3, 4, 5)) * 0.25 del x5, x57 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x54 x59 += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 @@ -1554,36 +1555,36 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x59 - x60 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) x60 += einsum(x15, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.00000000000012 del x15 rdm2_f_oovv += einsum(t3, (0, 1, 2, 3, 4, 5), x60, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * 0.08333333333333 del x60 - x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x61 += einsum(x1, (0, 1, 2, 3), (1, 0, 3, 2)) * -3.00000000000012 x61 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * 6.00000000000024 x61 += einsum(x0, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), x61, (0, 1, 4, 5), (5, 4, 2, 3)) * 0.08333333333333 del x61 - x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x62 += einsum(x1, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.99999999999994 del x1 x62 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * 5.99999999999988 del x3 x62 += einsum(x0, (0, 1, 2, 3), (0, 1, 3, 2)) del x0 - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(t1, (0, 1), x62, (0, 2, 3, 4), (2, 4, 3, 1)) * -0.16666666666667 del x62 rdm2_f_oovv += einsum(t1, (0, 1), x63, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x63 - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x2 x64 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) del x4 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(t1, (0, 1), x64, (0, 2, 3, 4), (2, 3, 1, 4)) * 0.5 del x64 rdm2_f_ovov += einsum(x65, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 @@ -1591,60 +1592,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x65, (0, 1, 2, 3), (3, 1, 0, 2)) rdm2_f_vovo += einsum(x65, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 del x65 - x66 = np.zeros((nvir, nvir), dtype=np.float64) + x66 = np.zeros((nvir, nvir), dtype=types[float]) x66 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x67 = np.zeros((nvir, nvir), dtype=np.float64) + x67 = np.zeros((nvir, nvir), dtype=types[float]) x67 += einsum(x66, (0, 1), (0, 1)) * 12.00000000000048 x67 += einsum(x47, (0, 1), (0, 1)) * 6.00000000000024 x67 += einsum(x48, (0, 1), (0, 1)) rdm2_f_ovov += einsum(delta.oo, (0, 1), x67, (2, 3), (0, 2, 1, 3)) * 0.08333333333333 rdm2_f_voov += einsum(delta.oo, (0, 1), x67, (2, 3), (2, 0, 1, 3)) * -0.08333333333333 del x67 - x68 = np.zeros((nvir, nvir), dtype=np.float64) + x68 = np.zeros((nvir, nvir), dtype=types[float]) x68 += einsum(x66, (0, 1), (0, 1)) * 2.0 x68 += einsum(x47, (0, 1), (0, 1)) x68 += einsum(x48, (0, 1), (0, 1)) * 0.16666666666666 rdm2_f_ovvo += einsum(delta.oo, (0, 1), x68, (2, 3), (0, 2, 3, 1)) * -0.5 rdm2_f_vovo += einsum(delta.oo, (0, 1), x68, (2, 3), (2, 0, 3, 1)) * 0.5 del x68 - x69 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x69 += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 1), (4, 0, 5, 6)) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(x69, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(x69, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.5 del x69 - x70 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x70 += einsum(t3, (0, 1, 2, 3, 4, 5), x14, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * -1.0 del x14 rdm2_f_ovvv += einsum(x70, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.16666666666667 rdm2_f_vovv += einsum(x70, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.16666666666667 del x70 - x71 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x71 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x71, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x71, (0, 1, 2, 3), (1, 0, 3, 2)) del x71 - x72 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x72 += einsum(t2, (0, 1, 2, 3), x12, (1, 4, 3, 5), (0, 4, 5, 2)) * -1.0 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) del x44 x73 += einsum(x31, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x31 x73 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x33 - x74 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x74 += einsum(t1, (0, 1), x73, (0, 2, 3, 4), (2, 1, 3, 4)) del x73 - x75 = np.zeros((nvir, nvir), dtype=np.float64) + x75 = np.zeros((nvir, nvir), dtype=types[float]) x75 += einsum(x66, (0, 1), (0, 1)) del x66 x75 += einsum(x47, (0, 1), (0, 1)) * 0.5 del x47 x75 += einsum(x48, (0, 1), (0, 1)) * 0.08333333333333 del x48 - x76 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x76 += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x72 x76 += einsum(x74, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -1656,27 +1657,27 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x76, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) del x76 - x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum(t2, (0, 1, 2, 3), x19, (0, 1, 4, 5), (4, 5, 2, 3)) * 0.5 rdm2_f_ovvv += einsum(x77, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x77, (0, 1, 2, 3), (1, 0, 3, 2)) del x77 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(t1, (0, 1), x19, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 rdm2_f_ovvv += einsum(t1, (0, 1), x78, (0, 2, 3, 4), (2, 3, 1, 4)) del x78 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(t1, (0, 1), x19, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x19 rdm2_f_vovv += einsum(t1, (0, 1), x79, (0, 2, 3, 4), (3, 2, 4, 1)) * 0.5 del x79 - x80 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x80 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) rdm2_f_vvov += einsum(x80, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vvvo += einsum(x80, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvv += einsum(t1, (0, 1), x80, (0, 2, 3, 4), (2, 3, 1, 4)) del x80 - x81 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x81 += einsum(t1, (0, 1), x12, (0, 2, 3, 4), (3, 2, 1, 4)) * -1.0 del x12 rdm2_f_vvvv += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 diff --git a/ebcc/codegen/GCCSDTQ.py b/ebcc/codegen/GCCSDTQ.py index 988ac73a..768f25af 100644 --- a/ebcc/codegen/GCCSDTQ.py +++ b/ebcc/codegen/GCCSDTQ.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t4=None, **kwargs): # energy e_cc = 0 e_cc += einsum(t1, (0, 1), f.ov, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (1, 0, 3, 2)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -16,7 +17,7 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t4=N def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t4=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.oo, (0, 1), t1, (1, 2), (0, 2)) * -1.0 t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) @@ -32,7 +33,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t1new += einsum(t1, (0, 1), t2, (2, 3, 4, 5), v.oovv, (0, 3, 4, 5), (2, 1)) * -0.5 t1new += einsum(t1, (0, 1), t2, (2, 3, 4, 5), v.oovv, (0, 3, 1, 5), (2, 4)) t1new += einsum(t1, (0, 1), t1, (2, 3), t1, (4, 5), v.oovv, (2, 4, 1, 3), (0, 5)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) t2new += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 @@ -107,7 +108,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(t1, (0, 1), t1, (2, 3), t2, (4, 5, 6, 7), v.oovv, (0, 2, 1, 7), (4, 5, 3, 6)) t2new += einsum(t1, (0, 1), t1, (2, 3), t2, (4, 5, 6, 7), v.oovv, (0, 2, 1, 7), (4, 5, 6, 3)) * -1.0 t2new += einsum(t1, (0, 1), t1, (2, 3), t1, (4, 5), t1, (6, 7), v.oovv, (4, 6, 1, 3), (0, 2, 5, 7)) - t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) t3new += einsum(f.oo, (0, 1), t3, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) * -1.0 t3new += einsum(f.oo, (0, 1), t3, (2, 3, 1, 4, 5, 6), (2, 0, 3, 4, 5, 6)) t3new += einsum(f.oo, (0, 1), t3, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) * -1.0 @@ -515,7 +516,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(t1, (0, 1), t1, (2, 3), t1, (4, 5), t2, (6, 7, 8, 9), v.oovv, (2, 4, 1, 9), (6, 7, 0, 3, 5, 8)) * -1.0 t3new += einsum(t1, (0, 1), t1, (2, 3), t1, (4, 5), t2, (6, 7, 8, 9), v.oovv, (2, 4, 1, 9), (6, 7, 0, 3, 8, 5)) t3new += einsum(t1, (0, 1), t1, (2, 3), t1, (4, 5), t2, (6, 7, 8, 9), v.oovv, (2, 4, 1, 9), (6, 7, 0, 8, 3, 5)) * -1.0 - t4new = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + t4new = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) t4new += einsum(f.oo, (0, 1), t4, (2, 3, 4, 1, 5, 6, 7, 8), (0, 2, 3, 4, 5, 6, 7, 8)) t4new += einsum(f.oo, (0, 1), t4, (2, 3, 4, 1, 5, 6, 7, 8), (2, 0, 3, 4, 5, 6, 7, 8)) * -1.0 t4new += einsum(f.oo, (0, 1), t4, (2, 3, 4, 1, 5, 6, 7, 8), (2, 3, 0, 4, 5, 6, 7, 8)) diff --git a/ebcc/codegen/GCCSD_SD_1_1.py b/ebcc/codegen/GCCSD_SD_1_1.py index 709fe955..d4ae569f 100644 --- a/ebcc/codegen/GCCSD_SD_1_1.py +++ b/ebcc/codegen/GCCSD_SD_1_1.py @@ -2,16 +2,17 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("ijab->jiba", t2) x0 += einsum("ia,jb->ijab", t1, t1) * 2 e_cc = 0 e_cc += einsum("ijab,ijab->", v.oovv, x0) * 0.25 del x0 - x1 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x1 += einsum("wia->wia", u11) x1 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x1) @@ -31,193 +32,193 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2 and U11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jkba->ijkb", t1, v.oovv) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ikja", x0) * -1 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum("ijab,kjlb->kila", t2, x0) - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 -= einsum("ijka->ikja", x30) del x30 - x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x65 += einsum("ia,jkla->jilk", t1, x0) del x0 - x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x66 += einsum("ijkl->klji", x65) * -1 - x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x67 += einsum("ijkl->klji", x65) * -1 del x65 x1 += einsum("ijka->kjia", v.ooov) - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kija->kb", t2, x1) * -0.5 del x1 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("w,wia->ia", s1, g.bov) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum("ia->ia", x2) - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia->ia", x2) - x78 = np.zeros((nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir), dtype=types[float]) x78 += einsum("ia->ia", x2) del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("ia,jiba->jb", t1, v.oovv) x4 += einsum("ia->ia", x3) x11 += einsum("ia->ia", x3) - x77 = np.zeros((nvir, nvir), dtype=np.float64) + x77 = np.zeros((nvir, nvir), dtype=types[float]) x77 += einsum("ia,ib->ab", t1, x3) del x3 x4 += einsum("ia->ia", f.ov) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum("ia,jkab->jkib", x4, t2) - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum("ijka->kjia", x38) del x38 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum("ia,ja->ij", t1, x4) - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum("ij->ij", x54) del x54 t1new += einsum("ia,ijab->jb", x4, t2) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x4, u11) del x4 - x5 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x5 += einsum("ia,wja->wji", t1, g.bov) - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("wij->wij", x5) del x5 x6 += einsum("wij->wij", g.boo) - x25 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x25 += einsum("ia,wij->wja", t1, x6) - x26 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x26 -= einsum("wia->wia", x25) del x25 t1new -= einsum("wia,wij->ja", u11, x6) del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("w,wij->ij", s1, g.boo) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x7) x55 += einsum("ij->ji", x7) del x7 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("wia,wja->ij", g.bov, u11) x13 += einsum("ij->ij", x8) - x57 = np.zeros((nocc, nocc), dtype=np.float64) + x57 = np.zeros((nocc, nocc), dtype=types[float]) x57 += einsum("ij->ij", x8) del x8 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 -= einsum("ia,ijka->jk", t1, v.ooov) x13 += einsum("ij->ij", x9) x57 += einsum("ij->ij", x9) del x9 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum("ij,ikab->kjab", x57, t2) del x57 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 -= einsum("ijab->ijba", x58) del x58 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 -= einsum("ijab,jkab->ik", t2, v.oovv) x13 += einsum("ij->ji", x10) * 0.5 - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum("ij,kjab->kiab", x10, t2) del x10 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum("ijab->ijba", x62) * -0.5 del x62 x11 += einsum("ia->ia", f.ov) - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("ia,ja->ij", t1, x11) del x11 x13 += einsum("ij->ji", x12) del x12 x13 += einsum("ij->ij", f.oo) t1new += einsum("ia,ij->ja", t1, x13) * -1 - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new += einsum("ij,wia->wja", x13, u11) * -1 del x13 - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 += einsum("w,wab->ab", s1, g.bvv) - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 += einsum("ab->ab", x14) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum("ab,ijcb->ijac", x14, t2) - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ijab->ijab", x34) del x34 x77 += einsum("ab->ab", x14) * -1 del x14 - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 -= einsum("ia,ibac->bc", t1, v.ovvv) x16 -= einsum("ab->ab", x15) - x42 = np.zeros((nvir, nvir), dtype=np.float64) + x42 = np.zeros((nvir, nvir), dtype=types[float]) x42 += einsum("ab->ab", x15) x77 += einsum("ab->ab", x15) del x15 x16 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x16) del x16 - x17 = np.zeros((nbos), dtype=np.float64) + x17 = np.zeros((nbos), dtype=types[float]) x17 += einsum("ia,wia->w", t1, g.bov) - x18 = np.zeros((nbos), dtype=np.float64) + x18 = np.zeros((nbos), dtype=types[float]) x18 += einsum("w->w", x17) del x17 x18 += einsum("w->w", G) t1new += einsum("w,wia->ia", x18, u11) s1new += einsum("w,wx->x", x18, s2) del x18 - x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x19 += einsum("ia,bcda->ibcd", t1, v.vvvv) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new -= einsum("ia,jbca->ijcb", t1, x19) del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum("ijab,jckb->ikac", t2, v.ovov) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 -= einsum("ijab->ijab", x20) del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 -= einsum("ijab,kjcb->kiac", t2, x21) x33 += einsum("ijab->ijab", x22) del x22 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 -= einsum("ia,jkba->jikb", t1, x21) del x21 x39 += einsum("ijka->kjia", x37) del x37 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ia,ijkb->jkab", t1, x39) del x39 x44 += einsum("ijab->jiab", x40) del x40 - x23 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x23 += einsum("ia,wba->wib", t1, g.bvv) x26 += einsum("wia->wia", x23) del x23 - x24 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x24 += einsum("wia,jiba->wjb", g.bov, t2) x26 += einsum("wia->wia", x24) del x24 x26 += einsum("wai->wia", g.bvo) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum("wia,wjb->ijab", u11, x26) del x26 x33 += einsum("ijab->jiba", x27) del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum("ia,jbka->ijkb", t1, v.ovov) x31 += einsum("ijka->ijka", x28) del x28 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 -= einsum("ijab,jklb->ikla", t2, v.ooov) x31 += einsum("ijka->ijka", x29) del x29 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum("ia,jikb->jkab", t1, x31) del x31 x33 += einsum("ijab->ijab", x32) @@ -227,17 +228,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->jiab", x33) t2new += einsum("ijab->jiba", x33) del x33 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum("ijab,jkbc->ikac", t2, v.oovv) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum("ijab,kjcb->kica", t2, x35) del x35 x44 -= einsum("ijab->ijab", x36) del x36 - x41 = np.zeros((nvir, nvir), dtype=np.float64) + x41 = np.zeros((nvir, nvir), dtype=types[float]) x41 += einsum("wia,wib->ab", g.bov, u11) x42 += einsum("ab->ba", x41) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum("ab,ijbc->ijca", x42, t2) del x42 x44 += einsum("ijab->jiab", x43) @@ -247,17 +248,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x44 x77 += einsum("ab->ba", x41) del x41 - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum("ijab,kcab->ijkc", t2, v.ovvv) - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum("ia,jkib->jkab", t1, x45) del x45 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("ijab->ijab", x46) * 0.5 del x46 - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 -= einsum("ijab,ijbc->ac", t2, v.oovv) - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("ab,ijcb->ijca", x47, t2) x49 += einsum("ijab->ijab", x48) * 0.5 del x48 @@ -266,20 +267,20 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x49 x77 += einsum("ab->ab", x47) * 0.5 del x47 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ia,bcja->ijbc", t1, v.vvov) x59 += einsum("ijab->ijba", x50) del x50 - x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x51 += einsum("ia,jkla->ijkl", t1, v.ooov) - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum("ia,jkil->jkla", t1, x51) - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 -= einsum("ia,jikb->jkba", t1, x52) del x52 x59 += einsum("ijab->ijba", x53) del x53 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ijab,kijl->klab", t2, x51) del x51 x63 += einsum("ijab->ijba", x61) * -0.5 @@ -288,7 +289,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->jiab", x63) del x63 x55 += einsum("ij->ji", f.oo) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ij,jkab->kiab", x55, t2) del x55 x59 += einsum("ijab->jiba", x56) @@ -296,12 +297,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->ijab", x59) t2new -= einsum("ijab->jiab", x59) del x59 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ab,ijcb->ijac", f.vv, t2) t2new += einsum("ijab->jiab", x60) t2new -= einsum("ijab->jiba", x60) del x60 - x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x64 += einsum("ijab,klab->ijkl", t2, v.oovv) x66 += einsum("ijkl->lkji", x64) * 0.5 x67 += einsum("ijkl->lkji", x64) * 0.5000000000000003 @@ -310,31 +311,31 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->lkba", t2, x66) * 0.5 del x66 x67 += einsum("ijkl->jilk", v.oooo) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum("ia,ijkl->lkja", t1, x67) del x67 x68 += einsum("iajk->kjia", v.ovoo) t2new += einsum("ia,jkib->jkab", t1, x68) del x68 - x69 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x69 += einsum("wia,ijab->wjb", u11, v.oovv) - x76 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x76 += einsum("wia->wia", x69) - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("wia,xia->wx", u11, x69) del x69 - x70 = np.zeros((nbos, nbos), dtype=np.float64) + x70 = np.zeros((nbos, nbos), dtype=types[float]) x70 += einsum("wia,xia->wx", gc.bov, u11) - x74 = np.zeros((nbos, nbos), dtype=np.float64) + x74 = np.zeros((nbos, nbos), dtype=types[float]) x74 += einsum("wx->wx", x70) del x70 - x71 = np.zeros((nbos, nbos), dtype=np.float64) + x71 = np.zeros((nbos, nbos), dtype=types[float]) x71 += einsum("wia,xia->wx", g.bov, u11) - x72 = np.zeros((nbos, nbos), dtype=np.float64) + x72 = np.zeros((nbos, nbos), dtype=types[float]) x72 += einsum("wx->xw", x71) del x71 x72 += einsum("wx->wx", w) - x73 = np.zeros((nbos, nbos), dtype=np.float64) + x73 = np.zeros((nbos, nbos), dtype=types[float]) x73 += einsum("wx,yw->xy", s2, x72) x74 += einsum("wx->wx", x73) del x73 @@ -343,12 +344,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x74 u11new += einsum("wx,xia->wia", x72, u11) del x72 - x75 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x75 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x75 += einsum("wx,xia->wia", s2, g.bov) x76 += einsum("wia->wia", x75) del x75 x76 += einsum("wia->wia", gc.bov) - x79 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x79 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x79 += einsum("ia,wja->wji", t1, x76) u11new += einsum("wia,ijab->wjb", x76, t2) del x76 @@ -363,7 +364,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x79 -= einsum("wia,ijka->wjk", u11, v.ooov) u11new -= einsum("ia,wij->wja", t1, x79) del x79 - x80 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x80 += einsum("wab->wab", gc.bvv) x80 += einsum("wx,xab->wab", s2, g.bvv) x80 += einsum("wia,ibac->wbc", u11, v.ovvv) @@ -396,70 +397,70 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 , LS2 and LU11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,bajk->jkib", t1, l2) - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum("ia,jkla->jkil", t1, x0) - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum("ijkl->ijlk", x5) * 2.0000000000000013 - x121 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x121 += einsum("ijkl->ijlk", x5) * 2 - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum("ijka,lkji->al", v.ooov, x5) * 0.5 del x5 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ijab,kjlb->kila", t2, x0) * -4 - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum("ijab,ijka->kb", t2, x0) - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia->ia", x49) * 0.5 del x49 - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 -= einsum("ijka,kljb->liba", v.ooov, x0) - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum("ijab->ijab", x95) del x95 l1new -= einsum("iajb,kjia->bk", v.ovov, x0) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("iabc,jkia->cbkj", v.ovvv, x0) - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 -= einsum("abij,jkab->ik", l2, t2) x19 += einsum("ia,jk->jika", t1, x1) * 2 - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum("ij->ij", x1) - x63 = np.zeros((nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc), dtype=types[float]) x63 += einsum("ij->ij", x1) * 0.5 - x66 = np.zeros((nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc), dtype=types[float]) x66 += einsum("ij->ij", x1) * 0.5 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 -= einsum("ij,kjab->ikab", x1, v.oovv) - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum("ijab->ijba", x103) * -0.5 del x103 - x123 = np.zeros((nocc, nocc), dtype=np.float64) + x123 = np.zeros((nocc, nocc), dtype=types[float]) x123 += einsum("ij->ij", x1) l1new += einsum("ia,ji->aj", f.ov, x1) * -0.5 del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("ai,ja->ij", l1, t1) x51 += einsum("ij->ij", x2) * 2 x63 += einsum("ij->ij", x2) - x77 = np.zeros((nocc, nocc), dtype=np.float64) + x77 = np.zeros((nocc, nocc), dtype=types[float]) x77 += einsum("ij->ij", x2) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new -= einsum("ij,wji->w", x2, g.boo) - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("w,wia->ia", s1, g.bov) - x12 = np.zeros((nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nvir), dtype=types[float]) x12 += einsum("ia->ia", x3) - x58 = np.zeros((nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir), dtype=types[float]) x58 += einsum("ia->ia", x3) - x84 = np.zeros((nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nvir), dtype=types[float]) x84 += einsum("ia->ia", x3) l1new -= einsum("ij,ja->ai", x2, x3) del x2 del x3 - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum("abij,klab->ijkl", l2, t2) x18 += einsum("ijkl->jilk", x4) * -1 x19 += einsum("ia,ijkl->jlka", t1, x18) * -1 @@ -469,88 +470,88 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x121 l1new += einsum("ijka,lkij->al", v.ooov, x4) * -0.25 del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum("abij,jkbc->ikac", l2, t2) l1new -= einsum("iabc,jiac->bj", v.ovvv, x6) del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum("ijab->jiab", x7) * -0.5 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum("ijab->ijab", x7) l1new += einsum("ijka,jkab->bi", x0, x7) del x7 - x8 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x8 -= einsum("wia,abji->wjb", u11, l2) - x65 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x65 += einsum("wia->wia", x8) - x100 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x100 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x100 += einsum("wia->wia", x8) l1new += einsum("wab,wia->bi", g.bvv, x8) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum("ia,jkba->ijkb", t1, v.oovv) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("ijka->ikja", x9) * -1 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum("ijka->kjia", x9) * 0.5000000000000003 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum("ijka,jlkb->ilab", x0, x9) x102 -= einsum("ijab->ijab", x96) del x96 - x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x110 -= einsum("ai,ijkb->kjab", l1, x9) - x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum("ijab->ijab", x110) del x110 - x119 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x119 += einsum("ijka->kjia", x9) * 0.5 del x9 x10 += einsum("ijka->kjia", v.ooov) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum("ijab,kila->ljkb", t2, x10) - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum("ijab,kija->kb", t2, x10) * 0.5 del x10 - x44 = np.zeros((nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nvir), dtype=types[float]) x44 += einsum("ia->ia", x25) del x25 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 -= einsum("ia,ijba->jb", t1, v.oovv) x12 += einsum("ia->ia", x11) x58 += einsum("ia->ia", x11) - x78 = np.zeros((nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir), dtype=types[float]) x78 += einsum("ia->ia", x11) - x89 = np.zeros((nocc, nocc), dtype=np.float64) + x89 = np.zeros((nocc, nocc), dtype=types[float]) x89 += einsum("ia,ja->ij", t1, x11) - x90 = np.zeros((nocc, nocc), dtype=np.float64) + x90 = np.zeros((nocc, nocc), dtype=types[float]) x90 += einsum("ij->ji", x89) del x89 x102 += einsum("ai,jb->ijab", l1, x11) - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 -= einsum("ia,jkib->kjba", x11, x0) del x11 x118 -= einsum("ijab->ijab", x113) del x113 x12 += einsum("ia->ia", f.ov) x17 += einsum("ia,jkab->ikjb", x12, t2) * 0.5 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ia,ijab->jb", x12, t2) x44 += einsum("ia->ia", x26) * -1 del x26 - x34 = np.zeros((nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc), dtype=types[float]) x34 += einsum("ia,ja->ij", t1, x12) - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum("ij->ji", x34) del x34 - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("w,ia->wai", ls1, x12) * 2 del x12 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum("ijab,klab->ijkl", t2, v.oovv) - x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x15 += einsum("ijkl->lkji", x13) * -1 - x120 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x120 += einsum("ijkl->lkji", x13) * 0.5 del x13 x14 += einsum("ijka->jika", v.ooov) * -1 @@ -569,66 +570,66 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x19 += einsum("ai,jkba->ikjb", l1, t2) * -2 l1new += einsum("ijab,kija->bk", v.oovv, x19) * -0.25 del x19 - x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x20 += einsum("abic->ibac", v.vvov) * -1 x20 += einsum("ia,bcda->icbd", t1, v.vvvv) l1new += einsum("abij,iabc->cj", l2, x20) * 0.5 del x20 - x21 = np.zeros((nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nvir), dtype=types[float]) x21 += einsum("w,wai->ia", s1, g.bvo) x44 += einsum("ia->ia", x21) * -1 del x21 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("wab,wib->ia", g.bvv, u11) x44 += einsum("ia->ia", x22) * -1 del x22 - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("ia,ibja->jb", t1, v.ovov) x44 += einsum("ia->ia", x23) del x23 - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 -= einsum("ijab,icab->jc", t2, v.ovvv) x44 += einsum("ia->ia", x24) * 0.5 del x24 - x27 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x27 += einsum("ia,wja->wji", t1, g.bov) - x28 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x28 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x28 += einsum("wij->wij", x27) - x68 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x68 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x68 += einsum("wij->wij", x27) del x27 x28 += einsum("wij->wij", g.boo) - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum("wia,wij->ja", u11, x28) del x28 x44 += einsum("ia->ia", x29) del x29 - x30 = np.zeros((nocc, nocc), dtype=np.float64) + x30 = np.zeros((nocc, nocc), dtype=types[float]) x30 += einsum("w,wij->ij", s1, g.boo) x35 += einsum("ij->ij", x30) - x86 = np.zeros((nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc), dtype=types[float]) x86 += einsum("ij->ij", x30) del x30 - x31 = np.zeros((nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc), dtype=types[float]) x31 += einsum("wia,wja->ij", g.bov, u11) x35 += einsum("ij->ij", x31) x86 += einsum("ij->ij", x31) del x31 - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 -= einsum("ia,ijka->jk", t1, v.ooov) x35 += einsum("ij->ij", x32) x90 += einsum("ij->ij", x32) del x32 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum("ij,abjk->kiab", x90, l2) del x90 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 -= einsum("ijab->ijba", x91) del x91 - x33 = np.zeros((nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc), dtype=types[float]) x33 -= einsum("ijab,kiab->jk", t2, v.oovv) x35 += einsum("ij->ji", x33) * 0.5 - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum("ij,abki->kjab", x33, l2) del x33 x105 += einsum("ijab->ijba", x104) * -0.5 @@ -637,45 +638,45 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abji", x105) del x105 x35 += einsum("ij->ij", f.oo) - x36 = np.zeros((nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nvir), dtype=types[float]) x36 += einsum("ia,ij->ja", t1, x35) x44 += einsum("ia->ia", x36) del x36 l1new += einsum("ai,ji->aj", l1, x35) * -1 del x35 - x37 = np.zeros((nvir, nvir), dtype=np.float64) + x37 = np.zeros((nvir, nvir), dtype=types[float]) x37 += einsum("w,wab->ab", s1, g.bvv) - x39 = np.zeros((nvir, nvir), dtype=np.float64) + x39 = np.zeros((nvir, nvir), dtype=types[float]) x39 += einsum("ab->ab", x37) - x70 = np.zeros((nvir, nvir), dtype=np.float64) + x70 = np.zeros((nvir, nvir), dtype=types[float]) x70 += einsum("ab->ab", x37) - x115 = np.zeros((nvir, nvir), dtype=np.float64) + x115 = np.zeros((nvir, nvir), dtype=types[float]) x115 += einsum("ab->ab", x37) del x37 - x38 = np.zeros((nvir, nvir), dtype=np.float64) + x38 = np.zeros((nvir, nvir), dtype=types[float]) x38 -= einsum("ia,ibac->bc", t1, v.ovvv) x39 += einsum("ab->ab", x38) * -1 x70 -= einsum("ab->ab", x38) - x112 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x112 -= einsum("ab,caij->jicb", x38, l2) del x38 x118 -= einsum("ijab->ijab", x112) del x112 x39 += einsum("ab->ab", f.vv) - x40 = np.zeros((nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nvir), dtype=types[float]) x40 += einsum("ia,ba->ib", t1, x39) del x39 x44 += einsum("ia->ia", x40) * -1 del x40 - x41 = np.zeros((nbos), dtype=np.float64) + x41 = np.zeros((nbos), dtype=types[float]) x41 += einsum("ia,wia->w", t1, g.bov) - x42 = np.zeros((nbos), dtype=np.float64) + x42 = np.zeros((nbos), dtype=types[float]) x42 += einsum("w->w", x41) - x74 = np.zeros((nbos), dtype=np.float64) + x74 = np.zeros((nbos), dtype=types[float]) x74 += einsum("w->w", x41) del x41 x42 += einsum("w->w", G) - x43 = np.zeros((nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nvir), dtype=types[float]) x43 += einsum("w,wia->ia", x42, u11) del x42 x44 += einsum("ia->ia", x43) * -1 @@ -684,24 +685,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ia,abij->bj", x44, l2) * -1 ls1new += einsum("ia,wai->w", x44, lu11) * -1 del x44 - x45 = np.zeros((nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir), dtype=types[float]) x45 += einsum("w,wia->ia", ls1, u11) x53 += einsum("ia->ia", x45) * -1 del x45 - x46 = np.zeros((nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nvir), dtype=types[float]) x46 += einsum("ai,jiba->jb", l1, t2) x53 += einsum("ia->ia", x46) * -1 del x46 - x47 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x47 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x47 += einsum("ia,waj->wji", t1, lu11) - x48 = np.zeros((nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nvir), dtype=types[float]) x48 += einsum("wia,wij->ja", u11, x47) x53 += einsum("ia->ia", x48) del x48 - x50 = np.zeros((nocc, nocc), dtype=np.float64) + x50 = np.zeros((nocc, nocc), dtype=types[float]) x50 += einsum("wai,wja->ij", lu11, u11) x51 += einsum("ij->ij", x50) * 2 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ia,ij->ja", t1, x51) * 0.5 del x51 x53 += einsum("ia->ia", x52) @@ -710,11 +711,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ij,jkia->ak", x63, v.ooov) * -1 del x63 x66 += einsum("ij->ij", x50) - x67 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x67 += einsum("w,ij->wij", s1, x66) del x66 x77 += einsum("ij->ij", x50) - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum("ij,jkab->kiab", x77, v.oovv) x92 += einsum("ijab->jiba", x88) del x88 @@ -726,30 +727,30 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ia,ijab->bj", x53, v.oovv) * -1 ls1new += einsum("ia,wia->w", x53, g.bov) * -1 del x53 - x54 = np.zeros((nvir, nvir), dtype=np.float64) + x54 = np.zeros((nvir, nvir), dtype=types[float]) x54 += einsum("ai,ib->ab", l1, t1) - x57 = np.zeros((nvir, nvir), dtype=np.float64) + x57 = np.zeros((nvir, nvir), dtype=types[float]) x57 += einsum("ab->ab", x54) ls1new += einsum("ab,wab->w", x54, g.bvv) del x54 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum("wai,wib->ab", lu11, u11) x57 += einsum("ab->ab", x55) - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 -= einsum("ab,ijcb->jiac", x55, v.oovv) x118 += einsum("ijab->ijab", x111) del x111 - x122 = np.zeros((nvir, nvir), dtype=np.float64) + x122 = np.zeros((nvir, nvir), dtype=types[float]) x122 += einsum("ab->ab", x55) del x55 - x56 = np.zeros((nvir, nvir), dtype=np.float64) + x56 = np.zeros((nvir, nvir), dtype=types[float]) x56 -= einsum("abij,ijbc->ac", l2, t2) x57 += einsum("ab->ab", x56) * 0.5 l1new += einsum("ab,iabc->ci", x57, v.ovvv) * -1 del x57 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 -= einsum("ab,ijcb->ijac", x56, v.oovv) - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 += einsum("ijab->ijab", x108) * 0.5 del x108 x122 += einsum("ab->ab", x56) * 0.5 @@ -757,21 +758,21 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ab,wab->w", x122, g.bvv) del x122 x58 += einsum("ia->ia", f.ov) - x61 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x61 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x61 += einsum("ia,wja->wij", x58, u11) - x73 = np.zeros((nbos), dtype=np.float64) + x73 = np.zeros((nbos), dtype=types[float]) x73 += einsum("ia,wia->w", x58, u11) del x58 - x76 = np.zeros((nbos), dtype=np.float64) + x76 = np.zeros((nbos), dtype=types[float]) x76 += einsum("w->w", x73) del x73 - x59 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x59 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x59 += einsum("wia,ijab->wjb", u11, v.oovv) - x60 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x60 += einsum("wia->wia", x59) - x69 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x69 += einsum("wia->wia", x59) - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum("wai,wjb->ijab", lu11, x59) del x59 x102 += einsum("ijab->ijab", x94) @@ -785,20 +786,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x61 += einsum("wia,jika->wjk", u11, v.ooov) l1new -= einsum("wai,wji->aj", lu11, x61) del x61 - x62 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x62 += einsum("wab->wab", gc.bvv) x62 += einsum("wx,wab->xab", s2, g.bvv) x62 -= einsum("wia,ibca->wbc", u11, v.ovvv) l1new += einsum("wai,wab->bi", lu11, x62) del x62 - x64 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x64 += einsum("wx,xai->wia", s2, lu11) x65 += einsum("wia->wia", x64) x67 += einsum("ia,wja->wji", t1, x65) del x65 x100 += einsum("wia->wia", x64) del x64 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum("wia,wjb->ijab", g.bov, x100) del x100 x102 += einsum("ijab->ijab", x101) @@ -807,9 +808,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("wia,wji->aj", g.bov, x67) * -1 del x67 x68 += einsum("wij->wij", g.boo) - x129 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x129 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x129 += einsum("ia,wij->wja", t1, x68) - x130 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x130 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x130 -= einsum("wia->wia", x129) del x129 l1new -= einsum("wij,wja->ai", x68, x8) @@ -822,20 +823,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x70 += einsum("ab->ab", f.vv) l1new += einsum("ai,ab->bi", l1, x70) del x70 - x71 = np.zeros((nbos), dtype=np.float64) + x71 = np.zeros((nbos), dtype=types[float]) x71 += einsum("w,xw->x", s1, w) x76 += einsum("w->w", x71) del x71 - x72 = np.zeros((nbos), dtype=np.float64) + x72 = np.zeros((nbos), dtype=types[float]) x72 += einsum("ia,wia->w", t1, gc.bov) x76 += einsum("w->w", x72) del x72 x74 += einsum("w->w", G) - x75 = np.zeros((nbos), dtype=np.float64) + x75 = np.zeros((nbos), dtype=types[float]) x75 += einsum("w,wx->x", x74, s2) x76 += einsum("w->w", x75) del x75 - x132 = np.zeros((nbos, nbos), dtype=np.float64) + x132 = np.zeros((nbos, nbos), dtype=types[float]) x132 += einsum("w,x->xw", ls1, x74) del x74 x76 += einsum("w->w", G) @@ -846,42 +847,42 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new -= einsum("ij,ja->ai", x77, x78) del x77 del x78 - x79 = np.zeros((nbos), dtype=np.float64) + x79 = np.zeros((nbos), dtype=types[float]) x79 += einsum("w->w", s1) x79 += einsum("w,xw->x", ls1, s2) x79 += einsum("ai,wia->w", l1, u11) l1new += einsum("w,wia->ai", x79, g.bov) del x79 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum("ai,jkib->jkab", l1, v.ooov) - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 -= einsum("ijab->jiab", x80) del x80 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("ab,caij->ijbc", f.vv, l2) x82 -= einsum("ijab->jiab", x81) del x81 l2new -= einsum("ijab->abij", x82) l2new += einsum("ijab->baij", x82) del x82 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("ai,jabc->ijbc", l1, v.ovvv) x92 += einsum("ijab->ijba", x83) del x83 x84 += einsum("ia->ia", f.ov) - x85 = np.zeros((nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc), dtype=types[float]) x85 += einsum("ia,ja->ij", t1, x84) x86 += einsum("ij->ji", x85) del x85 x102 += einsum("ai,jb->jiba", l1, x84) - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum("ia,jkib->jkba", x84, x0) del x0 del x84 x118 -= einsum("ijab->jiba", x117) del x117 x86 += einsum("ij->ij", f.oo) - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum("ij,abjk->kiab", x86, l2) del x86 x92 += einsum("ijab->jiba", x87) @@ -889,16 +890,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x92) l2new -= einsum("ijab->abji", x92) del x92 - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum("wia,wbj->ijab", gc.bov, lu11) x102 += einsum("ijab->ijab", x93) del x93 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum("ijab,kica->jkbc", t2, v.oovv) x98 += einsum("ijab->ijab", x97) del x97 x98 -= einsum("iajb->jiab", v.ovov) - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum("abij,ikac->jkbc", l2, x98) del x98 x102 += einsum("ijab->ijab", x99) @@ -908,9 +909,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->abji", x102) l2new += einsum("ijab->baji", x102) del x102 - x106 = np.zeros((nvir, nvir), dtype=np.float64) + x106 = np.zeros((nvir, nvir), dtype=types[float]) x106 -= einsum("ijab,ijca->bc", t2, v.oovv) - x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x107 -= einsum("ab,caij->jicb", x106, l2) del x106 x109 += einsum("ijab->ijab", x107) * 0.5 @@ -918,11 +919,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x109) * -1 l2new += einsum("ijab->baij", x109) del x109 - x114 = np.zeros((nvir, nvir), dtype=np.float64) + x114 = np.zeros((nvir, nvir), dtype=types[float]) x114 += einsum("wia,wib->ab", g.bov, u11) x115 -= einsum("ab->ba", x114) del x114 - x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x116 += einsum("ab,acij->ijcb", x115, l2) del x115 x118 -= einsum("ijab->jiba", x116) @@ -936,32 +937,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x120 += einsum("ijkl->jilk", v.oooo) l2new += einsum("abij,klij->balk", l2, x120) * 0.5 del x120 - x124 = np.zeros((nbos, nbos), dtype=np.float64) + x124 = np.zeros((nbos, nbos), dtype=types[float]) x124 += einsum("wx,xy->wy", ls2, w) x132 += einsum("wx->wx", x124) del x124 - x125 = np.zeros((nbos, nbos), dtype=np.float64) + x125 = np.zeros((nbos, nbos), dtype=types[float]) x125 += einsum("wia,xia->wx", g.bov, u11) - x126 = np.zeros((nbos, nbos), dtype=np.float64) + x126 = np.zeros((nbos, nbos), dtype=types[float]) x126 += einsum("wx,yx->yw", ls2, x125) del x125 x132 += einsum("wx->wx", x126) del x126 - x127 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x127 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x127 += einsum("ia,wba->wib", t1, g.bvv) x130 += einsum("wia->wia", x127) del x127 - x128 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x128 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x128 += einsum("wia,jiba->wjb", g.bov, t2) x130 += einsum("wia->wia", x128) del x128 x130 += einsum("wai->wia", g.bvo) - x131 = np.zeros((nbos, nbos), dtype=np.float64) + x131 = np.zeros((nbos, nbos), dtype=types[float]) x131 += einsum("wai,xia->wx", lu11, x130) del x130 x132 += einsum("wx->xw", x131) del x131 - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("wx->wx", x132) ls2new += einsum("wx->xw", x132) del x132 @@ -998,41 +999,41 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("ai,ja->ij", l1, t1) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("ij->ij", x0) - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo -= einsum("ij->ij", x0) del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("wai,wja->ij", lu11, u11) x5 += einsum("ij->ij", x1) rdm1_f_oo -= einsum("ij->ij", x1) del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("abij,kjab->ik", l2, t2) x5 += einsum("ij->ij", x2) * 0.5 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum("ia,ij->aj", t1, x5) * -1 del x5 rdm1_f_oo += einsum("ij->ij", x2) * -0.5 del x2 - x3 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x3 += einsum("ia,waj->wji", t1, lu11) rdm1_f_vo -= einsum("wia,wij->aj", u11, x3) del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ia,bajk->jkib", t1, l2) rdm1_f_vo += einsum("ijab,ijkb->ak", t2, x4) * 0.5 del x4 rdm1_f_oo += einsum("ij->ji", delta_oo) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) rdm1_f_vo += einsum("ai,jiba->bj", l1, t2) rdm1_f_vo += einsum("w,wia->ai", ls1, u11) rdm1_f_vo += einsum("ia->ai", t1) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("wai,wib->ba", lu11, u11) rdm1_f_vv += einsum("ai,ib->ba", l1, t1) rdm1_f_vv += einsum("abij,ijca->cb", l2, t2) * -0.5 @@ -1054,94 +1055,94 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum("ijkl->jilk", x0) * -1 - x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x51 += einsum("ijkl->jilk", x0) * -1 - x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x52 += einsum("ijkl->jilk", x0) * -1 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum("ijkl->jilk", x0) * 0.5 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) x20 += einsum("ijkl->ijlk", x2) * 2 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum("ia,ijkl->jkla", t1, x20) * 0.5 del x20 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum("ijka->iakj", x21) * -1 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ijka->aikj", x21) del x21 x51 += einsum("ijkl->ijlk", x2) * 2.0000000000000013 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum("ijab,ijkl->balk", t2, x51) * -0.25 del x51 x52 += einsum("ijkl->ijlk", x2) * 1.9999999999999987 - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum("ia,ijkl->jlka", t1, x52) * -1 del x52 rdm2_f_vvoo += einsum("ia,ijkb->abkj", t1, x53) * -0.5000000000000003 del x53 rdm2_f_oooo -= einsum("ijkl->ijlk", x2) del x2 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 -= einsum("ijab,kjlb->klia", t2, x1) - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ijka", x9) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 -= einsum("ijka->ijka", x9) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum("ia,ijkb->jkab", t1, x9) del x9 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 -= einsum("ijab->ijab", x34) del x34 - x16 = np.zeros((nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir), dtype=types[float]) x16 -= einsum("ijab,ijkb->ka", t2, x1) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x16) del x16 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("ia,jikb->jkba", t1, x1) - x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x59 -= einsum("ia,ijbc->jbca", t1, x28) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->cbia", x59) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->cbai", x59) del x59 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum("ijab->ibja", x28) - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->ibaj", x28) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->bija", x28) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->biaj", x28) del x28 - x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x58 += einsum("ijab,ijkc->kcab", t2, x1) rdm2_f_vvov += einsum("iabc->bcia", x58) * 0.5 rdm2_f_vvvo += einsum("iabc->bcai", x58) * -0.5 del x58 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov -= einsum("ijka->jika", x1) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ijka->jiak", x1) del x1 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("abij,kjab->ik", l2, t2) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia,ij->ja", t1, x3) x18 += einsum("ia->ia", x17) del x17 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ij,ka->jika", delta_oo, x18) * 0.5 rdm2_f_vooo += einsum("ij,ka->aijk", delta_oo, x18) * 0.5 rdm2_f_vooo += einsum("ij,ka->aikj", delta_oo, x18) * -0.5 @@ -1154,7 +1155,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovoo += einsum("ijka->iajk", x19) * -1 rdm2_f_ovoo += einsum("ijka->iakj", x19) del x19 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ij,kiab->kjab", x3, t2) rdm2_f_vvoo += einsum("ijab->abij", x50) * -0.5 rdm2_f_vvoo += einsum("ijab->abji", x50) * 0.5 @@ -1166,18 +1167,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ia,jk->ajik", t1, x3) * -0.5 rdm2_f_vooo += einsum("ia,jk->ajki", t1, x3) * 0.5 del x3 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum("ai,ja->ij", l1, t1) - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("ij->ij", x4) - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("ia,ij->ja", t1, x4) - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 -= einsum("ia->ia", x23) del x23 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ij,kiab->jkab", x4, t2) - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 -= einsum("ijab->ijba", x44) del x44 rdm2_f_oooo -= einsum("ij,kl->jkil", delta_oo, x4) @@ -1185,25 +1186,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jkli", delta_oo, x4) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x4) del x4 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("wai,wja->ij", lu11, u11) - x12 = np.zeros((nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nvir), dtype=types[float]) x12 += einsum("ia,ij->ja", t1, x5) - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum("ia->ia", x12) del x12 x14 += einsum("ij->ij", x5) x15 -= einsum("ia,jk->jika", t1, x14) x25 += einsum("ia,jk->jika", t1, x14) - x54 = np.zeros((nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir), dtype=types[float]) x54 += einsum("ia,ij->ja", t1, x14) del x14 - x55 = np.zeros((nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir), dtype=types[float]) x55 += einsum("ia->ia", x54) - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ia->ia", x54) del x54 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ij,kiab->kjab", x5, t2) x46 += einsum("ijab->ijba", x45) del x45 @@ -1215,19 +1216,19 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->kjil", delta_oo, x5) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x5) del x5 - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum("ai,jkba->ijkb", l1, t2) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ia,ijkb->jkab", t1, x6) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum("ijab->ijab", x40) del x40 rdm2_f_ovoo -= einsum("ijka->iakj", x6) rdm2_f_vooo += einsum("ijka->aikj", x6) del x6 - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("ia,waj->wji", t1, lu11) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("wia,wjk->jkia", u11, x7) x15 += einsum("ijka->ijka", x8) x25 -= einsum("ijka->ijka", x8) @@ -1235,19 +1236,19 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo -= einsum("ijka->aijk", x25) rdm2_f_vooo += einsum("ijka->aikj", x25) del x25 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("wia,wij->ja", u11, x7) x13 += einsum("ia->ia", x11) x55 += einsum("ia->ia", x11) x56 += einsum("ia->ia", x11) del x11 - x36 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x36 += einsum("ia,wij->wja", t1, x7) del x7 - x37 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x37 -= einsum("wia->wia", x36) del x36 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum("ai,jiba->jb", l1, t2) x13 -= einsum("ia->ia", x10) x15 += einsum("ij,ka->jika", delta_oo, x13) @@ -1259,7 +1260,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x13 x39 += einsum("ia,jb->ijab", t1, x10) del x10 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("w,wia->ia", ls1, u11) x24 += einsum("ia->ia", x22) x55 -= einsum("ia->ia", x22) @@ -1274,22 +1275,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ij,ka->ajki", delta_oo, x24) rdm2_f_vooo -= einsum("ij,ka->ajik", delta_oo, x24) del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_ovov -= einsum("ijab->ibja", x26) rdm2_f_ovvo += einsum("ijab->ibaj", x26) rdm2_f_voov += einsum("ijab->bija", x26) rdm2_f_vovo -= einsum("ijab->biaj", x26) del x26 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 -= einsum("abij,kjca->ikbc", l2, t2) - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ijab,jkbc->ikac", t2, x27) x43 += einsum("ijab->ijab", x42) del x42 - x63 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x63 += einsum("ia,ijbc->jbac", t1, x27) - x65 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x65 -= einsum("iabc->iabc", x63) del x63 rdm2_f_ovov -= einsum("ijab->ibja", x27) @@ -1297,20 +1298,20 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ijab->bija", x27) rdm2_f_vovo -= einsum("ijab->biaj", x27) del x27 - x29 = np.zeros((nvir, nvir), dtype=np.float64) + x29 = np.zeros((nvir, nvir), dtype=types[float]) x29 += einsum("ai,ib->ab", l1, t1) - x32 = np.zeros((nvir, nvir), dtype=np.float64) + x32 = np.zeros((nvir, nvir), dtype=types[float]) x32 += einsum("ab->ab", x29) - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum("ab->ab", x29) * 2 - x64 = np.zeros((nvir, nvir), dtype=np.float64) + x64 = np.zeros((nvir, nvir), dtype=types[float]) x64 += einsum("ab->ab", x29) del x29 - x30 = np.zeros((nvir, nvir), dtype=np.float64) + x30 = np.zeros((nvir, nvir), dtype=types[float]) x30 += einsum("wai,wib->ab", lu11, u11) x32 += einsum("ab->ab", x30) x33 += einsum("ab->ab", x30) * 2 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum("ab,ijca->ijcb", x30, t2) x43 -= einsum("ijab->ijab", x41) del x41 @@ -1321,7 +1322,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x30 x65 += einsum("ia,bc->ibac", t1, x64) del x64 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 -= einsum("abij,ijca->bc", l2, t2) x32 += einsum("ab->ab", x31) * 0.5 rdm2_f_ovov += einsum("ij,ab->jbia", delta_oo, x32) @@ -1331,7 +1332,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovvo += einsum("ij,ab->jbai", delta_oo, x33) * -0.5 rdm2_f_vovo += einsum("ij,ab->bjai", delta_oo, x33) * 0.5 del x33 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("ab,ijca->ijcb", x31, t2) rdm2_f_vvoo += einsum("ijab->abji", x49) * 0.5 rdm2_f_vvoo += einsum("ijab->baji", x49) * -0.5 @@ -1341,11 +1342,11 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("ia,bc->acbi", t1, x31) * -0.5 rdm2_f_vvvo += einsum("ia,bc->cabi", t1, x31) * 0.5 del x31 - x35 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x35 += einsum("wai,jiba->wjb", lu11, t2) x37 += einsum("wia->wia", x35) del x35 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("wia,wjb->jiba", u11, x37) del x37 x39 += einsum("ijab->ijab", x38) @@ -1355,9 +1356,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo -= einsum("ijab->abji", x39) rdm2_f_vvoo += einsum("ijab->baji", x39) del x39 - x47 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x47 += einsum("wx,xia->wia", ls2, u11) - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("wia,wjb->jiba", u11, x47) del x47 rdm2_f_vvoo -= einsum("ijab->baij", x48) @@ -1367,23 +1368,23 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo += einsum("ia,jb->baij", t1, x55) rdm2_f_vvoo -= einsum("ia,jb->abij", t1, x55) del x55 - x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x57 += einsum("ia,bcji->jbca", t1, l2) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv -= einsum("iabc->icba", x57) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->ciba", x57) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("ia,ibcd->adcb", t1, x57) del x57 - x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x60 += einsum("ai,jibc->jabc", l1, t2) rdm2_f_vvov -= einsum("iabc->cbia", x60) rdm2_f_vvvo += einsum("iabc->cbai", x60) del x60 - x61 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x61 += einsum("ia,wbi->wba", t1, lu11) - x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x62 += einsum("wia,wbc->ibca", u11, x61) del x61 x65 -= einsum("iabc->iabc", x62) @@ -1399,7 +1400,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kjia", delta_oo, l1) rdm2_f_oovo -= einsum("ij,ak->jkai", delta_oo, l1) rdm2_f_oovo += einsum("ij,ak->kjai", delta_oo, l1) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum("abij->jiba", l2) rdm2_f_ovov -= einsum("ai,jb->ibja", l1, t1) rdm2_f_ovvo += einsum("ai,jb->ibaj", l1, t1) @@ -1424,9 +1425,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("w,xw->x", ls1, s2) dm_b_des += einsum("ai,wia->w", l1, u11) dm_b_des += einsum("w->w", s1) @@ -1445,7 +1446,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("wx,yx->wy", ls2, s2) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wai,xia->wx", lu11, u11) @@ -1465,62 +1466,62 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("ia,waj->wji", t1, lu11) - x21 = np.zeros((nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nvir), dtype=types[float]) x21 += einsum("wia,wij->ja", u11, x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x0) del x0 - x1 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x1 += einsum("ai,wja->wij", l1, u11) - x17 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x17 += einsum("wij->wij", x1) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x1) del x1 - x2 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x2 += einsum("wx,xai->wia", s2, lu11) - x4 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x4 += einsum("wia->wia", x2) - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x2) del x2 - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 -= einsum("wia,abji->wjb", u11, l2) x4 += einsum("wia->wia", x3) - x5 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x5 += einsum("ia,wja->wij", t1, x4) x17 += einsum("wij->wji", x5) - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x17) del x17 rdm_eb_des_oo -= einsum("wij->wij", x5) del x5 rdm_eb_des_ov += einsum("wia,ijab->wjb", x4, t2) - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("ia,wib->wba", t1, x4) del x4 rdm_eb_des_vo += einsum("wia->wai", x3) del x3 - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum("ai,ja->ij", l1, t1) - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum("ij->ij", x6) * 2 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ij->ij", x6) - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ij->ij", x6) * 1.9999999999999987 del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("wai,wja->ij", lu11, u11) x9 += einsum("ij->ij", x7) * 2 x16 += einsum("ij->ij", x7) x20 += einsum("ij->ij", x7) * 1.9999999999999987 del x7 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("abij,kjab->ik", l2, t2) x9 += einsum("ij->ij", x8) x16 += einsum("ij->ij", x8) * 0.5 @@ -1533,38 +1534,38 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x9 += einsum("ij->ji", delta_oo) * -2 rdm_eb_des_oo += einsum("w,ij->wji", s1, x9) * -0.5 del x9 - x10 = np.zeros((nbos), dtype=np.float64) + x10 = np.zeros((nbos), dtype=types[float]) x10 += einsum("w,xw->x", ls1, s2) - x12 = np.zeros((nbos), dtype=np.float64) + x12 = np.zeros((nbos), dtype=types[float]) x12 += einsum("w->w", x10) del x10 - x11 = np.zeros((nbos), dtype=np.float64) + x11 = np.zeros((nbos), dtype=types[float]) x11 += einsum("ai,wia->w", l1, u11) x12 += einsum("w->w", x11) del x11 rdm_eb_des_oo += einsum("w,ij->wji", x12, delta_oo) rdm_eb_des_ov += einsum("w,ia->wia", x12, t1) del x12 - x13 = np.zeros((nvir, nvir), dtype=np.float64) + x13 = np.zeros((nvir, nvir), dtype=types[float]) x13 += einsum("wai,wib->ab", lu11, u11) - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 += einsum("ab->ab", x13) * 2 - x22 = np.zeros((nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir), dtype=types[float]) x22 += einsum("ab->ab", x13) del x13 - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 -= einsum("abij,ijca->bc", l2, t2) x15 += einsum("ab->ab", x14) rdm_eb_des_ov += einsum("ab,wia->wib", x15, u11) * -0.5 del x15 x22 += einsum("ab->ab", x14) * 0.5 del x14 - x18 = np.zeros((nbos, nbos), dtype=np.float64) + x18 = np.zeros((nbos, nbos), dtype=types[float]) x18 += einsum("wx,yx->wy", ls2, s2) x18 += einsum("wai,xia->wx", lu11, u11) rdm_eb_des_ov += einsum("wx,wia->xia", x18, u11) del x18 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ia,bajk->jkib", t1, l2) x21 += einsum("ijab,ijkb->ka", t2, x19) * -0.5000000000000003 del x19 @@ -1580,9 +1581,9 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_ov += einsum("wx,xia->wia", ls2, u11) rdm_eb_cre_ov += einsum("wai,jiba->wjb", lu11, t2) rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) rdm_eb_des_ov += einsum("wia->wia", u11) rdm_eb_des_vo += einsum("w,ai->wai", s1, l1) diff --git a/ebcc/codegen/GCCSD_SD_1_2.py b/ebcc/codegen/GCCSD_SD_1_2.py index 8d0464ef..48424b22 100644 --- a/ebcc/codegen/GCCSD_SD_1_2.py +++ b/ebcc/codegen/GCCSD_SD_1_2.py @@ -2,16 +2,17 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, u12=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("ijab->jiba", t2) x0 += einsum("ia,jb->ijab", t1, t1) * 2 e_cc = 0 e_cc += einsum("ijab,ijab->", v.oovv, x0) * 0.25 del x0 - x1 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x1 += einsum("wia->wia", u11) x1 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x1) @@ -31,123 +32,123 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2, U11 and U12 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jkba->ijkb", t1, v.oovv) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ikja", x0) * -1 - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum("ijab,kjlb->kila", t2, x0) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 -= einsum("ijka->ikja", x40) del x40 - x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x65 += einsum("ia,jkla->jilk", t1, x0) - x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x66 += einsum("ijkl->klji", x65) * -2.0000000000000013 - x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x67 += einsum("ijkl->klji", x65) * -1 del x65 - x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x110 += einsum("ijka->kjia", x0) del x0 x1 += einsum("ijka->kjia", v.ooov) - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kija->kb", t2, x1) * -0.5 del x1 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("w,wia->ia", s1, g.bov) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum("ia->ia", x2) - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia->ia", x2) - x81 = np.zeros((nocc, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nvir), dtype=types[float]) x81 += einsum("ia->ia", x2) del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("ia,jiba->jb", t1, v.oovv) x4 += einsum("ia->ia", x3) x11 += einsum("ia->ia", x3) - x77 = np.zeros((nvir, nvir), dtype=np.float64) + x77 = np.zeros((nvir, nvir), dtype=types[float]) x77 += einsum("ia,ib->ab", t1, x3) * 2 del x3 x4 += einsum("ia->ia", f.ov) - x24 = np.zeros((nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc), dtype=types[float]) x24 += einsum("ia,ja->ij", t1, x4) - x25 = np.zeros((nocc, nocc), dtype=np.float64) + x25 = np.zeros((nocc, nocc), dtype=types[float]) x25 += einsum("ij->ij", x24) del x24 - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum("ia,jkab->jkib", x4, t2) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum("ijka->kjia", x48) del x48 - x91 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x91 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x91 += einsum("ia,wja->wji", x4, u11) - x94 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x94 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x94 += einsum("wij->wji", x91) del x91 - x111 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x111 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x111 += einsum("ia,wxja->xwij", x4, u12) t1new += einsum("ia,ijab->jb", x4, t2) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x4, u11) - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("ia,wxia->xw", x4, u12) del x4 - x5 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x5 += einsum("ia,wja->wji", t1, g.bov) - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("wij->wij", x5) del x5 x6 += einsum("wij->wij", g.boo) - x35 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x35 += einsum("ia,wij->wja", t1, x6) - x36 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x36 -= einsum("wia->wia", x35) del x35 t1new -= einsum("wia,wij->ja", u11, x6) - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new -= einsum("wij,wxia->xja", x6, u12) del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("w,wij->ij", s1, g.boo) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x7) x25 += einsum("ij->ji", x7) - x83 = np.zeros((nocc, nocc), dtype=np.float64) + x83 = np.zeros((nocc, nocc), dtype=types[float]) x83 += einsum("ij->ij", x7) * 2 del x7 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("wia,wja->ij", g.bov, u11) x13 += einsum("ij->ij", x8) - x27 = np.zeros((nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc), dtype=types[float]) x27 += einsum("ij->ij", x8) x83 += einsum("ij->ij", x8) * 2 del x8 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 -= einsum("ia,ijka->jk", t1, v.ooov) x13 += einsum("ij->ij", x9) x27 += einsum("ij->ij", x9) - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("ij,ikab->kjab", x27, t2) del x27 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 -= einsum("ijab->ijba", x28) del x28 x83 += einsum("ij->ij", x9) * 2 del x9 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 -= einsum("ijab,jkab->ik", t2, v.oovv) x13 += einsum("ij->ji", x10) * 0.5 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ij,kjab->kiab", x10, t2) - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum("ijab->ijba", x61) * -0.5 del x61 x83 += einsum("ij->ji", x10) del x10 x11 += einsum("ia->ia", f.ov) - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("ia,ja->ij", t1, x11) x13 += einsum("ij->ji", x12) del x12 @@ -155,26 +156,26 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x11 x13 += einsum("ij->ij", f.oo) t1new += einsum("ia,ij->ja", t1, x13) * -1 - u12new = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + u12new = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) u12new += einsum("ij,wxia->xwja", x13, u12) * -1 del x13 - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 += einsum("w,wab->ab", s1, g.bvv) - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 += einsum("ab->ab", x14) - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ab,ijcb->ijac", x14, t2) - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("ijab->ijab", x44) del x44 x77 += einsum("ab->ab", x14) * -2 - x109 = np.zeros((nvir, nvir), dtype=np.float64) + x109 = np.zeros((nvir, nvir), dtype=types[float]) x109 += einsum("ab->ab", x14) * -2 del x14 - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 -= einsum("ia,ibac->bc", t1, v.ovvv) x16 -= einsum("ab->ab", x15) - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 += einsum("ab->ab", x15) x77 += einsum("ab->ab", x15) * 2 x109 += einsum("ab->ab", x15) * 2 @@ -182,9 +183,9 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x16 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x16) del x16 - x17 = np.zeros((nbos), dtype=np.float64) + x17 = np.zeros((nbos), dtype=types[float]) x17 += einsum("ia,wia->w", t1, g.bov) - x18 = np.zeros((nbos), dtype=np.float64) + x18 = np.zeros((nbos), dtype=types[float]) x18 += einsum("w->w", x17) del x17 x18 += einsum("w->w", G) @@ -192,25 +193,25 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb s1new += einsum("w,wx->x", x18, s2) u11new += einsum("w,wxia->xia", x18, u12) del x18 - x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x19 += einsum("ia,bcda->ibcd", t1, v.vvvv) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new -= einsum("ia,jbca->ijcb", t1, x19) del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum("ia,bcja->ijbc", t1, v.vvov) x29 += einsum("ijab->ijba", x20) del x20 - x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x21 += einsum("ia,jkla->ijkl", t1, v.ooov) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum("ia,jkil->jkla", t1, x21) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 -= einsum("ia,jikb->jkba", t1, x22) del x22 x29 += einsum("ijab->ijba", x23) del x23 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ijab,kijl->klab", t2, x21) del x21 x62 += einsum("ijab->ijba", x60) * -0.5 @@ -219,7 +220,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->jiab", x62) del x62 x25 += einsum("ij->ji", f.oo) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum("ij,jkab->kiab", x25, t2) del x25 x29 += einsum("ijab->jiba", x26) @@ -227,52 +228,52 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->ijab", x29) t2new -= einsum("ijab->jiab", x29) del x29 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum("ijab,jckb->ikac", t2, v.ovov) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 -= einsum("ijab->ijab", x30) del x30 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 -= einsum("ijab,kjcb->kiac", t2, x31) x43 += einsum("ijab->ijab", x32) del x32 - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 -= einsum("ia,jkba->jikb", t1, x31) x49 += einsum("ijka->kjia", x47) del x47 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ia,ijkb->jkab", t1, x49) del x49 x54 += einsum("ijab->jiab", x50) del x50 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 -= einsum("ijab->jiab", x31) del x31 - x33 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x33 += einsum("ia,wba->wib", t1, g.bvv) x36 += einsum("wia->wia", x33) del x33 - x34 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x34 += einsum("wia,jiba->wjb", g.bov, t2) x36 += einsum("wia->wia", x34) del x34 x36 += einsum("wai->wia", g.bvo) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("wia,wjb->ijab", u11, x36) del x36 x43 += einsum("ijab->jiba", x37) del x37 - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum("ia,jbka->ijkb", t1, v.ovov) x41 += einsum("ijka->ijka", x38) del x38 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 -= einsum("ijab,jklb->ikla", t2, v.ooov) x41 += einsum("ijka->ijka", x39) del x39 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ia,jikb->jkab", t1, x41) del x41 x43 += einsum("ijab->ijab", x42) @@ -282,17 +283,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->jiab", x43) t2new += einsum("ijab->jiba", x43) del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ijab,jkbc->ikac", t2, v.oovv) - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum("ijab,kjcb->kica", t2, x45) del x45 x54 -= einsum("ijab->ijab", x46) del x46 - x51 = np.zeros((nvir, nvir), dtype=np.float64) + x51 = np.zeros((nvir, nvir), dtype=types[float]) x51 += einsum("wia,wib->ab", g.bov, u11) x52 += einsum("ab->ba", x51) - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum("ab,ijbc->ijca", x52, t2) del x52 x54 += einsum("ijab->jiab", x53) @@ -303,17 +304,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x77 += einsum("ab->ba", x51) * 2 x109 += einsum("ab->ba", x51) * 2 del x51 - x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x55 += einsum("ijab,kcab->ijkc", t2, v.ovvv) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ia,jkib->jkab", t1, x55) del x55 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ijab->ijab", x56) * 0.5 del x56 - x57 = np.zeros((nvir, nvir), dtype=np.float64) + x57 = np.zeros((nvir, nvir), dtype=types[float]) x57 -= einsum("ijab,ijbc->ac", t2, v.oovv) - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum("ab,ijcb->ijca", x57, t2) x59 += einsum("ijab->ijab", x58) * 0.5 del x58 @@ -323,12 +324,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x77 += einsum("ab->ab", x57) x109 += einsum("ab->ab", x57) del x57 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum("ab,ijcb->ijac", f.vv, t2) t2new += einsum("ijab->jiab", x63) t2new -= einsum("ijab->jiba", x63) del x63 - x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x64 += einsum("ijab,klab->ijkl", t2, v.oovv) x66 += einsum("ijkl->lkji", x64) x67 += einsum("ijkl->lkji", x64) * 0.5000000000000003 @@ -337,45 +338,45 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->lkba", t2, x66) * 0.25 del x66 x67 += einsum("ijkl->jilk", v.oooo) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum("ia,ijkl->lkja", t1, x67) del x67 x68 += einsum("iajk->kjia", v.ovoo) t2new += einsum("ia,jkib->jkab", t1, x68) del x68 - x69 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x69 += einsum("wia,ijab->wjb", u11, v.oovv) - x76 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x76 += einsum("wia->wia", x69) - x97 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x97 += einsum("ia,wib->wab", t1, x69) - x98 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x98 += einsum("wab->wba", x97) del x97 - x102 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x102 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x102 += einsum("ia,wja->wij", t1, x69) - x103 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x103 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x103 += einsum("wij->wji", x102) del x102 s2new += einsum("wia,xia->wx", u11, x69) del x69 - x70 = np.zeros((nbos, nbos), dtype=np.float64) + x70 = np.zeros((nbos, nbos), dtype=types[float]) x70 += einsum("wia,xia->wx", gc.bov, u11) - x74 = np.zeros((nbos, nbos), dtype=np.float64) + x74 = np.zeros((nbos, nbos), dtype=types[float]) x74 += einsum("wx->wx", x70) del x70 - x71 = np.zeros((nbos, nbos), dtype=np.float64) + x71 = np.zeros((nbos, nbos), dtype=types[float]) x71 += einsum("wia,xia->wx", g.bov, u11) - x72 = np.zeros((nbos, nbos), dtype=np.float64) + x72 = np.zeros((nbos, nbos), dtype=types[float]) x72 += einsum("wx->xw", x71) - x90 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x90 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x90 += einsum("wx,ywia->xyia", x71, u12) del x71 - x107 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x107 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x107 -= einsum("wxia->wxia", x90) del x90 x72 += einsum("wx->wx", w) - x73 = np.zeros((nbos, nbos), dtype=np.float64) + x73 = np.zeros((nbos, nbos), dtype=types[float]) x73 += einsum("wx,yw->xy", s2, x72) x74 += einsum("wx->wx", x73) del x73 @@ -384,36 +385,36 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x74 u11new += einsum("wx,xia->wia", x72, u11) del x72 - x75 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x75 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x75 += einsum("wx,xia->wia", s2, g.bov) x76 += einsum("wia->wia", x75) - x92 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x92 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x92 += einsum("wia->wia", x75) del x75 x76 += einsum("wia->wia", gc.bov) - x82 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x82 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x82 += einsum("ia,wja->wji", t1, x76) u11new += einsum("wia,ijab->wjb", x76, t2) del x76 x77 += einsum("ab->ab", f.vv) * -2 u11new += einsum("ab,wib->wia", x77, u11) * -0.5 del x77 - x78 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x78 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x78 += einsum("wx,xij->wij", s2, g.boo) x82 += einsum("wij->wij", x78) x94 += einsum("wij->wij", x78) del x78 - x79 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x79 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x79 += einsum("wia,xwja->xij", g.bov, u12) x82 += einsum("wij->wij", x79) x103 += einsum("wij->wij", x79) del x79 - x80 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x80 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x80 -= einsum("wia,ijka->wjk", u11, v.ooov) x82 += einsum("wij->wij", x80) x103 += einsum("wij->wij", x80) del x80 - x104 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x104 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x104 += einsum("wia,xij->wxja", u11, x103) del x103 x107 += einsum("wxia->wxia", x104) @@ -427,14 +428,14 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x83 += einsum("ij->ij", f.oo) * 2 u11new += einsum("ij,wia->wja", x83, u11) * -0.5 del x83 - x84 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x84 += einsum("wx,xab->wab", s2, g.bvv) - x86 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x86 += einsum("wab->wab", x84) - x100 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x100 += einsum("wab->wab", x84) del x84 - x85 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x85 -= einsum("wia,ibac->wbc", u11, v.ovvv) x86 -= einsum("wab->wab", x85) x98 += einsum("wab->wba", x85) @@ -442,48 +443,48 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x86 += einsum("wab->wab", gc.bvv) u11new += einsum("ia,wba->wib", t1, x86) del x86 - x87 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x87 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x87 += einsum("wxia,ijab->wxjb", u12, v.oovv) u12new += einsum("ijab,wxjb->xwia", t2, x87) del x87 - x88 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x88 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x88 += einsum("wia,xyia->wxy", g.bov, u12) u12new += einsum("wia,wxy->yxia", u11, x88) del x88 - x89 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x89 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x89 += einsum("wx,yxia->ywia", w, u12) x107 -= einsum("wxia->wxia", x89) del x89 x92 += einsum("wia->wia", gc.bov) - x93 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x93 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x93 += einsum("ia,wja->wij", t1, x92) x94 += einsum("wij->wji", x93) del x93 - x105 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x105 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x105 += einsum("wia,xja->wxij", u11, x92) del x92 - x106 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x106 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x106 += einsum("ia,wxji->xwja", t1, x105) del x105 x107 += einsum("wxia->wxia", x106) del x106 x94 += einsum("wij->wij", gc.boo) - x95 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x95 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x95 += einsum("wia,xij->wxja", u11, x94) del x94 x107 += einsum("wxia->xwia", x95) del x95 - x96 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x96 += einsum("wia,xwib->xab", g.bov, u12) x98 += einsum("wab->wab", x96) del x96 - x99 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x99 += einsum("wia,xab->wxib", u11, x98) del x98 x107 += einsum("wxia->wxia", x99) del x99 x100 += einsum("wab->wab", gc.bvv) - x101 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x101 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x101 += einsum("wia,xba->wxib", u11, x100) del x100 x107 -= einsum("wxia->xwia", x101) @@ -531,119 +532,119 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1, LS2, LU11 and LU12 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x15 += einsum("ijkl->jilk", x0) * -1 - x134 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x134 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x134 += einsum("ijkl->jilk", x0) * -0.5 - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum("ijka,lkij->al", v.ooov, x0) * -0.25 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) x15 += einsum("ijkl->ijlk", x2) * 2.0000000000000013 - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum("ia,ijkl->jlka", t1, x15) * -0.5 del x15 x134 += einsum("ijkl->ijlk", x2) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("ijab,klij->balk", v.oovv, x134) * -0.5 del x134 l1new += einsum("ijka,lkji->al", v.ooov, x2) * 0.5 del x2 x16 += einsum("ijab,kjlb->klia", t2, x1) * 2 - x47 = np.zeros((nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nvir), dtype=types[float]) x47 += einsum("ijab,ijka->kb", t2, x1) - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ia->ia", x47) * 0.5 - x149 = np.zeros((nocc, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nvir), dtype=types[float]) x149 += einsum("ia->ia", x47) del x47 l2new += einsum("iabc,jkia->cbkj", v.ovvv, x1) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum("ia,jkba->ijkb", t1, v.oovv) - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ijka->ikja", x3) * -1 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum("ijka->kjia", x3) * 0.5000000000000003 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ijka->kjia", x3) - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 -= einsum("ai,ijkb->kjab", l1, x3) - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum("ijab->ijab", x89) del x89 - x104 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x104 -= einsum("ijka->ikja", x3) - x132 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x132 += einsum("ijka->kjia", x3) * 0.5 x4 += einsum("ijka->kjia", v.ooov) - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum("ijab,kila->lkjb", t2, x4) - x42 = np.zeros((nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nvir), dtype=types[float]) x42 += einsum("ijab,kija->kb", t2, x4) - x142 = np.zeros((nocc, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nvir), dtype=types[float]) x142 += einsum("ijab,kija->kb", t2, x4) * 0.5 del x4 - x148 = np.zeros((nocc, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nvir), dtype=types[float]) x148 += einsum("ia->ia", x142) del x142 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.bov) - x7 = np.zeros((nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nvir), dtype=types[float]) x7 += einsum("ia->ia", x5) - x64 = np.zeros((nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nvir), dtype=types[float]) x64 += einsum("ia->ia", x5) - x96 = np.zeros((nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir), dtype=types[float]) x96 += einsum("ia->ia", x5) del x5 - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum("ia,jiba->jb", t1, v.oovv) x7 += einsum("ia->ia", x6) x64 += einsum("ia->ia", x6) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 -= einsum("ia,jkib->kjba", x6, x1) x98 -= einsum("ijab->ijab", x92) del x92 - x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x107 += einsum("ai,jb->ijab", l1, x6) - x114 = np.zeros((nocc, nocc), dtype=np.float64) + x114 = np.zeros((nocc, nocc), dtype=types[float]) x114 += einsum("ia,ja->ij", t1, x6) del x6 - x115 = np.zeros((nocc, nocc), dtype=np.float64) + x115 = np.zeros((nocc, nocc), dtype=types[float]) x115 += einsum("ij->ji", x114) del x114 x7 += einsum("ia->ia", f.ov) x13 += einsum("ia,jkab->ikjb", x7, t2) * -0.5 - x24 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x24 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x24 += einsum("ia,wxja->xwij", x7, u12) * 0.5 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum("ia,ja->ij", t1, x7) - x36 = np.zeros((nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc), dtype=types[float]) x36 += einsum("ij->ji", x35) del x35 x42 += einsum("ia,ijab->jb", x7, t2) * -2 - x74 = np.zeros((nbos, nbos), dtype=np.float64) + x74 = np.zeros((nbos, nbos), dtype=types[float]) x74 += einsum("ia,wxia->xw", x7, u12) - x137 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x137 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x137 += einsum("ia,wja->wij", x7, u11) - x143 = np.zeros((nocc, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nvir), dtype=types[float]) x143 += einsum("ia,ijab->jb", x7, t2) x148 += einsum("ia->ia", x143) * -1 del x143 - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("w,ia->wai", ls1, x7) * 2 - lu12new = np.zeros((nbos, nbos, nvir, nocc), dtype=np.float64) + lu12new = np.zeros((nbos, nbos, nvir, nocc), dtype=types[float]) lu12new += einsum("wx,ia->xwai", ls2, x7) * 2 del x7 - x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x8 += einsum("ijab,klab->ijkl", t2, v.oovv) - x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x10 += einsum("ijkl->lkji", x8) - x133 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x133 += einsum("ijkl->lkji", x8) del x8 x9 += einsum("ijka->jika", v.ooov) * -1 @@ -652,13 +653,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x10 += einsum("ijkl->jilk", v.oooo) * 2 x13 += einsum("ia,ijkl->jlka", t1, x10) * -0.25 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum("ijab->jiab", x11) * -0.5 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 -= einsum("ijab->jiab", x11) - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum("ijab->ijab", x11) del x11 x12 += einsum("iajb->ijab", v.ovov) @@ -668,20 +669,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x13 += einsum("ijab,kcab->kjic", t2, v.ovvv) * -0.25 l1new += einsum("abij,kija->bk", l2, x13) del x13 - x14 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x14 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x14 += einsum("ia,wxaj->wxji", t1, lu12) x16 += einsum("wxia,wxjk->jkia", u12, x14) * -1 - x46 = np.zeros((nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nvir), dtype=types[float]) x46 += einsum("wxia,wxij->ja", u12, x14) x56 += einsum("ia->ia", x46) * 0.5 x149 += einsum("ia->ia", x46) del x46 - x155 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x155 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x155 += einsum("wia,xwij->xja", u11, x14) - x156 = np.zeros((nbos, nbos), dtype=np.float64) + x156 = np.zeros((nbos, nbos), dtype=types[float]) x156 += einsum("wia,xia->wx", g.bov, x155) del x155 - x162 = np.zeros((nbos, nbos), dtype=np.float64) + x162 = np.zeros((nbos, nbos), dtype=types[float]) x162 -= einsum("wx->wx", x156) del x156 lu12new += einsum("ijka,wxkj->xwai", v.ooov, x14) @@ -690,12 +691,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x16 += einsum("ai,jkba->ikjb", l1, t2) * -1 l1new += einsum("ijab,kija->bk", v.oovv, x16) * -0.5 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum("wxai,wxjb->ijab", lu12, u12) x17 += einsum("abij,kicb->jkac", l2, t2) * -2 l1new += einsum("iabc,jiab->cj", v.ovvv, x17) * 0.5 del x17 - x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x18 += einsum("abic->ibac", v.vvov) * -1 x18 += einsum("ia,bcda->icbd", t1, v.vvvv) l1new += einsum("abij,iabc->cj", l2, x18) * 0.5 @@ -707,125 +708,125 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x20 += einsum("ijka->jika", v.ooov) * -1 x24 += einsum("wxia,ijka->xwjk", u12, x20) * -0.5 del x20 - x21 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x21 += einsum("wx,wia->xia", s2, g.bov) - x23 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x23 += einsum("wia->wia", x21) del x21 - x22 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x22 += einsum("wia,jiba->wjb", u11, v.oovv) x23 += einsum("wia->wia", x22) - x65 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x65 += einsum("wia->wia", x22) - x71 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x71 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x71 += einsum("wia->wia", x22) * 0.5 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum("wai,wjb->ijab", lu11, x22) x107 += einsum("ijab->ijab", x100) del x100 - x136 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x136 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x136 += einsum("wia->wia", x22) del x22 x23 += einsum("wia->wia", gc.bov) x24 += einsum("wia,xja->wxji", u11, x23) l1new += einsum("wxai,wxji->aj", lu12, x24) * -1 del x24 - x141 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x141 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x141 += einsum("wia,ijab->wjb", x23, t2) del x23 - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum("w,wai->ia", s1, g.bvo) x42 += einsum("ia->ia", x25) * -2 x148 += einsum("ia->ia", x25) * -1 del x25 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("wab,wib->ia", g.bvv, u11) x42 += einsum("ia->ia", x26) * -2 x148 += einsum("ia->ia", x26) * -1 del x26 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum("ia,ibja->jb", t1, v.ovov) x42 += einsum("ia->ia", x27) * 2 x148 += einsum("ia->ia", x27) del x27 - x28 = np.zeros((nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir), dtype=types[float]) x28 -= einsum("ijab,icab->jc", t2, v.ovvv) x42 += einsum("ia->ia", x28) x148 += einsum("ia->ia", x28) * 0.5 del x28 - x29 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x29 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x29 += einsum("ia,wja->wji", t1, g.bov) - x30 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x30 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x30 += einsum("wij->wij", x29) - x66 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x66 += einsum("wij->wij", x29) del x29 x30 += einsum("wij->wij", g.boo) x42 += einsum("wia,wij->ja", u11, x30) * 2 x137 += einsum("wx,wij->xij", s2, x30) x141 += einsum("wij,wxia->xja", x30, u12) * -1 - x144 = np.zeros((nocc, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nvir), dtype=types[float]) x144 += einsum("wia,wij->ja", u11, x30) del x30 x148 += einsum("ia->ia", x144) del x144 - x31 = np.zeros((nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc), dtype=types[float]) x31 += einsum("w,wij->ij", s1, g.boo) x36 += einsum("ij->ij", x31) - x110 = np.zeros((nocc, nocc), dtype=np.float64) + x110 = np.zeros((nocc, nocc), dtype=types[float]) x110 += einsum("ij->ij", x31) del x31 - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 += einsum("wia,wja->ij", g.bov, u11) x36 += einsum("ij->ij", x32) x110 += einsum("ij->ij", x32) del x32 - x33 = np.zeros((nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc), dtype=types[float]) x33 += einsum("ia,jika->jk", t1, v.ooov) x36 += einsum("ij->ij", x33) x115 += einsum("ij->ij", x33) del x33 - x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x116 += einsum("ij,abjk->kiab", x115, l2) del x115 - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 -= einsum("ijab->ijba", x116) del x116 - x34 = np.zeros((nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc), dtype=types[float]) x34 += einsum("ijab,ikab->jk", t2, v.oovv) x36 += einsum("ij->ji", x34) * 0.5 - x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x121 += einsum("ij,abki->kjab", x34, l2) del x34 - x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x124 += einsum("ijab->ijba", x121) * -0.5 del x121 x36 += einsum("ij->ij", f.oo) x42 += einsum("ia,ij->ja", t1, x36) * 2 x141 += einsum("ij,wia->wja", x36, u11) * -1 - x145 = np.zeros((nocc, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nvir), dtype=types[float]) x145 += einsum("ia,ij->ja", t1, x36) x148 += einsum("ia->ia", x145) del x145 l1new += einsum("ai,ji->aj", l1, x36) * -1 lu12new += einsum("ij,wxaj->xwai", x36, lu12) * -1 del x36 - x37 = np.zeros((nvir, nvir), dtype=np.float64) + x37 = np.zeros((nvir, nvir), dtype=types[float]) x37 += einsum("w,wab->ab", s1, g.bvv) - x39 = np.zeros((nvir, nvir), dtype=np.float64) + x39 = np.zeros((nvir, nvir), dtype=types[float]) x39 += einsum("ab->ab", x37) - x80 = np.zeros((nvir, nvir), dtype=np.float64) + x80 = np.zeros((nvir, nvir), dtype=types[float]) x80 += einsum("ab->ab", x37) - x94 = np.zeros((nvir, nvir), dtype=np.float64) + x94 = np.zeros((nvir, nvir), dtype=types[float]) x94 += einsum("ab->ab", x37) - x135 = np.zeros((nvir, nvir), dtype=np.float64) + x135 = np.zeros((nvir, nvir), dtype=types[float]) x135 += einsum("ab->ab", x37) * -1 del x37 - x38 = np.zeros((nvir, nvir), dtype=np.float64) + x38 = np.zeros((nvir, nvir), dtype=types[float]) x38 += einsum("ia,ibca->bc", t1, v.ovvv) x39 += einsum("ab->ab", x38) * -1 x80 -= einsum("ab->ab", x38) - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 -= einsum("ab,caij->jicb", x38, l2) x98 -= einsum("ijab->ijab", x91) del x91 @@ -833,22 +834,22 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x38 x39 += einsum("ab->ab", f.vv) x42 += einsum("ia,ba->ib", t1, x39) * -2 - x146 = np.zeros((nocc, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nvir), dtype=types[float]) x146 += einsum("ia,ba->ib", t1, x39) del x39 x148 += einsum("ia->ia", x146) * -1 del x146 - x40 = np.zeros((nbos), dtype=np.float64) + x40 = np.zeros((nbos), dtype=types[float]) x40 += einsum("ia,wia->w", t1, g.bov) - x41 = np.zeros((nbos), dtype=np.float64) + x41 = np.zeros((nbos), dtype=types[float]) x41 += einsum("w->w", x40) - x85 = np.zeros((nbos), dtype=np.float64) + x85 = np.zeros((nbos), dtype=types[float]) x85 += einsum("w->w", x40) del x40 x41 += einsum("w->w", G) x42 += einsum("w,wia->ia", x41, u11) * -2 x141 += einsum("w,wxia->xia", x41, u12) - x147 = np.zeros((nocc, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nvir), dtype=types[float]) x147 += einsum("w,wia->ia", x41, u11) del x41 x148 += einsum("ia->ia", x147) * -1 @@ -856,81 +857,81 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x42 += einsum("ai->ia", f.vo) * -2 l1new += einsum("ia,abij->bj", x42, l2) * -0.5 del x42 - x43 = np.zeros((nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nvir), dtype=types[float]) x43 += einsum("w,wia->ia", ls1, u11) x56 += einsum("ia->ia", x43) * -1 x149 += einsum("ia->ia", x43) * -2 del x43 - x44 = np.zeros((nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nvir), dtype=types[float]) x44 += einsum("wx,wxia->ia", ls2, u12) x56 += einsum("ia->ia", x44) * -0.5 x149 += einsum("ia->ia", x44) * -1 del x44 - x45 = np.zeros((nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir), dtype=types[float]) x45 += einsum("ai,jiba->jb", l1, t2) x56 += einsum("ia->ia", x45) * -1 x149 += einsum("ia->ia", x45) * -2 del x45 - x48 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x48 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x48 += einsum("ia,waj->wji", t1, lu11) - x50 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x50 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x50 += einsum("wij->wij", x48) - x69 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x69 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x69 += einsum("wij->wij", x48) - x49 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x49 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x49 += einsum("wia,wxaj->xji", u11, lu12) x50 += einsum("wij->wij", x49) x56 += einsum("wia,wij->ja", u11, x50) x149 += einsum("wia,wij->ja", u11, x50) * 2 del x50 x69 += einsum("wij->wij", x49) - x70 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x70 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x70 += einsum("wx,wij->xij", s2, x69) - x170 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x170 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x170 += einsum("wia,xji->wxja", g.bov, x69) - x171 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x171 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x171 += einsum("wxia->wxia", x170) del x170 - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum("ai,ja->ij", l1, t1) - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum("ij->ij", x51) * 2 - x79 = np.zeros((nocc, nocc), dtype=np.float64) + x79 = np.zeros((nocc, nocc), dtype=types[float]) x79 += einsum("ij->ij", x51) - x112 = np.zeros((nocc, nocc), dtype=np.float64) + x112 = np.zeros((nocc, nocc), dtype=types[float]) x112 += einsum("ij->ij", x51) del x51 - x52 = np.zeros((nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc), dtype=types[float]) x52 += einsum("wai,wja->ij", lu11, u11) x55 += einsum("ij->ij", x52) * 2 x79 += einsum("ij->ij", x52) x112 += einsum("ij->ij", x52) del x52 - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum("ij,jkab->kiab", x112, v.oovv) del x112 x117 += einsum("ijab->jiba", x113) del x113 - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum("wxai,wxja->ij", lu12, u12) x55 += einsum("ij->ij", x53) x79 += einsum("ij->ij", x53) * 0.5 - x122 = np.zeros((nocc, nocc), dtype=np.float64) + x122 = np.zeros((nocc, nocc), dtype=types[float]) x122 += einsum("ij->ij", x53) del x53 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum("abij,ikab->jk", l2, t2) x55 += einsum("ij->ij", x54) x56 += einsum("ia,ij->ja", t1, x55) * 0.5 x149 += einsum("ia,ij->ja", t1, x55) l1new += einsum("ij,jkia->ak", x55, v.ooov) * -0.5 - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new += einsum("ij,wji->w", x55, g.boo) * -0.5 del x55 x79 += einsum("ij->ij", x54) * 0.5 x122 += einsum("ij->ij", x54) del x54 - x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x123 += einsum("ij,jkab->kiab", x122, v.oovv) * 0.5 del x122 x124 += einsum("ijab->jiba", x123) * -1 @@ -941,61 +942,61 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x56 += einsum("ia->ia", t1) * -1 l1new += einsum("ia,ijab->bj", x56, v.oovv) * -1 del x56 - x57 = np.zeros((nvir, nvir), dtype=np.float64) + x57 = np.zeros((nvir, nvir), dtype=types[float]) x57 += einsum("ai,ib->ab", l1, t1) - x61 = np.zeros((nvir, nvir), dtype=np.float64) + x61 = np.zeros((nvir, nvir), dtype=types[float]) x61 += einsum("ab->ab", x57) ls1new += einsum("ab,wab->w", x57, g.bvv) del x57 - x58 = np.zeros((nvir, nvir), dtype=np.float64) + x58 = np.zeros((nvir, nvir), dtype=types[float]) x58 += einsum("wai,wib->ab", lu11, u11) x61 += einsum("ab->ab", x58) - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 -= einsum("ab,ijcb->jiac", x58, v.oovv) x98 += einsum("ijab->ijab", x90) del x90 - x150 = np.zeros((nvir, nvir), dtype=np.float64) + x150 = np.zeros((nvir, nvir), dtype=types[float]) x150 += einsum("ab->ab", x58) * 2 del x58 - x59 = np.zeros((nvir, nvir), dtype=np.float64) + x59 = np.zeros((nvir, nvir), dtype=types[float]) x59 += einsum("wxai,wxib->ab", lu12, u12) x61 += einsum("ab->ab", x59) * 0.5 - x127 = np.zeros((nvir, nvir), dtype=np.float64) + x127 = np.zeros((nvir, nvir), dtype=types[float]) x127 += einsum("ab->ab", x59) x150 += einsum("ab->ab", x59) del x59 - x60 = np.zeros((nvir, nvir), dtype=np.float64) + x60 = np.zeros((nvir, nvir), dtype=types[float]) x60 -= einsum("abij,ijbc->ac", l2, t2) x61 += einsum("ab->ab", x60) * 0.5 l1new += einsum("ab,iabc->ci", x61, v.ovvv) * -1 del x61 x127 += einsum("ab->ab", x60) - x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x128 += einsum("ab,ijbc->ijca", x127, v.oovv) * 0.5 del x127 - x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x129 += einsum("ijab->jiba", x128) * -1 del x128 x150 += einsum("ab->ab", x60) del x60 ls1new += einsum("ab,wab->w", x150, g.bvv) * 0.5 del x150 - x62 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x62 += einsum("wia,wxja->xij", g.bov, u12) - x67 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x67 += einsum("wij->wij", x62) x137 += einsum("wij->wij", x62) del x62 - x63 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x63 += einsum("wia,jika->wjk", u11, v.ooov) x67 += einsum("wij->wij", x63) x137 += einsum("wij->wij", x63) del x63 x64 += einsum("ia->ia", f.ov) x67 += einsum("ia,wja->wij", x64, u11) - x84 = np.zeros((nbos), dtype=np.float64) + x84 = np.zeros((nbos), dtype=types[float]) x84 += einsum("ia,wia->w", x64, u11) - x87 = np.zeros((nbos), dtype=np.float64) + x87 = np.zeros((nbos), dtype=types[float]) x87 += einsum("w->w", x84) del x84 l1new += einsum("ia,ji->aj", x64, x79) * -1 @@ -1010,27 +1011,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x69 x66 += einsum("wij->wij", g.boo) x67 += einsum("wx,wij->xij", s2, x66) - x160 = np.zeros((nbos, nbos), dtype=np.float64) + x160 = np.zeros((nbos, nbos), dtype=types[float]) x160 += einsum("wij,xji->wx", x48, x66) del x48 x162 -= einsum("wx->xw", x160) del x160 - x161 = np.zeros((nbos, nbos), dtype=np.float64) + x161 = np.zeros((nbos, nbos), dtype=types[float]) x161 += einsum("wij,xji->wx", x49, x66) del x49 x162 -= einsum("wx->xw", x161) del x161 - x169 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x169 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x169 += einsum("wai,xji->wxja", lu11, x66) x171 += einsum("wxia->xwia", x169) del x169 x67 += einsum("wij->wij", gc.boo) l1new -= einsum("wai,wji->aj", lu11, x67) del x67 - x68 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x68 += einsum("wia,baji->wjb", u11, l2) x70 += einsum("ia,wja->wji", t1, x68) - x76 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x76 += einsum("wia->wia", x68) l1new -= einsum("wij,wja->ai", x66, x68) del x66 @@ -1042,15 +1043,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x71 += einsum("wia->wia", gc.bov) x74 += einsum("wia,xia->xw", u11, x71) * 2 del x71 - x72 = np.zeros((nbos, nbos), dtype=np.float64) + x72 = np.zeros((nbos, nbos), dtype=types[float]) x72 += einsum("wia,xia->wx", g.bov, u11) - x73 = np.zeros((nbos, nbos), dtype=np.float64) + x73 = np.zeros((nbos, nbos), dtype=types[float]) x73 += einsum("wx->xw", x72) - x152 = np.zeros((nbos, nbos), dtype=np.float64) + x152 = np.zeros((nbos, nbos), dtype=types[float]) x152 += einsum("wx,yx->yw", ls2, x72) x162 += einsum("wx->wx", x152) del x152 - x168 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x168 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x168 += einsum("wx,xyai->wyia", x72, lu12) del x72 x171 -= einsum("wxia->wxia", x168) @@ -1061,21 +1062,21 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x74 x141 += einsum("wx,xia->wia", x73, u11) del x73 - x75 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x75 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x75 += einsum("wx,xai->wia", s2, lu11) x76 += einsum("wia->wia", x75) del x75 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum("wia,wjb->ijab", g.bov, x76) x107 += einsum("ijab->ijab", x106) del x106 l1new += einsum("wab,wia->bi", g.bvv, x76) del x76 - x77 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x77 += einsum("wia,ibca->wbc", u11, v.ovvv) - x78 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x78 -= einsum("wab->wab", x77) - x138 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x138 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x138 += einsum("wab->wab", x77) * -1 del x77 x78 += einsum("wab->wab", gc.bvv) @@ -1084,20 +1085,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x80 += einsum("ab->ab", f.vv) l1new += einsum("ai,ab->bi", l1, x80) del x80 - x81 = np.zeros((nbos), dtype=np.float64) + x81 = np.zeros((nbos), dtype=types[float]) x81 += einsum("w,xw->x", s1, w) x87 += einsum("w->w", x81) del x81 - x82 = np.zeros((nbos), dtype=np.float64) + x82 = np.zeros((nbos), dtype=types[float]) x82 += einsum("ia,wia->w", t1, gc.bov) x87 += einsum("w->w", x82) del x82 - x83 = np.zeros((nbos), dtype=np.float64) + x83 = np.zeros((nbos), dtype=types[float]) x83 += einsum("wia,wxia->x", g.bov, u12) x87 += einsum("w->w", x83) del x83 x85 += einsum("w->w", G) - x86 = np.zeros((nbos), dtype=np.float64) + x86 = np.zeros((nbos), dtype=types[float]) x86 += einsum("w,wx->x", x85, s2) x87 += einsum("w->w", x86) del x86 @@ -1107,17 +1108,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("w,wai->ai", x87, lu11) ls1new += einsum("w,wx->x", x87, ls2) del x87 - x88 = np.zeros((nbos), dtype=np.float64) + x88 = np.zeros((nbos), dtype=types[float]) x88 += einsum("w->w", s1) x88 += einsum("w,xw->x", ls1, s2) x88 += einsum("ai,wia->w", l1, u11) x88 += einsum("wai,wxia->x", lu11, u12) l1new += einsum("w,wia->ai", x88, g.bov) del x88 - x93 = np.zeros((nvir, nvir), dtype=np.float64) + x93 = np.zeros((nvir, nvir), dtype=types[float]) x93 += einsum("wia,wib->ab", g.bov, u11) x94 -= einsum("ab->ba", x93) - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum("ab,acij->ijcb", x94, l2) del x94 x98 -= einsum("ijab->jiba", x95) @@ -1125,7 +1126,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x135 += einsum("ab->ba", x93) del x93 x96 += einsum("ia->ia", f.ov) - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum("ia,jkib->jkba", x96, x1) x98 -= einsum("ijab->jiba", x97) del x97 @@ -1133,27 +1134,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->baij", x98) del x98 x107 += einsum("ai,jb->jiba", l1, x96) - x109 = np.zeros((nocc, nocc), dtype=np.float64) + x109 = np.zeros((nocc, nocc), dtype=types[float]) x109 += einsum("ia,ja->ij", t1, x96) del x96 x110 += einsum("ij->ji", x109) del x109 - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum("wia,wbj->ijab", gc.bov, lu11) x107 += einsum("ijab->ijab", x99) del x99 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 -= einsum("ijab,ikca->jkbc", t2, v.oovv) x102 += einsum("ijab->ijab", x101) del x101 x102 -= einsum("iajb->jiab", v.ovov) - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum("abij,ikac->jkbc", l2, x102) del x102 x107 += einsum("ijab->ijab", x103) del x103 x104 += einsum("ijka->kjia", v.ooov) - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum("ijka,iklb->jlab", x1, x104) del x104 del x1 @@ -1164,12 +1165,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->abji", x107) l2new += einsum("ijab->baji", x107) del x107 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum("ai,jabc->ijbc", l1, v.ovvv) x117 += einsum("ijab->ijba", x108) del x108 x110 += einsum("ij->ij", f.oo) - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 += einsum("ij,abjk->kiab", x110, l2) del x110 x117 += einsum("ijab->jiba", x111) @@ -1177,21 +1178,21 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x117) l2new -= einsum("ijab->abji", x117) del x117 - x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum("ai,jkib->jkab", l1, v.ooov) - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 -= einsum("ijab->jiab", x118) del x118 - x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum("ab,caij->ijbc", f.vv, l2) x120 -= einsum("ijab->jiab", x119) del x119 l2new -= einsum("ijab->abij", x120) l2new += einsum("ijab->baij", x120) del x120 - x125 = np.zeros((nvir, nvir), dtype=np.float64) + x125 = np.zeros((nvir, nvir), dtype=types[float]) x125 += einsum("ijab,ijac->bc", t2, v.oovv) - x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x126 -= einsum("ab,caij->jicb", x125, l2) x129 += einsum("ijab->ijab", x126) * 0.5 del x126 @@ -1200,9 +1201,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x129 x135 += einsum("ab->ab", x125) * 0.5 del x125 - x130 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x130 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x130 += einsum("wxia,ijab->wxjb", u12, v.oovv) - x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x131 += einsum("wxai,wxjb->ijab", lu12, x130) del x130 l2new += einsum("ijab->abij", x131) * 0.5 @@ -1229,11 +1230,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x138 += einsum("wab->wab", gc.bvv) x141 += einsum("ia,wba->wib", t1, x138) del x138 - x139 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x139 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x139 += einsum("ia,wba->wib", t1, g.bvv) - x140 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x140 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x140 += einsum("wia->wia", x139) - x158 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x158 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x158 += einsum("wia->wia", x139) del x139 x140 += einsum("wai->wia", g.bvo) @@ -1246,33 +1247,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x141 x148 += einsum("ai->ia", f.vo) * -1 ls1new += einsum("ia,wai->w", x148, lu11) * -1 - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("ia,wxai->xw", x148, lu12) * -1 del x148 x149 += einsum("ia->ia", t1) * -2 ls1new += einsum("ia,wia->w", x149, g.bov) * -0.5 del x149 - x151 = np.zeros((nbos, nbos), dtype=np.float64) + x151 = np.zeros((nbos, nbos), dtype=types[float]) x151 += einsum("wx,xy->wy", ls2, w) x162 += einsum("wx->wx", x151) del x151 - x153 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x153 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x153 += einsum("wia,wxbi->xba", u11, lu12) - x154 = np.zeros((nbos, nbos), dtype=np.float64) + x154 = np.zeros((nbos, nbos), dtype=types[float]) x154 += einsum("wab,xab->wx", g.bvv, x153) x162 += einsum("wx->wx", x154) del x154 - x167 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x167 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x167 += einsum("wia,xba->wxib", g.bov, x153) del x153 x171 += einsum("wxia->wxia", x167) del x167 - x157 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x157 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x157 += einsum("wia,jiba->wjb", g.bov, t2) x158 += einsum("wia->wia", x157) del x157 x158 += einsum("wai->wia", g.bvo) - x159 = np.zeros((nbos, nbos), dtype=np.float64) + x159 = np.zeros((nbos, nbos), dtype=types[float]) x159 += einsum("wai,xia->wx", lu11, x158) del x158 x162 += einsum("wx->xw", x159) @@ -1280,19 +1281,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls2new += einsum("wx->wx", x162) ls2new += einsum("wx->xw", x162) del x162 - x163 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x163 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x163 += einsum("wxai,ijab->wxjb", lu12, t2) lu12new += einsum("ijab,wxia->xwbj", v.oovv, x163) del x163 - x164 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x164 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x164 += einsum("wia,xyai->xyw", u11, lu12) lu12new += einsum("wia,xyw->yxai", g.bov, x164) del x164 - x165 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x165 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x165 += einsum("wx,wyai->yxia", w, lu12) x171 -= einsum("wxia->wxia", x165) del x165 - x166 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x166 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x166 += einsum("wab,xai->wxib", g.bvv, lu11) x171 -= einsum("wxia->wxia", x166) del x166 @@ -1335,52 +1336,52 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11, u11) - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("ij->ij", x0) * 2 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo -= einsum("ij->ij", x0) del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("ai,ja->ij", l1, t1) x7 += einsum("ij->ij", x1) * 2 rdm1_f_oo -= einsum("ij->ij", x1) del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("abij,kjab->ik", l2, t2) x7 += einsum("ij->ij", x2) rdm1_f_oo += einsum("ij->ij", x2) * -0.5 del x2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("wxai,wxja->ij", lu12, u12) x7 += einsum("ij->ij", x3) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum("ia,ij->aj", t1, x7) * -0.5 del x7 rdm1_f_oo += einsum("ij->ij", x3) * -0.5 del x3 - x4 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x4 += einsum("ia,wxaj->wxji", t1, lu12) rdm1_f_vo += einsum("wxia,wxij->aj", u12, x4) * -0.5 del x4 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ia,bajk->jkib", t1, l2) rdm1_f_vo += einsum("ijab,ijkb->ak", t2, x5) * 0.5 del x5 - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("ia,waj->wji", t1, lu11) x6 += einsum("wia,wxaj->xji", u11, lu12) rdm1_f_vo -= einsum("wia,wij->aj", u11, x6) del x6 rdm1_f_oo += einsum("ij->ji", delta_oo) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) rdm1_f_vo += einsum("ai,jiba->bj", l1, t2) rdm1_f_vo += einsum("ia->ai", t1) rdm1_f_vo += einsum("w,wia->ai", ls1, u11) rdm1_f_vo += einsum("wx,wxia->ai", ls2, u12) * 0.5 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("ai,ib->ba", l1, t1) rdm1_f_vv += einsum("wai,wib->ba", lu11, u11) rdm1_f_vv += einsum("abij,ijca->cb", l2, t2) * -0.5 @@ -1403,129 +1404,129 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x28 += einsum("ijkl->jilk", x0) * -1 - x77 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x77 += einsum("ijkl->jilk", x0) * -1 - x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x78 += einsum("ijkl->jilk", x0) * -1 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum("ijkl->jilk", x0) * 0.5 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) x28 += einsum("ijkl->ijlk", x2) * 2 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum("ia,ijkl->jkla", t1, x28) * 0.5 del x28 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum("ijka->iakj", x29) * -1 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ijka->aikj", x29) del x29 x77 += einsum("ijkl->ijlk", x2) * 2.0000000000000013 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum("ijab,ijkl->balk", t2, x77) * -0.25 del x77 x78 += einsum("ijkl->ijlk", x2) * 1.9999999999999987 - x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x79 += einsum("ia,ijkl->jlka", t1, x78) * -1 del x78 rdm2_f_vvoo += einsum("ia,ijkb->bakj", t1, x79) * 0.5000000000000003 del x79 rdm2_f_oooo -= einsum("ijkl->ijlk", x2) del x2 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 -= einsum("ijab,kjlb->klia", t2, x1) - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ijka->ijka", x13) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 -= einsum("ijka->ijka", x13) - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ia,ijkb->jkab", t1, x13) del x13 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 -= einsum("ijab->ijab", x60) del x60 - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 -= einsum("ijab,ijkb->ka", t2, x1) - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ia->ia", x24) - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia->ia", x24) del x24 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("ia,jikb->jkba", t1, x1) - x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x88 -= einsum("ia,ijbc->jbca", t1, x37) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->cbia", x88) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->cbai", x88) del x88 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum("ijab->ibja", x37) - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->ibaj", x37) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->bija", x37) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->biaj", x37) del x37 - x87 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x87 += einsum("ijab,ijkc->kcab", t2, x1) rdm2_f_vvov += einsum("iabc->bcia", x87) * 0.5 rdm2_f_vvvo += einsum("iabc->bcai", x87) * -0.5 del x87 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov -= einsum("ijka->jika", x1) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ijka->jiak", x1) del x1 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("wai,wja->ij", lu11, u11) - x15 = np.zeros((nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nvir), dtype=types[float]) x15 += einsum("ia,ij->ja", t1, x3) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x15) del x15 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum("ij->ij", x3) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ij,kiab->kjab", x3, t2) - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ijab->ijba", x75) del x75 - x81 = np.zeros((nocc, nocc), dtype=np.float64) + x81 = np.zeros((nocc, nocc), dtype=types[float]) x81 += einsum("ij->ij", x3) rdm2_f_oooo -= einsum("ij,kl->ikjl", delta_oo, x3) rdm2_f_oooo += einsum("ij,kl->iklj", delta_oo, x3) rdm2_f_oooo += einsum("ij,kl->kjil", delta_oo, x3) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x3) del x3 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum("wxai,wxja->ij", lu12, u12) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum("ij->ij", x4) - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum("ij->ij", x4) del x4 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("abij,kjab->ik", l2, t2) x6 += einsum("ij->ij", x5) - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum("ia,ij->ja", t1, x6) x26 += einsum("ia->ia", x25) del x25 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum("ia,jk->jika", t1, x6) * -0.5 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ia,jk->jika", t1, x6) * 0.5 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ij,ikab->jkab", x6, t2) * 0.5 rdm2_f_vvoo += einsum("ijab->abji", x55) rdm2_f_vvoo += einsum("ijab->abij", x55) * -1 @@ -1537,23 +1538,23 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x6 x51 += einsum("ij->ij", x5) del x5 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ia,ij->ja", t1, x51) del x51 x53 += einsum("ia->ia", x52) del x52 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("ai,ja->ij", l1, t1) x19 += einsum("ij->ij", x7) x20 -= einsum("ia,jk->jika", t1, x19) x34 += einsum("ia,jk->jika", t1, x19) del x19 - x32 = np.zeros((nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir), dtype=types[float]) x32 += einsum("ia,ij->ja", t1, x7) - x33 = np.zeros((nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nvir), dtype=types[float]) x33 += einsum("ia->ia", x32) * -1 del x32 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("ij,kiab->jkab", x7, t2) x76 -= einsum("ijab->ijba", x74) del x74 @@ -1561,15 +1562,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo += einsum("ijab->baji", x76) del x76 x81 += einsum("ij->ij", x7) - x82 = np.zeros((nocc, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nvir), dtype=types[float]) x82 += einsum("ia,ij->ja", t1, x81) - x83 = np.zeros((nocc, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir), dtype=types[float]) x83 += einsum("ia->ia", x82) del x82 - x84 = np.zeros((nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nvir), dtype=types[float]) x84 += einsum("ia,ij->ja", t1, x81) * 2 del x81 - x85 = np.zeros((nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nvir), dtype=types[float]) x85 += einsum("ia->ia", x84) del x84 rdm2_f_oooo -= einsum("ij,kl->jkil", delta_oo, x7) @@ -1577,39 +1578,39 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jkli", delta_oo, x7) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x7) del x7 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("ai,jkba->ijkb", l1, t2) - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum("ia,ijkb->jkab", t1, x8) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ijab->ijab", x70) del x70 rdm2_f_ovoo -= einsum("ijka->iakj", x8) rdm2_f_vooo += einsum("ijka->aikj", x8) del x8 - x9 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x9 += einsum("ia,waj->wji", t1, lu11) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("wia,wjk->jkia", u11, x9) x20 += einsum("ijka->ijka", x10) x34 -= einsum("ijka->ijka", x10) del x10 - x16 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x16 += einsum("wij->wij", x9) - x62 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x62 += einsum("ia,wij->wja", t1, x9) - x63 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x63 -= einsum("wia->wia", x62) del x62 - x80 = np.zeros((nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nvir), dtype=types[float]) x80 += einsum("wia,wij->ja", u11, x9) del x9 x83 += einsum("ia->ia", x80) x85 += einsum("ia->ia", x80) * 2 del x80 - x11 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x11 += einsum("wia,wxaj->xji", u11, lu12) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum("wia,wjk->jika", u11, x11) x20 -= einsum("ijka->ijka", x12) x34 += einsum("ijka->ijka", x12) @@ -1618,25 +1619,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ijka->aikj", x34) del x34 x16 += einsum("wij->wij", x11) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("wia,wij->ja", u11, x16) del x16 x18 += einsum("ia->ia", x17) del x17 - x58 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x58 += einsum("ia,wij->wja", t1, x11) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("wia,wjb->ijba", u11, x58) del x58 x67 += einsum("ijab->ijab", x59) del x59 - x65 = np.zeros((nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nvir), dtype=types[float]) x65 += einsum("wia,wij->ja", u11, x11) del x11 - x66 = np.zeros((nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nvir), dtype=types[float]) x66 -= einsum("ia->ia", x65) del x65 - x14 = np.zeros((nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir), dtype=types[float]) x14 += einsum("ai,jiba->jb", l1, t2) x18 -= einsum("ia->ia", x14) x20 += einsum("ij,ka->jika", delta_oo, x18) @@ -1650,22 +1651,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x14 x67 += einsum("ia,jb->ijab", t1, x66) del x66 - x21 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x21 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x21 += einsum("ia,wxaj->wxji", t1, lu12) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum("wxia,wxjk->jkia", u12, x21) x27 += einsum("ijka->ijka", x22) * 0.5 x35 += einsum("ijka->ijka", x22) * -0.5 rdm2_f_vooo += einsum("ijka->aijk", x35) * -1 rdm2_f_vooo += einsum("ijka->aikj", x35) del x35 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ia,ijkb->jkab", t1, x22) del x22 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("ijab->ijab", x50) * 0.5 del x50 - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("wxia,wxij->ja", u12, x21) x26 += einsum("ia->ia", x23) x27 += einsum("ij,ka->jika", delta_oo, x26) * 0.5 @@ -1679,21 +1680,21 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x23 x54 += einsum("ia,jb->ijab", t1, x53) * 0.5 del x53 - x56 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x56 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x56 += einsum("wia,wxij->xja", u11, x21) del x21 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("wia,wjb->jiab", u11, x56) del x56 x67 += einsum("ijab->ijab", x57) del x57 - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum("w,wia->ia", ls1, u11) x33 += einsum("ia->ia", x30) x83 += einsum("ia->ia", x30) * -1 x85 += einsum("ia->ia", x30) * -2 del x30 - x31 = np.zeros((nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir), dtype=types[float]) x31 += einsum("wx,wxia->ia", ls2, u12) x33 += einsum("ia->ia", x31) * 0.5 x83 += einsum("ia->ia", x31) * -0.5 @@ -1708,15 +1709,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ij,ka->ajik", delta_oo, x33) * -1 rdm2_f_vooo += einsum("ij,ka->ajki", delta_oo, x33) del x33 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 -= einsum("abij,kjca->ikbc", l2, t2) - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum("ijab,jkbc->ikac", t2, x36) x73 += einsum("ijab->ijab", x72) del x72 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum("ia,ijbc->jbac", t1, x36) - x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x96 -= einsum("iabc->iabc", x94) del x94 rdm2_f_ovov -= einsum("ijab->ibja", x36) @@ -1724,18 +1725,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ijab->bija", x36) rdm2_f_vovo -= einsum("ijab->biaj", x36) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_ovov -= einsum("ijab->ibja", x38) rdm2_f_ovvo += einsum("ijab->ibaj", x38) rdm2_f_voov += einsum("ijab->bija", x38) rdm2_f_vovo -= einsum("ijab->biaj", x38) del x38 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("wxai,wxjb->ijab", lu12, u12) - x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x97 += einsum("ia,ijbc->jbac", t1, x39) - x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum("iabc->iabc", x97) * -0.5 del x97 rdm2_f_ovov += einsum("ijab->ibja", x39) * -0.5 @@ -1743,20 +1744,20 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ijab->bija", x39) * 0.5 rdm2_f_vovo += einsum("ijab->biaj", x39) * -0.5 del x39 - x40 = np.zeros((nvir, nvir), dtype=np.float64) + x40 = np.zeros((nvir, nvir), dtype=types[float]) x40 += einsum("ai,ib->ab", l1, t1) - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 += einsum("ab->ab", x40) * 2 - x45 = np.zeros((nvir, nvir), dtype=np.float64) + x45 = np.zeros((nvir, nvir), dtype=types[float]) x45 += einsum("ab->ab", x40) - x95 = np.zeros((nvir, nvir), dtype=np.float64) + x95 = np.zeros((nvir, nvir), dtype=types[float]) x95 += einsum("ab->ab", x40) del x40 - x41 = np.zeros((nvir, nvir), dtype=np.float64) + x41 = np.zeros((nvir, nvir), dtype=types[float]) x41 += einsum("wai,wib->ab", lu11, u11) x44 += einsum("ab->ab", x41) * 2 x45 += einsum("ab->ab", x41) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum("ab,ijca->ijcb", x41, t2) x73 -= einsum("ijab->ijab", x71) del x71 @@ -1767,14 +1768,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x41 x96 += einsum("ia,bc->ibac", t1, x95) del x95 - x42 = np.zeros((nvir, nvir), dtype=np.float64) + x42 = np.zeros((nvir, nvir), dtype=types[float]) x42 += einsum("wxai,wxib->ab", lu12, u12) x44 += einsum("ab->ab", x42) x45 += einsum("ab->ab", x42) * 0.5 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum("ab->ab", x42) del x42 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 -= einsum("abij,ijca->bc", l2, t2) x44 += einsum("ab->ab", x43) rdm2_f_ovov += einsum("ij,ab->jbia", delta_oo, x44) * 0.5 @@ -1786,7 +1787,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x45 x46 += einsum("ab->ab", x43) del x43 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ab,ijac->ijbc", x46, t2) * 0.5 rdm2_f_vvoo += einsum("ijab->baij", x47) rdm2_f_vvoo += einsum("ijab->abij", x47) * -1 @@ -1798,9 +1799,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("iabc->bcai", x98) * -1 rdm2_f_vvvo += einsum("iabc->cbai", x98) del x98 - x48 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x48 += einsum("wxai,jiba->wxjb", lu12, t2) - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("wxia,wxjb->jiba", u12, x48) del x48 x54 += einsum("ijab->ijab", x49) * -0.5 @@ -1810,11 +1811,11 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo += einsum("ijab->abji", x54) rdm2_f_vvoo += einsum("ijab->baji", x54) * -1 del x54 - x61 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x61 += einsum("wai,jiba->wjb", lu11, t2) x63 += einsum("wia->wia", x61) del x61 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum("wia,wjb->jiba", u11, x63) del x63 x67 += einsum("ijab->ijab", x64) @@ -1824,9 +1825,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo -= einsum("ijab->abji", x67) rdm2_f_vvoo += einsum("ijab->baji", x67) del x67 - x68 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x68 += einsum("wx,xia->wia", ls2, u11) - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum("wia,wjb->jiba", u11, x68) del x68 rdm2_f_vvoo -= einsum("ijab->baij", x69) @@ -1836,30 +1837,30 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo += einsum("ia,jb->abji", t1, x83) rdm2_f_vvoo += einsum("ia,jb->baji", t1, x83) * -1 del x83 - x86 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x86 += einsum("ia,bcji->jbca", t1, l2) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv -= einsum("iabc->icba", x86) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->ciba", x86) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("ia,ibcd->adcb", t1, x86) del x86 - x89 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x89 += einsum("ai,jibc->jabc", l1, t2) rdm2_f_vvov -= einsum("iabc->cbia", x89) rdm2_f_vvvo += einsum("iabc->cbai", x89) del x89 - x90 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x90 += einsum("ia,wbi->wba", t1, lu11) - x91 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x91 += einsum("wia,wbc->ibca", u11, x90) del x90 x96 -= einsum("iabc->iabc", x91) del x91 - x92 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x92 += einsum("wia,xwbi->xba", u11, lu12) - x93 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x93 += einsum("wia,wbc->ibac", u11, x92) del x92 x96 += einsum("iabc->iabc", x93) @@ -1875,7 +1876,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kjia", delta_oo, l1) rdm2_f_oovo -= einsum("ij,ak->jkai", delta_oo, l1) rdm2_f_oovo += einsum("ij,ak->kjai", delta_oo, l1) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum("abij->jiba", l2) rdm2_f_ovov -= einsum("ai,jb->ibja", l1, t1) rdm2_f_ovvo += einsum("ai,jb->ibaj", l1, t1) @@ -1900,9 +1901,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("wai,xwia->x", lu11, u12) dm_b_des += einsum("ai,wia->w", l1, u11) dm_b_des += einsum("w,xw->x", ls1, s2) @@ -1922,7 +1923,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wai,xia->wx", lu11, u11) rdm1_b += einsum("wx,yx->wy", ls2, s2) @@ -1943,74 +1944,74 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("wia,xwaj->xji", u11, lu12) - x4 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x4 += einsum("wij->wij", x0) - x8 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x8 += einsum("wx,xij->wij", s2, x0) - x27 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x27 += einsum("wij->wij", x8) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x8) del x8 - x31 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x31 += einsum("wij->wij", x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) del x0 - x1 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x1 += einsum("ia,waj->wji", t1, lu11) x4 += einsum("wij->wij", x1) - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x4) - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov -= einsum("wij,wxia->xja", x4, u12) del x4 x31 += einsum("wij->wij", x1) - x33 = np.zeros((nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nvir), dtype=types[float]) x33 += einsum("wia,wij->ja", u11, x31) del x31 rdm_eb_cre_oo -= einsum("wij->wji", x1) del x1 - x2 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x2 += einsum("ia,wxaj->wxji", t1, lu12) - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 += einsum("wia,xwij->xja", u11, x2) rdm_eb_cre_ov -= einsum("wia->wia", x3) rdm_eb_des_ov -= einsum("wx,xia->wia", s2, x3) del x3 x33 += einsum("wxia,wxij->ja", u12, x2) * 0.5 del x2 - x5 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x5 += einsum("wia,xwbi->xba", u11, lu12) - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("wab->wab", x5) rdm_eb_des_ov -= einsum("wab,xwia->xib", x5, u12) - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("wx,xab->wab", s2, x5) del x5 - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("wai,xwja->xij", lu11, u12) x27 += einsum("wij->wij", x6) rdm_eb_des_oo -= einsum("wij->wji", x6) del x6 - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("ai,wja->wij", l1, u11) x27 += einsum("wij->wij", x7) rdm_eb_des_oo -= einsum("wij->wji", x7) del x7 - x9 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x9 += einsum("wx,xai->wia", s2, lu11) - x11 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x11 += einsum("wia->wia", x9) - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x9) del x9 - x10 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x10 -= einsum("wia,abji->wjb", u11, l2) x11 += einsum("wia->wia", x10) - x12 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x12 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x12 += einsum("ia,wja->wij", t1, x11) x27 += einsum("wij->wji", x12) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x27) @@ -2022,28 +2023,28 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x11 rdm_eb_des_vo += einsum("wia->wai", x10) del x10 - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ai,ja->ij", l1, t1) - x17 = np.zeros((nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc), dtype=types[float]) x17 += einsum("ij->ij", x13) - x28 = np.zeros((nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc), dtype=types[float]) x28 += einsum("ij->ij", x13) - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 += einsum("ij->ij", x13) * 2 del x13 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("wai,wja->ij", lu11, u11) x17 += einsum("ij->ij", x14) x28 += einsum("ij->ij", x14) x32 += einsum("ij->ij", x14) * 2 del x14 - x15 = np.zeros((nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc), dtype=types[float]) x15 += einsum("wxai,wxja->ij", lu12, u12) x17 += einsum("ij->ij", x15) * 0.5 x28 += einsum("ij->ij", x15) * 0.5 x32 += einsum("ij->ij", x15) del x15 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("abij,kjab->ik", l2, t2) x17 += einsum("ij->ij", x16) * 0.5 x28 += einsum("ij->ij", x16) * 0.5 @@ -2056,52 +2057,52 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x17 += einsum("ij->ji", delta_oo) * -1 rdm_eb_des_oo += einsum("w,ij->wji", s1, x17) * -1 del x17 - x18 = np.zeros((nbos), dtype=np.float64) + x18 = np.zeros((nbos), dtype=types[float]) x18 += einsum("w,xw->x", ls1, s2) - x21 = np.zeros((nbos), dtype=np.float64) + x21 = np.zeros((nbos), dtype=types[float]) x21 += einsum("w->w", x18) del x18 - x19 = np.zeros((nbos), dtype=np.float64) + x19 = np.zeros((nbos), dtype=types[float]) x19 += einsum("ai,wia->w", l1, u11) x21 += einsum("w->w", x19) del x19 - x20 = np.zeros((nbos), dtype=np.float64) + x20 = np.zeros((nbos), dtype=types[float]) x20 += einsum("wai,xwia->x", lu11, u12) x21 += einsum("w->w", x20) del x20 rdm_eb_des_oo += einsum("w,ij->wji", x21, delta_oo) rdm_eb_des_ov += einsum("w,ia->wia", x21, t1) del x21 - x22 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x22 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x22 += einsum("wia,xyai->xyw", u11, lu12) rdm_eb_des_ov += einsum("wxy,wxia->yia", x22, u12) * 0.5 del x22 - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum("wai,wib->ab", lu11, u11) - x26 = np.zeros((nvir, nvir), dtype=np.float64) + x26 = np.zeros((nvir, nvir), dtype=types[float]) x26 += einsum("ab->ab", x23) - x34 = np.zeros((nvir, nvir), dtype=np.float64) + x34 = np.zeros((nvir, nvir), dtype=types[float]) x34 += einsum("ab->ab", x23) del x23 - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum("wxai,wxib->ab", lu12, u12) x26 += einsum("ab->ab", x24) * 0.5 x34 += einsum("ab->ab", x24) * 0.5 del x24 - x25 = np.zeros((nvir, nvir), dtype=np.float64) + x25 = np.zeros((nvir, nvir), dtype=types[float]) x25 -= einsum("abij,ijca->bc", l2, t2) x26 += einsum("ab->ab", x25) * 0.5 rdm_eb_des_ov += einsum("ab,wia->wib", x26, u11) * -1 del x26 x34 += einsum("ab->ab", x25) * 0.5 del x25 - x29 = np.zeros((nbos, nbos), dtype=np.float64) + x29 = np.zeros((nbos, nbos), dtype=types[float]) x29 += einsum("wx,yw->xy", ls2, s2) x29 += einsum("wai,xia->wx", lu11, u11) x29 += einsum("wxai,ywia->xy", lu12, u12) rdm_eb_des_ov += einsum("wx,wia->xia", x29, u11) del x29 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum("ia,bajk->jkib", t1, l2) x33 += einsum("ijab,ijkb->ka", t2, x30) * -0.5000000000000003 del x30 @@ -2118,7 +2119,7 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) rdm_eb_cre_ov += einsum("wx,xia->wia", ls2, u11) rdm_eb_cre_ov += einsum("wai,jiba->wjb", lu11, t2) - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) rdm_eb_des_ov += einsum("wia->wia", u11) diff --git a/ebcc/codegen/GCCSD_S_1_1.py b/ebcc/codegen/GCCSD_S_1_1.py index 25f2b745..72af5c75 100644 --- a/ebcc/codegen/GCCSD_S_1_1.py +++ b/ebcc/codegen/GCCSD_S_1_1.py @@ -2,16 +2,17 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("ijab->jiba", t2) x0 += einsum("ia,jb->ijab", t1, t1) * 2 e_cc = 0 e_cc += einsum("ijab,ijab->", v.oovv, x0) * 0.25 del x0 - x1 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x1 += einsum("wia->wia", u11) x1 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x1) @@ -31,189 +32,189 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1 and U11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jkba->ijkb", t1, v.oovv) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ikja", x0) * -1 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum("ijab,kjlb->kila", t2, x0) - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 -= einsum("ijka->ikja", x29) del x29 - x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x64 += einsum("ia,jkla->jilk", t1, x0) del x0 - x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x65 += einsum("ijkl->klji", x64) * -1 - x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x66 += einsum("ijkl->klji", x64) * -1 del x64 x1 += einsum("ijka->kjia", v.ooov) - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kija->kb", t2, x1) * -0.5 del x1 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("w,wia->ia", s1, g.bov) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum("ia->ia", x2) - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia->ia", x2) - x71 = np.zeros((nocc, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nvir), dtype=types[float]) x71 += einsum("ia->ia", x2) del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("ia,jiba->jb", t1, v.oovv) x4 += einsum("ia->ia", x3) x11 += einsum("ia->ia", x3) - x70 = np.zeros((nvir, nvir), dtype=np.float64) + x70 = np.zeros((nvir, nvir), dtype=types[float]) x70 += einsum("ia,ib->ab", t1, x3) del x3 x4 += einsum("ia->ia", f.ov) - x37 = np.zeros((nocc, nocc), dtype=np.float64) + x37 = np.zeros((nocc, nocc), dtype=types[float]) x37 += einsum("ia,ja->ij", t1, x4) - x38 = np.zeros((nocc, nocc), dtype=np.float64) + x38 = np.zeros((nocc, nocc), dtype=types[float]) x38 += einsum("ij->ij", x37) del x37 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum("ia,jkab->jkib", x4, t2) - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum("ijka->kjia", x51) del x51 t1new += einsum("ia,ijab->jb", x4, t2) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x4, u11) del x4 - x5 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x5 += einsum("ia,wja->wji", t1, g.bov) - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("wij->wij", x5) del x5 x6 += einsum("wij->wij", g.boo) - x24 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x24 += einsum("ia,wij->wja", t1, x6) - x25 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x25 -= einsum("wia->wia", x24) del x24 t1new -= einsum("wia,wij->ja", u11, x6) del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("w,wij->ij", s1, g.boo) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x7) x38 += einsum("ij->ji", x7) del x7 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("wia,wja->ij", g.bov, u11) x13 += einsum("ij->ij", x8) - x40 = np.zeros((nocc, nocc), dtype=np.float64) + x40 = np.zeros((nocc, nocc), dtype=types[float]) x40 += einsum("ij->ij", x8) del x8 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 -= einsum("ia,ijka->jk", t1, v.ooov) x13 += einsum("ij->ij", x9) x40 += einsum("ij->ij", x9) del x9 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum("ij,ikab->kjab", x40, t2) del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 -= einsum("ijab->ijba", x41) del x41 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 -= einsum("ijab,jkab->ik", t2, v.oovv) x13 += einsum("ij->ji", x10) * 0.5 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ij,kjab->kiab", x10, t2) del x10 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ijab->ijba", x44) * -0.5 del x44 x11 += einsum("ia->ia", f.ov) - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("ia,ja->ij", t1, x11) del x11 x13 += einsum("ij->ji", x12) del x12 x13 += einsum("ij->ij", f.oo) t1new += einsum("ia,ij->ja", t1, x13) * -1 - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new += einsum("ij,wia->wja", x13, u11) * -1 del x13 - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 += einsum("w,wab->ab", s1, g.bvv) - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 += einsum("ab->ab", x14) - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ab,ijcb->ijac", x14, t2) - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ijab->ijab", x47) del x47 x70 += einsum("ab->ab", x14) * -1 del x14 - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 -= einsum("ia,ibac->bc", t1, v.ovvv) x16 -= einsum("ab->ab", x15) - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum("ab->ab", x15) x70 += einsum("ab->ab", x15) del x15 x16 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x16) del x16 - x17 = np.zeros((nbos), dtype=np.float64) + x17 = np.zeros((nbos), dtype=types[float]) x17 += einsum("w->w", G) x17 += einsum("ia,wia->w", t1, g.bov) t1new += einsum("w,wia->ia", x17, u11) del x17 - x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x18 += einsum("ia,bcda->ibcd", t1, v.vvvv) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new -= einsum("ia,jbca->ijcb", t1, x18) del x18 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum("ijab,jckb->ikac", t2, v.ovov) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 -= einsum("ijab->ijab", x19) del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 -= einsum("ijab,kjcb->kiac", t2, x20) x32 += einsum("ijab->ijab", x21) del x21 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 -= einsum("ia,jkba->jikb", t1, x20) del x20 x52 += einsum("ijka->kjia", x50) del x50 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum("ia,ijkb->jkab", t1, x52) del x52 x57 += einsum("ijab->jiab", x53) del x53 - x22 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x22 += einsum("ia,wba->wib", t1, g.bvv) x25 += einsum("wia->wia", x22) del x22 - x23 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x23 += einsum("wia,jiba->wjb", g.bov, t2) x25 += einsum("wia->wia", x23) del x23 x25 += einsum("wai->wia", g.bvo) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum("wia,wjb->ijab", u11, x25) del x25 x32 += einsum("ijab->jiba", x26) del x26 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum("ia,jbka->ijkb", t1, v.ovov) x30 += einsum("ijka->ijka", x27) del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 -= einsum("ijab,jklb->ikla", t2, v.ooov) x30 += einsum("ijka->ijka", x28) del x28 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum("ia,jikb->jkab", t1, x30) del x30 x32 += einsum("ijab->ijab", x31) @@ -223,20 +224,20 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->jiab", x32) t2new += einsum("ijab->jiba", x32) del x32 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ia,bcja->ijbc", t1, v.vvov) x42 += einsum("ijab->ijba", x33) del x33 - x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x34 += einsum("ia,jkla->ijkl", t1, v.ooov) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ia,jkil->jkla", t1, x34) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 -= einsum("ia,jikb->jkba", t1, x35) del x35 x42 += einsum("ijab->ijba", x36) del x36 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum("ijab,kijl->klab", t2, x34) del x34 x45 += einsum("ijab->ijba", x43) * -0.5 @@ -245,7 +246,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->jiab", x45) del x45 x38 += einsum("ij->ji", f.oo) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ij,jkab->kiab", x38, t2) del x38 x42 += einsum("ijab->jiba", x39) @@ -253,22 +254,22 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab->ijab", x42) t2new -= einsum("ijab->jiab", x42) del x42 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum("ab,ijcb->ijac", f.vv, t2) t2new += einsum("ijab->jiab", x46) t2new -= einsum("ijab->jiba", x46) del x46 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("ijab,jkbc->ikac", t2, v.oovv) - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("ijab,kjcb->ikac", t2, x48) del x48 x57 -= einsum("ijab->ijab", x49) del x49 - x54 = np.zeros((nvir, nvir), dtype=np.float64) + x54 = np.zeros((nvir, nvir), dtype=types[float]) x54 += einsum("wia,wib->ab", g.bov, u11) x55 += einsum("ab->ba", x54) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ab,ijbc->ijca", x55, t2) del x55 x57 += einsum("ijab->jiab", x56) @@ -278,17 +279,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x57 x70 += einsum("ab->ba", x54) del x54 - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum("ijab,kcab->ijkc", t2, v.ovvv) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ia,jkib->jkab", t1, x58) del x58 - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum("ijab->ijab", x59) * 0.5 del x59 - x60 = np.zeros((nvir, nvir), dtype=np.float64) + x60 = np.zeros((nvir, nvir), dtype=types[float]) x60 -= einsum("ijab,ijbc->ac", t2, v.oovv) - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ab,ijcb->ijca", x60, t2) x62 += einsum("ijab->ijab", x61) * 0.5 del x61 @@ -297,7 +298,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x62 x70 += einsum("ab->ab", x60) * 0.5 del x60 - x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x63 += einsum("ijab,klab->ijkl", t2, v.oovv) x65 += einsum("ijkl->lkji", x63) * 0.49999999999999967 x66 += einsum("ijkl->lkji", x63) * 0.5000000000000003 @@ -306,19 +307,19 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->lkba", t2, x65) * 0.5000000000000003 del x65 x66 += einsum("ijkl->jilk", v.oooo) - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum("ia,ijkl->lkja", t1, x66) del x66 x67 += einsum("iajk->kjia", v.ovoo) t2new += einsum("ia,jkib->jkab", t1, x67) del x67 - x68 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x68 += einsum("wia,ijab->wjb", u11, v.oovv) - x69 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x69 += einsum("wia->wia", x68) del x68 x69 += einsum("wia->wia", gc.bov) - x72 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x72 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x72 += einsum("ia,wja->wji", t1, x69) u11new += einsum("wia,ijab->wjb", x69, t2) del x69 @@ -332,12 +333,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x72 -= einsum("wia,ijka->wjk", u11, v.ooov) u11new -= einsum("ia,wij->wja", t1, x72) del x72 - x73 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x73 += einsum("wab->wab", gc.bvv) x73 += einsum("wia,ibac->wbc", u11, v.ovvv) u11new += einsum("ia,wba->wib", t1, x73) del x73 - x74 = np.zeros((nbos, nbos), dtype=np.float64) + x74 = np.zeros((nbos, nbos), dtype=types[float]) x74 += einsum("wx->wx", w) x74 += einsum("wia,xia->xw", g.bov, u11) u11new += einsum("wx,xia->wia", x74, u11) @@ -368,148 +369,148 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 and LU11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum("ijkl->jilk", x0) * -1 - x112 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x112 += einsum("ijkl->jilk", x0) * -0.5 - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum("ijka,lkij->al", v.ooov, x0) * -0.25 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) x18 += einsum("ijkl->ijlk", x2) * 2.0000000000000013 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ia,ijkl->jlka", t1, x18) * -0.5 del x18 x112 += einsum("ijkl->ijlk", x2) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("ijab,klij->balk", v.oovv, x112) * -0.5 del x112 l1new += einsum("ijka,lkji->al", v.ooov, x2) * 0.5 del x2 x19 += einsum("ijab,kjlb->klia", t2, x1) * 2 - x50 = np.zeros((nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nvir), dtype=types[float]) x50 += einsum("ijab,ijka->kb", t2, x1) - x54 = np.zeros((nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir), dtype=types[float]) x54 += einsum("ia->ia", x50) * 0.5 del x50 l2new += einsum("iabc,jkia->cbkj", v.ovvv, x1) - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 -= einsum("wia,abji->wjb", u11, l2) - x65 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x65 += einsum("ia,wja->wji", t1, x3) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("wia,wjb->ijab", g.bov, x3) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("ijab->ijab", x73) del x73 l1new += einsum("wab,wia->bi", g.bvv, x3) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 -= einsum("abij,kicb->jkac", l2, t2) l1new -= einsum("iabc,jiac->bj", v.ovvv, x4) del x4 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.bov) - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia->ia", x5) - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 += einsum("ia->ia", x5) - x80 = np.zeros((nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nvir), dtype=types[float]) x80 += einsum("ia->ia", x5) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum("ai,ja->ij", l1, t1) - x52 = np.zeros((nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc), dtype=types[float]) x52 += einsum("ij->ij", x6) * 2 - x68 = np.zeros((nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc), dtype=types[float]) x68 += einsum("ij->ij", x6) - x120 = np.zeros((nocc, nocc), dtype=np.float64) + x120 = np.zeros((nocc, nocc), dtype=types[float]) x120 += einsum("ij->ij", x6) l1new -= einsum("ia,ji->aj", x5, x6) del x5 - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new -= einsum("ij,wji->w", x6, g.boo) del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("abij,ikab->jk", l2, t2) x19 += einsum("ia,jk->jkia", t1, x7) * -1 x52 += einsum("ij->ij", x7) - x64 = np.zeros((nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc), dtype=types[float]) x64 += einsum("ij->ij", x7) * 0.5 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 -= einsum("ij,kjab->ikab", x7, v.oovv) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ijab->ijba", x83) * -0.5 del x83 x120 += einsum("ij->ij", x7) * 0.5 l1new += einsum("ia,ji->aj", f.ov, x7) * -0.5 del x7 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("ia,jkba->ijkb", t1, v.oovv) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum("ijka->ikja", x8) * -1 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum("ijka->kjia", x8) * 0.5000000000000003 - x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x78 -= einsum("ijka->ikja", x8) - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 -= einsum("ai,ijkb->kjab", l1, x8) - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum("ijab->ijab", x98) del x98 - x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x110 += einsum("ijka->kjia", x8) * 0.5 del x8 x9 += einsum("ijka->kjia", v.ooov) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum("ijab,kila->lkjb", t2, x9) * 2 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ijab,kija->kb", t2, x9) * 0.5 del x9 - x45 = np.zeros((nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir), dtype=types[float]) x45 += einsum("ia->ia", x26) del x26 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum("ia,jiba->jb", t1, v.oovv) x11 += einsum("ia->ia", x10) x59 += einsum("ia->ia", x10) - x69 = np.zeros((nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nvir), dtype=types[float]) x69 += einsum("ia->ia", x10) x81 += einsum("ai,jb->ijab", l1, x10) - x94 = np.zeros((nocc, nocc), dtype=np.float64) + x94 = np.zeros((nocc, nocc), dtype=types[float]) x94 += einsum("ia,ja->ij", t1, x10) - x95 = np.zeros((nocc, nocc), dtype=np.float64) + x95 = np.zeros((nocc, nocc), dtype=types[float]) x95 += einsum("ij->ji", x94) del x94 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 -= einsum("ia,jkib->kjba", x10, x1) x106 -= einsum("ijab->ijab", x101) del x101 - x118 = np.zeros((nvir, nvir), dtype=np.float64) + x118 = np.zeros((nvir, nvir), dtype=types[float]) x118 += einsum("ia,ib->ab", t1, x10) del x10 x11 += einsum("ia->ia", f.ov) x17 += einsum("ia,jkab->ikjb", x11, t2) * -1 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum("ia,ijab->jb", x11, t2) x45 += einsum("ia->ia", x27) * -1 del x27 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum("ia,ja->ij", t1, x11) - x36 = np.zeros((nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc), dtype=types[float]) x36 += einsum("ij->ji", x35) del x35 - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("w,ia->wai", ls1, x11) * 2 del x11 - x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x12 += einsum("ijab,klab->ijkl", t2, v.oovv) - x14 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x14 += einsum("ijkl->lkji", x12) - x111 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x111 += einsum("ijkl->lkji", x12) del x12 x13 += einsum("ijka->jika", v.ooov) * -1 @@ -518,13 +519,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x14 += einsum("ijkl->jilk", v.oooo) * 2 x17 += einsum("ia,ijkl->jlka", t1, x14) * -0.5 del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum("ia,jbca->ijbc", t1, v.ovvv) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum("ijab->jiab", x15) * -0.5 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 -= einsum("ijab->jiab", x15) - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ijab->ijab", x15) del x15 x16 += einsum("iajb->ijab", v.ovov) @@ -537,7 +538,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x19 += einsum("ai,jkba->ikjb", l1, t2) * -1 l1new += einsum("ijab,kija->bk", v.oovv, x19) * -0.5 del x19 - x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x20 += einsum("abic->ibac", v.vvov) * -1 x20 += einsum("ia,bcda->icbd", t1, v.vvvv) l1new += einsum("abij,iabc->cj", l2, x20) * 0.5 @@ -545,61 +546,61 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x21 += einsum("iajb->ijab", v.ovov) l1new += einsum("ijka,kiab->bj", x1, x21) del x21 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("w,wai->ia", s1, g.bvo) x45 += einsum("ia->ia", x22) * -1 del x22 - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("wab,wib->ia", g.bvv, u11) x45 += einsum("ia->ia", x23) * -1 del x23 - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 += einsum("ia,ibja->jb", t1, v.ovov) x45 += einsum("ia->ia", x24) del x24 - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 -= einsum("ijab,icab->jc", t2, v.ovvv) x45 += einsum("ia->ia", x25) * 0.5 del x25 - x28 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x28 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x28 += einsum("ia,wja->wji", t1, g.bov) - x29 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x29 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x29 += einsum("wij->wij", x28) - x66 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x66 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x66 += einsum("wij->wij", x28) del x28 x29 += einsum("wij->wij", g.boo) - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum("wia,wij->ja", u11, x29) del x29 x45 += einsum("ia->ia", x30) del x30 - x31 = np.zeros((nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc), dtype=types[float]) x31 += einsum("w,wij->ij", s1, g.boo) x36 += einsum("ij->ij", x31) - x91 = np.zeros((nocc, nocc), dtype=np.float64) + x91 = np.zeros((nocc, nocc), dtype=types[float]) x91 += einsum("ij->ij", x31) del x31 - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 += einsum("wia,wja->ij", g.bov, u11) x36 += einsum("ij->ij", x32) x91 += einsum("ij->ij", x32) del x32 - x33 = np.zeros((nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc), dtype=types[float]) x33 -= einsum("ia,ijka->jk", t1, v.ooov) x36 += einsum("ij->ij", x33) x95 += einsum("ij->ij", x33) del x33 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum("ij,abjk->kiab", x95, l2) del x95 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 -= einsum("ijab->ijba", x96) del x96 - x34 = np.zeros((nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc), dtype=types[float]) x34 += einsum("ijab,ikab->jk", t2, v.oovv) x36 += einsum("ij->ji", x34) * 0.5 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ij,abki->kjab", x34, l2) del x34 x84 += einsum("ijab->ijba", x82) * -0.5 @@ -608,46 +609,46 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abji", x84) del x84 x36 += einsum("ij->ij", f.oo) - x37 = np.zeros((nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nvir), dtype=types[float]) x37 += einsum("ia,ij->ja", t1, x36) x45 += einsum("ia->ia", x37) del x37 l1new += einsum("ai,ji->aj", l1, x36) * -1 lu11new += einsum("ij,waj->wai", x36, lu11) * -1 del x36 - x38 = np.zeros((nvir, nvir), dtype=np.float64) + x38 = np.zeros((nvir, nvir), dtype=types[float]) x38 += einsum("w,wab->ab", s1, g.bvv) - x40 = np.zeros((nvir, nvir), dtype=np.float64) + x40 = np.zeros((nvir, nvir), dtype=types[float]) x40 += einsum("ab->ab", x38) - x67 = np.zeros((nvir, nvir), dtype=np.float64) + x67 = np.zeros((nvir, nvir), dtype=types[float]) x67 += einsum("ab->ab", x38) - x103 = np.zeros((nvir, nvir), dtype=np.float64) + x103 = np.zeros((nvir, nvir), dtype=types[float]) x103 += einsum("ab->ab", x38) x118 += einsum("ab->ab", x38) * -1 del x38 - x39 = np.zeros((nvir, nvir), dtype=np.float64) + x39 = np.zeros((nvir, nvir), dtype=types[float]) x39 -= einsum("ia,ibac->bc", t1, v.ovvv) x40 += einsum("ab->ab", x39) * -1 x67 -= einsum("ab->ab", x39) - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 -= einsum("ab,caij->jicb", x39, l2) x106 -= einsum("ijab->ijab", x100) del x100 x118 += einsum("ab->ab", x39) del x39 x40 += einsum("ab->ab", f.vv) - x41 = np.zeros((nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir), dtype=types[float]) x41 += einsum("ia,ba->ib", t1, x40) del x40 x45 += einsum("ia->ia", x41) * -1 del x41 - x42 = np.zeros((nbos), dtype=np.float64) + x42 = np.zeros((nbos), dtype=types[float]) x42 += einsum("ia,wia->w", t1, g.bov) - x43 = np.zeros((nbos), dtype=np.float64) + x43 = np.zeros((nbos), dtype=types[float]) x43 += einsum("w->w", x42) del x42 x43 += einsum("w->w", G) - x44 = np.zeros((nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nvir), dtype=types[float]) x44 += einsum("w,wia->ia", x43, u11) del x43 x45 += einsum("ia->ia", x44) * -1 @@ -656,27 +657,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ia,abij->bj", x45, l2) * -1 ls1new += einsum("ia,wai->w", x45, lu11) * -1 del x45 - x46 = np.zeros((nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nvir), dtype=types[float]) x46 += einsum("w,wia->ia", ls1, u11) x54 += einsum("ia->ia", x46) * -1 del x46 - x47 = np.zeros((nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nvir), dtype=types[float]) x47 += einsum("ai,jiba->jb", l1, t2) x54 += einsum("ia->ia", x47) * -1 del x47 - x48 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x48 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x48 += einsum("ia,waj->wji", t1, lu11) - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum("wia,wij->ja", u11, x48) x54 += einsum("ia->ia", x49) del x49 - x117 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x117 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x117 -= einsum("ia,wij->wja", t1, x48) lu11new += einsum("wij,kjia->wak", x48, v.ooov) - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum("wai,wja->ij", lu11, u11) x52 += einsum("ij->ij", x51) * 2 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia,ij->ja", t1, x52) * 0.5 x54 += einsum("ia->ia", x53) del x53 @@ -687,7 +688,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ij,wji->w", x64, g.boo) * -1 del x64 x68 += einsum("ij->ij", x51) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum("ij,jkab->kiab", x68, v.oovv) x97 += einsum("ijab->jiba", x93) del x93 @@ -699,32 +700,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ia,ijab->bj", x54, v.oovv) * -1 ls1new += einsum("ia,wia->w", x54, g.bov) * -1 del x54 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum("ai,ib->ab", l1, t1) - x58 = np.zeros((nvir, nvir), dtype=np.float64) + x58 = np.zeros((nvir, nvir), dtype=types[float]) x58 += einsum("ab->ab", x55) ls1new += einsum("ab,wab->w", x55, g.bvv) del x55 - x56 = np.zeros((nvir, nvir), dtype=np.float64) + x56 = np.zeros((nvir, nvir), dtype=types[float]) x56 += einsum("wai,wib->ab", lu11, u11) x58 += einsum("ab->ab", x56) - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 -= einsum("ab,ijcb->jiac", x56, v.oovv) x106 += einsum("ijab->ijab", x99) del x99 - x113 = np.zeros((nvir, nvir), dtype=np.float64) + x113 = np.zeros((nvir, nvir), dtype=types[float]) x113 += einsum("ab->ab", x56) * 2 - x119 = np.zeros((nvir, nvir), dtype=np.float64) + x119 = np.zeros((nvir, nvir), dtype=types[float]) x119 += einsum("ab->ab", x56) del x56 - x57 = np.zeros((nvir, nvir), dtype=np.float64) + x57 = np.zeros((nvir, nvir), dtype=types[float]) x57 -= einsum("abij,ijbc->ac", l2, t2) x58 += einsum("ab->ab", x57) * 0.5 l1new += einsum("ab,iabc->ci", x58, v.ovvv) * -1 del x58 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum("ab,ijcb->jiac", x57, v.oovv) - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum("ijab->ijab", x85) * 0.5 del x85 x113 += einsum("ab->ab", x57) @@ -735,16 +736,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new += einsum("ab,wib->wai", x119, g.bov) * -1 del x119 x59 += einsum("ia->ia", f.ov) - x62 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x62 += einsum("ia,wja->wij", x59, u11) - x70 = np.zeros((nbos), dtype=np.float64) + x70 = np.zeros((nbos), dtype=types[float]) x70 += einsum("ia,wia->w", x59, u11) del x59 - x60 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x60 += einsum("wia,ijab->wjb", u11, v.oovv) - x61 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x61 += einsum("wia->wia", x60) - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("wai,wjb->ijab", lu11, x60) del x60 x81 += einsum("ijab->ijab", x74) @@ -757,7 +758,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x62 += einsum("wia,jika->wjk", u11, v.ooov) l1new -= einsum("wai,wji->aj", lu11, x62) del x62 - x63 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x63 += einsum("wab->wab", gc.bvv) x63 -= einsum("wia,ibca->wbc", u11, v.ovvv) l1new += einsum("wai,wab->bi", lu11, x63) @@ -766,7 +767,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("wia,wji->aj", g.bov, x65) * -1 del x65 x66 += einsum("wij->wij", g.boo) - x116 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x116 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x116 -= einsum("ia,wij->wja", t1, x66) l1new -= einsum("wia,wji->aj", x3, x66) del x3 @@ -784,27 +785,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x70 += einsum("ia,wia->w", t1, gc.bov) l1new += einsum("w,wai->ai", x70, lu11) del x70 - x71 = np.zeros((nbos), dtype=np.float64) + x71 = np.zeros((nbos), dtype=types[float]) x71 += einsum("w->w", s1) x71 += einsum("ai,wia->w", l1, u11) l1new += einsum("w,wia->ai", x71, g.bov) del x71 - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum("wia,wbj->ijab", gc.bov, lu11) x81 += einsum("ijab->ijab", x72) del x72 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 -= einsum("ijab,ikca->jkbc", t2, v.oovv) x76 += einsum("ijab->ijab", x75) del x75 x76 -= einsum("iajb->jiab", v.ovov) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("abij,ikac->jkbc", l2, x76) del x76 x81 += einsum("ijab->ijab", x77) del x77 x78 += einsum("ijka->kjia", v.ooov) - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ijka,iklb->jlab", x1, x78) del x78 x81 -= einsum("ijab->ijab", x79) @@ -816,11 +817,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->abji", x81) l2new += einsum("ijab->baji", x81) del x81 - x90 = np.zeros((nocc, nocc), dtype=np.float64) + x90 = np.zeros((nocc, nocc), dtype=types[float]) x90 += einsum("ia,ja->ij", t1, x80) x91 += einsum("ij->ji", x90) del x90 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum("ia,jkib->jkba", x80, x1) del x1 x106 -= einsum("ijab->jiba", x105) @@ -828,9 +829,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new -= einsum("ia,wji->waj", x80, x48) del x48 del x80 - x86 = np.zeros((nvir, nvir), dtype=np.float64) + x86 = np.zeros((nvir, nvir), dtype=types[float]) x86 += einsum("ijab,ijac->bc", t2, v.oovv) - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 -= einsum("ab,caij->jicb", x86, l2) x88 += einsum("ijab->ijab", x87) * 0.5 del x87 @@ -839,12 +840,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x88 x118 += einsum("ab->ab", x86) * 0.5 del x86 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum("ai,jabc->ijbc", l1, v.ovvv) x97 += einsum("ijab->ijba", x89) del x89 x91 += einsum("ij->ij", f.oo) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum("ij,abjk->kiab", x91, l2) del x91 x97 += einsum("ijab->jiba", x92) @@ -852,10 +853,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x97) l2new -= einsum("ijab->abji", x97) del x97 - x102 = np.zeros((nvir, nvir), dtype=np.float64) + x102 = np.zeros((nvir, nvir), dtype=types[float]) x102 += einsum("wia,wib->ab", g.bov, u11) x103 -= einsum("ab->ba", x102) - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum("ab,acij->ijcb", x103, l2) del x103 x106 -= einsum("ijab->jiba", x104) @@ -865,12 +866,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x106 x118 += einsum("ab->ba", x102) del x102 - x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x107 += einsum("ai,jkib->jkab", l1, v.ooov) - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 -= einsum("ijab->jiab", x107) del x107 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum("ab,caij->ijbc", f.vv, l2) x109 -= einsum("ijab->jiab", x108) del x108 @@ -883,11 +884,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x111 += einsum("ijkl->jilk", v.oooo) * 2 l2new += einsum("abij,klij->balk", l2, x111) * 0.25 del x111 - x114 = np.zeros((nbos, nbos), dtype=np.float64) + x114 = np.zeros((nbos, nbos), dtype=types[float]) x114 += einsum("wai,xia->wx", lu11, u11) lu11new += einsum("wx,xia->wai", x114, g.bov) del x114 - x115 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x115 += einsum("ia,wbi->wba", t1, lu11) lu11new += einsum("wab,iacb->wci", x115, v.ovvv) del x115 @@ -902,7 +903,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x118 += einsum("ab->ab", f.vv) * -1 lu11new += einsum("ab,wai->wbi", x118, lu11) * -1 del x118 - x121 = np.zeros((nbos, nbos), dtype=np.float64) + x121 = np.zeros((nbos, nbos), dtype=types[float]) x121 += einsum("wx->wx", w) x121 += einsum("wia,xia->xw", g.bov, u11) lu11new += einsum("wx,wai->xai", x121, lu11) @@ -934,41 +935,41 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("ai,ja->ij", l1, t1) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("ij->ij", x0) - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo -= einsum("ij->ij", x0) del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("wai,wja->ij", lu11, u11) x5 += einsum("ij->ij", x1) rdm1_f_oo -= einsum("ij->ij", x1) del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("abij,kjab->ik", l2, t2) x5 += einsum("ij->ij", x2) * 0.5 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum("ia,ij->aj", t1, x5) * -1 del x5 rdm1_f_oo += einsum("ij->ij", x2) * -0.5 del x2 - x3 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x3 += einsum("ia,waj->wji", t1, lu11) rdm1_f_vo -= einsum("wia,wij->aj", u11, x3) del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ia,bajk->jkib", t1, l2) rdm1_f_vo += einsum("ijab,ijkb->ak", t2, x4) * 0.5 del x4 rdm1_f_oo += einsum("ij->ji", delta_oo) - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) rdm1_f_vo += einsum("w,wia->ai", ls1, u11) rdm1_f_vo += einsum("ia->ai", t1) rdm1_f_vo += einsum("ai,jiba->bj", l1, t2) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("ai,ib->ba", l1, t1) rdm1_f_vv += einsum("wai,wib->ba", lu11, u11) rdm1_f_vv += einsum("abij,ijca->cb", l2, t2) * -0.5 @@ -990,99 +991,99 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum("ijkl->jilk", x0) * -1 - x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x48 += einsum("ijkl->jilk", x0) * -1 - x49 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x49 += einsum("ijkl->jilk", x0) * -1 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum("ijkl->jilk", x0) * 0.5 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) x20 += einsum("ijkl->ijlk", x2) * 2 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum("ia,ijkl->jkla", t1, x20) * 0.5 del x20 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum("ijka->iakj", x21) * -1 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ijka->aikj", x21) del x21 x48 += einsum("ijkl->ijlk", x2) * 2.0000000000000013 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum("ijab,ijkl->balk", t2, x48) * -0.25 del x48 x49 += einsum("ijkl->ijlk", x2) * 1.9999999999999987 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum("ia,ijkl->jlka", t1, x49) * -1 del x49 rdm2_f_vvoo += einsum("ia,ijkb->abkj", t1, x50) * -0.5000000000000003 del x50 rdm2_f_oooo -= einsum("ijkl->ijlk", x2) del x2 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 -= einsum("ijab,kjlb->klia", t2, x1) - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ijka", x9) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 -= einsum("ijka->ijka", x9) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ia,ijkb->jkab", t1, x9) del x9 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 -= einsum("ijab->ijab", x33) del x33 - x16 = np.zeros((nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir), dtype=types[float]) x16 -= einsum("ijab,ijkb->ka", t2, x1) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x16) del x16 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("ia,jikb->jkba", t1, x1) - x56 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x56 -= einsum("ia,ijbc->jbca", t1, x28) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->cbia", x56) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->cbai", x56) del x56 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum("ijab->ibja", x28) - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->ibaj", x28) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->bija", x28) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->biaj", x28) del x28 - x55 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x55 += einsum("ijab,ijkc->kcab", t2, x1) rdm2_f_vvov += einsum("iabc->bcia", x55) * 0.5 rdm2_f_vvvo += einsum("iabc->bcai", x55) * -0.5 del x55 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov -= einsum("ijka->jika", x1) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ijka->jiak", x1) del x1 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("ai,ja->ij", l1, t1) - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("ij->ij", x3) - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("ia,ij->ja", t1, x3) - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 -= einsum("ia->ia", x23) del x23 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum("ij,kiab->jkab", x3, t2) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 -= einsum("ijab->ijba", x43) del x43 rdm2_f_oooo -= einsum("ij,kl->jkil", delta_oo, x3) @@ -1090,13 +1091,13 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jkli", delta_oo, x3) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x3) del x3 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum("abij,kjab->ik", l2, t2) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia,ij->ja", t1, x4) x18 += einsum("ia->ia", x17) del x17 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ij,ka->jika", delta_oo, x18) * 0.5 rdm2_f_vooo += einsum("ij,ka->aijk", delta_oo, x18) * 0.5 rdm2_f_vooo += einsum("ij,ka->aikj", delta_oo, x18) * -0.5 @@ -1109,7 +1110,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovoo += einsum("ijka->iajk", x19) * -1 rdm2_f_ovoo += einsum("ijka->iakj", x19) del x19 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ij,kiab->kjab", x4, t2) rdm2_f_vvoo += einsum("ijab->abij", x47) * -0.5 rdm2_f_vvoo += einsum("ijab->abji", x47) * 0.5 @@ -1121,25 +1122,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ia,jk->ajik", t1, x4) * -0.5 rdm2_f_vooo += einsum("ia,jk->ajki", t1, x4) * 0.5 del x4 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("wai,wja->ij", lu11, u11) - x12 = np.zeros((nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nvir), dtype=types[float]) x12 += einsum("ia,ij->ja", t1, x5) - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum("ia->ia", x12) del x12 x14 += einsum("ij->ij", x5) x15 -= einsum("ia,jk->jika", t1, x14) x25 += einsum("ia,jk->jika", t1, x14) - x51 = np.zeros((nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir), dtype=types[float]) x51 += einsum("ia,ij->ja", t1, x14) del x14 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ia->ia", x51) - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("ia->ia", x51) del x51 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ij,kiab->kjab", x5, t2) x45 += einsum("ijab->ijba", x44) del x44 @@ -1151,19 +1152,19 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->kjil", delta_oo, x5) rdm2_f_oooo -= einsum("ij,kl->kjli", delta_oo, x5) del x5 - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum("ai,jkba->ijkb", l1, t2) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ia,ijkb->jkab", t1, x6) - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ijab->ijab", x39) del x39 rdm2_f_ovoo -= einsum("ijka->iakj", x6) rdm2_f_vooo += einsum("ijka->aikj", x6) del x6 - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("ia,waj->wji", t1, lu11) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("wia,wjk->jkia", u11, x7) x15 += einsum("ijka->ijka", x8) x25 -= einsum("ijka->ijka", x8) @@ -1171,19 +1172,19 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo -= einsum("ijka->aijk", x25) rdm2_f_vooo += einsum("ijka->aikj", x25) del x25 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("wia,wij->ja", u11, x7) x13 += einsum("ia->ia", x11) x52 += einsum("ia->ia", x11) x53 += einsum("ia->ia", x11) del x11 - x35 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x35 += einsum("ia,wij->wja", t1, x7) del x7 - x36 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x36 -= einsum("wia->wia", x35) del x35 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum("ai,jiba->jb", l1, t2) x13 -= einsum("ia->ia", x10) x15 += einsum("ij,ka->jika", delta_oo, x13) @@ -1195,7 +1196,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x13 x38 += einsum("ia,jb->ijab", t1, x10) del x10 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("w,wia->ia", ls1, u11) x24 += einsum("ia->ia", x22) x52 -= einsum("ia->ia", x22) @@ -1210,22 +1211,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo -= einsum("ij,ka->ajik", delta_oo, x24) rdm2_f_vooo += einsum("ij,ka->ajki", delta_oo, x24) del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_ovov -= einsum("ijab->ibja", x26) rdm2_f_ovvo += einsum("ijab->ibaj", x26) rdm2_f_voov += einsum("ijab->bija", x26) rdm2_f_vovo -= einsum("ijab->biaj", x26) del x26 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 -= einsum("abij,kjca->ikbc", l2, t2) - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum("ijab,jkbc->ikac", t2, x27) x42 += einsum("ijab->ijab", x41) del x41 - x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x60 += einsum("ia,ijbc->jbac", t1, x27) - x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x62 -= einsum("iabc->iabc", x60) del x60 rdm2_f_ovov -= einsum("ijab->ibja", x27) @@ -1233,17 +1234,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ijab->bija", x27) rdm2_f_vovo -= einsum("ijab->biaj", x27) del x27 - x29 = np.zeros((nvir, nvir), dtype=np.float64) + x29 = np.zeros((nvir, nvir), dtype=types[float]) x29 += einsum("ai,ib->ab", l1, t1) - x32 = np.zeros((nvir, nvir), dtype=np.float64) + x32 = np.zeros((nvir, nvir), dtype=types[float]) x32 += einsum("ab->ab", x29) - x61 = np.zeros((nvir, nvir), dtype=np.float64) + x61 = np.zeros((nvir, nvir), dtype=types[float]) x61 += einsum("ab->ab", x29) del x29 - x30 = np.zeros((nvir, nvir), dtype=np.float64) + x30 = np.zeros((nvir, nvir), dtype=types[float]) x30 += einsum("wai,wib->ab", lu11, u11) x32 += einsum("ab->ab", x30) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ab,ijca->ijcb", x30, t2) x42 -= einsum("ijab->ijab", x40) del x40 @@ -1254,7 +1255,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x30 x62 += einsum("ia,bc->ibac", t1, x61) del x61 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 -= einsum("abij,ijca->bc", l2, t2) x32 += einsum("ab->ab", x31) * 0.5 rdm2_f_ovov += einsum("ij,ab->jbia", delta_oo, x32) @@ -1262,7 +1263,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ij,ab->bjia", delta_oo, x32) * -1 rdm2_f_vovo += einsum("ij,ab->bjai", delta_oo, x32) del x32 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum("ab,ijca->ijcb", x31, t2) rdm2_f_vvoo += einsum("ijab->abji", x46) * 0.5 rdm2_f_vvoo += einsum("ijab->baji", x46) * -0.5 @@ -1272,11 +1273,11 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("ia,bc->acbi", t1, x31) * -0.5 rdm2_f_vvvo += einsum("ia,bc->cabi", t1, x31) * 0.5 del x31 - x34 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x34 += einsum("wai,jiba->wjb", lu11, t2) x36 += einsum("wia->wia", x34) del x34 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("wia,wjb->jiba", u11, x36) del x36 x38 += einsum("ijab->ijab", x37) @@ -1290,23 +1291,23 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvoo += einsum("ia,jb->baij", t1, x52) rdm2_f_vvoo -= einsum("ia,jb->abij", t1, x52) del x52 - x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x54 += einsum("ia,bcji->jbca", t1, l2) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv -= einsum("iabc->icba", x54) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->ciba", x54) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("ia,ibcd->adcb", t1, x54) del x54 - x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x57 += einsum("ai,jibc->jabc", l1, t2) rdm2_f_vvov -= einsum("iabc->cbia", x57) rdm2_f_vvvo += einsum("iabc->cbai", x57) del x57 - x58 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x58 += einsum("ia,wbi->wba", t1, lu11) - x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x59 += einsum("wia,wbc->ibca", u11, x58) del x58 x62 -= einsum("iabc->iabc", x59) @@ -1322,7 +1323,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kjia", delta_oo, l1) rdm2_f_oovo -= einsum("ij,ak->jkai", delta_oo, l1) rdm2_f_oovo += einsum("ij,ak->kjai", delta_oo, l1) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum("abij->jiba", l2) rdm2_f_ovov -= einsum("ai,jb->ibja", l1, t1) rdm2_f_ovvo += einsum("ai,jb->ibaj", l1, t1) @@ -1347,9 +1348,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("ai,wia->w", l1, u11) dm_b_des += einsum("w->w", s1) @@ -1367,7 +1368,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("wai,xia->wx", lu11, u11) rdm1_b += einsum("w,x->wx", ls1, s1) @@ -1386,31 +1387,31 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("ia,waj->wji", t1, lu11) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("wia,wij->ja", u11, x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x0) del x0 - x1 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x1 += einsum("ai,wja->wij", l1, u11) - x14 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x14 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x14 += einsum("wij->wij", x1) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x1) del x1 - x2 = np.zeros((nbos), dtype=np.float64) + x2 = np.zeros((nbos), dtype=types[float]) x2 += einsum("ai,wia->w", l1, u11) rdm_eb_des_oo += einsum("w,ij->wji", x2, delta_oo) - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov += einsum("w,ia->wia", x2, t1) del x2 - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 -= einsum("wia,abji->wjb", u11, l2) - x4 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x4 += einsum("ia,wja->wji", t1, x3) x14 += einsum("wij->wij", x4) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x14) @@ -1418,27 +1419,27 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_des_oo -= einsum("wij->wji", x4) del x4 rdm_eb_des_ov += einsum("wia,jiba->wjb", x3, t2) - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x3) - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("ia,wib->wba", t1, x3) del x3 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("ai,ja->ij", l1, t1) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("ij->ij", x5) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x5) - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ij->ij", x5) * 1.9999999999999987 del x5 - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum("wai,wja->ij", lu11, u11) x8 += einsum("ij->ij", x6) x13 += einsum("ij->ij", x6) x16 += einsum("ij->ij", x6) * 1.9999999999999987 del x6 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("abij,kjab->ik", l2, t2) x8 += einsum("ij->ij", x7) * 0.5 x13 += einsum("ij->ij", x7) * 0.5 @@ -1451,25 +1452,25 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x8 += einsum("ij->ji", delta_oo) * -1 rdm_eb_des_oo += einsum("w,ij->wji", s1, x8) * -1 del x8 - x9 = np.zeros((nbos, nbos), dtype=np.float64) + x9 = np.zeros((nbos, nbos), dtype=types[float]) x9 += einsum("wai,xia->wx", lu11, u11) rdm_eb_des_ov += einsum("wx,wia->xia", x9, u11) del x9 - x10 = np.zeros((nvir, nvir), dtype=np.float64) + x10 = np.zeros((nvir, nvir), dtype=types[float]) x10 += einsum("wai,wib->ab", lu11, u11) - x12 = np.zeros((nvir, nvir), dtype=np.float64) + x12 = np.zeros((nvir, nvir), dtype=types[float]) x12 += einsum("ab->ab", x10) * 2 - x18 = np.zeros((nvir, nvir), dtype=np.float64) + x18 = np.zeros((nvir, nvir), dtype=types[float]) x18 += einsum("ab->ab", x10) del x10 - x11 = np.zeros((nvir, nvir), dtype=np.float64) + x11 = np.zeros((nvir, nvir), dtype=types[float]) x11 -= einsum("abij,ijca->bc", l2, t2) x12 += einsum("ab->ab", x11) rdm_eb_des_ov += einsum("ab,wia->wib", x12, u11) * -0.5 del x12 x18 += einsum("ab->ab", x11) * 0.5 del x11 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ia,bajk->jkib", t1, l2) x17 += einsum("ijab,ijkb->ka", t2, x15) * -0.5000000000000003 del x15 @@ -1484,9 +1485,9 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_oo += einsum("w,ij->wji", ls1, delta_oo) rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) rdm_eb_cre_ov += einsum("wai,jiba->wjb", lu11, t2) - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) rdm_eb_des_ov += einsum("wia->wia", u11) rdm_eb_des_vo += einsum("w,ai->wai", s1, l1) diff --git a/ebcc/codegen/GCCSDtp.py b/ebcc/codegen/GCCSDtp.py index e4c60d5a..3ee98066 100644 --- a/ebcc/codegen/GCCSDtp.py +++ b/ebcc/codegen/GCCSDtp.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -26,7 +27,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) sV = space.active[space.correlated][space.virtual[space.correlated]] # T amplitudes - t1new = np.zeros(((nocc, nvir)), dtype=np.float64) + t1new = np.zeros(((nocc, nvir)), dtype=types[float]) t1new[np.ix_(so,sv)] += einsum(f.ov, (0, 1), (0, 1)) t1new[np.ix_(so,sv)] += einsum(f.oo, (0, 1), t1[np.ix_(so,sv)], (1, 2), (0, 2)) * -1.0 t1new[np.ix_(so,sv)] += einsum(f.vv, (0, 1), t1[np.ix_(so,sv)], (2, 1), (2, 0)) @@ -35,90 +36,90 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t1new[np.ix_(so,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.ooov, (0, 1, 4, 3), (4, 2)) * -0.5 t1new[np.ix_(so,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.ovvv, (1, 4, 2, 3), (0, 4)) * -0.5 t1new[np.ix_(sO,sV)] += einsum(v.OOVV, (0, 1, 2, 3), t3, (4, 0, 1, 5, 2, 3), (4, 5)) * 0.25 - t2new = np.zeros(((nocc, nocc, nvir, nvir)), dtype=np.float64) + t2new = np.zeros(((nocc, nocc, nvir, nvir)), dtype=types[float]) t2new[np.ix_(so,so,sv,sv)] += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) t2new[np.ix_(sO,sO,sV,sV)] += einsum(f.OV, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) t2new[np.ix_(so,so,sv,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.oooo, (4, 5, 0, 1), (4, 5, 2, 3)) * 0.5 t2new[np.ix_(so,so,sv,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.vvvv, (4, 5, 2, 3), (0, 1, 4, 5)) * 0.5 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(f.ov, (0, 1), t1[np.ix_(so,sv)], (2, 1), (0, 2)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x0, (0, 2), (2, 1)) * -1.0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x1, (0, 2), (2, 1)) * -1.0 - x2 = np.zeros((nvir, nvir), dtype=np.float64) + x2 = np.zeros((nvir, nvir), dtype=types[float]) x2 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x2, (2, 1), (0, 2)) * -1.0 - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) t1new[np.ix_(so,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x3, (4, 0, 1, 3), (4, 2)) * 0.5 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x4, (2, 0), (2, 1)) * -0.5 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) t1new[np.ix_(so,sv)] += einsum(x5, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 0, 3, 1), (2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(t1[np.ix_(so,sv)], (0, 1), x5, (2, 1), (0, 2)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x6, (2, 0), (2, 1)) * -1.0 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(f.oo, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 1, 3, 4), (0, 2, 3, 4)) t2new[np.ix_(so,so,sv,sv)] += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) del x7 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(f.vv, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new[np.ix_(so,so,sv,sv)] += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x8, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) t2new[np.ix_(so,so,sv,sv)] += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x9, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x9 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) t2new[np.ix_(so,so,sv,sv)] += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) t2new[np.ix_(so,so,sv,sv)] += einsum(x10, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) t2new[np.ix_(so,so,sv,sv)] += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x11, (0, 1, 2, 3), (0, 1, 3, 2)) t2new[np.ix_(so,so,sv,sv)] += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x11, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x11 - x12 = np.zeros((naocc, navir, navir, nocc), dtype=np.float64) + x12 = np.zeros((naocc, navir, navir, nocc), dtype=types[float]) x12 += einsum(v.oVOO, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 1), (4, 5, 6, 0)) * -1.0 t2new[np.ix_(so,sO,sV,sV)] += einsum(x12, (0, 1, 2, 3), (3, 0, 2, 1)) * 0.5 t2new[np.ix_(sO,so,sV,sV)] += einsum(x12, (0, 1, 2, 3), (0, 3, 2, 1)) * -0.5 del x12 - x13 = np.zeros((naocc, naocc, navir, nvir), dtype=np.float64) + x13 = np.zeros((naocc, naocc, navir, nvir), dtype=types[float]) x13 += einsum(v.vOVV, (0, 1, 2, 3), t3, (4, 5, 1, 6, 2, 3), (4, 5, 6, 0)) * -1.0 t2new[np.ix_(sO,sO,sv,sV)] += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 t2new[np.ix_(sO,sO,sV,sv)] += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x0, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 0, 3, 4), (1, 2, 3, 4)) del x0 t2new[np.ix_(so,so,sv,sv)] += einsum(x14, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t1[np.ix_(so,sv)], (0, 1), x15, (0, 2, 3, 4), (2, 3, 1, 4)) del x15 t2new[np.ix_(so,so,sv,sv)] += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x16, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x16 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x17, (2, 3, 0, 4), (2, 3, 1, 4)) del x17 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t1[np.ix_(so,sv)], (0, 1), x18, (2, 0, 3, 4), (2, 3, 1, 4)) del x18 t2new[np.ix_(so,so,sv,sv)] += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -126,20 +127,20 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new[np.ix_(so,so,sv,sv)] += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x19, (0, 1, 2, 3), (1, 0, 3, 2)) del x19 - x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x20 += einsum(t1[np.ix_(so,sv)], (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x20, (2, 3, 4, 1), (0, 2, 4, 3)) * -1.0 del x20 - x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x21 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x21, (4, 0, 1, 5), (4, 5, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x22, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 t2new[np.ix_(so,so,sv,sv)] += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t1[np.ix_(so,sv)], (0, 1), x23, (2, 0, 3, 4), (2, 3, 1, 4)) del x23 t2new[np.ix_(so,so,sv,sv)] += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -147,105 +148,105 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new[np.ix_(so,so,sv,sv)] += einsum(x24, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x24, (0, 1, 2, 3), (1, 0, 3, 2)) del x24 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x1, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x1 t2new[np.ix_(so,so,sv,sv)] += einsum(x25, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x25, (0, 1, 2, 3), (1, 0, 3, 2)) del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1[np.ix_(so,sv)], (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x26, (4, 1, 5, 3), (4, 0, 2, 5)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x27, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x27, (0, 1, 2, 3), (1, 0, 3, 2)) t2new[np.ix_(so,so,sv,sv)] += einsum(x27, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.ovvv, (4, 5, 2, 3), (0, 1, 4, 5)) - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(t1[np.ix_(so,sv)], (0, 1), x28, (2, 3, 0, 4), (2, 3, 1, 4)) del x28 t2new[np.ix_(so,so,sv,sv)] += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t2new[np.ix_(so,so,sv,sv)] += einsum(x29, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 del x29 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(x2, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 del x2 t2new[np.ix_(so,so,sv,sv)] += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) del x30 - x31 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x31 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x31 += einsum(t1[np.ix_(so,sv)], (0, 1), v.vVOO, (1, 2, 3, 4), (3, 4, 2, 0)) * -1.0 - x32 = np.zeros((naocc, navir, navir, nocc), dtype=np.float64) + x32 = np.zeros((naocc, navir, navir, nocc), dtype=types[float]) x32 += einsum(x31, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 2), (4, 5, 6, 3)) del x31 t2new[np.ix_(so,sO,sV,sV)] += einsum(x32, (0, 1, 2, 3), (3, 0, 2, 1)) * 0.5 t2new[np.ix_(sO,so,sV,sV)] += einsum(x32, (0, 1, 2, 3), (0, 3, 2, 1)) * -0.5 del x32 - x33 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x33 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x33 += einsum(v.oOVV, (0, 1, 2, 3), t3, (4, 5, 1, 6, 2, 3), (4, 5, 6, 0)) * -1.0 - x34 = np.zeros((naocc, naocc, navir, nvir), dtype=np.float64) + x34 = np.zeros((naocc, naocc, navir, nvir), dtype=types[float]) x34 += einsum(t1[np.ix_(so,sv)], (0, 1), x33, (2, 3, 4, 0), (3, 2, 4, 1)) * -1.0 del x33 t2new[np.ix_(sO,sO,sv,sV)] += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 t2new[np.ix_(sO,sO,sV,sv)] += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x34 - x35 = np.zeros((naocc, navir), dtype=np.float64) + x35 = np.zeros((naocc, navir), dtype=types[float]) x35 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oOvV, (0, 2, 1, 3), (2, 3)) t2new[np.ix_(sO,sO,sV,sV)] += einsum(x35, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) del x35 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x36, (4, 1, 5, 3), (4, 0, 5, 2)) del x36 t2new[np.ix_(so,so,sv,sv)] += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x37, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x37 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(x4, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 1, 3, 4), (2, 0, 3, 4)) del x4 t2new[np.ix_(so,so,sv,sv)] += einsum(x38, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 t2new[np.ix_(so,so,sv,sv)] += einsum(x38, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 del x38 - x39 = np.zeros((nvir, nvir), dtype=np.float64) + x39 = np.zeros((nvir, nvir), dtype=types[float]) x39 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(x39, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 1), (2, 3, 4, 0)) del x39 t2new[np.ix_(so,so,sv,sv)] += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t2new[np.ix_(so,so,sv,sv)] += einsum(x40, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 del x40 - x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x41 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (0, 1, 4, 5)) t2new[np.ix_(so,so,sv,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x41, (4, 5, 0, 1), (5, 4, 2, 3)) * -0.25 - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(t1[np.ix_(so,sv)], (0, 1), x21, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x21 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(t1[np.ix_(so,sv)], (0, 1), x42, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x42 t2new[np.ix_(so,so,sv,sv)] += einsum(x43, (0, 1, 2, 3), (0, 1, 3, 2)) t2new[np.ix_(so,so,sv,sv)] += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x43 - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(t1[np.ix_(so,sv)], (0, 1), x26, (2, 3, 4, 1), (2, 0, 3, 4)) * -1.0 del x26 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t1[np.ix_(so,sv)], (0, 1), x44, (2, 3, 0, 4), (3, 2, 1, 4)) * -1.0 del x44 t2new[np.ix_(so,so,sv,sv)] += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x45, (0, 1, 2, 3), (0, 1, 3, 2)) del x45 - x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x46 += einsum(t1[np.ix_(so,sv)], (0, 1), x3, (2, 3, 4, 1), (2, 0, 4, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x46, (4, 5, 0, 1), (5, 4, 2, 3)) * -0.5 - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(t2[np.ix_(so,so,sv,sv)], (0, 1, 2, 3), x3, (4, 1, 5, 3), (4, 0, 5, 2)) del x3 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(t1[np.ix_(so,sv)], (0, 1), x47, (2, 3, 0, 4), (2, 3, 1, 4)) del x47 t2new[np.ix_(so,so,sv,sv)] += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -253,44 +254,44 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new[np.ix_(so,so,sv,sv)] += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x48 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(x6, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x6 t2new[np.ix_(so,so,sv,sv)] += einsum(x49, (0, 1, 2, 3), (0, 1, 3, 2)) t2new[np.ix_(so,so,sv,sv)] += einsum(x49, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x49 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(t1[np.ix_(so,sv)], (0, 1), x41, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x41 t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x50, (2, 3, 0, 4), (2, 3, 1, 4)) * 0.5 del x50 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x5, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t1[np.ix_(so,sv)], (0, 1), x51, (2, 3, 0, 4), (2, 3, 1, 4)) del x51 t2new[np.ix_(so,so,sv,sv)] += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(x52, (0, 1, 2, 3), (0, 1, 3, 2)) del x52 - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(t1[np.ix_(so,sv)], (0, 1), x46, (2, 3, 4, 0), (2, 3, 4, 1)) del x46 t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), x53, (2, 3, 0, 4), (3, 2, 1, 4)) * -1.0 del x53 - x54 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x54 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x54 += einsum(f.OO, (0, 1), t3, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) - t3new = np.zeros(((naocc, naocc, naocc, navir, navir, navir)), dtype=np.float64) + t3new = np.zeros(((naocc, naocc, naocc, navir, navir, navir)), dtype=types[float]) t3new += einsum(x54, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new += einsum(x54, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) t3new += einsum(x54, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x54 - x55 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x55 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x55 += einsum(f.VV, (0, 1), t3, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new += einsum(x55, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 t3new += einsum(x55, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) t3new += einsum(x55, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x55 - x56 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x56 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x56 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), v.oVOO, (0, 4, 5, 6), (1, 5, 6, 2, 3, 4)) t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -302,7 +303,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new += einsum(x56, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -1.0 del x56 - x57 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x57 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x57 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), v.vOVV, (2, 4, 5, 6), (0, 1, 4, 3, 5, 6)) t3new += einsum(x57, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 t3new += einsum(x57, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) @@ -314,13 +315,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x57, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) t3new += einsum(x57, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x57 - x58 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x58 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x58 += einsum(v.OOOO, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 7), (4, 0, 1, 5, 6, 7)) t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 0.5 t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -0.5 t3new += einsum(x58, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.5 del x58 - x59 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x59 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x59 += einsum(v.OVOV, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 1), (4, 5, 0, 6, 7, 3)) t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) @@ -332,33 +333,33 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -1.0 t3new += einsum(x59, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) del x59 - x60 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x60 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x60 += einsum(v.VVVV, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 7, 0, 1)) t3new += einsum(x60, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -0.5 t3new += einsum(x60, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 0.5 t3new += einsum(x60, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -0.5 del x60 - x61 = np.zeros((naocc, naocc), dtype=np.float64) + x61 = np.zeros((naocc, naocc), dtype=types[float]) x61 += einsum(f.vO, (0, 1), t1[np.ix_(sO,sv)], (2, 0), (1, 2)) - x62 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x62 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x62 += einsum(x61, (0, 1), t3, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) del x61 t3new += einsum(x62, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new += einsum(x62, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) t3new += einsum(x62, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x62 - x63 = np.zeros((navir, navir), dtype=np.float64) + x63 = np.zeros((navir, navir), dtype=types[float]) x63 += einsum(f.oV, (0, 1), t1[np.ix_(so,sV)], (0, 2), (1, 2)) - x64 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x64 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x64 += einsum(x63, (0, 1), t3, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x63 t3new += einsum(x64, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new += einsum(x64, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -1.0 t3new += einsum(x64, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) del x64 - x65 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x65 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x65 += einsum(f.ov, (0, 1), t2[np.ix_(sO,sO,sv,sV)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x66 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x66 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x66 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x65, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x65 t3new += einsum(x66, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -371,9 +372,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x66, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) t3new += einsum(x66, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x66 - x67 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x67 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x67 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), v.ooOO, (4, 0, 5, 6), (1, 5, 6, 2, 3, 4)) * -1.0 - x68 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x68 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x68 += einsum(t1[np.ix_(so,sV)], (0, 1), x67, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x67 t3new += einsum(x68, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -386,9 +387,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x68, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -1.0 t3new += einsum(x68, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) del x68 - x69 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x69 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x69 += einsum(t1[np.ix_(sO,sv)], (0, 1), v.oVvO, (2, 3, 1, 4), (0, 4, 3, 2)) - x70 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x70 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x70 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x69, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x69 t3new += einsum(x70, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -410,9 +411,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x70, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x70, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) del x70 - x71 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x71 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x71 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), v.oVvO, (4, 5, 2, 6), (0, 1, 6, 3, 5, 4)) * -1.0 - x72 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x72 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x72 += einsum(t1[np.ix_(so,sV)], (0, 1), x71, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x71 t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 @@ -434,9 +435,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x72, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) del x72 - x73 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=np.float64) + x73 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=types[float]) x73 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), v.vvVV, (4, 2, 5, 6), (0, 1, 3, 5, 6, 4)) * -1.0 - x74 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x74 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x74 += einsum(t1[np.ix_(sO,sv)], (0, 1), x73, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x73 t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -1.0 @@ -449,9 +450,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -1.0 t3new += einsum(x74, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x74 - x75 = np.zeros((naocc, naocc, naocc, naocc), dtype=np.float64) + x75 = np.zeros((naocc, naocc, naocc, naocc), dtype=types[float]) x75 += einsum(t1[np.ix_(sO,sv)], (0, 1), v.vOOO, (1, 2, 3, 4), (0, 3, 4, 2)) * -1.0 - x76 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x76 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x76 += einsum(x75, (0, 1, 2, 3), t3, (4, 2, 1, 5, 6, 7), (0, 4, 3, 5, 6, 7)) * -1.0 del x75 t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.5 @@ -461,9 +462,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -0.5 t3new += einsum(x76, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 0.5 del x76 - x77 = np.zeros((naocc, naocc, navir, navir), dtype=np.float64) + x77 = np.zeros((naocc, naocc, navir, navir), dtype=types[float]) x77 += einsum(t1[np.ix_(so,sV)], (0, 1), v.oOOV, (0, 2, 3, 4), (3, 2, 1, 4)) * -1.0 - x78 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x78 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x78 += einsum(x77, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) del x77 t3new += einsum(x78, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) @@ -476,18 +477,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x78, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) t3new += einsum(x78, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x78 - x79 = np.zeros((naocc, naocc), dtype=np.float64) + x79 = np.zeros((naocc, naocc), dtype=types[float]) x79 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oOvO, (0, 2, 1, 3), (2, 3)) - x80 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x80 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x80 += einsum(x79, (0, 1), t3, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) del x79 t3new += einsum(x80, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new += einsum(x80, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new += einsum(x80, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -1.0 del x80 - x81 = np.zeros((naocc, naocc, navir, navir), dtype=np.float64) + x81 = np.zeros((naocc, naocc, navir, navir), dtype=types[float]) x81 += einsum(t1[np.ix_(sO,sv)], (0, 1), v.vVOV, (1, 2, 3, 4), (0, 3, 4, 2)) * -1.0 - x82 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x82 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x82 += einsum(x81, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 7, 2)) del x81 t3new += einsum(x82, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) @@ -500,9 +501,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x82, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new += einsum(x82, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -1.0 del x82 - x83 = np.zeros((navir, navir, navir, navir), dtype=np.float64) + x83 = np.zeros((navir, navir, navir, navir), dtype=types[float]) x83 += einsum(t1[np.ix_(so,sV)], (0, 1), v.oVVV, (0, 2, 3, 4), (1, 3, 4, 2)) * -1.0 - x84 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x84 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x84 += einsum(x83, (0, 1, 2, 3), t3, (4, 5, 6, 7, 1, 2), (4, 5, 6, 0, 7, 3)) del x83 t3new += einsum(x84, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 0.5 @@ -512,18 +513,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x84, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 0.5 t3new += einsum(x84, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -0.5 del x84 - x85 = np.zeros((navir, navir), dtype=np.float64) + x85 = np.zeros((navir, navir), dtype=types[float]) x85 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oVvV, (0, 2, 1, 3), (2, 3)) - x86 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x86 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x86 += einsum(x85, (0, 1), t3, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) del x85 t3new += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 t3new += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) t3new += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x86 - x87 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x87 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x87 += einsum(t2[np.ix_(so,sO,sv,sV)], (0, 1, 2, 3), v.oovO, (4, 0, 2, 5), (1, 5, 3, 4)) * -1.0 - x88 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x88 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x88 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x87, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x87 t3new += einsum(x88, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) @@ -545,9 +546,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x88, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x88, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) del x88 - x89 = np.zeros((naocc, navir, navir, nvir), dtype=np.float64) + x89 = np.zeros((naocc, navir, navir, nvir), dtype=types[float]) x89 += einsum(t2[np.ix_(so,so,sV,sV)], (0, 1, 2, 3), v.oovO, (0, 1, 4, 5), (5, 2, 3, 4)) * -1.0 - x90 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x90 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x90 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), x89, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x89 t3new += einsum(x90, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 0.5 @@ -560,9 +561,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x90, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 0.5 t3new += einsum(x90, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -0.5 del x90 - x91 = np.zeros((naocc, navir, navir, nvir), dtype=np.float64) + x91 = np.zeros((naocc, navir, navir, nvir), dtype=types[float]) x91 += einsum(t2[np.ix_(so,sO,sv,sV)], (0, 1, 2, 3), v.oVvv, (0, 4, 5, 2), (1, 3, 4, 5)) * -1.0 - x92 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x92 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x92 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), x91, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x91 t3new += einsum(x92, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) @@ -584,9 +585,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x92, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new += einsum(x92, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) del x92 - x93 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x93 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x93 += einsum(t2[np.ix_(sO,sO,sv,sv)], (0, 1, 2, 3), v.oVvv, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x94 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x94 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x94 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x93, (4, 5, 6, 0), (5, 4, 1, 2, 3, 6)) del x93 t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 0.5 @@ -599,9 +600,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.5 t3new += einsum(x94, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.5 del x94 - x95 = np.zeros((naocc, naocc, naocc, naocc, navir, navir), dtype=np.float64) + x95 = np.zeros((naocc, naocc, naocc, naocc, navir, navir), dtype=types[float]) x95 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), v.vVOO, (2, 4, 5, 6), (0, 1, 5, 6, 3, 4)) - x96 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x96 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x96 += einsum(t3, (0, 1, 2, 3, 4, 5), x95, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 3, 4)) * -1.0 del x95 t3new += einsum(x96, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 0.5 @@ -614,18 +615,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x96, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 0.5 t3new += einsum(x96, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -0.5 del x96 - x97 = np.zeros((naocc, naocc, naocc, naocc), dtype=np.float64) + x97 = np.zeros((naocc, naocc, naocc, naocc), dtype=types[float]) x97 += einsum(t2[np.ix_(sO,sO,sv,sv)], (0, 1, 2, 3), v.vvOO, (2, 3, 4, 5), (0, 1, 4, 5)) - x98 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x98 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x98 += einsum(x97, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 del x97 t3new += einsum(x98, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.25 t3new += einsum(x98, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.25 t3new += einsum(x98, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -0.25 del x98 - x99 = np.zeros((naocc, naocc, navir, navir, navir, navir), dtype=np.float64) + x99 = np.zeros((naocc, naocc, navir, navir, navir, navir), dtype=types[float]) x99 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), v.oOVV, (0, 4, 5, 6), (1, 4, 2, 3, 5, 6)) - x100 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x100 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x100 += einsum(t3, (0, 1, 2, 3, 4, 5), x99, (6, 2, 7, 8, 4, 5), (6, 0, 1, 7, 8, 3)) del x99 t3new += einsum(x100, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -0.5 @@ -638,9 +639,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x100, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -0.5 t3new += einsum(x100, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 0.5 del x100 - x101 = np.zeros((naocc, naocc, navir, navir), dtype=np.float64) + x101 = np.zeros((naocc, naocc, navir, navir), dtype=types[float]) x101 += einsum(t2[np.ix_(so,sO,sv,sV)], (0, 1, 2, 3), v.oOvV, (0, 4, 2, 5), (1, 4, 3, 5)) - x102 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x102 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x102 += einsum(x101, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x101 t3new += einsum(x102, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 1.00000000000001 @@ -653,36 +654,36 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x102, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 1.00000000000001 t3new += einsum(x102, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -1.00000000000001 del x102 - x103 = np.zeros((naocc, naocc), dtype=np.float64) + x103 = np.zeros((naocc, naocc), dtype=types[float]) x103 += einsum(t2[np.ix_(so,sO,sv,sv)], (0, 1, 2, 3), v.oOvv, (0, 4, 2, 3), (1, 4)) - x104 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x104 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x104 += einsum(x103, (0, 1), t3, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x103 t3new += einsum(x104, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 0.5 t3new += einsum(x104, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 0.5 t3new += einsum(x104, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -0.5 del x104 - x105 = np.zeros((navir, navir, navir, navir), dtype=np.float64) + x105 = np.zeros((navir, navir, navir, navir), dtype=types[float]) x105 += einsum(t2[np.ix_(so,so,sV,sV)], (0, 1, 2, 3), v.ooVV, (0, 1, 4, 5), (2, 3, 4, 5)) - x106 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x106 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x106 += einsum(x105, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 2), (4, 5, 6, 1, 0, 7)) del x105 t3new += einsum(x106, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.25 t3new += einsum(x106, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.25 t3new += einsum(x106, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -0.25 del x106 - x107 = np.zeros((navir, navir), dtype=np.float64) + x107 = np.zeros((navir, navir), dtype=types[float]) x107 += einsum(t2[np.ix_(so,so,sv,sV)], (0, 1, 2, 3), v.oovV, (0, 1, 2, 4), (3, 4)) - x108 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x108 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x108 += einsum(x107, (0, 1), t3, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x107 t3new += einsum(x108, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 0.5 t3new += einsum(x108, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -0.5 t3new += einsum(x108, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 0.5 del x108 - x109 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=np.float64) + x109 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=types[float]) x109 += einsum(t1[np.ix_(so,sV)], (0, 1), t2[np.ix_(so,sO,sV,sV)], (2, 3, 4, 5), v.oovO, (2, 0, 6, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x110 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x110 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x110 += einsum(t1[np.ix_(sO,sv)], (0, 1), x109, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x109 t3new += einsum(x110, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -704,9 +705,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x110, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) t3new += einsum(x110, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x110 - x111 = np.zeros((naocc, navir, navir, nvir), dtype=np.float64) + x111 = np.zeros((naocc, navir, navir, nvir), dtype=types[float]) x111 += einsum(t1[np.ix_(so,sV)], (0, 1), t1[np.ix_(so,sV)], (2, 3), v.oovO, (0, 2, 4, 5), (5, 1, 3, 4)) * -1.0 - x112 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x112 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x112 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), x111, (4, 5, 6, 2), (0, 1, 4, 6, 5, 3)) del x111 t3new += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -719,9 +720,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -1.0 t3new += einsum(x112, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x112 - x113 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=np.float64) + x113 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=types[float]) x113 += einsum(t1[np.ix_(sO,sv)], (0, 1), t2[np.ix_(so,sO,sV,sV)], (2, 3, 4, 5), v.oVvv, (2, 6, 7, 1), (0, 3, 4, 5, 6, 7)) - x114 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x114 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x114 += einsum(t1[np.ix_(sO,sv)], (0, 1), x113, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x113 t3new += einsum(x114, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 @@ -734,9 +735,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x114, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x114, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) del x114 - x115 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=np.float64) + x115 = np.zeros((naocc, naocc, navir, navir, navir, nvir), dtype=types[float]) x115 += einsum(t1[np.ix_(so,sV)], (0, 1), t2[np.ix_(sO,sO,sv,sV)], (2, 3, 4, 5), v.oVvv, (0, 6, 7, 4), (2, 3, 1, 5, 6, 7)) - x116 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x116 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x116 += einsum(t1[np.ix_(sO,sv)], (0, 1), x115, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x115 t3new += einsum(x116, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -758,24 +759,24 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x116, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -1.0 t3new += einsum(x116, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x116 - x117 = np.zeros((naocc, naocc, naocc, nvir), dtype=np.float64) + x117 = np.zeros((naocc, naocc, naocc, nvir), dtype=types[float]) x117 += einsum(t1[np.ix_(sO,sv)], (0, 1), v.vvOO, (2, 1, 3, 4), (0, 3, 4, 2)) - x118 = np.zeros((naocc, naocc, naocc, naocc), dtype=np.float64) + x118 = np.zeros((naocc, naocc, naocc, naocc), dtype=types[float]) x118 += einsum(t1[np.ix_(sO,sv)], (0, 1), x117, (2, 3, 4, 1), (2, 0, 4, 3)) del x117 - x119 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x119 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x119 += einsum(x118, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 del x118 t3new += einsum(x119, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.5 t3new += einsum(x119, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.5 t3new += einsum(x119, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -0.5 del x119 - x120 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x120 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x120 += einsum(t1[np.ix_(sO,sv)], (0, 1), v.oOvV, (2, 3, 1, 4), (0, 3, 4, 2)) - x121 = np.zeros((naocc, naocc, navir, navir), dtype=np.float64) + x121 = np.zeros((naocc, naocc, navir, navir), dtype=types[float]) x121 += einsum(t1[np.ix_(so,sV)], (0, 1), x120, (2, 3, 4, 0), (2, 3, 1, 4)) del x120 - x122 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x122 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x122 += einsum(x121, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x121 t3new += einsum(x122, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -788,47 +789,47 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x122, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -1.0 t3new += einsum(x122, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) del x122 - x123 = np.zeros((naocc, nvir), dtype=np.float64) + x123 = np.zeros((naocc, nvir), dtype=types[float]) x123 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oOvv, (0, 2, 3, 1), (2, 3)) * -1.0 - x124 = np.zeros((naocc, naocc), dtype=np.float64) + x124 = np.zeros((naocc, naocc), dtype=types[float]) x124 += einsum(t1[np.ix_(sO,sv)], (0, 1), x123, (2, 1), (0, 2)) del x123 - x125 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x125 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x125 += einsum(x124, (0, 1), t3, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x124 t3new += einsum(x125, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new += einsum(x125, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) t3new += einsum(x125, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x125 - x126 = np.zeros((navir, navir, navir, nocc), dtype=np.float64) + x126 = np.zeros((navir, navir, navir, nocc), dtype=types[float]) x126 += einsum(t1[np.ix_(so,sV)], (0, 1), v.ooVV, (2, 0, 3, 4), (1, 3, 4, 2)) - x127 = np.zeros((navir, navir, navir, navir), dtype=np.float64) + x127 = np.zeros((navir, navir, navir, navir), dtype=types[float]) x127 += einsum(t1[np.ix_(so,sV)], (0, 1), x126, (2, 3, 4, 0), (2, 1, 4, 3)) del x126 - x128 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x128 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x128 += einsum(x127, (0, 1, 2, 3), t3, (4, 5, 6, 7, 2, 3), (4, 5, 6, 1, 0, 7)) * -1.0 del x127 t3new += einsum(x128, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.5 t3new += einsum(x128, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 0.5 t3new += einsum(x128, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -0.5 del x128 - x129 = np.zeros((navir, nocc), dtype=np.float64) + x129 = np.zeros((navir, nocc), dtype=types[float]) x129 += einsum(t1[np.ix_(so,sv)], (0, 1), v.oovV, (2, 0, 1, 3), (3, 2)) * -1.0 - x130 = np.zeros((navir, navir), dtype=np.float64) + x130 = np.zeros((navir, navir), dtype=types[float]) x130 += einsum(t1[np.ix_(so,sV)], (0, 1), x129, (2, 0), (1, 2)) del x129 - x131 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x131 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x131 += einsum(x130, (0, 1), t3, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x130 t3new += einsum(x131, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new += einsum(x131, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -1.0 t3new += einsum(x131, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) del x131 - x132 = np.zeros((naocc, navir, nocc, nvir), dtype=np.float64) + x132 = np.zeros((naocc, navir, nocc, nvir), dtype=types[float]) x132 += einsum(t2[np.ix_(so,sO,sv,sV)], (0, 1, 2, 3), v.oovv, (4, 0, 5, 2), (1, 3, 4, 5)) - x133 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x133 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x133 += einsum(t1[np.ix_(sO,sv)], (0, 1), x132, (2, 3, 4, 1), (0, 2, 3, 4)) - x134 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x134 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x134 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x133, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x133 t3new += einsum(x134, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) @@ -850,9 +851,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x134, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x134, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) del x134 - x135 = np.zeros((naocc, naocc, naocc, navir, nocc, nocc), dtype=np.float64) + x135 = np.zeros((naocc, naocc, naocc, navir, nocc, nocc), dtype=types[float]) x135 += einsum(t1[np.ix_(sO,sv)], (0, 1), t2[np.ix_(sO,sO,sv,sV)], (2, 3, 4, 5), v.oovv, (6, 7, 4, 1), (0, 2, 3, 5, 6, 7)) - x136 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x136 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x136 += einsum(t2[np.ix_(so,so,sV,sV)], (0, 1, 2, 3), x135, (4, 5, 6, 7, 1, 0), (4, 5, 6, 7, 2, 3)) * -1.0 del x135 t3new += einsum(x136, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.5 @@ -865,10 +866,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x136, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -0.5 t3new += einsum(x136, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 0.5 del x136 - x137 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x137 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x137 += einsum(t2[np.ix_(sO,sO,sv,sV)], (0, 1, 2, 3), x132, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x132 - x138 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x138 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x138 += einsum(t1[np.ix_(so,sV)], (0, 1), x137, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x137 t3new += einsum(x138, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 @@ -890,12 +891,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x138, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) t3new += einsum(x138, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x138 - x139 = np.zeros((naocc, naocc, nocc, nocc), dtype=np.float64) + x139 = np.zeros((naocc, naocc, nocc, nocc), dtype=types[float]) x139 += einsum(t2[np.ix_(sO,sO,sv,sv)], (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (0, 1, 4, 5)) - x140 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x140 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x140 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x139, (4, 5, 0, 6), (4, 5, 1, 2, 3, 6)) del x139 - x141 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x141 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x141 += einsum(t1[np.ix_(so,sV)], (0, 1), x140, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x140 t3new += einsum(x141, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.5 @@ -908,10 +909,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x141, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -0.5 t3new += einsum(x141, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 0.5 del x141 - x142 = np.zeros((naocc, naocc, navir, nocc), dtype=np.float64) + x142 = np.zeros((naocc, naocc, navir, nocc), dtype=types[float]) x142 += einsum(x5, (0, 1), t2[np.ix_(sO,sO,sv,sV)], (2, 3, 1, 4), (2, 3, 4, 0)) del x5 - x143 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x143 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x143 += einsum(t2[np.ix_(so,sO,sV,sV)], (0, 1, 2, 3), x142, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) * -1.0 del x142 t3new += einsum(x143, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -924,12 +925,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x143, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) t3new += einsum(x143, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x143 - x144 = np.zeros((naocc, naocc, navir, navir, nocc, nvir), dtype=np.float64) + x144 = np.zeros((naocc, naocc, navir, navir, nocc, nvir), dtype=types[float]) x144 += einsum(t1[np.ix_(sO,sv)], (0, 1), t2[np.ix_(so,sO,sV,sV)], (2, 3, 4, 5), v.oovv, (6, 2, 7, 1), (0, 3, 4, 5, 6, 7)) * -1.0 - x145 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x145 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x145 += einsum(t1[np.ix_(sO,sv)], (0, 1), x144, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) * -1.0 del x144 - x146 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x146 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x146 += einsum(t1[np.ix_(so,sV)], (0, 1), x145, (2, 3, 4, 5, 6, 0), (3, 2, 4, 1, 5, 6)) * -1.0 del x145 t3new += einsum(x146, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -942,12 +943,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new += einsum(x146, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) t3new += einsum(x146, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x146 - x147 = np.zeros((naocc, naocc, navir, navir, nocc, nvir), dtype=np.float64) + x147 = np.zeros((naocc, naocc, navir, navir, nocc, nvir), dtype=types[float]) x147 += einsum(t1[np.ix_(so,sV)], (0, 1), t2[np.ix_(sO,sO,sv,sV)], (2, 3, 4, 5), v.oovv, (6, 0, 7, 4), (2, 3, 1, 5, 6, 7)) * -1.0 - x148 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=np.float64) + x148 = np.zeros((naocc, naocc, naocc, navir, navir, nocc), dtype=types[float]) x148 += einsum(t1[np.ix_(sO,sv)], (0, 1), x147, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x147 - x149 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=np.float64) + x149 = np.zeros((naocc, naocc, naocc, navir, navir, navir), dtype=types[float]) x149 += einsum(t1[np.ix_(so,sV)], (0, 1), x148, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) * -1.0 del x148 t3new += einsum(x149, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -1.0 diff --git a/ebcc/codegen/GCCSDxTx.py b/ebcc/codegen/GCCSDxTx.py index 813cc32c..803622d2 100644 --- a/ebcc/codegen/GCCSDxTx.py +++ b/ebcc/codegen/GCCSDxTx.py @@ -2,12 +2,13 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 e_cc += einsum(v.oovv, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 0.25 @@ -17,66 +18,66 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x1 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x1, (4, 0, 1, 3), (4, 2)) * 0.5 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(v.ovvv, (0, 1, 2, 3), x2, (0, 4, 2, 3), (4, 1)) * 0.5 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(x3, (0, 1), (0, 1)) del x3 t1new += einsum(x4, (0, 1), t2, (2, 0, 3, 1), (2, 3)) - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 1), (2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(f.oo, (0, 1), (0, 1)) x6 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) x6 += einsum(x5, (0, 1), (0, 1)) x6 += einsum(v.oovv, (0, 1, 2, 3), x2, (1, 4, 2, 3), (0, 4)) * -0.5 t1new += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(t1, (0, 1), x4, (2, 1), (0, 2)) - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum(f.oo, (0, 1), (0, 1)) x9 += einsum(x8, (0, 1), (0, 1)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x9, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x9 - x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x11 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1, 2, 3), x2, (1, 2, 4, 5), (0, 3, 4, 5)) * 0.5 del x11 - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(x5, (0, 1), (0, 1)) del x5 x14 += einsum(x13, (0, 1), (1, 0)) * 0.5 del x13 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(x14, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) * -1.0 del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x7 x16 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -88,11 +89,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x16, (0, 1, 2, 3), (1, 0, 2, 3)) del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x17 x19 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -100,31 +101,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x19, (0, 1, 2, 3), (0, 1, 3, 2)) del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x21, (4, 1, 5, 3), (4, 0, 2, 5)) * -1.0 del x21 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 0, 5, 2)) del x0 - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) del x23 x26 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) del x24 x26 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x25 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), x26, (2, 0, 3, 4), (2, 3, 4, 1)) del x26 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x20 x28 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -136,37 +137,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new += einsum(x28, (0, 1, 2, 3), (1, 0, 3, 2)) del x28 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x29, (4, 1, 5, 3), (4, 0, 5, 2)) del x29 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 += einsum(t1, (0, 1), v.ovvv, (0, 2, 3, 1), (2, 3)) - x32 = np.zeros((nvir, nvir), dtype=np.float64) + x32 = np.zeros((nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum(x31, (0, 1), (0, 1)) del x31 x33 += einsum(x32, (0, 1), (0, 1)) * 0.5 del x32 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x33, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x33 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(v.ovvv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 4, 5, 1)) * 0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(x4, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x4 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(x35, (0, 1, 2, 3), (0, 2, 1, 3)) del x35 x37 += einsum(x36, (0, 1, 2, 3), (2, 1, 0, 3)) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t1, (0, 1), x37, (0, 2, 3, 4), (2, 3, 4, 1)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x30 x39 += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -176,12 +177,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) del x39 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x40 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x40, (4, 5, 2, 3), (5, 4, 0, 1)) * -1.0 del x40 - x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x41 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x41 += einsum(v.oovv, (0, 1, 2, 3), x2, (4, 5, 2, 3), (0, 1, 5, 4)) * -0.5 t2new += einsum(x2, (0, 1, 2, 3), x41, (0, 1, 4, 5), (4, 5, 3, 2)) * -0.5 @@ -194,41 +195,41 @@ def energy_perturbative(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, denom3 = 1 / direct_sum("ia+jb+kc->ijkabc", e_ia, e_ia, e_ia) # energy - x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), v.oovv, (2, 3, 5, 6), denom3, (3, 2, 1, 5, 0, 6), (1, 5, 6, 4)) e_pert = 0 e_pert += einsum(v.ovvv, (0, 1, 2, 3), x0, (0, 2, 3, 1), ()) * 0.25 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 6), (2, 3, 4, 0, 5, 6)) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), denom3, (4, 1, 5, 6, 2, 3), x1, (5, 1, 4, 2, 6, 3), (5, 4, 0, 6)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x2, (0, 1, 2, 3), ()) * -1.0 del x2 - x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x3 += einsum(l1, (0, 1), v.oovv, (2, 3, 4, 5), (1, 2, 3, 0, 4, 5)) * -1.0 x3 += einsum(x1, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) x3 += einsum(x1, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.5 x3 += einsum(x1, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 0.25 x3 += einsum(x1, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 0.5 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(v.ooov, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), denom3, (0, 5, 1, 3, 4, 6), (5, 2, 4, 6)) x4 += einsum(v.oovv, (0, 1, 2, 3), v.ovvv, (1, 4, 2, 3), denom3, (1, 0, 5, 3, 6, 2), (5, 0, 4, 6)) - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(v.ovvv, (0, 1, 2, 3), denom3, (0, 4, 5, 2, 6, 3), x3, (4, 0, 5, 3, 2, 6), (5, 4, 6, 1)) * 4.0 del x3 x5 += einsum(l1, (0, 1), x4, (1, 2, 3, 0), (1, 2, 0, 3)) * 2.0 del x4 e_pert += einsum(t2, (0, 1, 2, 3), x5, (0, 1, 2, 3), ()) * -0.25 del x5 - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), denom3, (1, 4, 5, 2, 6, 3), (4, 5, 0, 6)) - x7 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 6, 7), (2, 3, 4, 5, 0, 1, 6, 7)) x7 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 6, 7), (4, 5, 2, 3, 6, 7, 0, 1)) - x8 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x8 += einsum(l2, (0, 1, 2, 3), v.ooov, (4, 5, 3, 6), (2, 4, 5, 0, 1, 6)) - x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x9 += einsum(x8, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -0.5 x9 += einsum(x8, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 @@ -236,21 +237,21 @@ def energy_perturbative(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, x9 += einsum(x1, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) x9 += einsum(x1, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x1 - x10 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) - x11 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 3, 5, 6), (0, 1, 4, 2, 5, 6)) - x12 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x12 += einsum(x10, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -1.0 x12 += einsum(x11, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -2.0 x12 += einsum(x11, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x12 += einsum(x11, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 - x13 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), x9, (0, 4, 5, 6, 3, 2), (0, 1, 5, 4, 2, 3, 6)) del x9 x13 += einsum(l2, (0, 1, 2, 3), x12, (4, 2, 5, 1, 0, 6), (2, 3, 4, 5, 0, 1, 6)) del x12 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(l1, (0, 1), x6, (2, 1, 3, 0), (1, 2, 3, 0)) del x6 x14 += einsum(v.ovvv, (0, 1, 2, 3), denom3, (0, 4, 5, 2, 6, 3), x7, (0, 7, 5, 4, 2, 3, 1, 6), (5, 4, 7, 6)) * -0.5 @@ -259,13 +260,13 @@ def energy_perturbative(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, del x13 e_pert += einsum(v.ooov, (0, 1, 2, 3), x14, (0, 1, 2, 3), ()) * 0.5 del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x15 += einsum(x11, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -0.5 del x11 x15 += einsum(x10, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) x15 += einsum(x10, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -0.25 del x10 - x16 = np.zeros((nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir), dtype=types[float]) x16 += einsum(v.oovv, (0, 1, 2, 3), denom3, (0, 1, 4, 2, 5, 3), x15, (1, 0, 4, 2, 3, 5), (4, 5)) del x15 e_pert += einsum(l1, (0, 1), x16, (1, 0), ()) diff --git a/ebcc/codegen/GMP2.py b/ebcc/codegen/GMP2.py index dc67a246..7ca1cfe5 100644 --- a/ebcc/codegen/GMP2.py +++ b/ebcc/codegen/GMP2.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy diff --git a/ebcc/codegen/GMP3.py b/ebcc/codegen/GMP3.py index 5a4a16fa..7bf7298c 100644 --- a/ebcc/codegen/GMP3.py +++ b/ebcc/codegen/GMP3.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), t2, (4, 5, 2, 3), (0, 4, 5, 1)) e_mp = 0 e_mp += einsum(v.oooo, (0, 1, 2, 3), x0, (0, 2, 3, 1), ()) * 0.125 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x1 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (4, 0, 5, 2)) * -8.0 x1 += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 5, 2, 3), (0, 1, 4, 5)) diff --git a/ebcc/codegen/GQCISD.py b/ebcc/codegen/GQCISD.py index 214bc6cc..5da31622 100644 --- a/ebcc/codegen/GQCISD.py +++ b/ebcc/codegen/GQCISD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -12,41 +13,41 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(t1, (0, 1), v.ovov, (2, 1, 0, 3), (2, 3)) * -1.0 t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 2, 3), (0, 4)) * -0.5 - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 5, 2, 3), (0, 1, 4, 5)) * 0.5 t2new += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x0 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) t1new += einsum(t2, (0, 1, 2, 3), x0, (4, 0, 1, 3), (4, 2)) * 0.5 del x0 - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(f.ov, (0, 1), (0, 1)) x1 += einsum(t1, (0, 1), v.oovv, (2, 0, 3, 1), (2, 3)) t1new += einsum(x1, (0, 1), t2, (2, 0, 3, 1), (2, 3)) del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 2, 3), (0, 4)) - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum(f.oo, (0, 1), (0, 1)) x3 += einsum(x2, (0, 1), (1, 0)) * 0.5 t1new += einsum(t1, (0, 1), x3, (0, 2), (2, 1)) * -1.0 del x3 - x4 = np.zeros((nvir, nvir), dtype=np.float64) + x4 = np.zeros((nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), v.oovv, (0, 1, 4, 3), (2, 4)) - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(x4, (0, 1), t2, (2, 3, 4, 1), (2, 3, 4, 0)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), x6, (4, 1, 5, 3), (4, 0, 5, 2)) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x5 x8 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -54,14 +55,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) t2new += einsum(x8, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(x2, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) del x2 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x9, (0, 1, 2, 3), (0, 1, 3, 2)) del x9 x12 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -71,18 +72,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x12, (0, 1, 2, 3), (1, 0, 2, 3)) del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) t2new += einsum(x13, (0, 1, 2, 3), (1, 0, 2, 3)) t2new += einsum(x13, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x14, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x14 x16 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -90,7 +91,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x16, (0, 1, 2, 3), (0, 1, 3, 2)) del x16 - x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x17 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x17 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 2, 3), (4, 5, 0, 1)) t2new += einsum(t2, (0, 1, 2, 3), x17, (0, 1, 4, 5), (4, 5, 2, 3)) * 0.25 diff --git a/ebcc/codegen/RCC2.py b/ebcc/codegen/RCC2.py index 71f4a227..530d316d 100644 --- a/ebcc/codegen/RCC2.py +++ b/ebcc/codegen/RCC2.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) * 2.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) e_cc += einsum(x0, (0, 1, 2, 3), x1, (0, 1, 3, 2), ()) * 2.0 @@ -20,53 +21,53 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (3, 2, 4, 1)) * -1.0 - x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) t1new += einsum(t2, (0, 1, 2, 3), x0, (1, 2, 3, 4), (0, 4)) * 2.0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(t2, (0, 1, 2, 3), x2, (4, 1, 0, 2), (4, 3)) * -1.0 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), x3, (0, 2, 3, 1), (2, 3)) * 2.0 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum(f.ov, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(x5, (0, 1), x6, (0, 2, 3, 1), (2, 3)) * 2.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x7 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 del x7 - x8 = np.zeros((nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir), dtype=types[float]) x8 += einsum(f.vv, (0, 1), (0, 1)) * 0.5 x8 += einsum(t1, (0, 1), x0, (0, 2, 1, 3), (2, 3)) del x0 t1new += einsum(t1, (0, 1), x8, (1, 2), (0, 2)) * 2.0 del x8 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum(f.oo, (0, 1), (0, 1)) x10 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 3), (4, 0)) * 2.0 del x3 @@ -76,43 +77,43 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x5 t1new += einsum(t1, (0, 1), x10, (0, 2), (2, 1)) * -1.0 del x10 - x11 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new += einsum(t1, (0, 1), x11, (2, 3, 1, 4), (0, 2, 3, 4)) del x11 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t1, (0, 1), x16, (2, 3, 4, 0), (2, 4, 3, 1)) del x16 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) del x14 x18 += einsum(x15, (0, 1, 2, 3), (2, 0, 1, 3)) del x15 x18 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t1, (0, 1), x18, (0, 2, 3, 4), (2, 3, 4, 1)) del x18 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum(f.oo, (0, 1), (0, 1)) x21 += einsum(x20, (0, 1), (0, 1)) del x20 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(x21, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x21 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x12 x23 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -123,24 +124,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x23 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x24 += einsum(x13, (0, 1, 2, 3), (1, 0, 2, 3)) del x13 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t1, (0, 1), x24, (2, 3, 1, 4), (2, 3, 0, 4)) del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), x25, (0, 2, 3, 4), (3, 2, 4, 1)) del x25 t2new += einsum(x26, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x26, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x26 - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (3, 0, 2, 4)) del x1 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x28 += einsum(t1, (0, 1), x27, (0, 2, 3, 4), (3, 2, 4, 1)) del x27 @@ -151,68 +152,68 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 1, 5, 0), (4, 5, 3, 2)) l2new += einsum(v.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new += einsum(l2, (0, 1, 2, 3), v.oooo, (4, 2, 5, 3), (0, 1, 4, 5)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), x2, (2, 3, 4, 1), (2, 0, 3, 4)) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum(t1, (0, 1), x5, (2, 3, 4, 1), (0, 2, 3, 4)) l2new += einsum(l2, (0, 1, 2, 3), x6, (2, 3, 4, 5), (0, 1, 4, 5)) - x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x7 += einsum(x4, (0, 1, 2, 3), (1, 0, 3, 2)) del x4 x7 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), x7, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x7 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x1 x9 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x3 x9 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), x10, (0, 2, 3, 1), (2, 3)) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) * 2.0 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x13 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x13 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x15 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x17 += einsum(v.oooo, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x17 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x17 += einsum(x16, (0, 1, 2, 3), (2, 1, 0, 3)) x17 += einsum(x16, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -2.0 x18 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x18 += einsum(x0, (0, 1, 2, 3), (1, 2, 0, 3)) @@ -232,55 +233,55 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x17 l1new += einsum(l2, (0, 1, 2, 3), x18, (2, 3, 4, 1), (0, 4)) del x18 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x21 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(l2, (0, 1, 2, 3), x14, (3, 4, 1, 5), (2, 4, 0, 5)) * 2.0 x22 += einsum(l2, (0, 1, 2, 3), x19, (2, 4, 1, 5), (3, 4, 0, 5)) x22 += einsum(t1, (0, 1), x21, (2, 0, 3, 4), (2, 3, 1, 4)) * 2.0 l1new += einsum(v.ovvv, (0, 1, 2, 3), x22, (4, 0, 3, 2), (1, 4)) * -1.0 del x22 - x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - x24 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x24 += einsum(v.vvvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x24 += einsum(v.vvvv, (0, 1, 2, 3), (0, 1, 2, 3)) l1new += einsum(x23, (0, 1, 2, 3), x24, (1, 4, 2, 3), (4, 0)) * 2.0 del x23, x24 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x25 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x26 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x27 += einsum(x25, (0, 1, 2, 3), x26, (0, 4, 2, 5), (1, 4, 3, 5)) * -2.0 del x25, x26 l1new += einsum(v.ovvv, (0, 1, 2, 3), x27, (4, 0, 3, 1), (2, 4)) * -1.0 del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - x29 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x29 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 1, 0), (3, 2, 4, 5)) - x30 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x30 += einsum(t1, (0, 1), x20, (2, 3, 4, 1), (3, 2, 4, 0)) l2new += einsum(v.ovov, (0, 1, 2, 3), x30, (4, 5, 0, 2), (3, 1, 5, 4)) - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) x31 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x31, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x31 - x33 = np.zeros((nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc), dtype=types[float]) x33 += einsum(l2, (0, 1, 2, 3), x14, (2, 4, 0, 1), (3, 4)) * 2.0 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x34 += einsum(x28, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x28 @@ -293,23 +294,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x34 += einsum(t1, (0, 1), x33, (2, 3), (2, 0, 3, 1)) * -1.0 l1new += einsum(v.ovov, (0, 1, 2, 3), x34, (4, 0, 2, 1), (3, 4)) * 2.0 del x34 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x35 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x35 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x35 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x36 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x36 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x36 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x37 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x38 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x38 += einsum(x16, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x38 += einsum(x16, (0, 1, 2, 3), (0, 3, 2, 1)) - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x35, (4, 1, 5, 3), (4, 0, 5, 2)) del x35 x39 += einsum(t2, (0, 1, 2, 3), x36, (4, 1, 5, 2), (4, 0, 5, 3)) * 0.5 @@ -320,17 +321,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x38 l1new += einsum(l2, (0, 1, 2, 3), x39, (3, 2, 4, 1), (0, 4)) * 2.0 del x39 - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x40 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) x41 += einsum(t1, (0, 1), x40, (2, 0, 3, 4), (2, 3, 4, 1)) * -0.5 l1new += einsum(v.ovvv, (0, 1, 2, 3), x41, (4, 0, 3, 1), (2, 4)) * 2.0 del x41 - x42 = np.zeros((nocc, nocc), dtype=np.float64) + x42 = np.zeros((nocc, nocc), dtype=types[float]) x42 += einsum(l2, (0, 1, 2, 3), x14, (2, 4, 0, 1), (3, 4)) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(t2, (0, 1, 2, 3), x21, (4, 1, 5, 3), (4, 0, 5, 2)) * 2.0 del x21 x43 += einsum(t2, (0, 1, 2, 3), x40, (4, 1, 5, 2), (4, 0, 5, 3)) @@ -338,26 +339,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x42 l1new += einsum(v.ovov, (0, 1, 2, 3), x43, (4, 0, 2, 3), (1, 4)) del x43 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x44 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x45 = np.zeros((nvir, nvir), dtype=np.float64) + x45 = np.zeros((nvir, nvir), dtype=types[float]) x45 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x45 += einsum(l2, (0, 1, 2, 3), x44, (2, 3, 1, 4), (0, 4)) * 2.0 - x46 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x46 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x46 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) l1new += einsum(x45, (0, 1), x46, (2, 1, 0, 3), (3, 2)) * 2.0 del x45 - x47 = np.zeros((nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc), dtype=types[float]) x47 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x11, (0, 1), x47, (2, 0), (1, 2)) * -2.0 - x48 = np.zeros((nocc, nocc), dtype=np.float64) + x48 = np.zeros((nocc, nocc), dtype=types[float]) x48 += einsum(x47, (0, 1), (0, 1)) x48 += einsum(x33, (0, 1), (0, 1)) del x33 l1new += einsum(f.ov, (0, 1), x48, (2, 0), (1, 2)) * -1.0 - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum(t1, (0, 1), (0, 1)) * -1.0 x49 += einsum(x14, (0, 1, 2, 3), x20, (0, 1, 4, 2), (4, 3)) * 2.0 del x14 @@ -366,51 +367,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x49 += einsum(t1, (0, 1), x48, (0, 2), (2, 1)) l1new += einsum(x49, (0, 1), x10, (0, 2, 3, 1), (3, 2)) * -2.0 del x49 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) x50 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 l1new += einsum(v.oovv, (0, 1, 2, 3), x50, (4, 0, 1, 3), (2, 4)) * -2.0 del x50 - x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x51 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x51 += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) del x30 l1new += einsum(v.ooov, (0, 1, 2, 3), x51, (4, 0, 1, 2), (3, 4)) * 2.0 del x51 - x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x52 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 x52 += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x29 l1new += einsum(v.ooov, (0, 1, 2, 3), x52, (1, 4, 2, 0), (3, 4)) del x52 - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x53 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 l1new += einsum(x48, (0, 1), x53, (0, 2, 1, 3), (3, 2)) * -1.0 del x48, x53 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x54 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 l1new += einsum(l1, (0, 1), x54, (1, 2, 0, 3), (3, 2)) * 2.0 del x54 - x55 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x55 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x55 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x56 = np.zeros((nvir, nvir), dtype=np.float64) + x56 = np.zeros((nvir, nvir), dtype=types[float]) x56 += einsum(f.vv, (0, 1), (0, 1)) * 0.5 x56 += einsum(t1, (0, 1), x55, (0, 2, 1, 3), (3, 2)) l1new += einsum(l1, (0, 1), x56, (0, 2), (2, 1)) * 2.0 del x56 - x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x57 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x57 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -0.5 - x58 = np.zeros((nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir), dtype=types[float]) x58 += einsum(t1, (0, 1), x10, (0, 2, 3, 1), (2, 3)) * 2.0 del x10 - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 += einsum(f.ov, (0, 1), (0, 1)) x59 += einsum(x58, (0, 1), (0, 1)) - x60 = np.zeros((nocc, nocc), dtype=np.float64) + x60 = np.zeros((nocc, nocc), dtype=types[float]) x60 += einsum(f.oo, (0, 1), (0, 1)) x60 += einsum(v.ovov, (0, 1, 2, 3), x44, (2, 4, 1, 3), (4, 0)) * 2.0 del x44 @@ -419,66 +420,66 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x59 l1new += einsum(l1, (0, 1), x60, (1, 2), (0, 2)) * -1.0 del x60 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(l1, (0, 1), v.ooov, (2, 1, 3, 4), (2, 3, 0, 4)) - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(v.ooov, (0, 1, 2, 3), x20, (4, 1, 2, 5), (4, 0, 5, 3)) - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(v.ovvv, (0, 1, 2, 3), x20, (4, 5, 0, 3), (5, 4, 1, 2)) - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(x20, (0, 1, 2, 3), x5, (1, 2, 4, 5), (0, 4, 3, 5)) - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(t1, (0, 1), x46, (2, 1, 3, 4), (0, 2, 3, 4)) * 2.0 del x46 - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * 2.0 x66 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x66 += einsum(x65, (0, 1, 2, 3), (0, 1, 3, 2)) del x65 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(l2, (0, 1, 2, 3), x66, (3, 4, 5, 1), (2, 4, 0, 5)) del x66 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x69 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) del x68 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(l2, (0, 1, 2, 3), x69, (2, 4, 5, 1), (3, 4, 0, 5)) del x69 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(v.ooov, (0, 1, 2, 3), x40, (4, 0, 1, 5), (2, 4, 3, 5)) del x40 - x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x72 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x72 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(x5, (0, 1, 2, 3), x72, (0, 4, 2, 5), (1, 4, 3, 5)) del x72 - x74 = np.zeros((nvir, nvir), dtype=np.float64) + x74 = np.zeros((nvir, nvir), dtype=types[float]) x74 += einsum(t1, (0, 1), x55, (0, 2, 1, 3), (2, 3)) * 2.0 del x55 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(x74, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) del x74 - x76 = np.zeros((nocc, nocc), dtype=np.float64) + x76 = np.zeros((nocc, nocc), dtype=types[float]) x76 += einsum(t1, (0, 1), x57, (2, 3, 0, 1), (2, 3)) del x57 - x77 = np.zeros((nocc, nocc), dtype=np.float64) + x77 = np.zeros((nocc, nocc), dtype=types[float]) x77 += einsum(t1, (0, 1), x11, (2, 1), (0, 2)) - x78 = np.zeros((nocc, nocc), dtype=np.float64) + x78 = np.zeros((nocc, nocc), dtype=types[float]) x78 += einsum(x76, (0, 1), (1, 0)) del x76 x78 += einsum(x77, (0, 1), (0, 1)) del x77 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(x78, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) * 2.0 del x78 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(x11, (0, 1), x20, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x11 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) * -1.0 x81 += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) del x61 @@ -507,42 +508,42 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x81, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x81, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x81 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(l1, (0, 1), v.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(f.ov, (0, 1), x20, (2, 3, 0, 4), (2, 3, 1, 4)) - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(l1, (0, 1), x5, (1, 2, 3, 4), (2, 3, 0, 4)) - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(x47, (0, 1), v.ovov, (2, 3, 1, 4), (0, 2, 3, 4)) del x47 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(l2, (0, 1, 2, 3), x16, (2, 4, 3, 5), (4, 5, 0, 1)) del x16 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(v.ooov, (0, 1, 2, 3), x20, (1, 4, 2, 5), (4, 0, 5, 3)) - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(x20, (0, 1, 2, 3), x5, (0, 2, 4, 5), (1, 4, 3, 5)) del x5, x20 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x90 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) del x2 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(l2, (0, 1, 2, 3), x90, (2, 4, 1, 5), (3, 4, 0, 5)) del x90 - x92 = np.zeros((nocc, nocc), dtype=np.float64) + x92 = np.zeros((nocc, nocc), dtype=types[float]) x92 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x93 = np.zeros((nocc, nocc), dtype=np.float64) + x93 = np.zeros((nocc, nocc), dtype=types[float]) x93 += einsum(f.oo, (0, 1), (0, 1)) x93 += einsum(x92, (0, 1), (1, 0)) del x92 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(x93, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) del x93 - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x82 x95 += einsum(x83, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -573,46 +574,46 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x1, (2, 4, 0, 1), (4, 3)) * -2.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x3 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x2 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x3, (1, 0, 4, 2), (4, 3)) * -2.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 rdm1_f_ov += einsum(l1, (0, 1), x4, (1, 2, 3, 0), (2, 3)) * 4.0 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(x0, (0, 1), (0, 1)) * 0.5 del x0 x6 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 0, 1), (3, 4)) del x5 rdm1_f_ov += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) * -4.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x7 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 rdm1_f_vv += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 2), (4, 3)) * 4.0 @@ -626,58 +627,58 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 1, 0), (3, 2, 4, 5)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 @@ -691,18 +692,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) - x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x3 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (2, 3, 0, 1)) - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 1, 2)) @@ -716,10 +717,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x4, (2, 3), (3, 0, 2, 1)) * -1.0 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 0, 1), (3, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) * 2.0 @@ -733,30 +734,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -2.0 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x7 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x7, (1, 0, 4, 3), (4, 2)) * 2.0 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(l1, (0, 1), x9, (1, 2, 3, 0), (2, 3)) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 0, 1), (3, 4)) * 2.0 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(x4, (0, 1), (0, 1)) x12 += einsum(x11, (0, 1), (0, 1)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(t1, (0, 1), x12, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_ooov += einsum(t1, (0, 1), x12, (2, 3), (3, 0, 2, 1)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(t1, (0, 1), x12, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x12, (2, 3), (0, 3, 1, 2)) * -1.0 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) - x14 = np.zeros((nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir), dtype=types[float]) x14 += einsum(x8, (0, 1), (0, 1)) x14 += einsum(x10, (0, 1), (0, 1)) * -1.0 x14 += einsum(x13, (0, 1), (0, 1)) @@ -769,31 +770,31 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x14, (2, 3), (2, 0, 3, 1)) * -1.0 del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) rdm2_f_ooov += einsum(x15, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x15, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x16 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (4, 1, 5, 2), (4, 5, 0, 3)) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x18 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 del x18 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x3, (0, 2, 3, 4), (2, 3, 4, 1)) del x3 rdm2_f_ooov += einsum(x20, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x20, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x20, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x20, (0, 1, 2, 3), (1, 2, 3, 0)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x21 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) x21 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -809,29 +810,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(x21, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x21, (0, 1, 2, 3), (2, 0, 3, 1)) del x21 - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x1, (1, 4, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x24 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 3), (4, 5, 0, 2)) del x24 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x25 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), (0, 1)) * -1.0 x26 += einsum(x8, (0, 1), (0, 1)) del x8 @@ -844,16 +845,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x26, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovo += einsum(delta.oo, (0, 1), x26, (2, 3), (2, 0, 3, 1)) * -1.0 del x26 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x27 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), x27, (1, 4, 5, 3), (4, 5, 0, 2)) del x27 rdm2_f_oovo += einsum(x28, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x28, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x28 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x29 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_oovv += einsum(x29, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -861,46 +862,46 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x29, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) del x29 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(x4, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x31 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), x31, (1, 4, 2, 5), (4, 0, 5, 3)) * 2.0 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), x32, (1, 4, 3, 5), (4, 0, 5, 2)) del x32 - x34 = np.zeros((nvir, nvir), dtype=np.float64) + x34 = np.zeros((nvir, nvir), dtype=types[float]) x34 += einsum(t2, (0, 1, 2, 3), x31, (0, 1, 4, 3), (4, 2)) * 2.0 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(x34, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x36 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x17 x36 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x19 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t1, (0, 1), x36, (0, 2, 3, 4), (2, 3, 4, 1)) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(x11, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x11 - x39 = np.zeros((nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x7, (1, 0, 4, 3), (4, 2)) del x7 - x40 = np.zeros((nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nvir), dtype=types[float]) x40 += einsum(l1, (0, 1), x9, (1, 2, 3, 0), (2, 3)) * 0.5 - x41 = np.zeros((nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir), dtype=types[float]) x41 += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) * 0.5 del x12 - x42 = np.zeros((nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nvir), dtype=types[float]) x42 += einsum(x39, (0, 1), (0, 1)) x42 += einsum(x40, (0, 1), (0, 1)) * -1.0 x42 += einsum(x41, (0, 1), (0, 1)) del x41 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(x33, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x43 += einsum(x35, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -918,35 +919,35 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) del x43 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x0, (0, 1, 4, 5), (4, 5, 2, 3)) del x0 rdm2_f_oovv += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t2, (0, 1, 2, 3), x2, (1, 0, 4, 5), (4, 5, 3, 2)) del x2 rdm2_f_oovv += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), x31, (1, 4, 3, 5), (4, 0, 5, 2)) - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(t2, (0, 1, 2, 3), x46, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x46 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x48 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x48, (1, 4, 2, 5), (4, 0, 5, 3)) - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), x49, (1, 4, 2, 5), (4, 0, 5, 3)) * -1.0 del x49 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), x20, (0, 2, 3, 4), (3, 2, 4, 1)) del x20 rdm2_f_oovv += einsum(x51, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x51, (0, 1, 2, 3), (0, 1, 3, 2)) - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) del x44 x52 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -962,53 +963,53 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x52, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x52 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum(t1, (0, 1), x4, (0, 2), (2, 1)) del x4 rdm2_f_oovv += einsum(t1, (0, 1), x53, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x53, (2, 3), (2, 0, 3, 1)) * -1.0 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t2, (0, 1, 2, 3), x54, (1, 4, 2, 5), (4, 0, 5, 3)) del x54 rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) del x55 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x56, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x56, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x56, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x56, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), x56, (1, 4, 2, 5), (4, 0, 5, 3)) rdm2_f_oovv += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) del x57 - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) - x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x59 += einsum(x1, (0, 1, 2, 3), x9, (0, 4, 5, 3), (4, 1, 2, 5)) - x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) del x58 x60 += einsum(x59, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x59 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(t1, (0, 1), x60, (0, 2, 3, 4), (2, 3, 4, 1)) del x60 - x62 = np.zeros((nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nvir), dtype=types[float]) x62 += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) del x6 - x63 = np.zeros((nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nvir), dtype=types[float]) x63 += einsum(x39, (0, 1), (0, 1)) del x39 x63 += einsum(x40, (0, 1), (0, 1)) * -1.0 del x40 x63 += einsum(x62, (0, 1), (0, 1)) del x62 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(x33, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x33 x64 += einsum(x35, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1024,15 +1025,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x64, (0, 1, 2, 3), (1, 0, 3, 2)) del x64 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x65 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(t1, (0, 1), x65, (0, 2, 3, 4), (2, 3, 4, 1)) del x65 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) del x30 x67 += einsum(x66, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1042,30 +1043,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x67, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x67, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x67 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(t2, (0, 1, 2, 3), x31, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(t2, (0, 1, 2, 3), x68, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x68 rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) del x69 - x70 = np.zeros((nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir), dtype=types[float]) x70 += einsum(t1, (0, 1), (0, 1)) * -1.0 x70 += einsum(x53, (0, 1), (0, 1)) del x53 rdm2_f_oovv += einsum(t1, (0, 1), x70, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x70, (2, 3), (0, 2, 1, 3)) * -1.0 del x70 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x71 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(l2, (0, 1, 2, 3), x71, (2, 4, 1, 5), (4, 3, 5, 0)) rdm2_f_ovov += einsum(x72, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovov += einsum(x72, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x72 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(l2, (0, 1, 2, 3), x5, (3, 4, 1, 5), (2, 4, 0, 5)) * 2.0 del x5 rdm2_f_ovov += einsum(x73, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1073,10 +1074,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x73, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x73, (0, 1, 2, 3), (2, 1, 0, 3)) del x73 - x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x74 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x74 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(t1, (0, 1), x74, (2, 0, 3, 4), (2, 3, 4, 1)) del x74 rdm2_f_ovov += einsum(x75, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1084,12 +1085,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x75, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x75, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x75 - x76 = np.zeros((nvir, nvir), dtype=np.float64) + x76 = np.zeros((nvir, nvir), dtype=types[float]) x76 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x77 = np.zeros((nvir, nvir), dtype=np.float64) + x77 = np.zeros((nvir, nvir), dtype=types[float]) x77 += einsum(t2, (0, 1, 2, 3), x31, (0, 1, 4, 3), (4, 2)) del x31 - x78 = np.zeros((nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir), dtype=types[float]) x78 += einsum(x76, (0, 1), (0, 1)) * 0.5 x78 += einsum(x77, (0, 1), (0, 1)) del x77 @@ -1097,18 +1098,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_ovov += einsum(delta.oo, (0, 1), x78, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x78, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x78, (2, 3), (0, 2, 1, 3)) * 2.0 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(t1, (0, 1), x78, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovvv += einsum(t1, (0, 1), x78, (2, 3), (0, 2, 1, 3)) * 2.0 del x78 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(t1, (0, 1), x1, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x79, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x79, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x79, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x79, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x79 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(t2, (0, 1, 2, 3), x48, (1, 4, 5, 2), (4, 0, 5, 3)) del x48 rdm2_f_ovvo += einsum(x80, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1116,10 +1117,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x80, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x80, (0, 1, 2, 3), (2, 1, 3, 0)) del x80 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 2.0 x81 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(t2, (0, 1, 2, 3), x81, (1, 4, 5, 3), (4, 0, 5, 2)) del x81 rdm2_f_ovvo += einsum(x82, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -1127,7 +1128,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x82, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x82, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x82 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(t1, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) del x16 rdm2_f_ovvo += einsum(x83, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1135,7 +1136,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x83, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x83, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x83 - x84 = np.zeros((nvir, nvir), dtype=np.float64) + x84 = np.zeros((nvir, nvir), dtype=types[float]) x84 += einsum(x76, (0, 1), (0, 1)) del x76 x84 += einsum(x34, (0, 1), (0, 1)) @@ -1148,22 +1149,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(delta.oo, (0, 1), x84, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x84, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x84, (2, 3), (2, 0, 3, 1)) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(t1, (0, 1), x84, (2, 3), (2, 0, 3, 1)) rdm2_f_vovv += einsum(t1, (0, 1), x84, (2, 3), (2, 0, 3, 1)) - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x85, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x85, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x85, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x85, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t1, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovvo += einsum(x86, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x86, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(l2, (0, 1, 2, 3), x9, (3, 4, 5, 1), (4, 2, 5, 0)) del x9 rdm2_f_ovvo += einsum(x87, (0, 1, 2, 3), (0, 3, 2, 1)) @@ -1171,45 +1172,45 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x87, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x87, (0, 1, 2, 3), (3, 0, 1, 2)) del x87 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(l2, (0, 1, 2, 3), x71, (2, 4, 5, 1), (4, 3, 5, 0)) del x71 rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x88 - x89 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x89 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x89, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x89, (0, 1, 2, 3), (1, 0, 3, 2)) - x90 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x90 += einsum(t2, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 rdm2_f_ovvv += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x90, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x90, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x91 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(l2, (0, 1, 2, 3), x91, (3, 4, 1, 5), (4, 2, 5, 0)) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x93 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(l2, (0, 1, 2, 3), x93, (2, 4, 1, 5), (4, 3, 5, 0)) del x93 - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) x95 += einsum(x92, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x95 += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) del x94 - x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x96 += einsum(t1, (0, 1), x95, (0, 2, 3, 4), (2, 3, 4, 1)) del x95 - x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x97 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 x97 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1227,7 +1228,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x97, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x97, (0, 1, 2, 3), (1, 0, 3, 2)) del x97 - x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum(t1, (0, 1), x56, (0, 2, 3, 4), (2, 3, 1, 4)) del x56 rdm2_f_ovvv += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1235,60 +1236,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x98 - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) x99 += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) x99 += einsum(x92, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x92 - x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum(t1, (0, 1), x99, (0, 2, 3, 4), (2, 3, 4, 1)) del x99 rdm2_f_ovvv += einsum(x100, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovvv += einsum(x100, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x100 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(l2, (0, 1, 2, 3), x91, (3, 4, 1, 5), (4, 2, 5, 0)) * 0.5 del x91 - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x85 x102 += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x86 x102 += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x101 - x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x103 += einsum(t1, (0, 1), x102, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x102 rdm2_f_vovv += einsum(x103, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x103, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x103 - x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x104, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x104, (0, 1, 2, 3), (2, 1, 3, 0)) - x105 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x105 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x105, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x105, (0, 1, 2, 3), (1, 0, 3, 2)) - x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(t1, (0, 1), x104, (0, 2, 3, 4), (3, 2, 4, 1)) del x104 rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) - x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(x105, (0, 1, 2, 3), (1, 0, 3, 2)) del x105 x107 += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) diff --git a/ebcc/codegen/RCC3.py b/ebcc/codegen/RCC3.py index 134b7ca0..dc475ece 100644 --- a/ebcc/codegen/RCC3.py +++ b/ebcc/codegen/RCC3.py @@ -2,19 +2,20 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 e_cc = 0 e_cc += einsum(t2, (0, 1, 2, 3), x0, (0, 1, 3, 2), ()) * 2.0 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x1 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum(f.ov, (0, 1), (0, 1)) x2 += einsum(t1, (0, 1), x1, (0, 2, 1, 3), (2, 3)) del x1 @@ -25,127 +26,127 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (3, 2, 4, 1)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) t1new += einsum(x0, (0, 1, 2, 3), x1, (0, 1, 4, 3, 2, 5), (4, 5)) * -0.25 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 t1new += einsum(x2, (0, 1, 2, 3), t3, (4, 1, 0, 5, 2, 3), (4, 5)) * 1.5 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x3 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x3, (4, 5, 3, 1), (5, 4, 0, 2)) - x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x4 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x4 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 t1new += einsum(x3, (0, 1, 2, 3), x4, (0, 2, 3, 4), (1, 4)) * 2.0 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x6 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x6 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x6 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(t2, (0, 1, 2, 3), x6, (4, 0, 1, 3), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(f.ov, (0, 1), (0, 1)) x9 += einsum(x8, (0, 1), (0, 1)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) t1new += einsum(x9, (0, 1), x10, (0, 2, 1, 3), (2, 3)) * 2.0 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x11 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x11, (0, 2, 1, 3), (2, 3)) * 2.0 del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(f.oo, (0, 1), (0, 1)) x14 += einsum(x12, (0, 1), (0, 1)) x14 += einsum(x3, (0, 1, 2, 3), x7, (0, 4, 2, 3), (4, 1)) * 2.0 x14 += einsum(t1, (0, 1), x13, (2, 3, 0, 1), (3, 2)) * 2.0 t1new += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) * -1.0 del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 1, 0), (4, 5, 3, 2)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x17, (4, 1, 2, 5), (4, 0, 3, 5)) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(x5, (0, 1, 2, 3), t3, (4, 2, 1, 5, 6, 3), (0, 4, 5, 6)) - x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x22, (0, 1, 2, 3), t3, (4, 5, 0, 2, 6, 1), (4, 5, 6, 3)) * 0.5 del x22 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x24 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x24, (0, 1, 2, 3), t3, (2, 4, 0, 3, 5, 6), (4, 1, 6, 5)) * 0.5 del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), x4, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x4 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t2, (0, 1, 2, 3), x26, (4, 1, 3, 5), (0, 4, 2, 5)) del x26 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 1, 3), (4, 5, 0, 6)) - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 1, 2), (4, 0, 5, 3)) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.5 x32 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x32 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(v.ooov, (0, 1, 2, 3), x32, (2, 4, 5, 3), (0, 1, 4, 5)) * 2.0 del x32 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(x9, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(x28, (0, 1, 2, 3), (2, 0, 1, 3)) x35 += einsum(x29, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x29 @@ -157,20 +158,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x33 x35 += einsum(x34, (0, 1, 2, 3), (2, 1, 0, 3)) del x34 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(t1, (0, 1), x35, (0, 2, 3, 4), (2, 3, 1, 4)) del x35 - x37 = np.zeros((nocc, nocc), dtype=np.float64) + x37 = np.zeros((nocc, nocc), dtype=types[float]) x37 += einsum(t1, (0, 1), x9, (2, 1), (0, 2)) * 0.5 del x9 - x38 = np.zeros((nocc, nocc), dtype=np.float64) + x38 = np.zeros((nocc, nocc), dtype=types[float]) x38 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x38 += einsum(x37, (0, 1), (0, 1)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(x38, (0, 1), t2, (2, 1, 3, 4), (2, 0, 4, 3)) * 2.0 del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x16 x40 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -193,69 +194,69 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x40, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x40, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x40 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x42 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x42, (0, 1, 2, 3), t3, (1, 4, 2, 3, 5, 6), (4, 0, 6, 5)) * 0.5 del x42 - x44 = np.zeros((nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nvir), dtype=types[float]) x44 += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) - x45 = np.zeros((nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir), dtype=types[float]) x45 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x45 += einsum(x44, (0, 1), (0, 1)) del x44 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(x45, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(t1, (0, 1), x5, (2, 3, 0, 4), (2, 3, 1, 4)) - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x48 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x48, (1, 4, 3, 5), (0, 4, 2, 5)) * 0.5 del x48 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x47 x50 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x49 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(t2, (0, 1, 2, 3), x50, (4, 1, 5, 2), (0, 4, 3, 5)) * 2.0 del x50 - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 3), (2, 4)) * 2.0 - x53 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x53 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x53 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x54 = np.zeros((nvir, nvir), dtype=np.float64) + x54 = np.zeros((nvir, nvir), dtype=types[float]) x54 += einsum(t1, (0, 1), x53, (0, 2, 1, 3), (2, 3)) del x53 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum(x52, (0, 1), (1, 0)) del x52 x55 += einsum(x54, (0, 1), (0, 1)) * -1.0 del x54 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x55, (0, 1), t2, (2, 3, 0, 4), (2, 3, 4, 1)) del x55 - x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), (0, 4, 5, 3)) - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum(x0, (0, 1, 2, 3), t3, (4, 5, 0, 2, 6, 3), (4, 5, 1, 6)) * 0.5 del x0 - x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x59 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x59 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(t2, (0, 1, 2, 3), x59, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x59 - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum(v.ovvv, (0, 1, 2, 3), x3, (4, 5, 3, 1), (0, 4, 5, 2)) - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x62 += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x57 @@ -265,29 +266,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x60 x62 += einsum(x61, (0, 1, 2, 3), (2, 1, 0, 3)) del x61 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(t1, (0, 1), x62, (2, 3, 0, 4), (2, 3, 1, 4)) del x62 - x64 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x64 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x64 += einsum(t1, (0, 1), t2, (2, 3, 4, 5), (2, 0, 3, 1, 4, 5)) * -1.0 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(v.ovvv, (0, 1, 2, 3), x64, (0, 4, 5, 1, 6, 3), (4, 5, 2, 6)) del x64 - x66 = np.zeros((nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc), dtype=types[float]) x66 += einsum(t2, (0, 1, 2, 3), x7, (1, 4, 3, 2), (0, 4)) - x67 = np.zeros((nocc, nocc), dtype=np.float64) + x67 = np.zeros((nocc, nocc), dtype=types[float]) x67 += einsum(t1, (0, 1), x13, (2, 3, 0, 1), (2, 3)) del x13 - x68 = np.zeros((nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc), dtype=types[float]) x68 += einsum(x66, (0, 1), (1, 0)) del x66 x68 += einsum(x67, (0, 1), (1, 0)) del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(x68, (0, 1), t2, (2, 0, 3, 4), (2, 1, 4, 3)) * 2.0 del x68 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) del x41 x70 += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -307,61 +308,61 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x70, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x70 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x71 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 x71 += einsum(t2, (0, 1, 2, 3), x7, (1, 4, 3, 5), (0, 4, 2, 5)) del x7 t2new += einsum(t2, (0, 1, 2, 3), x71, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x71 - x72 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x72 += einsum(v.ovov, (0, 1, 2, 3), x3, (4, 5, 1, 3), (4, 5, 0, 2)) del x3 - x73 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x73 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x73 += einsum(x72, (0, 1, 2, 3), (3, 1, 0, 2)) del x72 t2new += einsum(t2, (0, 1, 2, 3), x73, (0, 4, 5, 1), (5, 4, 3, 2)) - x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x74 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x74 += einsum(t1, (0, 1), x73, (0, 2, 3, 4), (3, 2, 4, 1)) del x73 t2new += einsum(t1, (0, 1), x74, (2, 3, 0, 4), (2, 3, 1, 4)) del x74 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x75 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 t2new += einsum(t2, (0, 1, 2, 3), x75, (4, 1, 5, 2), (4, 0, 5, 3)) del x75 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x76 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x76, (4, 1, 5, 2), (4, 0, 3, 5)) del x76 - x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 6), (0, 4, 5, 2, 3, 6)) - x78 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 1, 6), (4, 0, 5, 6, 2, 3)) - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x80 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(t2, (0, 1, 2, 3), x79, (4, 5, 6, 3), (4, 0, 1, 5, 2, 6)) del x79 - x81 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(x78, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x78 x81 += einsum(x80, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x80 - x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x82 += einsum(t1, (0, 1), x81, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x81 - x83 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x83 += einsum(x77, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x77 x83 += einsum(x82, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x82 - t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) t3new += einsum(x83, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new += einsum(x83, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) t3new += einsum(x83, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -375,24 +376,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x83, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x83, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x83 - x84 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 6, 1), (4, 0, 6, 5, 2, 3)) del x18 - x85 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x85 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t1, (0, 1), x85, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x85 - x87 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(t2, (0, 1, 2, 3), x17, (4, 5, 3, 6), (4, 0, 1, 5, 2, 6)) - x88 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(x84, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x84 x88 += einsum(x86, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x86 x88 += einsum(x87, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x87 - x89 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x89 += einsum(t1, (0, 1), x88, (2, 3, 0, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x88 t3new += einsum(x89, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -408,32 +409,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x89, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x89, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x89 - x90 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x90 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x91 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x92 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(t1, (0, 1), x91, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x91 - x93 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x93 += einsum(t1, (0, 1), x92, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x92 - x94 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x94 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x95 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x95 += einsum(t1, (0, 1), x5, (2, 3, 4, 1), (2, 0, 4, 3)) - x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x96 += einsum(t1, (0, 1), x95, (2, 3, 0, 4), (3, 2, 4, 1)) del x95 - x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x97 += einsum(x94, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x94 x97 += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) del x96 - x98 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum(t2, (0, 1, 2, 3), x97, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) del x97 - x99 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum(x90, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x90 x99 += einsum(x93, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -453,27 +454,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x99, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x99, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x99 - x100 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 1, 6), (4, 0, 5, 2, 3, 6)) del x5 - x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x101 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x102 += einsum(t2, (0, 1, 2, 3), x101, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) del x101 - x103 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum(t2, (0, 1, 2, 3), v.oooo, (4, 5, 6, 1), (0, 4, 5, 6, 2, 3)) - x104 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 6, 3), (0, 1, 4, 6, 2, 5)) - x105 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(x103, (0, 1, 2, 3, 4, 5), (0, 2, 3, 1, 4, 5)) * -1.0 del x103 x105 += einsum(x104, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x104 - x106 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(t1, (0, 1), x105, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x105 - x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(x100, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x100 x107 += einsum(x102, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -493,42 +494,42 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x107, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x107, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x107 - x108 = np.zeros((nvir, nvir), dtype=np.float64) + x108 = np.zeros((nvir, nvir), dtype=types[float]) x108 += einsum(f.ov, (0, 1), t1, (0, 2), (1, 2)) - x109 = np.zeros((nvir, nvir), dtype=np.float64) + x109 = np.zeros((nvir, nvir), dtype=types[float]) x109 += einsum(f.vv, (0, 1), (0, 1)) x109 += einsum(x108, (0, 1), (0, 1)) * -1.0 del x108 t3new += einsum(x109, (0, 1), t3, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) - x110 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x110 += einsum(x109, (0, 1), t3, (2, 3, 4, 0, 5, 6), (2, 4, 3, 6, 5, 1)) del x109 t3new += einsum(x110, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -1.0 t3new += einsum(x110, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) del x110 - x111 = np.zeros((nocc, nocc), dtype=np.float64) + x111 = np.zeros((nocc, nocc), dtype=types[float]) x111 += einsum(f.oo, (0, 1), (0, 1)) x111 += einsum(x12, (0, 1), (0, 1)) del x12 t3new += einsum(x111, (0, 1), t3, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -1.0 - x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x112 += einsum(x111, (0, 1), t3, (2, 3, 0, 4, 5, 6), (2, 3, 1, 6, 4, 5)) del x111 t3new += einsum(x112, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -1.0 del x112 - x113 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 6, 3), (0, 1, 4, 5, 2, 6)) - x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x114 += einsum(t1, (0, 1), x113, (2, 3, 0, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x113 - x115 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x115 += einsum(t1, (0, 1), x17, (2, 3, 1, 4), (0, 2, 3, 4)) del x17 - x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x116 += einsum(t2, (0, 1, 2, 3), x115, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x115 - x117 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x117 += einsum(x114, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x114 x117 += einsum(x116, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -546,7 +547,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x117, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x117, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x117 - x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x118 += einsum(t2, (0, 1, 2, 3), x28, (4, 5, 1, 6), (4, 0, 5, 2, 3, 6)) del x28 t3new += einsum(x118, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) diff --git a/ebcc/codegen/RCCD.py b/ebcc/codegen/RCCD.py index 7038d0c4..c46c5188 100644 --- a/ebcc/codegen/RCCD.py +++ b/ebcc/codegen/RCCD.py @@ -2,10 +2,11 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) e_cc = 0 @@ -16,20 +17,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # T amplitudes - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (4, 0, 3, 5)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) del x1 x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -37,25 +38,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x4 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 2), (0, 4, 3, 5)) - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), x5, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x5 - x7 = np.zeros((nvir, nvir), dtype=np.float64) + x7 = np.zeros((nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), x4, (0, 1, 3, 4), (2, 4)) - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(x7, (0, 1), t2, (2, 3, 1, 4), (2, 3, 4, 0)) * 2.0 del x7 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 2, 3), (0, 4)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x9, (0, 1), t2, (2, 1, 3, 4), (2, 0, 4, 3)) * 2.0 del x9 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 x11 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -65,25 +66,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x11, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x11 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x12 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x12 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 del x4 t2new += einsum(t2, (0, 1, 2, 3), x12, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x12 - x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x13 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x13 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (4, 0, 1, 5)) t2new += einsum(t2, (0, 1, 2, 3), x13, (0, 4, 5, 1), (5, 4, 3, 2)) del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x14 += einsum(x0, (0, 1, 2, 3), (0, 1, 2, 3)) del x0 t2new += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 5, 2), (0, 4, 3, 5)) del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x15 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x15, (4, 1, 5, 2), (0, 4, 5, 3)) @@ -93,45 +94,45 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs): # L amplitudes - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(v.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new += einsum(l2, (0, 1, 2, 3), v.oooo, (4, 2, 5, 3), (0, 1, 4, 5)) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) l2new += einsum(l2, (0, 1, 2, 3), x0, (2, 3, 4, 5), (0, 1, 4, 5)) del x0 - x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l2new += einsum(v.ovov, (0, 1, 2, 3), x1, (4, 5, 0, 2), (1, 3, 4, 5)) del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 1, 5), (3, 4, 0, 5)) del x5 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x7 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x8 = np.zeros((nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir), dtype=types[float]) x8 += einsum(l2, (0, 1, 2, 3), x7, (2, 3, 1, 4), (0, 4)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1), v.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) * 2.0 del x8 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum(l2, (0, 1, 2, 3), x7, (3, 4, 0, 1), (2, 4)) - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(x10, (0, 1), v.ovov, (2, 3, 1, 4), (0, 2, 4, 3)) * 2.0 del x10 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) del x2 x12 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -145,56 +146,56 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new += einsum(x12, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x12, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(l2, (0, 1, 2, 3), x14, (3, 4, 1, 5), (2, 4, 0, 5)) * 0.5 del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x13 x16 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x15 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x17 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(x16, (0, 1, 2, 3), x17, (1, 4, 5, 3), (0, 4, 2, 5)) * 4.0 del x16, x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x19 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(l2, (0, 1, 2, 3), x19, (3, 4, 1, 5), (2, 4, 0, 5)) del x19 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x22 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(l2, (0, 1, 2, 3), x22, (2, 4, 1, 5), (3, 4, 0, 5)) del x22 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x24 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x25 = np.zeros((nvir, nvir), dtype=np.float64) + x25 = np.zeros((nvir, nvir), dtype=types[float]) x25 += einsum(v.ovov, (0, 1, 2, 3), x24, (0, 2, 4, 3), (1, 4)) del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(x25, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) * 2.0 del x25 - x27 = np.zeros((nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc), dtype=types[float]) x27 += einsum(v.ovov, (0, 1, 2, 3), x7, (2, 4, 1, 3), (4, 0)) del x7 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(x27, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) * 2.0 del x27 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) del x18 x29 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -215,21 +216,21 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 0, 1), (4, 2)) * -2.0 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l2, (0, 1, 2, 3), x1, (2, 3, 1, 4), (0, 4)) * 4.0 del x1 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f = np.block([[rdm1_f_oo, rdm1_f_ov], [rdm1_f_vo, rdm1_f_vv]]) @@ -239,31 +240,31 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 0, 1), (2, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 @@ -277,7 +278,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 2, 1)) * -2.0 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) @@ -285,29 +286,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t2, (0, 1, 2, 3), x2, (0, 1, 4, 5), (5, 4, 3, 2)) del x2 rdm2_f_oovv += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x4 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 3), (4, 0, 5, 2)) - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), x5, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x5 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x7 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x7, (1, 4, 5, 2), (0, 4, 3, 5)) del x7 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 2), (4, 0, 5, 3)) * -1.0 del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) del x3 x10 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -319,33 +320,33 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_oovv += einsum(x10, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 2), (4, 0, 5, 3)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), x11, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x11 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x13 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x14 = np.zeros((nvir, nvir), dtype=np.float64) + x14 = np.zeros((nvir, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), x13, (0, 1, 4, 3), (2, 4)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * 2.0 - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(delta.oo, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * 2.0 rdm2_f_vovo += einsum(delta.oo, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * 2.0 rdm2_f_vovo += einsum(delta.oo, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * 2.0 rdm2_f_vovo += einsum(delta.oo, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * 2.0 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(x14, (0, 1), t2, (2, 3, 1, 4), (2, 3, 4, 0)) * 2.0 del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x1, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) * 2.0 del x1 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) del x12 x17 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -365,68 +366,68 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_oovv += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x17 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (1, 4, 2, 5), (4, 0, 5, 3)) del x18 rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x20, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x20, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x20, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x20, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), x20, (1, 4, 2, 5), (4, 0, 5, 3)) del x20 rdm2_f_oovv += einsum(x21, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x21, (0, 1, 2, 3), (0, 1, 3, 2)) del x21 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 3), (4, 0, 5, 2)) * 2.0 del x4 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x22, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x22 rdm2_f_oovv += einsum(x23, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_oovv += einsum(x23, (0, 1, 2, 3), (1, 0, 3, 2)) del x23 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x24 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(l2, (0, 1, 2, 3), x24, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 5, 1), (2, 4, 0, 5)) * 2.0 del x0 rdm2_f_ovov += einsum(x26, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x26, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(x26, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x26, (0, 1, 2, 3), (2, 1, 0, 3)) del x26 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x27 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), x27, (1, 4, 5, 2), (0, 4, 3, 5)) del x27 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(x28, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_ovvo += einsum(x28, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_vovo += einsum(x28, (0, 1, 2, 3), (3, 0, 2, 1)) rdm2_f_vovo += einsum(x28, (0, 1, 2, 3), (3, 0, 2, 1)) del x28 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 2.0 x29 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x29, (1, 4, 5, 3), (0, 4, 2, 5)) del x29 rdm2_f_ovvo += einsum(x30, (0, 1, 2, 3), (0, 3, 2, 1)) @@ -434,7 +435,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_vovo += einsum(x30, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_vovo += einsum(x30, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 del x30 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 += einsum(t2, (0, 1, 2, 3), x13, (0, 1, 4, 3), (2, 4)) * 2.0 del x13 rdm2_f_ovvo += einsum(delta.oo, (0, 1), x31, (2, 3), (0, 3, 2, 1)) * -1.0 @@ -442,17 +443,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_voov += einsum(delta.oo, (0, 1), x31, (2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(delta.oo, (0, 1), x31, (2, 3), (3, 0, 1, 2)) * -1.0 del x31 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x32, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x32, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x32, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x32, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x32 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x33 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(l2, (0, 1, 2, 3), x33, (3, 4, 1, 5), (2, 4, 0, 5)) del x33 rdm2_f_ovvo += einsum(x34, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -460,15 +461,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_voov += einsum(x34, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x34, (0, 1, 2, 3), (2, 1, 0, 3)) del x34 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(l2, (0, 1, 2, 3), x24, (2, 4, 1, 5), (3, 4, 0, 5)) del x24 rdm2_f_voov += einsum(x35, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x35, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x35 - x36 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x36 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x36, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vvvv += einsum(x36, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x36, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -476,38 +477,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_vvvv += einsum(x36, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vvvv += einsum(x36, (0, 1, 2, 3), (1, 0, 3, 2)) del x36 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f = pack_2e(rdm2_f_oooo, rdm2_f_ooov, rdm2_f_oovo, rdm2_f_ovoo, rdm2_f_vooo, rdm2_f_oovv, rdm2_f_ovov, rdm2_f_ovvo, rdm2_f_voov, rdm2_f_vovo, rdm2_f_vvoo, rdm2_f_ovvv, rdm2_f_vovv, rdm2_f_vvov, rdm2_f_vvvo, rdm2_f_vvvv) diff --git a/ebcc/codegen/RCCSD.py b/ebcc/codegen/RCCSD.py index 7b317496..d727bc54 100644 --- a/ebcc/codegen/RCCSD.py +++ b/ebcc/codegen/RCCSD.py @@ -1,20 +1,22 @@ # Code generated by qwick. -import numpy as np +from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) e_cc = 0 e_cc += einsum(t2, (0, 1, 2, 3), x0, (0, 1, 2, 3), ()) * 2.0 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x1 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum(f.ov, (0, 1), (0, 1)) x2 += einsum(t1, (0, 1), x1, (0, 2, 3, 1), (2, 3)) del x1 @@ -25,126 +27,126 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (3, 2, 4, 1)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) t1new += einsum(t2, (0, 1, 2, 3), x0, (1, 2, 3, 4), (0, 4)) * 2.0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(t2, (0, 1, 2, 3), x2, (4, 0, 1, 3), (4, 2)) * -1.0 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), x3, (0, 2, 3, 1), (2, 3)) * 2.0 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum(f.ov, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t1new += einsum(x5, (0, 1), x6, (0, 2, 3, 1), (2, 3)) del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x7 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 del x7 - x8 = np.zeros((nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir), dtype=types[float]) x8 += einsum(f.vv, (0, 1), (0, 1)) x8 += einsum(t1, (0, 1), x0, (0, 2, 1, 3), (2, 3)) * 2.0 del x0 t1new += einsum(t1, (0, 1), x8, (1, 2), (0, 2)) del x8 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum(t1, (0, 1), x5, (2, 1), (2, 0)) del x5 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(f.oo, (0, 1), (0, 1)) x11 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 3), (4, 0)) * 2.0 x11 += einsum(t1, (0, 1), x9, (2, 3, 0, 1), (3, 2)) * 2.0 x11 += einsum(x10, (0, 1), (0, 1)) t1new += einsum(t1, (0, 1), x11, (0, 2), (2, 1)) * -1.0 del x11 - x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x12 += einsum(t1, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) t2new += einsum(t2, (0, 1, 2, 3), x12, (4, 5, 1, 0), (5, 4, 2, 3)) - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 5, 2), (4, 0, 3, 5)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t1, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x17 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), x17, (1, 4, 3, 5), (4, 0, 5, 2)) * 0.5 del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x16 x19 += einsum(x18, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x18 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x19, (4, 1, 5, 2), (4, 0, 5, 3)) * 2.0 del x19 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 4, 2), (4, 3)) * 2.0 - x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), x22, (0, 2, 1, 3), (2, 3)) del x22 - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum(x21, (0, 1), (0, 1)) del x21 x24 += einsum(x23, (0, 1), (0, 1)) * -1.0 del x23 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x24, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x24 - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), (0, 4, 5, 3)) - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x28 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), x28, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x28 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x31 += einsum(x30, (0, 1, 2, 3), (1, 0, 2, 3)) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x31, (2, 3, 1, 4), (2, 3, 0, 4)) del x31 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x26 x33 += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -153,23 +155,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x29 x33 += einsum(x32, (0, 1, 2, 3), (2, 1, 0, 3)) del x32 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(t1, (0, 1), x33, (2, 3, 0, 4), (2, 3, 4, 1)) del x33 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 3), (4, 0)) - x36 = np.zeros((nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc), dtype=types[float]) x36 += einsum(t1, (0, 1), x9, (2, 3, 0, 1), (2, 3)) del x9 - x37 = np.zeros((nocc, nocc), dtype=np.float64) + x37 = np.zeros((nocc, nocc), dtype=types[float]) x37 += einsum(x35, (0, 1), (0, 1)) del x35 x37 += einsum(x36, (0, 1), (1, 0)) del x36 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(x37, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) * 2.0 del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x39 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -183,47 +185,47 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x39, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x39 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x41 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(t2, (0, 1, 2, 3), x41, (4, 5, 0, 1), (4, 5, 2, 3)) del x41 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 5, 3), (4, 0, 2, 5)) del x14 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x44 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x30, (0, 1, 2, 3), x44, (1, 4, 5, 2), (4, 0, 5, 3)) * 2.0 del x44 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x1, (4, 5, 1, 2), (4, 0, 5, 3)) del x1 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.5 x49 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x49 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(v.ooov, (0, 1, 2, 3), x49, (2, 4, 5, 3), (0, 1, 4, 5)) * 2.0 del x49 - x51 = np.zeros((nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), x3, (0, 2, 3, 1), (2, 3)) del x3 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x52 += einsum(x51, (0, 1), (0, 1)) del x51 - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(x52, (0, 1), t2, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x52 - x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x54 += einsum(x46, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x46 x54 += einsum(x47, (0, 1, 2, 3), (2, 0, 1, 3)) @@ -234,17 +236,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x50 x54 += einsum(x53, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x53 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t1, (0, 1), x54, (0, 2, 3, 4), (2, 3, 4, 1)) del x54 - x56 = np.zeros((nocc, nocc), dtype=np.float64) + x56 = np.zeros((nocc, nocc), dtype=types[float]) x56 += einsum(f.oo, (0, 1), (0, 1)) x56 += einsum(x10, (0, 1), (1, 0)) del x10 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(x56, (0, 1), t2, (2, 1, 3, 4), (0, 2, 4, 3)) del x56 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) del x40 x58 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -262,38 +264,38 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x58, (0, 1, 2, 3), (0, 1, 3, 2)) t2new += einsum(x58, (0, 1, 2, 3), (1, 0, 2, 3)) del x58 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x59 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x60 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x60 += einsum(t2, (0, 1, 2, 3), x59, (1, 4, 3, 5), (0, 4, 2, 5)) * 4.0 del x59 t2new += einsum(t2, (0, 1, 2, 3), x60, (4, 1, 5, 3), (4, 0, 5, 2)) del x60 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x61 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x61, (4, 5, 3, 1), (5, 4, 0, 2)) - x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x62 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x62 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (4, 0, 1, 5)) t2new += einsum(x61, (0, 1, 2, 3), x62, (0, 4, 5, 1), (5, 4, 3, 2)) del x61, x62 - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x63 += einsum(t1, (0, 1), x12, (2, 3, 0, 4), (3, 2, 4, 1)) del x12 t2new += einsum(t1, (0, 1), x63, (2, 3, 0, 4), (2, 3, 1, 4)) del x63 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x64 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) del x13 t2new += einsum(t2, (0, 1, 2, 3), x64, (4, 1, 5, 2), (4, 0, 5, 3)) del x64 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x65 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x65, (4, 1, 5, 2), (4, 0, 3, 5)) @@ -303,68 +305,68 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(l2, (0, 1, 2, 3), v.oooo, (4, 2, 5, 3), (0, 1, 4, 5)) l2new += einsum(v.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 1, 5, 0), (4, 5, 3, 2)) - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), x2, (2, 3, 4, 1), (2, 0, 3, 4)) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum(t1, (0, 1), x5, (2, 3, 4, 1), (0, 2, 3, 4)) - x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x7 += einsum(x4, (0, 1, 2, 3), (1, 0, 3, 2)) del x4 x7 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 l2new += einsum(l2, (0, 1, 2, 3), x7, (3, 2, 4, 5), (0, 1, 5, 4)) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), x7, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x7 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x1 x9 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x3 x9 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), x10, (0, 2, 3, 1), (2, 3)) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) * 2.0 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x13 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x13 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x13 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x15 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x17 += einsum(v.oooo, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x17 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x17 += einsum(x16, (0, 1, 2, 3), (2, 1, 0, 3)) x17 += einsum(x16, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -2.0 x18 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x18 += einsum(x0, (0, 1, 2, 3), (1, 2, 0, 3)) @@ -383,55 +385,55 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x17 l1new += einsum(l2, (0, 1, 2, 3), x18, (2, 3, 4, 1), (0, 4)) del x18 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x20 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 l1new += einsum(v.oovv, (0, 1, 2, 3), x22, (4, 0, 1, 3), (2, 4)) * -2.0 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(l2, (0, 1, 2, 3), x19, (3, 4, 1, 5), (2, 4, 0, 5)) * 2.0 x23 += einsum(l2, (0, 1, 2, 3), x20, (2, 4, 1, 5), (3, 4, 0, 5)) x23 += einsum(t1, (0, 1), x22, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 l1new += einsum(v.ovvv, (0, 1, 2, 3), x23, (4, 0, 3, 2), (1, 4)) * -1.0 del x23 - x24 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x24 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - x25 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x25 += einsum(v.vvvv, (0, 1, 2, 3), (0, 2, 1, 3)) x25 += einsum(v.vvvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 l1new += einsum(x24, (0, 1, 2, 3), x25, (1, 3, 4, 2), (4, 0)) * 2.0 del x24, x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x26 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x27 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 0.5 x28 += einsum(x26, (0, 1, 2, 3), x27, (0, 4, 2, 5), (1, 4, 3, 5)) * -1.0 del x26, x27 l1new += einsum(v.ovvv, (0, 1, 2, 3), x28, (4, 0, 3, 1), (2, 4)) * -2.0 del x28 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x29 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x29 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x29 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x30 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(x16, (0, 1, 2, 3), (0, 2, 1, 3)) x31 += einsum(x16, (0, 1, 2, 3), (0, 3, 2, 1)) * -0.5 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), x29, (4, 5, 1, 3), (4, 0, 5, 2)) * 2.0 del x29 x32 += einsum(t2, (0, 1, 2, 3), x13, (4, 5, 1, 2), (4, 0, 5, 3)) @@ -442,24 +444,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x31 l1new += einsum(l2, (0, 1, 2, 3), x32, (3, 2, 4, 1), (0, 4)) del x32 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x33 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) x34 += einsum(t1, (0, 1), x33, (2, 0, 3, 4), (2, 3, 4, 1)) * -0.5 l1new += einsum(v.ovvv, (0, 1, 2, 3), x34, (4, 0, 3, 1), (2, 4)) * 2.0 del x34 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x36 += einsum(t1, (0, 1), x21, (2, 3, 4, 1), (3, 2, 4, 0)) l2new += einsum(v.ovov, (0, 1, 2, 3), x36, (4, 5, 0, 2), (3, 1, 5, 4)) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t1, (0, 1), x36, (0, 2, 3, 4), (2, 4, 3, 1)) - x38 = np.zeros((nocc, nocc), dtype=np.float64) + x38 = np.zeros((nocc, nocc), dtype=types[float]) x38 += einsum(l2, (0, 1, 2, 3), x19, (2, 4, 0, 1), (3, 4)) - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x39 += einsum(x35, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x35 @@ -472,15 +474,15 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x39 += einsum(t1, (0, 1), x38, (2, 3), (2, 0, 3, 1)) * 4.0 l1new += einsum(v.ovov, (0, 1, 2, 3), x39, (4, 0, 2, 1), (3, 4)) * -1.0 del x39 - x40 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x40 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 1, 0), (3, 2, 4, 5)) l2new += einsum(v.ovov, (0, 1, 2, 3), x40, (4, 5, 0, 2), (1, 3, 4, 5)) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(t1, (0, 1), x40, (2, 0, 3, 4), (2, 3, 4, 1)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x42 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(x41, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 del x41 @@ -491,36 +493,36 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x38 l1new += einsum(v.ovov, (0, 1, 2, 3), x43, (4, 0, 2, 3), (1, 4)) * 2.0 del x43 - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x44 += einsum(l2, (0, 1, 2, 3), x14, (2, 3, 1, 4), (0, 4)) * 2.0 - x45 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x45 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x45 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new += einsum(x44, (0, 1), x45, (2, 3, 1, 0), (3, 2)) del x44, x45 - x46 = np.zeros((nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc), dtype=types[float]) x46 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x11, (0, 1), x46, (2, 0), (1, 2)) * -2.0 - x47 = np.zeros((nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc), dtype=types[float]) x47 += einsum(l2, (0, 1, 2, 3), x19, (2, 4, 0, 1), (3, 4)) * 2.0 - x48 = np.zeros((nocc, nocc), dtype=np.float64) + x48 = np.zeros((nocc, nocc), dtype=types[float]) x48 += einsum(x46, (0, 1), (0, 1)) del x46 x48 += einsum(x47, (0, 1), (0, 1)) del x47 l1new += einsum(f.ov, (0, 1), x48, (2, 0), (1, 2)) * -1.0 - x49 = np.zeros((nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir), dtype=types[float]) x49 += einsum(t1, (0, 1), (0, 1)) * -1.0 x49 += einsum(x14, (0, 1, 2, 3), x21, (0, 1, 4, 3), (4, 2)) * 2.0 x49 += einsum(l1, (0, 1), x20, (1, 2, 3, 0), (2, 3)) * -1.0 x49 += einsum(t1, (0, 1), x48, (0, 2), (2, 1)) - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * 2.0 x50 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new += einsum(x49, (0, 1), x50, (0, 2, 3, 1), (3, 2)) * -1.0 del x49, x50 - x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x51 += einsum(x40, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x51 += einsum(x40, (0, 1, 2, 3), (1, 0, 3, 2)) del x40 @@ -529,35 +531,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x36 l1new += einsum(v.ooov, (0, 1, 2, 3), x51, (1, 4, 0, 2), (3, 4)) * 2.0 del x51 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x52 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 l1new += einsum(x48, (0, 1), x52, (0, 2, 1, 3), (3, 2)) * -1.0 del x52 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x53 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 l1new += einsum(l1, (0, 1), x53, (1, 2, 0, 3), (3, 2)) * 2.0 del x53 - x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x54 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x54 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum(f.vv, (0, 1), (0, 1)) x55 += einsum(t1, (0, 1), x54, (0, 1, 2, 3), (3, 2)) * 2.0 del x54 l1new += einsum(l1, (0, 1), x55, (0, 2), (2, 1)) del x55 - x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x56 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x56 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -0.5 - x57 = np.zeros((nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir), dtype=types[float]) x57 += einsum(t1, (0, 1), x10, (0, 2, 3, 1), (2, 3)) * 2.0 del x10 - x58 = np.zeros((nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir), dtype=types[float]) x58 += einsum(f.ov, (0, 1), (0, 1)) x58 += einsum(x57, (0, 1), (0, 1)) - x59 = np.zeros((nocc, nocc), dtype=np.float64) + x59 = np.zeros((nocc, nocc), dtype=types[float]) x59 += einsum(f.oo, (0, 1), (0, 1)) x59 += einsum(v.ovov, (0, 1, 2, 3), x14, (2, 4, 1, 3), (4, 0)) * 2.0 x59 += einsum(t1, (0, 1), x56, (2, 3, 0, 1), (3, 2)) * 2.0 @@ -565,44 +567,44 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x58 l1new += einsum(l1, (0, 1), x59, (1, 2), (0, 2)) * -1.0 del x59 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(l1, (0, 1), v.ooov, (2, 1, 3, 4), (2, 3, 0, 4)) - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(v.ooov, (0, 1, 2, 3), x21, (4, 1, 2, 5), (4, 0, 5, 3)) - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(v.ovvv, (0, 1, 2, 3), x21, (4, 5, 0, 3), (5, 4, 1, 2)) - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(x21, (0, 1, 2, 3), x5, (1, 2, 4, 5), (0, 4, 3, 5)) - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x64 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum(x19, (0, 1, 2, 3), x64, (0, 4, 2, 5), (1, 4, 3, 5)) * 4.0 del x64 - x66 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x66 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x66 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(t1, (0, 1), x66, (2, 1, 3, 4), (0, 2, 3, 4)) * 2.0 del x66 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x68 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x68 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) del x65 x68 += einsum(x67, (0, 1, 2, 3), (0, 1, 3, 2)) del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(l2, (0, 1, 2, 3), x68, (3, 4, 1, 5), (2, 4, 0, 5)) del x68 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(v.ovov, (0, 1, 2, 3), x20, (2, 4, 5, 3), (0, 4, 1, 5)) del x20 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x73 += einsum(x70, (0, 1, 2, 3), (0, 1, 3, 2)) del x70 @@ -610,53 +612,53 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x71 x73 += einsum(x72, (0, 1, 2, 3), (1, 0, 3, 2)) del x72 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum(l2, (0, 1, 2, 3), x73, (2, 4, 1, 5), (3, 4, 0, 5)) del x73 - x75 = np.zeros((nvir, nvir), dtype=np.float64) + x75 = np.zeros((nvir, nvir), dtype=types[float]) x75 += einsum(v.ovov, (0, 1, 2, 3), x19, (0, 2, 1, 4), (3, 4)) * 2.0 del x19 - x76 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x76 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x76 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x77 = np.zeros((nvir, nvir), dtype=np.float64) + x77 = np.zeros((nvir, nvir), dtype=types[float]) x77 += einsum(t1, (0, 1), x76, (0, 2, 1, 3), (2, 3)) del x76 - x78 = np.zeros((nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir), dtype=types[float]) x78 += einsum(x75, (0, 1), (0, 1)) del x75 x78 += einsum(x77, (0, 1), (0, 1)) * -1.0 del x77 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(x78, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) del x78 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(v.ooov, (0, 1, 2, 3), x33, (4, 0, 1, 5), (2, 4, 3, 5)) del x33 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(x42, (0, 1, 2, 3), x5, (0, 4, 2, 5), (4, 1, 5, 3)) del x42 - x82 = np.zeros((nocc, nocc), dtype=np.float64) + x82 = np.zeros((nocc, nocc), dtype=types[float]) x82 += einsum(v.ovov, (0, 1, 2, 3), x14, (2, 4, 1, 3), (0, 4)) - x83 = np.zeros((nocc, nocc), dtype=np.float64) + x83 = np.zeros((nocc, nocc), dtype=types[float]) x83 += einsum(t1, (0, 1), x56, (2, 3, 0, 1), (2, 3)) del x56 - x84 = np.zeros((nocc, nocc), dtype=np.float64) + x84 = np.zeros((nocc, nocc), dtype=types[float]) x84 += einsum(t1, (0, 1), x11, (2, 1), (0, 2)) - x85 = np.zeros((nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc), dtype=types[float]) x85 += einsum(x82, (0, 1), (1, 0)) del x82 x85 += einsum(x83, (0, 1), (1, 0)) del x83 x85 += einsum(x84, (0, 1), (0, 1)) del x84 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(x85, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) * 2.0 del x85 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(x11, (0, 1), x21, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x11 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) * -1.0 x88 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) del x60 @@ -685,52 +687,52 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new += einsum(x88, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x88, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x88 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(l1, (0, 1), v.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(f.ov, (0, 1), x21, (2, 3, 0, 4), (2, 3, 1, 4)) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(l1, (0, 1), x5, (1, 2, 3, 4), (2, 3, 0, 4)) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(l2, (0, 1, 2, 3), x16, (2, 4, 3, 5), (4, 5, 0, 1)) del x16 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(v.ooov, (0, 1, 2, 3), x21, (1, 4, 2, 5), (4, 0, 5, 3)) - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(x21, (0, 1, 2, 3), x5, (0, 2, 4, 5), (1, 4, 3, 5)) del x5, x21 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x97 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) del x2 x97 += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x96 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(l2, (0, 1, 2, 3), x97, (2, 4, 1, 5), (3, 4, 0, 5)) del x97 - x99 = np.zeros((nvir, nvir), dtype=np.float64) + x99 = np.zeros((nvir, nvir), dtype=types[float]) x99 += einsum(l2, (0, 1, 2, 3), x14, (2, 3, 1, 4), (0, 4)) del x14 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(x99, (0, 1), v.ovov, (2, 1, 3, 4), (2, 3, 4, 0)) * 2.0 del x99 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x48, (0, 1), v.ovov, (2, 3, 1, 4), (2, 0, 4, 3)) del x48 - x102 = np.zeros((nocc, nocc), dtype=np.float64) + x102 = np.zeros((nocc, nocc), dtype=types[float]) x102 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x103 = np.zeros((nocc, nocc), dtype=np.float64) + x103 = np.zeros((nocc, nocc), dtype=types[float]) x103 += einsum(f.oo, (0, 1), (0, 1)) x103 += einsum(x102, (0, 1), (1, 0)) del x102 - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum(x103, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) del x103 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x89 x105 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -763,42 +765,42 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x1, (2, 4, 0, 1), (4, 3)) * -2.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x3 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x2 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 4, 2), (4, 3)) * -2.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 rdm1_f_ov += einsum(l1, (0, 1), x4, (1, 2, 3, 0), (2, 3)) * 4.0 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum(x0, (0, 1), (0, 1)) del x0 x5 += einsum(l2, (0, 1, 2, 3), x4, (3, 4, 0, 1), (2, 4)) * 2.0 del x4 rdm1_f_ov += einsum(t1, (0, 1), x5, (0, 2), (2, 1)) * -2.0 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x6 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 rdm1_f_vv += einsum(t2, (0, 1, 2, 3), x6, (0, 1, 4, 2), (4, 3)) * 4.0 @@ -812,57 +814,57 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 0, 1), (2, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 @@ -876,11 +878,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 2, 1)) * -2.0 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x3, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_ovoo += einsum(x3, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 @@ -894,18 +896,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 1, 0)) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum(t1, (0, 1), x3, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(x2, (0, 1, 2, 3), (1, 0, 3, 2)) x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (2, 3, 0, 1)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) @@ -919,30 +921,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x7 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 3), (4, 2)) * 2.0 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(l1, (0, 1), x9, (1, 2, 3, 0), (2, 3)) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 0, 1), (2, 4)) * 2.0 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(x6, (0, 1), (0, 1)) x12 += einsum(x11, (0, 1), (0, 1)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(t1, (0, 1), x12, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_ooov += einsum(t1, (0, 1), x12, (2, 3), (3, 0, 2, 1)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(t1, (0, 1), x12, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x12, (2, 3), (0, 3, 1, 2)) * -1.0 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) - x14 = np.zeros((nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir), dtype=types[float]) x14 += einsum(x8, (0, 1), (0, 1)) del x8 x14 += einsum(x10, (0, 1), (0, 1)) * -1.0 @@ -958,31 +960,31 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x14, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x14, (2, 3), (2, 0, 3, 1)) * -1.0 del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) rdm2_f_ooov += einsum(x15, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x15, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x16 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (1, 4, 5, 2), (4, 5, 0, 3)) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x18 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (1, 4, 5, 3), (4, 5, 0, 2)) * 2.0 del x18 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x5, (0, 2, 3, 4), (2, 3, 4, 1)) del x5 rdm2_f_ooov += einsum(x20, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x20, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x20, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x20, (0, 1, 2, 3), (1, 2, 3, 0)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x21 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) x21 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -999,37 +1001,37 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(x21, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x21, (0, 1, 2, 3), (2, 0, 3, 1)) del x21 - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x3, (4, 1, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x24 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (1, 4, 5, 3), (4, 5, 0, 2)) del x24 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x25 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 3), (4, 2)) del x7 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum(l1, (0, 1), x9, (1, 2, 3, 0), (2, 3)) * 0.5 - x28 = np.zeros((nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir), dtype=types[float]) x28 += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) * 0.5 del x12 - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum(t1, (0, 1), (0, 1)) * -0.5 x29 += einsum(x26, (0, 1), (0, 1)) x29 += einsum(x27, (0, 1), (0, 1)) * -1.0 @@ -1039,59 +1041,59 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x29, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_oovo += einsum(delta.oo, (0, 1), x29, (2, 3), (2, 0, 3, 1)) * -2.0 del x29 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x30 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum(t2, (0, 1, 2, 3), x30, (4, 1, 5, 3), (4, 5, 0, 2)) del x30 rdm2_f_oovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x31 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x32 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), x4, (0, 1, 4, 5), (5, 4, 3, 2)) rdm2_f_oovv += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(t1, (0, 1), x4, (0, 2, 3, 4), (2, 4, 3, 1)) del x4 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), x34, (0, 2, 3, 4), (2, 3, 1, 4)) del x34 rdm2_f_oovv += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x36 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x36, (1, 4, 3, 5), (4, 0, 5, 2)) - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), x37, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x37 rdm2_f_oovv += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x39 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(t2, (0, 1, 2, 3), x39, (1, 4, 2, 5), (4, 0, 5, 3)) del x39 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), x40, (1, 4, 2, 5), (4, 0, 5, 3)) * -1.0 del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(x2, (0, 1, 2, 3), x32, (0, 1, 4, 5), (2, 3, 4, 5)) del x2, x32 rdm2_f_oovv += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_oovv += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) del x33 x43 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1107,39 +1109,39 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x43, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x43 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(x6, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t2, (0, 1, 2, 3), x36, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x36 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), x45, (1, 4, 2, 5), (4, 0, 5, 3)) del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x47 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 - x48 = np.zeros((nvir, nvir), dtype=np.float64) + x48 = np.zeros((nvir, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x47, (0, 1, 3, 4), (4, 2)) * 2.0 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(x48, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x50 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x17 x50 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x19 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), x50, (0, 2, 3, 4), (2, 3, 4, 1)) del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(x11, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x11 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum(x26, (0, 1), (0, 1)) x53 += einsum(x27, (0, 1), (0, 1)) * -1.0 x53 += einsum(x28, (0, 1), (0, 1)) del x28 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) x54 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x54 += einsum(x49, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1157,53 +1159,53 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 3, 2)) del x54 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(t2, (0, 1, 2, 3), x55, (1, 4, 2, 5), (0, 4, 3, 5)) del x55 rdm2_f_oovv += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) del x56 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x57, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x57, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x57, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x57, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(t2, (0, 1, 2, 3), x57, (1, 4, 2, 5), (0, 4, 3, 5)) rdm2_f_oovv += einsum(x58, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x58, (0, 1, 2, 3), (0, 1, 3, 2)) del x58 - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) del x6 rdm2_f_oovv += einsum(t1, (0, 1), x59, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x59, (2, 3), (2, 0, 3, 1)) * -1.0 - x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(t2, (0, 1, 2, 3), x3, (4, 1, 5, 3), (4, 5, 0, 2)) - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum(x3, (0, 1, 2, 3), x9, (0, 4, 5, 3), (4, 1, 2, 5)) - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) del x60 x62 += einsum(x61, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x61 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(t1, (0, 1), x62, (0, 2, 3, 4), (2, 3, 4, 1)) del x62 - x64 = np.zeros((nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nvir), dtype=types[float]) x64 += einsum(t1, (0, 1), x1, (0, 2), (2, 1)) del x1 - x65 = np.zeros((nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nvir), dtype=types[float]) x65 += einsum(x26, (0, 1), (0, 1)) del x26 x65 += einsum(x27, (0, 1), (0, 1)) * -1.0 del x27 x65 += einsum(x64, (0, 1), (0, 1)) del x64 - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x46 x66 += einsum(x49, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1219,15 +1221,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x66, (0, 1, 2, 3), (1, 0, 3, 2)) del x66 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x67 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum(t1, (0, 1), x67, (0, 2, 3, 4), (2, 3, 4, 1)) del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) del x44 x69 += einsum(x68, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1237,22 +1239,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x69 - x70 = np.zeros((nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir), dtype=types[float]) x70 += einsum(t1, (0, 1), (0, 1)) * -1.0 x70 += einsum(x59, (0, 1), (0, 1)) del x59 rdm2_f_oovv += einsum(t1, (0, 1), x70, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x70, (2, 3), (0, 2, 1, 3)) * -1.0 del x70 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x71 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(l2, (0, 1, 2, 3), x71, (2, 4, 5, 1), (4, 3, 5, 0)) rdm2_f_ovov += einsum(x72, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovov += einsum(x72, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x72 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(l2, (0, 1, 2, 3), x0, (3, 4, 5, 1), (2, 4, 0, 5)) * 2.0 del x0 rdm2_f_ovov += einsum(x73, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1260,7 +1262,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x73, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x73, (0, 1, 2, 3), (2, 1, 0, 3)) del x73 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum(t1, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) del x16 rdm2_f_ovov += einsum(x74, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1268,9 +1270,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x74, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x74, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x74 - x75 = np.zeros((nvir, nvir), dtype=np.float64) + x75 = np.zeros((nvir, nvir), dtype=types[float]) x75 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x76 = np.zeros((nvir, nvir), dtype=np.float64) + x76 = np.zeros((nvir, nvir), dtype=types[float]) x76 += einsum(x75, (0, 1), (0, 1)) x76 += einsum(x48, (0, 1), (0, 1)) del x48 @@ -1282,23 +1284,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(delta.oo, (0, 1), x76, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x76, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x76, (2, 3), (2, 0, 3, 1)) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(t1, (0, 1), x76, (2, 3), (0, 2, 1, 3)) rdm2_f_ovvv += einsum(t1, (0, 1), x76, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(t1, (0, 1), x76, (2, 3), (2, 0, 3, 1)) rdm2_f_vovv += einsum(t1, (0, 1), x76, (2, 3), (2, 0, 3, 1)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(t1, (0, 1), x3, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x77, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x77, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x77, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x77, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x77 - x78 = np.zeros((nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir), dtype=types[float]) x78 += einsum(t2, (0, 1, 2, 3), x47, (0, 1, 3, 4), (4, 2)) del x47 - x79 = np.zeros((nvir, nvir), dtype=np.float64) + x79 = np.zeros((nvir, nvir), dtype=types[float]) x79 += einsum(x75, (0, 1), (0, 1)) * 0.5 del x75 x79 += einsum(x78, (0, 1), (0, 1)) @@ -1308,10 +1310,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_ovvo += einsum(delta.oo, (0, 1), x79, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_ovvo += einsum(delta.oo, (0, 1), x79, (2, 3), (0, 2, 3, 1)) * -2.0 del x79 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x80 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(t2, (0, 1, 2, 3), x80, (1, 4, 2, 5), (4, 0, 5, 3)) del x80 rdm2_f_ovvo += einsum(x81, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1319,10 +1321,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) del x81 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x82 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 2.0 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(t2, (0, 1, 2, 3), x82, (1, 4, 3, 5), (4, 0, 5, 2)) del x82 rdm2_f_ovvo += einsum(x83, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -1330,10 +1332,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovo += einsum(x83, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x83, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x83 - x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x84 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x84 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(t1, (0, 1), x84, (2, 0, 3, 4), (2, 3, 4, 1)) del x84 rdm2_f_ovvo += einsum(x85, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1341,19 +1343,19 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x85, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x85, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x85 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x86, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x86, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(t1, (0, 1), x3, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovvo += einsum(x87, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x87, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x87, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x87, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(l2, (0, 1, 2, 3), x9, (3, 4, 5, 1), (4, 2, 5, 0)) del x9 rdm2_f_ovvo += einsum(x88, (0, 1, 2, 3), (0, 3, 2, 1)) @@ -1361,45 +1363,45 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (3, 0, 1, 2)) del x88 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x89 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(l2, (0, 1, 2, 3), x89, (2, 4, 5, 1), (4, 3, 5, 0)) del x89 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x90 - x91 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x91 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x91, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x91, (0, 1, 2, 3), (1, 0, 3, 2)) - x92 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x92 += einsum(t2, (0, 1, 2, 3), x3, (1, 0, 4, 5), (4, 5, 3, 2)) del x3 rdm2_f_ovvv += einsum(x92, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x92, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x92, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x92, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x93 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(l2, (0, 1, 2, 3), x93, (3, 4, 1, 5), (4, 2, 5, 0)) - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(l2, (0, 1, 2, 3), x71, (2, 4, 1, 5), (4, 3, 5, 0)) del x71 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(x87, (0, 1, 2, 3), (0, 1, 2, 3)) x96 += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x96 += einsum(x95, (0, 1, 2, 3), (1, 0, 3, 2)) del x95 - x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x97 += einsum(t1, (0, 1), x96, (0, 2, 3, 4), (2, 3, 4, 1)) del x96 - x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) del x91 x98 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1417,7 +1419,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 3, 2)) del x98 - x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum(t1, (0, 1), x57, (0, 2, 3, 4), (2, 3, 1, 4)) del x57 rdm2_f_ovvv += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1425,60 +1427,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_vovv += einsum(x99, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x99, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x99 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(x87, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x94 - x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x101 += einsum(t1, (0, 1), x100, (0, 2, 3, 4), (2, 3, 4, 1)) del x100 rdm2_f_ovvv += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovvv += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x101 - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum(l2, (0, 1, 2, 3), x93, (3, 4, 1, 5), (4, 2, 5, 0)) * 0.5 del x93 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x86 x103 += einsum(x87, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x87 x103 += einsum(x102, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x102 - x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(t1, (0, 1), x103, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x103 rdm2_f_vovv += einsum(x104, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x104, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x104 - x105 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x105 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) - x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) - x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(t1, (0, 1), x105, (0, 2, 3, 4), (3, 2, 4, 1)) del x105 rdm2_f_vvvv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) - x108 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) del x106 x108 += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) diff --git a/ebcc/codegen/RCCSDT.py b/ebcc/codegen/RCCSDT.py index 31c65990..ec6e556a 100644 --- a/ebcc/codegen/RCCSDT.py +++ b/ebcc/codegen/RCCSDT.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) * 2.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) e_cc += einsum(x0, (0, 1, 2, 3), x1, (0, 1, 2, 3), ()) * 2.0 @@ -20,148 +21,148 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (4, 0, 3, 5)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) t1new += einsum(x0, (0, 1, 2, 3), x1, (1, 4, 0, 2, 3, 5), (4, 5)) * -0.25 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.3333333333333333 x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t1new += einsum(x2, (0, 1, 2, 3), t3, (4, 0, 1, 5, 2, 3), (4, 5)) * 1.5 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x3 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x4 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x4 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 t1new += einsum(x3, (0, 1, 2, 3), x4, (0, 2, 3, 4), (1, 4)) * 2.0 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x6 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x6 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x6 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 t1new += einsum(t2, (0, 1, 2, 3), x6, (4, 0, 1, 3), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x9 += einsum(x8, (0, 1), (0, 1)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t1new += einsum(x9, (0, 1), x10, (0, 2, 3, 1), (2, 3)) * 2.0 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x11 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x11, (0, 2, 1, 3), (2, 3)) * 2.0 del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x13 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(x13, (0, 1, 2, 3), x3, (0, 4, 3, 2), (4, 1)) * 2.0 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x15 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum(t1, (0, 1), x15, (2, 3, 0, 1), (2, 3)) * 2.0 - x17 = np.zeros((nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc), dtype=types[float]) x17 += einsum(f.oo, (0, 1), (0, 1)) x17 += einsum(x12, (0, 1), (0, 1)) x17 += einsum(x14, (0, 1), (1, 0)) x17 += einsum(x16, (0, 1), (1, 0)) del x16 t1new += einsum(t1, (0, 1), x17, (0, 2), (2, 1)) * -1.0 - t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + t3new = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) t3new += einsum(x17, (0, 1), t3, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -1.0 del x17 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new += einsum(x18, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) t2new += einsum(t2, (0, 1, 2, 3), x19, (4, 5, 0, 1), (5, 4, 3, 2)) - x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new += einsum(t1, (0, 1), x20, (2, 3, 1, 4), (0, 2, 3, 4)) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x24 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (4, 5, 0, 1), (4, 5, 2, 3)) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x23, (4, 1, 2, 5), (4, 0, 3, 5)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(x5, (0, 1, 2, 3), t3, (4, 2, 1, 5, 6, 3), (0, 4, 5, 6)) - x28 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x28 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x28 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x28, (0, 1, 2, 3), t3, (4, 5, 0, 1, 6, 2), (4, 5, 6, 3)) * 0.5 del x28 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x30 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(x30, (0, 1, 2, 3), t3, (0, 4, 2, 5, 6, 3), (4, 1, 5, 6)) * 0.5 del x30 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x4, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x4 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), x32, (4, 1, 3, 5), (0, 4, 2, 5)) del x32 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 1, 3), (4, 5, 0, 6)) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 1, 2), (4, 0, 5, 3)) - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.5 x38 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x38 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(v.ooov, (0, 1, 2, 3), x38, (2, 4, 5, 3), (0, 1, 4, 5)) * 2.0 - x40 = np.zeros((nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nvir), dtype=types[float]) x40 += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 - x41 = np.zeros((nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir), dtype=types[float]) x41 += einsum(f.ov, (0, 1), (0, 1)) x41 += einsum(x40, (0, 1), (0, 1)) del x40 - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(x41, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(x34, (0, 1, 2, 3), (2, 0, 1, 3)) x43 += einsum(x35, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x35 @@ -171,20 +172,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x39 x43 += einsum(x42, (0, 1, 2, 3), (2, 1, 0, 3)) del x42 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t1, (0, 1), x43, (0, 2, 3, 4), (2, 3, 1, 4)) del x43 - x45 = np.zeros((nocc, nocc), dtype=np.float64) + x45 = np.zeros((nocc, nocc), dtype=types[float]) x45 += einsum(t1, (0, 1), x41, (2, 1), (0, 2)) * 0.5 del x41 - x46 = np.zeros((nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc), dtype=types[float]) x46 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x46 += einsum(x45, (0, 1), (0, 1)) del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(x46, (0, 1), t2, (2, 1, 3, 4), (2, 0, 4, 3)) * 2.0 del x46 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x22 x48 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -207,58 +208,58 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x48, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x48 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x50 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(x50, (0, 1, 2, 3), t3, (2, 4, 1, 5, 6, 3), (4, 0, 5, 6)) * 0.5 del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(x9, (0, 1), t3, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(t1, (0, 1), x5, (2, 3, 0, 4), (2, 3, 1, 4)) - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x54 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t2, (0, 1, 2, 3), x54, (1, 4, 3, 5), (0, 4, 2, 5)) * 0.5 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x56 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x55 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), x56, (4, 1, 5, 2), (0, 4, 3, 5)) * 2.0 del x56 - x58 = np.zeros((nvir, nvir), dtype=np.float64) + x58 = np.zeros((nvir, nvir), dtype=types[float]) x58 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 2, 4), (3, 4)) * 2.0 - x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x59 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x59 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x60 = np.zeros((nvir, nvir), dtype=np.float64) + x60 = np.zeros((nvir, nvir), dtype=types[float]) x60 += einsum(t1, (0, 1), x59, (0, 1, 2, 3), (2, 3)) del x59 - x61 = np.zeros((nvir, nvir), dtype=np.float64) + x61 = np.zeros((nvir, nvir), dtype=types[float]) x61 += einsum(x58, (0, 1), (1, 0)) del x58 x61 += einsum(x60, (0, 1), (1, 0)) * -1.0 - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(x61, (0, 1), t2, (2, 3, 0, 4), (2, 3, 4, 1)) del x61 - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), (0, 4, 5, 3)) - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(x0, (0, 1, 2, 3), t3, (4, 5, 0, 3, 6, 2), (4, 5, 1, 6)) * 0.5 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x65 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(t2, (0, 1, 2, 3), x65, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x65 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum(v.ovvv, (0, 1, 2, 3), x3, (4, 5, 3, 1), (0, 4, 5, 2)) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x68 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x68 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -266,28 +267,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x68 += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) x68 += einsum(x67, (0, 1, 2, 3), (2, 1, 0, 3)) del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(t1, (0, 1), x68, (2, 3, 0, 4), (2, 3, 1, 4)) del x68 - x70 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x70 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x70 += einsum(t1, (0, 1), t2, (2, 3, 4, 5), (2, 0, 3, 1, 4, 5)) * -1.0 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(v.ovvv, (0, 1, 2, 3), x70, (0, 4, 5, 1, 6, 3), (4, 5, 2, 6)) del x70 - x72 = np.zeros((nocc, nocc), dtype=np.float64) + x72 = np.zeros((nocc, nocc), dtype=types[float]) x72 += einsum(t2, (0, 1, 2, 3), x13, (1, 4, 2, 3), (0, 4)) - x73 = np.zeros((nocc, nocc), dtype=np.float64) + x73 = np.zeros((nocc, nocc), dtype=types[float]) x73 += einsum(t1, (0, 1), x15, (2, 3, 0, 1), (2, 3)) del x15 - x74 = np.zeros((nocc, nocc), dtype=np.float64) + x74 = np.zeros((nocc, nocc), dtype=types[float]) x74 += einsum(x72, (0, 1), (1, 0)) del x72 x74 += einsum(x73, (0, 1), (1, 0)) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(x74, (0, 1), t2, (2, 0, 3, 4), (2, 1, 4, 3)) * 2.0 del x74 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) del x49 x76 += einsum(x51, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -307,52 +308,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x76 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x77 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x77 += einsum(t2, (0, 1, 2, 3), x7, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), x77, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x77 - x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x78 += einsum(t1, (0, 1), x5, (2, 3, 4, 1), (2, 0, 4, 3)) - x79 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x79 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(x78, (0, 1, 2, 3), (3, 1, 2, 0)) t2new += einsum(t2, (0, 1, 2, 3), x79, (1, 4, 0, 5), (4, 5, 3, 2)) del x79 - x80 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x80 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(x19, (0, 1, 2, 3), (3, 1, 0, 2)) x80 += einsum(x78, (0, 1, 2, 3), (3, 1, 0, 2)) - x81 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x81 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x81 += einsum(t1, (0, 1), x80, (0, 2, 3, 4), (3, 2, 4, 1)) del x80 t2new += einsum(t1, (0, 1), x81, (2, 3, 0, 4), (2, 3, 1, 4)) del x81 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x82 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 t2new += einsum(t2, (0, 1, 2, 3), x82, (4, 1, 5, 2), (4, 0, 5, 3)) del x82 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x84 += einsum(x83, (0, 1, 2, 3), (0, 1, 2, 3)) del x83 t2new += einsum(t2, (0, 1, 2, 3), x84, (4, 1, 5, 2), (0, 4, 5, 3)) - x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x85 += einsum(v.oooo, (0, 1, 2, 3), t3, (3, 4, 1, 5, 6, 7), (4, 0, 2, 7, 5, 6)) - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x86 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.99999999999999 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(v.ovov, (0, 1, 2, 3), x86, (2, 4, 5, 1), (4, 0, 5, 3)) - x88 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x88 += einsum(x87, (0, 1, 2, 3), t3, (4, 1, 5, 6, 7, 3), (4, 5, 0, 6, 7, 2)) * 1.00000000000001 - x89 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x89 += einsum(x85, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -0.5 del x85 x89 += einsum(x88, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) @@ -360,24 +361,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x89, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * -1.0 t3new += einsum(x89, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) del x89 - x90 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x90 += einsum(v.oooo, (0, 1, 2, 3), t3, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 7, 6)) - x91 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x91 += einsum(x24, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 7), (0, 4, 1, 5, 7, 6)) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x93 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x93 += einsum(x92, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (0, 4, 5, 6, 7, 2)) - x94 = np.zeros((nocc, nocc), dtype=np.float64) + x94 = np.zeros((nocc, nocc), dtype=types[float]) x94 += einsum(f.oo, (0, 1), (0, 1)) x94 += einsum(x12, (0, 1), (0, 1)) del x12 x94 += einsum(x14, (0, 1), (1, 0)) del x14 - x95 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum(x94, (0, 1), t3, (2, 3, 0, 4, 5, 6), (2, 3, 1, 6, 4, 5)) del x94 - x96 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x96 += einsum(x90, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x90 x96 += einsum(x91, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -389,23 +390,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x96, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new += einsum(x96, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x96 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(v.ovov, (0, 1, 2, 3), x86, (2, 4, 5, 1), (4, 0, 5, 3)) * 1.00000000000001 - x98 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum(x97, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) - x99 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum(t2, (0, 1, 2, 3), v.oooo, (4, 5, 6, 1), (0, 4, 5, 6, 2, 3)) - x100 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(t2, (0, 1, 2, 3), x24, (4, 5, 1, 6), (4, 0, 5, 6, 2, 3)) - x101 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x99, (0, 1, 2, 3, 4, 5), (0, 2, 3, 1, 4, 5)) * -1.0 del x99 x101 += einsum(x100, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x100 - x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x102 += einsum(t1, (0, 1), x101, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x101 - x103 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x103 += einsum(x98, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x98 x103 += einsum(x102, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -415,16 +416,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x103, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new += einsum(x103, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x103 - x104 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) - x105 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x105 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x105 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) del x63 - x106 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(t2, (0, 1, 2, 3), x105, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) del x105 - x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(x104, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x104 x107 += einsum(x106, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -434,47 +435,47 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x107, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x107, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x107 - x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(v.vvvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 1), (4, 6, 5, 7, 0, 2)) - x109 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x109 += einsum(x19, (0, 1, 2, 3), t3, (3, 4, 2, 5, 6, 7), (1, 0, 4, 5, 7, 6)) - x110 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x110 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 6, 1, 7, 3), (4, 6, 5, 0, 2, 7)) - x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x111 += einsum(t2, (0, 1, 2, 3), x110, (4, 5, 6, 0, 1, 7), (4, 5, 6, 2, 3, 7)) - x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x112 += einsum(x78, (0, 1, 2, 3), t3, (2, 4, 3, 5, 6, 7), (1, 0, 4, 7, 5, 6)) del x78 - x113 = np.zeros((nvir, nvir), dtype=np.float64) + x113 = np.zeros((nvir, nvir), dtype=types[float]) x113 += einsum(f.ov, (0, 1), t1, (0, 2), (1, 2)) - x114 = np.zeros((nvir, nvir), dtype=np.float64) + x114 = np.zeros((nvir, nvir), dtype=types[float]) x114 += einsum(x3, (0, 1, 2, 3), x7, (0, 1, 2, 4), (3, 4)) * 2.0 del x7 - x115 = np.zeros((nvir, nvir), dtype=np.float64) + x115 = np.zeros((nvir, nvir), dtype=types[float]) x115 += einsum(f.vv, (0, 1), (0, 1)) * -1.0 x115 += einsum(x113, (0, 1), (0, 1)) x115 += einsum(x114, (0, 1), (1, 0)) - x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x116 += einsum(x115, (0, 1), t3, (2, 3, 4, 0, 5, 6), (2, 4, 3, 6, 5, 1)) del x115 - x117 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 1, 5, 6, 7, 3), (4, 5, 0, 2, 6, 7)) - x118 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 7, 2)) - x119 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum(t1, (0, 1), x110, (2, 3, 4, 0, 5, 6), (3, 2, 4, 5, 1, 6)) del x110 - x120 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum(x117, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x117 x120 += einsum(x118, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x118 x120 += einsum(x119, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 del x119 - x121 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x121 += einsum(t1, (0, 1), x120, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x120 - x122 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x122 += einsum(x108, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x108 x122 += einsum(x109, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 @@ -490,36 +491,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x122, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new += einsum(x122, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 del x122 - x123 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x123 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 3), (0, 2, 4, 5)) - x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x124 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x124 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x125 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x125 += einsum(v.ovvv, (0, 1, 2, 3), x124, (0, 4, 1, 5), (4, 2, 3, 5)) - x126 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x126 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x126 += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x123 x126 += einsum(x125, (0, 1, 2, 3), (0, 3, 2, 1)) del x125 - x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x127 += einsum(t2, (0, 1, 2, 3), x126, (4, 5, 2, 6), (0, 1, 4, 3, 5, 6)) del x126 - x128 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x128 += einsum(t2, (0, 1, 2, 3), x5, (4, 0, 1, 5), (4, 2, 3, 5)) - x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x129 += einsum(t1, (0, 1), x53, (2, 0, 3, 4), (2, 1, 3, 4)) del x53 - x130 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x130 += einsum(x128, (0, 1, 2, 3), (0, 1, 2, 3)) del x128 x130 += einsum(x129, (0, 1, 2, 3), (0, 1, 2, 3)) del x129 - x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x131 += einsum(t2, (0, 1, 2, 3), x130, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) del x130 - x132 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x132 += einsum(x127, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) del x127 x132 += einsum(x131, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) @@ -537,36 +538,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x132, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x132, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x132 - x133 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x133 += einsum(t2, (0, 1, 2, 3), x54, (1, 4, 3, 5), (0, 4, 2, 5)) del x54 - x134 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x134 += einsum(v.ovov, (0, 1, 2, 3), x86, (2, 4, 5, 3), (4, 0, 5, 1)) del x86 - x135 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x135 += einsum(x133, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x133 x135 += einsum(x134, (0, 1, 2, 3), (0, 1, 2, 3)) del x134 - x136 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x136 += einsum(x135, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) * 1.00000000000001 del x135 - x137 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x137 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x137 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x137 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x138 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x138 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x138 += einsum(x137, (0, 1, 2, 3), t3, (0, 4, 1, 5, 6, 2), (4, 5, 6, 3)) del x137 - x139 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x139 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x139 += einsum(t2, (0, 1, 2, 3), x138, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -0.5 del x138 - x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x140 += einsum(x0, (0, 1, 2, 3), t3, (4, 5, 0, 3, 6, 2), (4, 5, 1, 6)) del x0 - x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x141 += einsum(t2, (0, 1, 2, 3), x140, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) * -0.5 del x140 - x142 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x142 += einsum(x136, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x136 x142 += einsum(x139, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) @@ -582,17 +583,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x142, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x142, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x142 - x143 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x143 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 0, 2, 5, 6, 1), (4, 5, 6, 3)) - x144 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x144 += einsum(t2, (0, 1, 2, 3), x143, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) del x143 - x145 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x145 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 2, 5, 1, 6, 3), (4, 5, 0, 6)) - x146 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x146 += einsum(t2, (0, 1, 2, 3), x145, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) del x145 - x147 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x147 += einsum(x144, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 del x144 x147 += einsum(x146, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -0.5 @@ -602,9 +603,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x147, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new += einsum(x147, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x147 - x148 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x148 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x149 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x149 += einsum(t2, (0, 1, 2, 3), x148, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) del x148 t3new += einsum(x149, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 @@ -620,25 +621,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x149, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new += einsum(x149, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x149 - x150 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x150 += einsum(x2, (0, 1, 2, 3), t3, (4, 0, 1, 5, 2, 6), (4, 6, 5, 3)) del x2 - x151 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x151 += einsum(t2, (0, 1, 2, 3), x150, (4, 5, 6, 2), (0, 1, 4, 3, 6, 5)) * 1.5 del x150 t3new += einsum(x151, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) t3new += einsum(x151, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 del x151 - x152 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x152 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (4, 5, 0, 6, 7, 2)) - x153 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x153 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x153 += einsum(v.ovov, (0, 1, 2, 3), x3, (4, 5, 1, 3), (4, 5, 0, 2)) - x154 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x154 += einsum(x153, (0, 1, 2, 3), t3, (4, 3, 2, 5, 6, 7), (4, 1, 0, 7, 5, 6)) - x155 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x155 += einsum(x73, (0, 1), t3, (2, 3, 1, 4, 5, 6), (2, 3, 0, 6, 4, 5)) * 2.0 del x73 - x156 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x156 += einsum(x152, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x152 x156 += einsum(x154, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) @@ -648,7 +649,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x156, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 t3new += einsum(x156, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) del x156 - x157 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x157 += einsum(t2, (0, 1, 2, 3), x36, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) del x36 t3new += einsum(x157, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 @@ -660,32 +661,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x157, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new += einsum(x157, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x157 - x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x158 += einsum(x13, (0, 1, 2, 3), t3, (4, 0, 5, 2, 3, 6), (4, 5, 1, 6)) del x13 - x159 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x159 += einsum(t2, (0, 1, 2, 3), x158, (4, 5, 1, 6), (0, 5, 4, 3, 2, 6)) * 2.0 del x158 t3new += einsum(x159, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) t3new += einsum(x159, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -1.0 del x159 - x160 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x160 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x160 += einsum(v.oovv, (0, 1, 2, 3), t3, (4, 1, 5, 6, 7, 3), (4, 5, 0, 6, 7, 2)) - x161 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x161 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x161 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x161 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 - x162 = np.zeros((nvir, nvir), dtype=np.float64) + x162 = np.zeros((nvir, nvir), dtype=types[float]) x162 += einsum(t1, (0, 1), x161, (0, 1, 2, 3), (2, 3)) * 2.0 del x161 - x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x163 += einsum(x162, (0, 1), t3, (2, 3, 4, 1, 5, 6), (2, 4, 3, 6, 5, 0)) del x162 - x164 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x164 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 2, 7)) - x165 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x165 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x165 += einsum(x3, (0, 1, 2, 3), x164, (4, 5, 6, 1, 0, 7), (4, 5, 6, 2, 3, 7)) del x3, x164 - x166 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x166 += einsum(x160, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x160 x166 += einsum(x163, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 @@ -695,43 +696,43 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x166, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 t3new += einsum(x166, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) del x166 - x167 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x167 += einsum(x87, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (4, 5, 0, 7, 6, 2)) * 1.00000000000001 del x87 t3new += einsum(x167, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 t3new += einsum(x167, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x167 - x168 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x168 += einsum(x92, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 7, 2)) - x169 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x169 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 1, 7, 3), (4, 6, 5, 0, 7, 2)) - x170 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x170 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x170 += einsum(t1, (0, 1), x169, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x169 - x171 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x171 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x171 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 1, 2), (0, 4, 5, 3)) - x172 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x172 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x172 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x172 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x173 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x173 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x173 += einsum(t2, (0, 1, 2, 3), x172, (4, 5, 1, 3), (0, 4, 5, 2)) del x172 - x174 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x174 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x174 += einsum(x171, (0, 1, 2, 3), (0, 2, 1, 3)) del x171 x174 += einsum(x173, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x173 - x175 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x175 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x175 += einsum(t2, (0, 1, 2, 3), x174, (4, 1, 5, 6), (0, 4, 5, 3, 2, 6)) del x174 - x176 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x176 += einsum(x34, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x176 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) del x37 - x177 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x177 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x177 += einsum(t2, (0, 1, 2, 3), x176, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) del x176 - x178 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x178 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x178 += einsum(x168, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x168 x178 += einsum(x170, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -0.5 @@ -745,23 +746,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x178, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * -1.0 t3new += einsum(x178, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) del x178 - x179 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x179 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x179 += einsum(t1, (0, 1), x23, (2, 3, 1, 4), (0, 2, 3, 4)) - x180 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x180 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x180 += einsum(t2, (0, 1, 2, 3), x179, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x179 - x181 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x181 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x181 += einsum(t2, (0, 1, 2, 3), x5, (4, 1, 5, 2), (4, 0, 5, 3)) - x182 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x182 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x182 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x182 += einsum(x181, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x181 x182 += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) del x66 - x183 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x183 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x183 += einsum(t2, (0, 1, 2, 3), x182, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) del x182 - x184 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x184 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x184 += einsum(x180, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x180 x184 += einsum(x183, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -771,27 +772,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x184, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * -1.0 t3new += einsum(x184, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) del x184 - x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x185 += einsum(x24, (0, 1, 2, 3), t3, (3, 4, 2, 5, 6, 7), (0, 4, 1, 7, 5, 6)) - x186 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x186 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x186 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) - x187 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x187 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x187 += einsum(t1, (0, 1), x186, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x186 - x188 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x188 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x188 += einsum(x9, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) * 2.0 - x189 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x189 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x189 += einsum(t1, (0, 1), x153, (2, 3, 4, 0), (3, 2, 4, 1)) del x153 - x190 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x190 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x190 += einsum(x188, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x188 x190 += einsum(x189, (0, 1, 2, 3), (1, 0, 2, 3)) del x189 - x191 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x191 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x191 += einsum(t2, (0, 1, 2, 3), x190, (4, 5, 1, 6), (0, 4, 5, 3, 2, 6)) del x190 - x192 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x192 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x192 += einsum(x185, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 del x185 x192 += einsum(x187, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -803,26 +804,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x192, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new += einsum(x192, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x192 - x193 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x193 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x193 += einsum(t2, (0, 1, 2, 3), x20, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) del x20 - x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x194 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x195 += einsum(v.ovov, (0, 1, 2, 3), x124, (2, 4, 3, 5), (4, 0, 5, 1)) del x124 - x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x196 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x196 += einsum(x194, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x196 += einsum(x195, (0, 1, 2, 3), (0, 1, 2, 3)) del x195 - x197 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x197 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x197 += einsum(t2, (0, 1, 2, 3), x196, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) del x196 - x198 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x198 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x198 += einsum(t1, (0, 1), x197, (2, 3, 4, 0, 5, 6), (3, 2, 4, 1, 5, 6)) del x197 - x199 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x199 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x199 += einsum(x193, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x193 x199 += einsum(x198, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -840,18 +841,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x199, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 t3new += einsum(x199, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x199 - x200 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x200 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x200 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x201 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x201 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x201 += einsum(t2, (0, 1, 2, 3), x200, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x200 - x202 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x202 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x202 += einsum(t2, (0, 1, 2, 3), x84, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) del x84 - x203 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x203 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x203 += einsum(t1, (0, 1), x202, (2, 3, 4, 0, 5, 6), (3, 2, 4, 1, 5, 6)) * -1.0 del x202 - x204 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x204 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x204 += einsum(x201, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x201 x204 += einsum(x203, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -869,7 +870,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x204, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x204, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x204 - x205 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x205 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x205 += einsum(x23, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 2), (0, 4, 5, 6, 7, 3)) t3new += einsum(x205, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 t3new += einsum(x205, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) @@ -880,19 +881,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x205, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) t3new += einsum(x205, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x205 - x206 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x206 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x206 += einsum(x92, (0, 1, 2, 3), t3, (4, 1, 5, 6, 7, 3), (0, 4, 5, 6, 7, 2)) t3new += einsum(x206, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 t3new += einsum(x206, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) del x206 - x207 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x207 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x207 += einsum(v.vvvv, (0, 1, 2, 3), t3, (4, 5, 6, 1, 7, 3), (4, 6, 5, 7, 0, 2)) - x208 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x208 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x208 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 1, 3), (4, 6, 5, 0, 7, 2)) - x209 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x209 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x209 += einsum(t1, (0, 1), x208, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x208 - x210 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x210 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x210 += einsum(x207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -0.5 del x207 x210 += einsum(x209, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -900,17 +901,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x210, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -1.0 t3new += einsum(x210, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) del x210 - x211 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x211 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x211 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 2), (0, 3, 4, 5)) - x212 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x212 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x212 += einsum(t2, (0, 1, 2, 3), x211, (4, 5, 3, 6), (0, 1, 4, 2, 5, 6)) del x211 - x213 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x213 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x213 += einsum(t2, (0, 1, 2, 3), x92, (4, 5, 6, 3), (4, 0, 1, 5, 2, 6)) - x214 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x214 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x214 += einsum(t1, (0, 1), x213, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x213 - x215 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x215 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x215 += einsum(x212, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x212 x215 += einsum(x214, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -928,26 +929,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x215, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x215, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x215 - x216 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x216 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x216 += einsum(t2, (0, 1, 2, 3), x23, (4, 5, 3, 6), (4, 0, 1, 5, 2, 6)) - x217 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x217 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x217 += einsum(t1, (0, 1), x216, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x216 - x218 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x218 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x218 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 0, 1, 5), (4, 2, 3, 5)) - x219 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x219 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x219 += einsum(t1, (0, 1), v.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x220 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x220 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x220 += einsum(t1, (0, 1), x219, (2, 0, 3, 4), (2, 1, 3, 4)) - x221 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x221 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x221 += einsum(x218, (0, 1, 2, 3), (0, 1, 2, 3)) del x218 x221 += einsum(x220, (0, 1, 2, 3), (0, 1, 2, 3)) del x220 - x222 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x222 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x222 += einsum(t2, (0, 1, 2, 3), x221, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) del x221 - x223 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x223 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x223 += einsum(x217, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x217 x223 += einsum(x222, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) @@ -965,14 +966,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x223, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) t3new += einsum(x223, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x223 - x224 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x224 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x224 += einsum(x24, (0, 1, 2, 3), t3, (4, 3, 2, 5, 6, 7), (0, 4, 1, 5, 7, 6)) t3new += einsum(x224, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) t3new += einsum(x224, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) * -1.0 del x224 - x225 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x225 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x225 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 3), (4, 5, 0, 1, 6, 7)) - x226 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x226 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x226 += einsum(t1, (0, 1), x225, (2, 3, 0, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x225 t3new += einsum(x226, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -984,17 +985,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x226, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new += einsum(x226, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x226 - x227 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x227 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x227 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (4, 5, 0, 2, 6, 7)) - x228 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x228 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x228 += einsum(t1, (0, 1), x227, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x227 t3new += einsum(x228, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) t3new += einsum(x228, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 del x228 - x229 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x229 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x229 += einsum(t1, (0, 1), x24, (2, 3, 0, 4), (2, 3, 4, 1)) - x230 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x230 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x230 += einsum(t2, (0, 1, 2, 3), x229, (4, 5, 1, 6), (4, 0, 5, 6, 2, 3)) del x229 t3new += einsum(x230, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) * -1.0 @@ -1002,7 +1003,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x230, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) t3new += einsum(x230, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * -1.0 del x230 - x231 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x231 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x231 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 3), (4, 5, 0, 6, 7, 1)) t3new += einsum(x231, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) t3new += einsum(x231, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 @@ -1013,11 +1014,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -1.0 t3new += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) del x231 - x232 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x232 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x232 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.499999999999995 x232 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x232 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x233 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x233 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x233 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x233 += einsum(x18, (0, 1, 2, 3), (1, 0, 3, 2)) del x18 @@ -1026,14 +1027,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x194 x233 += einsum(v.ovov, (0, 1, 2, 3), x232, (2, 4, 5, 3), (0, 4, 1, 5)) * 2.00000000000002 del x232 - x234 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x234 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x234 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x234 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x234 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) x234 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -1.0 t3new += einsum(x233, (0, 1, 2, 3), x234, (0, 4, 5, 2, 6, 7), (4, 1, 5, 7, 3, 6)) del x233, x234 - x235 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x235 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x235 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x235 += einsum(x219, (0, 1, 2, 3), (1, 0, 3, 2)) del x219 @@ -1042,7 +1043,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x97 t3new += einsum(x235, (0, 1, 2, 3), t3, (4, 0, 5, 6, 2, 7), (4, 1, 5, 6, 3, 7)) del x235 - x236 = np.zeros((nvir, nvir), dtype=np.float64) + x236 = np.zeros((nvir, nvir), dtype=types[float]) x236 += einsum(f.vv, (0, 1), (0, 1)) * -1.0 x236 += einsum(x113, (0, 1), (0, 1)) del x113 @@ -1052,34 +1053,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x60 t3new += einsum(x236, (0, 1), t3, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -1.0 del x236 - x237 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x237 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x237 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x237 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) - x238 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x238 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x238 += einsum(x237, (0, 1, 2, 3), x38, (1, 4, 5, 3), (4, 0, 2, 5)) - x239 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x239 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x239 += einsum(t2, (0, 1, 2, 3), x237, (4, 5, 1, 3), (0, 4, 5, 2)) * 0.5 - x240 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x240 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x240 += einsum(t2, (0, 1, 2, 3), x237, (4, 5, 1, 2), (0, 4, 5, 3)) * 0.5 del x237 - x241 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x241 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x241 += einsum(x9, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) del x9 - x242 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x242 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x242 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x242 += einsum(x92, (0, 1, 2, 3), (0, 1, 3, 2)) del x92 - x243 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x243 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x243 += einsum(t1, (0, 1), x242, (2, 3, 1, 4), (0, 2, 3, 4)) * 0.5 del x242 - x244 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x244 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x244 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x244 += einsum(x24, (0, 1, 2, 3), (2, 1, 0, 3)) x244 += einsum(x19, (0, 1, 2, 3), (3, 1, 0, 2)) - x245 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x245 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x245 += einsum(t1, (0, 1), x244, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x244 - x246 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x246 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x246 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -0.5 x246 += einsum(x5, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 x246 += einsum(x238, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -1094,60 +1095,60 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x243 x246 += einsum(x245, (0, 1, 2, 3), (0, 2, 1, 3)) del x245 - x247 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x247 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x247 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x247 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) t3new += einsum(x246, (0, 1, 2, 3), x247, (1, 4, 5, 6), (4, 0, 2, 5, 3, 6)) * -2.0 - x248 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x248 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x248 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x248 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t3new += einsum(x246, (0, 1, 2, 3), x248, (1, 4, 5, 6), (2, 0, 4, 5, 3, 6)) * -2.0 del x246 - x249 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x249 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x249 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x249 += einsum(x24, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x250 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x250 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x250 += einsum(t1, (0, 1), x249, (0, 2, 3, 4), (2, 3, 4, 1)) del x249 - x251 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x251 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x251 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x251 += einsum(x250, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x250 - x252 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x252 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x252 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x253 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x253 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x253 += einsum(t1, (0, 1), x19, (2, 3, 4, 0), (2, 3, 4, 1)) del x19 - x254 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x254 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x254 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) x254 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x254 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x255 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x255 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x255 += einsum(v.ooov, (0, 1, 2, 3), x254, (1, 4, 5, 3), (0, 2, 4, 5)) del x254 - x256 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x256 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x256 += einsum(x38, (0, 1, 2, 3), x5, (4, 0, 5, 3), (4, 5, 1, 2)) * 2.0 del x38 - x257 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x257 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x257 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x257 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x258 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x258 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x258 += einsum(v.ooov, (0, 1, 2, 3), x257, (2, 4, 5, 3), (0, 1, 4, 5)) * 2.0 del x257 - x259 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x259 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x259 += einsum(x247, (0, 1, 2, 3), x5, (4, 5, 0, 3), (4, 5, 1, 2)) del x247 - x260 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x260 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x260 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x260 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x260 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) - x261 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x261 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x261 += einsum(t1, (0, 1), x260, (2, 3, 1, 4), (0, 2, 3, 4)) del x260 - x262 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x262 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x262 += einsum(x8, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) * 2.0 del x8 - x263 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x263 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x263 += einsum(x253, (0, 1, 2, 3), (0, 2, 1, 3)) x263 += einsum(x255, (0, 1, 2, 3), (2, 1, 0, 3)) x263 += einsum(x256, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1157,7 +1158,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x263 += einsum(x261, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x261 x263 += einsum(x262, (0, 1, 2, 3), (1, 2, 0, 3)) - x264 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x264 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x264 += einsum(x251, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x264 += einsum(x251, (0, 1, 2, 3), (0, 2, 1, 3)) del x251 @@ -1168,30 +1169,30 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x263 t3new += einsum(t2, (0, 1, 2, 3), x264, (1, 4, 5, 6), (4, 0, 5, 6, 2, 3)) * -1.0 del x264 - x265 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x265 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x265 += einsum(t1, (0, 1), v.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x266 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x266 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x266 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x266 += einsum(x265, (0, 1, 2, 3), (1, 0, 2, 3)) del x265 x266 += einsum(x252, (0, 1, 2, 3), (1, 0, 2, 3)) del x252 - x267 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x267 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x267 += einsum(x34, (0, 1, 2, 3), (0, 2, 1, 3)) del x34 x267 += einsum(x258, (0, 1, 2, 3), (2, 1, 0, 3)) del x258 - x268 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x268 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x268 += einsum(x248, (0, 1, 2, 3), x5, (4, 5, 0, 2), (4, 5, 1, 3)) del x5, x248 - x269 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x269 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x269 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x269 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) del x23 - x270 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x270 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x270 += einsum(t1, (0, 1), x269, (2, 3, 1, 4), (0, 2, 3, 4)) del x269 - x271 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x271 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x271 += einsum(x253, (0, 1, 2, 3), (0, 1, 2, 3)) del x253 x271 += einsum(x255, (0, 1, 2, 3), (2, 0, 1, 3)) @@ -1204,10 +1205,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x262 x271 += einsum(x270, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x270 - x272 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x272 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x272 += einsum(t1, (0, 1), x24, (2, 3, 4, 0), (2, 4, 3, 1)) del x24 - x273 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x273 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x273 += einsum(x266, (0, 1, 2, 3), (0, 2, 1, 3)) x273 += einsum(x266, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x266 @@ -1227,79 +1228,79 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l1=None, l2=None, l3=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(l2, (0, 1, 2, 3), v.vvvv, (4, 1, 5, 0), (4, 5, 3, 2)) l2new += einsum(v.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new += einsum(l2, (0, 1, 2, 3), v.oooo, (4, 2, 5, 3), (0, 1, 4, 5)) - l3new = np.zeros((nvir, nvir, nvir, nocc, nocc, nocc), dtype=np.float64) + l3new = np.zeros((nvir, nvir, nvir, nocc, nocc, nocc), dtype=types[float]) l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (0, 3, 5, 1, 2, 4)) l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (5, 3, 0, 1, 2, 4)) * -1.0 l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (5, 0, 3, 2, 1, 4)) * -1.0 l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (3, 0, 5, 2, 1, 4)) l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (0, 5, 3, 2, 4, 1)) * -1.0 l3new += einsum(l1, (0, 1), v.ovov, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) - x0 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 3), (4, 5, 0, 1, 6, 7)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x2 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(x1, (0, 1, 2, 3), t3, (4, 5, 0, 6, 3, 7), (4, 5, 1, 2, 7, 6)) * 0.25 - x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) - x4 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 2, 5, 6, 3, 7), (4, 5, 0, 1, 6, 7)) - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x6 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 1, 6), (4, 0, 5, 6, 2, 3)) - x7 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), x5, (4, 5, 6, 1), (4, 0, 5, 6, 2, 3)) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x9 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x10 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) - x11 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(x10, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (4, 5, 0, 2, 7, 6)) * 0.25 - x12 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x8, (0, 1, 2, 3), t3, (4, 5, 2, 6, 7, 3), (0, 4, 5, 1, 6, 7)) - x13 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(x8, (0, 1, 2, 3), t3, (4, 1, 5, 6, 3, 7), (0, 4, 5, 2, 6, 7)) - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x14 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), x14, (1, 4, 3, 5), (0, 4, 2, 5)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x16 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (1, 4, 2, 5), (0, 4, 3, 5)) * 0.5 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x18 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) - x19 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * 2.0 - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum(t1, (0, 1), x8, (2, 3, 4, 1), (0, 2, 3, 4)) - x21 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(t2, (0, 1, 2, 3), x20, (4, 5, 1, 6), (5, 4, 0, 6, 2, 3)) - x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x22 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), x22, (2, 3, 1, 4), (0, 2, 3, 4)) * -1.0 - x24 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x8, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x25 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(x24, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x25 += einsum(x24, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) - x26 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(x0, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * 1.25 x26 += einsum(x0, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) * -0.25 x26 += einsum(x0, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -0.25 @@ -1349,46 +1350,46 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x25 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x26, (3, 4, 5, 6, 1, 2), (0, 6)) * -1.0 del x26 - x27 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(f.ov, (0, 1), t3, (2, 3, 4, 5, 6, 1), (0, 2, 4, 3, 5, 6)) - x28 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(f.ov, (0, 1), t3, (2, 3, 4, 5, 1, 6), (0, 2, 4, 3, 5, 6)) - x29 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x1, (0, 1, 2, 3), t3, (4, 5, 0, 6, 7, 3), (4, 5, 1, 2, 6, 7)) * 1.00000000000004 - x30 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 1, 7, 3), (4, 6, 5, 0, 7, 2)) - x31 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * 2.00000000000008 del x18 - x32 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(x30, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x32 += einsum(x31, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) del x31 - x33 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(x10, (0, 1, 2, 3), t3, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) * 1.00000000000004 - x34 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 6, 1, 7, 3), (4, 6, 5, 0, 2, 7)) - x35 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), x34, (2, 3, 4, 0, 5, 6), (3, 2, 4, 5, 1, 6)) del x34 - x36 = np.zeros((nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nvir), dtype=types[float]) x36 += einsum(t1, (0, 1), x14, (0, 2, 1, 3), (2, 3)) - x37 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(x36, (0, 1), t3, (2, 3, 4, 5, 1, 6), (2, 4, 3, 0, 5, 6)) * 0.6666666666666666 - x38 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(x36, (0, 1), t3, (2, 3, 4, 1, 5, 6), (2, 4, 3, 0, 6, 5)) * 0.6666666666666666 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x39 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x39 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x39 += einsum(x8, (0, 1, 2, 3), (2, 0, 1, 3)) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x40 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x41 += einsum(x8, (0, 1, 2, 3), (2, 0, 1, 3)) - x42 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(x27, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -0.3333333333333333 x42 += einsum(x27, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * 2.333333333333333 x42 += einsum(x27, (0, 1, 2, 3, 4, 5), (2, 3, 0, 1, 4, 5)) * 0.3333333333333333 @@ -1421,60 +1422,60 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x42 += einsum(x41, (0, 1, 2, 3), t3, (4, 0, 5, 3, 6, 7), (4, 5, 2, 1, 6, 7)) * -2.00000000000008 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x42, (3, 5, 6, 4, 1, 2), (0, 6)) * -0.24999999999999 del x42 - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x43 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x43, (1, 4, 3, 5), (0, 4, 2, 5)) * 1.5000000000000002 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x45 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 3.0000000000000004 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), x45, (1, 4, 2, 5), (0, 4, 3, 5)) * 0.5 del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x47 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -2.0 x47 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x44 x47 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 - x48 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x47, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * 6.00000000000024 del x47 - x49 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x50 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -0.5 x50 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 3, 4, 2, 5)) - x51 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), x50, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * 12.00000000000048 del x50 - x52 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 1, 3), (4, 6, 5, 0, 7, 2)) - x53 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(v.ovvv, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 7, 2)) - x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x54 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x54 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t1, (0, 1), x54, (2, 3, 1, 4), (0, 2, 3, 4)) - x56 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(t2, (0, 1, 2, 3), x55, (4, 5, 2, 6), (0, 1, 4, 5, 3, 6)) * 12.00000000000048 del x55 - x57 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x57 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 2, 7)) - x58 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(t1, (0, 1), x57, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) - x59 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(t1, (0, 1), x57, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 1, 6)) - x60 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(x24, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x60 += einsum(x24, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.5 - x61 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(t1, (0, 1), x60, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 1, 6)) * 12.00000000000048 del x60 - x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(x48, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) x62 += einsum(x48, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x48 @@ -1507,24 +1508,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x61 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x62, (5, 3, 6, 4, 2, 1), (0, 6)) * 0.08333333333333 del x62 - x63 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(t2, (0, 1, 2, 3), v.oooo, (4, 5, 6, 1), (0, 4, 5, 6, 2, 3)) - x64 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(x36, (0, 1), t3, (2, 3, 4, 1, 5, 6), (2, 4, 3, 0, 6, 5)) * 0.11111111111110666 - x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x65 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x66 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(t2, (0, 1, 2, 3), x65, (4, 5, 6, 1), (4, 5, 0, 6, 2, 3)) - x67 = np.zeros((nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nvir), dtype=types[float]) x67 += einsum(t1, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * 2.0 - x68 = np.zeros((nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nvir), dtype=types[float]) x68 += einsum(f.ov, (0, 1), (0, 1)) x68 += einsum(x67, (0, 1), (0, 1)) l3new += einsum(x68, (0, 1), l2, (2, 3, 4, 5), (1, 2, 3, 0, 4, 5)) l3new += einsum(x68, (0, 1), l2, (2, 3, 4, 5), (2, 3, 1, 4, 5, 0)) l3new += einsum(x68, (0, 1), l2, (2, 3, 4, 5), (2, 3, 1, 0, 5, 4)) * -1.0 l3new += einsum(x68, (0, 1), l2, (2, 3, 4, 5), (1, 2, 3, 5, 4, 0)) * -1.0 - x69 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(x63, (0, 1, 2, 3, 4, 5), (1, 2, 3, 0, 4, 5)) * 0.3333333333333333 x69 += einsum(x63, (0, 1, 2, 3, 4, 5), (1, 2, 3, 0, 5, 4)) * -1.0 x69 += einsum(x63, (0, 1, 2, 3, 4, 5), (1, 3, 2, 0, 4, 5)) * -0.3333333333333333 @@ -1546,19 +1547,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x69 += einsum(x68, (0, 1), t3, (2, 3, 4, 5, 1, 6), (0, 2, 4, 3, 5, 6)) * 0.05555555555555333 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x69, (6, 5, 4, 3, 1, 2), (0, 6)) * 1.5 del x69 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) - x71 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), x70, (4, 5, 6, 3), (0, 1, 4, 5, 2, 6)) - x72 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(t1, (0, 1), x49, (2, 3, 4, 5, 0, 6), (2, 3, 5, 4, 1, 6)) - x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(t1, (0, 1), x24, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) - x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x74 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x74 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) x74 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(x71, (0, 1, 2, 3, 4, 5), (3, 1, 0, 2, 4, 5)) * 2.0 x75 += einsum(x66, (0, 1, 2, 3, 4, 5), (3, 2, 1, 0, 5, 4)) * 2.0 del x66 @@ -1575,30 +1576,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x75 += einsum(x68, (0, 1), t3, (2, 3, 4, 5, 1, 6), (0, 2, 4, 3, 5, 6)) * 0.99999999999996 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x75, (6, 3, 5, 4, 0, 2), (1, 6)) * -0.25 del x75 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x77 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(v.ovov, (0, 1, 2, 3), x77, (2, 4, 3, 5), (0, 4, 1, 5)) * 0.5 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x79 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x79 += einsum(x78, (0, 1, 2, 3), (1, 0, 3, 2)) del x78 - x80 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(t2, (0, 1, 2, 3), x79, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) del x79 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x81 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x82 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(t2, (0, 1, 2, 3), x81, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * 2.0 del x81 - x83 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(t1, (0, 1), x49, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 1, 6)) - x84 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(x80, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) x84 += einsum(x80, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x80 @@ -1612,19 +1613,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x84 += einsum(x83, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 5, 4)) l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x84, (3, 4, 6, 5, 2, 1), (0, 6)) * -1.0 del x84 - x85 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x85 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) x85 += einsum(x5, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 - x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t2, (0, 1, 2, 3), x85, (4, 1, 5, 6), (0, 4, 5, 6, 3, 2)) * 6.0 del x85 - x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x87 += einsum(x65, (0, 1, 2, 3), (1, 0, 3, 2)) x87 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) l2new += einsum(l2, (0, 1, 2, 3), x87, (3, 2, 4, 5), (0, 1, 5, 4)) - x88 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(t2, (0, 1, 2, 3), x87, (4, 5, 1, 6), (0, 4, 5, 6, 3, 2)) * 3.0 - x89 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(x63, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -3.0 x89 += einsum(x63, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) x89 += einsum(x63, (0, 1, 2, 3, 4, 5), (3, 0, 2, 1, 4, 5)) * 3.0 @@ -1639,19 +1640,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x88 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x89, (3, 4, 6, 5, 1, 2), (0, 6)) * -0.25 del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x91 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), x90, (4, 5, 6, 3), (4, 0, 1, 5, 2, 6)) - x92 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x92 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x92 += einsum(x5, (0, 1, 2, 3), (2, 1, 0, 3)) x92 += einsum(x65, (0, 1, 2, 3), (3, 1, 0, 2)) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x93 += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) x93 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x94 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(x63, (0, 1, 2, 3, 4, 5), (3, 0, 2, 1, 5, 4)) * -1.0000000000000402 del x63 x94 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 5, 6, 2), (0, 1, 4, 5, 6, 3)) * 1.0000000000000402 @@ -1667,16 +1668,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x93 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x94, (5, 3, 6, 4, 0, 2), (1, 6)) * 0.49999999999997996 del x94 - x95 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(t1, (0, 1), x24, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 1, 6)) del x24 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(v.ovov, (0, 1, 2, 3), x77, (2, 4, 3, 5), (0, 4, 1, 5)) - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x97 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x97 += einsum(x96, (0, 1, 2, 3), (1, 0, 3, 2)) - x98 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(x8, (0, 1, 2, 3), t3, (4, 5, 2, 6, 3, 7), (4, 5, 0, 1, 6, 7)) x98 += einsum(x95, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 x98 += einsum(x7, (0, 1, 2, 3, 4, 5), (1, 3, 0, 2, 4, 5)) @@ -1689,11 +1690,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x97 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x98, (3, 4, 5, 6, 0, 2), (1, 6)) * 0.5 del x98 - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x100 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(t2, (0, 1, 2, 3), x99, (4, 5, 3, 6), (4, 0, 1, 5, 2, 6)) - x101 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x71, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.25 del x71 x101 += einsum(x100, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * 0.5 @@ -1709,13 +1710,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x95 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x101, (5, 4, 3, 6, 2, 1), (0, 6)) * 2.0 del x101 - x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x102 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x102 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x103 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x103 += einsum(x57, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x103 += einsum(x57, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) - x104 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum(x30, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x104 += einsum(x30, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 del x30 @@ -1728,25 +1729,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x103 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x104, (5, 4, 3, 6, 2, 1), (0, 6)) * 0.08333333333333 del x104 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x105 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x105 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 x105 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) del x17 - x106 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x106 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 x106 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 3, 4, 2, 5)) del x49 - x107 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x107 += einsum(t2, (0, 1, 2, 3), x105, (4, 5, 6, 3), (0, 1, 5, 4, 2, 6)) * 2.0 del x105 x107 += einsum(t1, (0, 1), x106, (2, 3, 4, 5, 0, 6), (2, 3, 5, 4, 6, 1)) * -2.0 del x106 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x107, (4, 3, 6, 5, 1, 2), (0, 6)) * -0.5 del x107 - x108 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum(v.ooov, (0, 1, 2, 3), t3, (4, 5, 1, 6, 3, 7), (4, 5, 0, 2, 6, 7)) * 0.5 x108 += einsum(x83, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x83 @@ -1754,58 +1755,58 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x100 l1new += einsum(l3, (0, 1, 2, 3, 4, 5), x108, (3, 4, 5, 6, 0, 2), (1, 6)) del x108 - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 7, 1, 2), (4, 6, 0, 7)) - x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x110 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 3, 2, 7, 0), (5, 6, 1, 7)) - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) - x112 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x112 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 6, 5, 0, 2, 3)) l3new += einsum(v.ooov, (0, 1, 2, 3), x112, (4, 5, 1, 0, 6, 7), (6, 3, 7, 4, 2, 5)) - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum(t2, (0, 1, 2, 3), x112, (0, 4, 1, 5, 6, 3), (4, 5, 6, 2)) - x114 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x114 += einsum(t2, (0, 1, 2, 3), x112, (0, 4, 1, 5, 2, 6), (4, 5, 6, 3)) - x115 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 5.0 x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 x115 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x116 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x116 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x116 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x117 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x118 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum(t1, (0, 1), l3, (2, 1, 3, 4, 5, 6), (4, 6, 5, 0, 2, 3)) l3new += einsum(x8, (0, 1, 2, 3), x118, (4, 5, 0, 1, 6, 7), (7, 3, 6, 5, 2, 4)) l3new += einsum(x68, (0, 1), x118, (2, 3, 4, 0, 5, 6), (6, 1, 5, 3, 4, 2)) * -1.0 - x119 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum(x118, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x119 += einsum(x118, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x120 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x121 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x121 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x122 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x122 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x123 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x123 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 1, 5, 6), (6, 5, 0, 4)) - x124 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x124 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 1, 5, 6), (6, 5, 0, 4)) - x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x125 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.3333333333333333 x125 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x126 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x126 += einsum(x125, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 0.75 - x127 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x127 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x127 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x127 += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.75 @@ -1814,7 +1815,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x127 += einsum(x124, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.25 x127 += einsum(x126, (0, 1, 2, 3), (1, 0, 2, 3)) x127 += einsum(x117, (0, 1, 2, 3), l3, (2, 4, 3, 0, 5, 6), (5, 6, 1, 4)) * -0.25 - x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x128 += einsum(x109, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x128 += einsum(x110, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x128 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1830,27 +1831,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x127 l1new += einsum(v.ovvv, (0, 1, 2, 3), x128, (4, 0, 3, 2), (1, 4)) * -0.25 del x128 - x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x129 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x130 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x130 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x131 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x131 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * 0.3333333333333333 x131 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 0, 1, 2)) * 0.3333333333333333 - x132 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x132 += einsum(x129, (0, 1, 2, 3), (0, 1, 2, 3)) x132 += einsum(x130, (0, 1, 2, 3), l3, (4, 5, 2, 1, 6, 0), (6, 4, 5, 3)) * -0.125 x132 += einsum(t2, (0, 1, 2, 3), x131, (0, 4, 1, 5, 2, 6), (4, 5, 6, 3)) * 0.75 del x131 l1new += einsum(v.vvvv, (0, 1, 2, 3), x132, (4, 1, 2, 3), (0, 4)) * 2.0 del x132 - x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x133 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x133 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) x133 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 0, 1, 2)) - x134 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x134 += einsum(x129, (0, 1, 2, 3), (0, 1, 2, 3)) del x129 x134 += einsum(x130, (0, 1, 2, 3), l3, (4, 5, 2, 1, 6, 0), (6, 4, 5, 3)) * -0.75 @@ -1858,72 +1859,72 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x133 l1new += einsum(v.vvvv, (0, 1, 2, 3), x134, (4, 2, 1, 3), (0, 4)) * -1.0 del x134 - x135 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x135 += einsum(l2, (0, 1, 2, 3), t3, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) - x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x136 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - x137 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x137 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x137 += einsum(t1, (0, 1), x122, (2, 3, 4, 1), (3, 2, 4, 0)) l2new += einsum(v.ovov, (0, 1, 2, 3), x137, (4, 5, 0, 2), (3, 1, 5, 4)) - x138 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x138 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x138 += einsum(t1, (0, 1), x137, (0, 2, 3, 4), (2, 4, 3, 1)) - x139 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x139 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x139 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 7, 0, 1, 2), (3, 5, 6, 7)) - x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x140 += einsum(t1, (0, 1), x139, (0, 2, 3, 4), (2, 4, 3, 1)) - x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x141 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x141 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) - x142 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x142 += einsum(t1, (0, 1), x141, (2, 3, 4, 1, 5, 6), (0, 2, 3, 4, 5, 6)) l3new += einsum(x8, (0, 1, 2, 3), x142, (2, 4, 5, 0, 6, 7), (6, 3, 7, 5, 1, 4)) * -1.0 - x143 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x143 += einsum(t1, (0, 1), x142, (2, 3, 4, 5, 1, 6), (0, 4, 3, 5, 2, 6)) * -1.0 del x142 - x144 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x144 += einsum(t2, (0, 1, 2, 3), x143, (4, 5, 0, 1, 6, 3), (5, 4, 6, 2)) * -0.25 del x143 - x145 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x145 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 1, 2)) x145 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) - x146 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x146 += einsum(t2, (0, 1, 2, 3), x145, (1, 4, 0, 5, 2, 6), (4, 3, 5, 6)) del x145 - x147 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x147 += einsum(t2, (0, 1, 2, 3), x146, (4, 5, 3, 2), (0, 1, 4, 5)) * 0.25 del x146 - x148 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x148 += einsum(x140, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.124999999999995 del x140 x148 += einsum(x144, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x144 x148 += einsum(x147, (0, 1, 2, 3), (2, 1, 0, 3)) del x147 - x149 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x149 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 2, 0, 1, 6), (6, 4, 5, 3)) - x150 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x150 += einsum(t2, (0, 1, 2, 3), x149, (4, 2, 3, 5), (4, 0, 1, 5)) - x151 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x151 += einsum(t1, (0, 1), x118, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x152 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x152 += einsum(t2, (0, 1, 2, 3), x151, (1, 4, 0, 5, 6, 3), (4, 5, 6, 2)) - x153 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x153 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x153 += einsum(x150, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x150 x153 += einsum(x152, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 del x152 - x154 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x154 += einsum(x130, (0, 1, 2, 3), x151, (0, 1, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.375 - x155 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x155 += einsum(x117, (0, 1, 2, 3), l3, (4, 5, 2, 1, 6, 0), (6, 4, 5, 3)) - x156 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x156 += einsum(t2, (0, 1, 2, 3), x155, (4, 3, 2, 5), (0, 1, 4, 5)) * -0.375 - x157 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x157 += einsum(x154, (0, 1, 2, 3), (0, 1, 2, 3)) del x154 x157 += einsum(x156, (0, 1, 2, 3), (2, 1, 0, 3)) del x156 - x158 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 0.2 x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.2 @@ -1932,39 +1933,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -0.2 x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -0.2 x158 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x159 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x159 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x159 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) - x160 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x160 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x160 += einsum(t1, (0, 1), x159, (2, 3, 4, 1, 5, 6), (0, 2, 3, 4, 5, 6)) - x161 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x161 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x161 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x161 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) x161 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) - x162 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x162 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x162 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -0.3333333333333333 x162 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) * 0.3333333333333333 x162 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) x162 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 1, 0, 2)) * -0.3333333333333333 - x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x163 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x163 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) * -1.0 x163 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) * -1.0 x163 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 1, 0, 2)) * 3.0 - x164 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x164 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x164 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 x164 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 - x165 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x165 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x165 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) - x166 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x166 += einsum(x125, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 0.1875 - x167 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x167 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 5, 6, 1), (5, 6, 0, 4)) - x168 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x168 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 1.3333333333333333 x168 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) * -1.0 - x169 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x169 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x169 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x169 += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.0625 @@ -1975,35 +1976,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x169 += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.0625 x169 += einsum(x167, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.25 x169 += einsum(x117, (0, 1, 2, 3), x168, (0, 4, 5, 2, 3, 6), (4, 5, 1, 6)) * 0.1875 - x170 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x170 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x170 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 4, 1, 0, 2), (5, 3, 6, 7)) - x171 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x171 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x171 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 3, 2, 1, 0), (5, 4, 6, 7)) - x172 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x172 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x172 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 3, 2, 0, 1), (5, 4, 6, 7)) - x173 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x173 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x173 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 3, 1, 2, 0), (5, 4, 6, 7)) - x174 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x174 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x174 += einsum(t1, (0, 1), x167, (2, 3, 4, 1), (2, 3, 0, 4)) - x175 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x175 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x175 += einsum(x172, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.16666666666666 x175 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.16666666666666 x175 += einsum(x174, (0, 1, 2, 3), (0, 1, 2, 3)) del x174 - x176 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x176 += einsum(t1, (0, 1), x165, (2, 3, 4, 1), (2, 3, 0, 4)) - x177 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x177 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x177 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x177 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) - x178 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x178 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x178 += einsum(l3, (0, 1, 2, 3, 4, 5), x177, (4, 6, 7, 0, 2, 1), (3, 5, 6, 7)) * 0.16666666666666 - x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x179 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x179 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x180 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x180 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x180 += einsum(x179, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 0.3333333333333333 x180 += einsum(x130, (0, 1, 2, 3), l3, (3, 4, 2, 5, 6, 0), (6, 5, 1, 4)) * 0.3333333333333333 - x181 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x181 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x181 += einsum(x170, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.16666666666666 x181 += einsum(x171, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.16666666666662 x181 += einsum(x171, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.16666666666666 @@ -2014,31 +2015,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x181 += einsum(x178, (0, 1, 2, 3), (1, 0, 2, 3)) x181 += einsum(t1, (0, 1), x180, (2, 3, 4, 1), (2, 3, 0, 4)) * 3.0 del x180 - x182 = np.zeros((nocc, nocc), dtype=np.float64) + x182 = np.zeros((nocc, nocc), dtype=types[float]) x182 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 0, 1, 2), (4, 6)) - x183 = np.zeros((nocc, nocc), dtype=np.float64) + x183 = np.zeros((nocc, nocc), dtype=types[float]) x183 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 3, 1, 2, 0), (5, 6)) - x184 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x184 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x184 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x184 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) - x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 - x186 = np.zeros((nocc, nocc), dtype=np.float64) + x186 = np.zeros((nocc, nocc), dtype=types[float]) x186 += einsum(x184, (0, 1, 2, 3, 4, 5), x185, (1, 6, 0, 3, 4, 5), (2, 6)) * 0.041666666666665 - x187 = np.zeros((nocc, nocc), dtype=np.float64) + x187 = np.zeros((nocc, nocc), dtype=types[float]) x187 += einsum(t3, (0, 1, 2, 3, 4, 5), x184, (1, 2, 6, 5, 4, 3), (0, 6)) * 0.041666666666665 - x188 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x188 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x188 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x188 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.14285714285714288 - x189 = np.zeros((nocc, nocc), dtype=np.float64) + x189 = np.zeros((nocc, nocc), dtype=types[float]) x189 += einsum(l3, (0, 1, 2, 3, 4, 5), x188, (3, 6, 4, 0, 2, 1), (5, 6)) * 0.291666666666655 - x190 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x190 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x190 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x190 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x191 = np.zeros((nocc, nocc), dtype=np.float64) + x191 = np.zeros((nocc, nocc), dtype=types[float]) x191 += einsum(l2, (0, 1, 2, 3), x190, (3, 4, 0, 1), (2, 4)) - x192 = np.zeros((nocc, nocc), dtype=np.float64) + x192 = np.zeros((nocc, nocc), dtype=types[float]) x192 += einsum(x182, (0, 1), (0, 1)) * 0.124999999999995 x192 += einsum(x183, (0, 1), (0, 1)) * -0.041666666666665 x192 += einsum(x186, (0, 1), (0, 1)) * -1.0 @@ -2048,7 +2049,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x192 += einsum(x189, (0, 1), (0, 1)) del x189 x192 += einsum(x191, (0, 1), (0, 1)) - x193 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x193 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x193 += einsum(x135, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.75 x193 += einsum(t3, (0, 1, 2, 3, 4, 5), x112, (1, 2, 6, 7, 4, 5), (6, 0, 7, 3)) * -0.125 x193 += einsum(t3, (0, 1, 2, 3, 4, 5), x118, (1, 2, 6, 7, 5, 4), (6, 0, 7, 3)) * -0.125 @@ -2084,17 +2085,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x193 += einsum(t1, (0, 1), x192, (2, 3), (2, 0, 3, 1)) * 2.0 l1new += einsum(v.ovov, (0, 1, 2, 3), x193, (4, 0, 2, 1), (3, 4)) * -2.0 del x193 - x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x194 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 5, 3, 7, 2, 1), (4, 6, 0, 7)) - x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x195 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 7, 2, 0), (4, 6, 1, 7)) - x196 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x196 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x196 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x196 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) - x197 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x197 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x197 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x197 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x198 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x198 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x198 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 8.0 x198 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 2, 7, 1), (4, 6, 0, 7)) x198 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2107,9 +2108,9 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x198 += einsum(x120, (0, 1, 2, 3), x197, (0, 4, 2, 5), (4, 1, 5, 3)) * 16.0 l1new += einsum(v.ovvv, (0, 1, 2, 3), x198, (4, 0, 3, 1), (2, 4)) * 0.25 del x198 - x199 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x199 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x199 += einsum(x117, (0, 1, 2, 3), l3, (2, 4, 3, 0, 5, 6), (6, 5, 1, 4)) * 0.5 - x200 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x200 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x200 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x200 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 x200 += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -2118,7 +2119,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x200 += einsum(x124, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x200 += einsum(x125, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 1.5 x200 += einsum(x199, (0, 1, 2, 3), (0, 1, 2, 3)) - x201 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x201 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x201 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 x201 += einsum(x113, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x113 @@ -2129,32 +2130,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x200 l1new += einsum(v.ovvv, (0, 1, 2, 3), x201, (4, 0, 3, 1), (2, 4)) * 0.5 del x201 - x202 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x202 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x202 += einsum(l2, (0, 1, 2, 3), t3, (4, 3, 5, 6, 1, 0), (2, 4, 5, 6)) - x203 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x203 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x203 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l2new += einsum(v.ovov, (0, 1, 2, 3), x203, (4, 5, 0, 2), (1, 3, 4, 5)) - x204 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x204 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x204 += einsum(t1, (0, 1), x203, (2, 0, 3, 4), (2, 3, 4, 1)) - x205 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x205 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x205 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x205 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x205 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) x205 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 - x206 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x206 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x206 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x206 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.6666666666666666 x206 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 - x207 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x207 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x207 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.75 del x124 x207 += einsum(x126, (0, 1, 2, 3), (1, 0, 2, 3)) x207 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) * -3.0 x207 += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 x207 += einsum(x167, (0, 1, 2, 3), (1, 0, 2, 3)) - x208 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x208 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x208 += einsum(t2, (0, 1, 2, 3), l3, (3, 4, 2, 1, 5, 6), (6, 5, 0, 4)) - x209 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x209 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x209 += einsum(x208, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 x209 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x209 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -2162,10 +2163,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x209 += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.75 x209 += einsum(t2, (0, 1, 2, 3), x168, (1, 4, 5, 2, 3, 6), (4, 5, 0, 6)) * -0.1875 del x168 - x210 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x210 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x210 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 0.4444444444444444 x210 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 0, 2)) - x211 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x211 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x211 += einsum(x208, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x211 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x211 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -2173,12 +2174,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x211 += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 x211 += einsum(t2, (0, 1, 2, 3), x210, (1, 4, 5, 2, 3, 6), (5, 4, 0, 6)) * 1.125 del x210 - x212 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x212 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x212 += einsum(x117, (0, 1, 2, 3), l3, (2, 4, 3, 0, 5, 6), (6, 5, 1, 4)) - x213 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x213 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x213 += einsum(x125, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 3.0 x213 += einsum(x212, (0, 1, 2, 3), (0, 1, 2, 3)) - x214 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x214 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x214 += einsum(x170, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.16666666666666 x214 += einsum(x171, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.16666666666666 x214 += einsum(x171, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.16666666666662 @@ -2191,7 +2192,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x178 x214 += einsum(t1, (0, 1), x213, (2, 3, 4, 1), (2, 3, 0, 4)) del x213 - x215 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x215 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x215 += einsum(x135, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x135 x215 += einsum(t3, (0, 1, 2, 3, 4, 5), x118, (6, 2, 1, 7, 3, 5), (6, 0, 7, 4)) * 4.0 @@ -2220,44 +2221,44 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x192 l1new += einsum(v.ovov, (0, 1, 2, 3), x215, (4, 0, 2, 3), (1, 4)) * 0.125 del x215 - x216 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x216 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x216 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 5, 2, 6, 1, 3), (4, 5, 0, 6)) - x217 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x217 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x217 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x218 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x218 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x218 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x219 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x219 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x219 += einsum(t1, (0, 1), x90, (2, 3, 4, 1), (2, 0, 3, 4)) - x220 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x220 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x220 += einsum(t1, (0, 1), x87, (2, 3, 0, 4), (2, 3, 4, 1)) del x87 - x221 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x221 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x221 += einsum(x218, (0, 1, 2, 3), (0, 1, 2, 3)) x221 += einsum(x219, (0, 1, 2, 3), (0, 1, 2, 3)) x221 += einsum(x220, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x220 - x222 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x222 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x222 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 2, 5, 6, 3, 1), (4, 5, 0, 6)) - x223 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x223 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x223 += einsum(x36, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) - x224 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x224 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x224 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.5 x224 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 1.5 x224 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) - x225 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x225 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x225 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x225 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x225 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x225 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x226 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x226 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x226 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x226 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x227 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x227 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x227 += einsum(v.oooo, (0, 1, 2, 3), (0, 2, 3, 1)) x227 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x227 += einsum(x5, (0, 1, 2, 3), (2, 0, 3, 1)) x227 += einsum(x5, (0, 1, 2, 3), (3, 0, 2, 1)) * -0.5 - x228 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x228 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x228 += einsum(x216, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 x228 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x228 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 @@ -2280,22 +2281,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x227 l1new += einsum(l2, (0, 1, 2, 3), x228, (2, 3, 4, 1), (0, 4)) * 2.0 del x228 - x229 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x229 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x229 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -0.5 x229 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.5 x229 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) - x230 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x230 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x230 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x230 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x230 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) x230 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x231 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x231 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x231 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x231 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x232 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x232 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x232 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x232 += einsum(x5, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 - x233 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x233 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x233 += einsum(x216, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.5 x233 += einsum(v.ovov, (0, 1, 2, 3), x229, (2, 4, 5, 3, 1, 6), (4, 5, 0, 6)) * -0.5 del x229 @@ -2309,30 +2310,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x232 l1new += einsum(l2, (0, 1, 2, 3), x233, (3, 2, 4, 1), (0, 4)) * -1.0 del x233 - x234 = np.zeros((nvir, nvir), dtype=np.float64) + x234 = np.zeros((nvir, nvir), dtype=types[float]) x234 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 0, 6, 2), (1, 6)) - x235 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x235 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.14285714285714288 x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 0.14285714285714288 x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 0.14285714285714288 x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -0.14285714285714288 x235 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -0.14285714285714288 - x236 = np.zeros((nvir, nvir), dtype=np.float64) + x236 = np.zeros((nvir, nvir), dtype=types[float]) x236 += einsum(x234, (0, 1), (0, 1)) * 3.0 x236 += einsum(l3, (0, 1, 2, 3, 4, 5), x235, (3, 5, 4, 6, 1, 2), (0, 6)) * 6.999999999999999 x236 += einsum(l3, (0, 1, 2, 3, 4, 5), x116, (3, 4, 5, 6, 1, 2), (0, 6)) * -1.0 - x237 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x237 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x237 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x237 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 l1new += einsum(x236, (0, 1), x237, (2, 3, 0, 1), (3, 2)) * 0.16666666666666 del x236, x237 - x238 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x238 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x238 += einsum(x130, (0, 1, 2, 3), x159, (0, 4, 5, 2, 3, 6), (1, 4, 5, 6)) * 0.5 - x239 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x239 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x239 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x239 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 - x240 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x240 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x240 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x240 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 x240 += einsum(x238, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -2340,37 +2341,37 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x240 += einsum(x239, (0, 1, 2, 3), l3, (4, 2, 3, 0, 5, 6), (5, 6, 1, 4)) * 1.5 l1new += einsum(v.oovv, (0, 1, 2, 3), x240, (0, 4, 1, 3), (2, 4)) del x240 - x241 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x241 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.999999999999999 x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -1.0 x241 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 - x242 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x242 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x242 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x242 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x242 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 - x243 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x243 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x243 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x243 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0 x243 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x243 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 x243 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) - x244 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x244 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x244 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x244 += einsum(x239, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) * 0.75 - x245 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x245 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x245 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x245 += einsum(x126, (0, 1, 2, 3), (1, 0, 2, 3)) x245 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x126 x245 += einsum(x238, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x238 - x246 = np.zeros((nocc, nocc), dtype=np.float64) + x246 = np.zeros((nocc, nocc), dtype=types[float]) x246 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x246, (0, 1), x36, (1, 2), (2, 0)) * -2.0 - x247 = np.zeros((nocc, nocc), dtype=np.float64) + x247 = np.zeros((nocc, nocc), dtype=types[float]) x247 += einsum(x246, (0, 1), (0, 1)) x247 += einsum(x182, (0, 1), (0, 1)) * 0.24999999999999 x247 += einsum(x183, (0, 1), (0, 1)) * -0.08333333333333 @@ -2378,7 +2379,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x247 += einsum(t3, (0, 1, 2, 3, 4, 5), x184, (1, 2, 6, 5, 4, 3), (6, 0)) * 0.08333333333333 x247 += einsum(l3, (0, 1, 2, 3, 4, 5), x188, (3, 6, 4, 0, 2, 1), (5, 6)) * 0.58333333333331 x247 += einsum(l2, (0, 1, 2, 3), x190, (2, 4, 1, 0), (3, 4)) * 2.0 - x248 = np.zeros((nocc, nvir), dtype=np.float64) + x248 = np.zeros((nocc, nvir), dtype=types[float]) x248 += einsum(t1, (0, 1), (0, 1)) * -4.0 x248 += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 1, 0), (4, 5)) * 2.0 x248 += einsum(t3, (0, 1, 2, 3, 4, 5), x118, (2, 0, 1, 6, 5, 3), (6, 4)) * 0.99999999999996 @@ -2396,22 +2397,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x121 x248 += einsum(t1, (0, 1), x247, (0, 2), (2, 1)) * 4.0 del x247 - x249 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x249 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x249 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * 2.0 x249 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new += einsum(x248, (0, 1), x249, (0, 2, 3, 1), (3, 2)) * -0.25 del x248, x249 - x250 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x250 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x250 += einsum(x172, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.041666666666665 x250 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.041666666666665 - x251 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x251 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x251 += einsum(x130, (0, 1, 2, 3), x159, (0, 4, 5, 2, 3, 6), (4, 5, 1, 6)) * -1.0 del x159 x251 += einsum(x179, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) del x179 x251 += einsum(x239, (0, 1, 2, 3), l3, (4, 2, 3, 0, 5, 6), (5, 6, 1, 4)) * 3.0 del x239 - x252 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x252 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x252 += einsum(x170, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.041666666666665 x252 += einsum(x203, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x252 += einsum(x203, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -2429,20 +2430,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x251 l1new += einsum(v.ooov, (0, 1, 2, 3), x252, (4, 1, 2, 0), (3, 4)) * 2.0 del x252 - x253 = np.zeros((nvir, nvir), dtype=np.float64) + x253 = np.zeros((nvir, nvir), dtype=types[float]) x253 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 0.5 x253 += einsum(l2, (0, 1, 2, 3), x120, (2, 3, 4, 1), (0, 4)) - x254 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x254 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x254 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x254 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) l1new += einsum(x253, (0, 1), x254, (2, 1, 0, 3), (3, 2)) * 4.0 del x253, x254 - x255 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x255 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x255 += einsum(x172, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.14285714285714288 del x172 x255 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.14285714285714288 del x173 - x256 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x256 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x256 += einsum(x170, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.14285714285714288 del x170 x256 += einsum(x171, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.14285714285714288 @@ -2457,65 +2458,65 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x177 l1new += einsum(v.ooov, (0, 1, 2, 3), x256, (4, 1, 0, 2), (3, 4)) * -0.58333333333331 del x256 - x257 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x257 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x257 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 0.3333333333333333 x257 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) * -0.3333333333333333 x257 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) x257 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -0.3333333333333333 - x258 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x258 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x258 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x258 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) x258 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) * -1.0 x258 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * 3.0 - x259 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x259 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x259 += einsum(t2, (0, 1, 2, 3), x257, (1, 4, 5, 6, 3, 2), (5, 4, 0, 6)) del x257 x259 += einsum(t2, (0, 1, 2, 3), x258, (1, 4, 5, 6, 2, 3), (5, 4, 0, 6)) * 0.3333333333333333 del x258 - x260 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x260 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x260 += einsum(t1, (0, 1), x259, (2, 3, 4, 1), (2, 3, 0, 4)) * 3.0 del x259 l1new += einsum(v.ooov, (0, 1, 2, 3), x260, (4, 0, 2, 1), (3, 4)) * 0.5 del x260 - x261 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x261 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x261 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 3.0 x261 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) x261 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -1.0 - x262 = np.zeros((nocc, nocc), dtype=np.float64) + x262 = np.zeros((nocc, nocc), dtype=types[float]) x262 += einsum(x246, (0, 1), (0, 1)) * 0.5 x262 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 1, 2, 0), (4, 6)) * -0.041666666666665 x262 += einsum(l3, (0, 1, 2, 3, 4, 5), x261, (3, 5, 6, 0, 2, 1), (4, 6)) * 0.041666666666665 del x261 x262 += einsum(x191, (0, 1), (0, 1)) del x191 - x263 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x263 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x263 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x263 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 l1new += einsum(x262, (0, 1), x263, (0, 2, 1, 3), (3, 2)) * -2.0 del x262 - x264 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x264 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x264 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x264 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x264 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 6.999999999999999 x264 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 - x265 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x265 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x265 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x265 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) - x266 = np.zeros((nocc, nocc), dtype=np.float64) + x266 = np.zeros((nocc, nocc), dtype=types[float]) x266 += einsum(l3, (0, 1, 2, 3, 4, 5), x264, (4, 6, 3, 0, 2, 1), (5, 6)) del x264 x266 += einsum(l3, (0, 1, 2, 3, 4, 5), x265, (4, 6, 3, 0, 1, 2), (5, 6)) * -1.0 - x267 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x267 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x267 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x267 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) l1new += einsum(x266, (0, 1), x267, (0, 2, 1, 3), (3, 2)) * -0.16666666666666 del x266, x267 - x268 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x268 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x268 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x268 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 l1new += einsum(l1, (0, 1), x268, (1, 2, 0, 3), (3, 2)) * 2.0 del x268 - x269 = np.zeros((nocc, nocc), dtype=np.float64) + x269 = np.zeros((nocc, nocc), dtype=types[float]) x269 += einsum(x246, (0, 1), (0, 1)) * 1.714285714285783 x269 += einsum(x182, (0, 1), (0, 1)) * 0.4285714285714286 x269 += einsum(x183, (0, 1), (0, 1)) * -0.14285714285714288 @@ -2525,22 +2526,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x269 += einsum(l2, (0, 1, 2, 3), x190, (2, 4, 1, 0), (3, 4)) * 3.428571428571566 l1new += einsum(f.ov, (0, 1), x269, (2, 0), (1, 2)) * -0.58333333333331 del x269 - x270 = np.zeros((nvir, nvir), dtype=np.float64) + x270 = np.zeros((nvir, nvir), dtype=types[float]) x270 += einsum(f.vv, (0, 1), (0, 1)) * 0.5 x270 += einsum(t1, (0, 1), x54, (0, 1, 2, 3), (3, 2)) l1new += einsum(l1, (0, 1), x270, (0, 2), (2, 1)) * 2.0 del x270 - x271 = np.zeros((nocc, nocc), dtype=np.float64) + x271 = np.zeros((nocc, nocc), dtype=types[float]) x271 += einsum(v.ovov, (0, 1, 2, 3), x190, (2, 4, 1, 3), (0, 4)) * 2.0 - x272 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x272 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x272 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x272 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -0.5 - x273 = np.zeros((nocc, nocc), dtype=np.float64) + x273 = np.zeros((nocc, nocc), dtype=types[float]) x273 += einsum(t1, (0, 1), x272, (2, 3, 0, 1), (2, 3)) * 2.0 del x272 - x274 = np.zeros((nocc, nocc), dtype=np.float64) + x274 = np.zeros((nocc, nocc), dtype=types[float]) x274 += einsum(t1, (0, 1), x68, (2, 1), (0, 2)) - x275 = np.zeros((nocc, nocc), dtype=np.float64) + x275 = np.zeros((nocc, nocc), dtype=types[float]) x275 += einsum(f.oo, (0, 1), (0, 1)) x275 += einsum(x271, (0, 1), (1, 0)) x275 += einsum(x273, (0, 1), (1, 0)) @@ -2549,41 +2550,41 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l1new += einsum(l1, (0, 1), x275, (1, 2), (0, 2)) * -1.0 l3new += einsum(x275, (0, 1), l3, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -1.0 del x275 - x276 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x276 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x276 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x277 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x277 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x277 += einsum(l1, (0, 1), v.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x278 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x278 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x278 += einsum(l1, (0, 1), x8, (1, 2, 3, 4), (2, 3, 0, 4)) - x279 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x279 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x279 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 3, 5), (4, 5, 0, 1)) - x280 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x280 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x280 += einsum(x217, (0, 1, 2, 3), l3, (4, 5, 3, 6, 2, 1), (0, 6, 4, 5)) - x281 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x281 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x281 += einsum(x122, (0, 1, 2, 3), x8, (0, 2, 4, 5), (1, 4, 3, 5)) - x282 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x282 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x282 += einsum(v.ovvv, (0, 1, 2, 3), x123, (4, 5, 0, 3), (4, 5, 1, 2)) - x283 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x283 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x283 += einsum(t1, (0, 1), v.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x284 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x284 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x284 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x284 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x285 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x285 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x285 += einsum(t2, (0, 1, 2, 3), x284, (0, 4, 1, 5), (4, 2, 3, 5)) del x284 - x286 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x286 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x286 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x286 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x287 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x287 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x287 += einsum(x286, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) * 0.49999999999998 del x286 - x288 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x288 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x288 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x288 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 - x289 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x289 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x289 += einsum(x288, (0, 1, 2, 3), t3, (4, 1, 0, 5, 2, 6), (4, 6, 5, 3)) * 1.49999999999994 del x288 - x290 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x290 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x290 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x290 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x290 += einsum(x283, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 @@ -2595,56 +2596,56 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x287 x290 += einsum(x289, (0, 1, 2, 3), (0, 1, 2, 3)) del x289 - x291 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x291 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x291 += einsum(x290, (0, 1, 2, 3), l3, (2, 4, 1, 0, 5, 6), (6, 5, 4, 3)) * 0.5 del x290 - x292 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x292 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x292 += einsum(x16, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) * 0.24999999999999 - x293 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x293 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x293 += einsum(v.ovvv, (0, 1, 2, 3), x120, (0, 4, 1, 5), (4, 2, 3, 5)) * 2.0 - x294 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x294 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x294 += einsum(v.ovvv, (0, 1, 2, 3), x117, (0, 4, 3, 5), (4, 1, 2, 5)) - x295 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x295 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x295 += einsum(x292, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x292 x295 += einsum(x293, (0, 1, 2, 3), (0, 2, 3, 1)) del x293 x295 += einsum(x294, (0, 1, 2, 3), (0, 2, 3, 1)) del x294 - x296 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x296 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x296 += einsum(x295, (0, 1, 2, 3), l3, (1, 4, 2, 0, 5, 6), (6, 5, 4, 3)) del x295 - x297 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x297 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x297 += einsum(t1, (0, 1), v.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x298 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x298 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x298 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x298 += einsum(x297, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 del x297 - x299 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x299 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x299 += einsum(t1, (0, 1), x65, (2, 3, 0, 4), (3, 2, 4, 1)) - x300 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x300 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x300 += einsum(x218, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x300 += einsum(x299, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x299 x300 += einsum(x223, (0, 1, 2, 3), (1, 0, 2, 3)) del x223 - x301 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x301 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x301 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -0.5 x301 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.5 x301 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) x301 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x302 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x302 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x302 += einsum(v.ovov, (0, 1, 2, 3), x301, (2, 4, 5, 3, 1, 6), (0, 4, 5, 6)) * 0.49999999999998 del x301 - x303 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x303 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x303 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x303 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x304 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x304 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x304 += einsum(t2, (0, 1, 2, 3), x303, (4, 5, 1, 3), (0, 4, 5, 2)) del x303 - x305 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x305 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x305 += einsum(t2, (0, 1, 2, 3), x1, (4, 5, 1, 2), (0, 4, 5, 3)) - x306 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x306 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x306 += einsum(x216, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.49999999999998 x306 += einsum(x298, (0, 1, 2, 3), (0, 2, 1, 3)) x306 += einsum(x298, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 @@ -2658,41 +2659,41 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x304 x306 += einsum(x305, (0, 1, 2, 3), (0, 2, 1, 3)) del x305 - x307 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x307 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x307 += einsum(x306, (0, 1, 2, 3), l3, (4, 5, 3, 0, 6, 1), (6, 2, 4, 5)) del x306 - x308 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x308 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x308 += einsum(t1, (0, 1), x20, (2, 3, 4, 0), (2, 3, 4, 1)) - x309 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x309 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x309 += einsum(x219, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x219 x309 += einsum(x308, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x308 - x310 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x310 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x310 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x310 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) - x311 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x311 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x311 += einsum(t2, (0, 1, 2, 3), x310, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x310 - x312 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x312 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x312 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) x312 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x313 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x313 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x313 += einsum(t2, (0, 1, 2, 3), x312, (4, 5, 1, 2), (0, 4, 5, 3)) del x312 - x314 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x314 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x314 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x314 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x315 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x315 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x315 += einsum(t1, (0, 1), x314, (2, 3, 1, 4), (0, 2, 3, 4)) del x314 - x316 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x316 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x316 += einsum(x5, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x316 += einsum(x5, (0, 1, 2, 3), (0, 3, 2, 1)) - x317 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x317 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x317 += einsum(t1, (0, 1), x316, (2, 3, 4, 0), (2, 3, 4, 1)) del x316 - x318 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x318 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x318 += einsum(x309, (0, 1, 2, 3), (0, 1, 2, 3)) x318 += einsum(x309, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x309 @@ -2704,19 +2705,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x315 x318 += einsum(x317, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x317 - x319 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x319 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x319 += einsum(x318, (0, 1, 2, 3), l3, (4, 5, 3, 0, 6, 1), (6, 2, 4, 5)) del x318 - x320 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x320 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x320 += einsum(t2, (0, 1, 2, 3), x14, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x14 - x321 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x321 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x321 += einsum(t2, (0, 1, 2, 3), x16, (1, 4, 2, 5), (0, 4, 3, 5)) del x16 - x322 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x322 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x322 += einsum(t1, (0, 1), x1, (0, 2, 3, 4), (2, 3, 1, 4)) * 0.5 del x1 - x323 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x323 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x323 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x323 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x323 += einsum(x320, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2725,51 +2726,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x321 x323 += einsum(x322, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x322 - x324 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x324 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x324 += einsum(x323, (0, 1, 2, 3), x112, (0, 4, 5, 1, 2, 6), (4, 5, 6, 3)) del x323 - x325 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x325 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x325 += einsum(t1, (0, 1), x22, (2, 1, 3, 4), (0, 2, 3, 4)) del x22 - x326 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x326 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x326 += einsum(t1, (0, 1), x10, (2, 3, 0, 4), (2, 3, 1, 4)) * 0.5 del x10 - x327 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x327 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x327 += einsum(x325, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x325 x327 += einsum(x326, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x326 - x328 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x328 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x328 += einsum(x327, (0, 1, 2, 3), x112, (0, 4, 5, 1, 2, 6), (4, 5, 6, 3)) del x327 - x329 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x329 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x329 += einsum(x130, (0, 1, 2, 3), l3, (4, 5, 2, 1, 6, 0), (6, 4, 5, 3)) - x330 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x330 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x330 += einsum(x149, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x330 += einsum(x329, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x329 - x331 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x331 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x331 += einsum(v.ovvv, (0, 1, 2, 3), x330, (4, 5, 3, 1), (0, 4, 2, 5)) * 0.5 del x330 - x332 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x332 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x332 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) - x333 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x333 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x333 += einsum(x130, (0, 1, 2, 3), x118, (0, 1, 4, 5, 6, 2), (4, 5, 6, 3)) del x130 - x334 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x334 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x334 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -0.5 x334 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) - x335 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x335 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x335 += einsum(t2, (0, 1, 2, 3), x334, (1, 4, 5, 2, 3, 6), (0, 4, 5, 6)) * 2.0 del x334 - x336 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x336 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x336 += einsum(x208, (0, 1, 2, 3), (1, 0, 2, 3)) del x208 x336 += einsum(x335, (0, 1, 2, 3), (2, 1, 0, 3)) del x335 - x337 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x337 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x337 += einsum(t1, (0, 1), x336, (0, 2, 3, 4), (2, 3, 1, 4)) - x338 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x338 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x338 += einsum(x332, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x332 x338 += einsum(x109, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.99999999999996 @@ -2782,21 +2783,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x333 x338 += einsum(x337, (0, 1, 2, 3), (0, 1, 3, 2)) del x337 - x339 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x339 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x339 += einsum(v.ovov, (0, 1, 2, 3), x338, (4, 2, 5, 1), (0, 4, 3, 5)) * 0.5 del x338 - x340 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x340 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x340 += einsum(x155, (0, 1, 2, 3), x40, (0, 4, 5, 3), (4, 5, 1, 2)) * -0.5 - x341 = np.zeros((nvir, nvir), dtype=np.float64) + x341 = np.zeros((nvir, nvir), dtype=types[float]) x341 += einsum(l3, (0, 1, 2, 3, 4, 5), x235, (3, 5, 4, 6, 1, 2), (0, 6)) * 2.333333333333333 del x235 - x342 = np.zeros((nvir, nvir), dtype=np.float64) + x342 = np.zeros((nvir, nvir), dtype=types[float]) x342 += einsum(l3, (0, 1, 2, 3, 4, 5), x116, (3, 4, 5, 6, 1, 2), (0, 6)) * 0.3333333333333333 del x116 - x343 = np.zeros((nvir, nvir), dtype=np.float64) + x343 = np.zeros((nvir, nvir), dtype=types[float]) x343 += einsum(l2, (0, 1, 2, 3), x120, (2, 3, 4, 1), (0, 4)) * 8.00000000000032 del x120 - x344 = np.zeros((nvir, nvir), dtype=np.float64) + x344 = np.zeros((nvir, nvir), dtype=types[float]) x344 += einsum(x234, (0, 1), (0, 1)) del x234 x344 += einsum(x341, (0, 1), (0, 1)) @@ -2805,35 +2806,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x342 x344 += einsum(x343, (0, 1), (0, 1)) del x343 - x345 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x345 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x345 += einsum(x344, (0, 1), v.ovov, (2, 1, 3, 4), (2, 3, 4, 0)) * 0.24999999999999 del x344 - x346 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x346 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x346 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x346 += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) - x347 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x347 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x347 += einsum(l2, (0, 1, 2, 3), x346, (2, 4, 1, 5), (3, 4, 0, 5)) del x346 - x348 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x348 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x348 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x348 += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) del x123 x348 += einsum(x199, (0, 1, 2, 3), (1, 0, 2, 3)) - x349 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x349 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x349 += einsum(v.ooov, (0, 1, 2, 3), x348, (1, 4, 2, 5), (0, 4, 3, 5)) del x348 - x350 = np.zeros((nocc, nocc), dtype=np.float64) + x350 = np.zeros((nocc, nocc), dtype=types[float]) x350 += einsum(x184, (0, 1, 2, 3, 4, 5), x185, (1, 6, 0, 3, 4, 5), (2, 6)) * 0.3333333333333333 del x185 - x351 = np.zeros((nocc, nocc), dtype=np.float64) + x351 = np.zeros((nocc, nocc), dtype=types[float]) x351 += einsum(t3, (0, 1, 2, 3, 4, 5), x184, (1, 2, 6, 5, 4, 3), (0, 6)) * 0.3333333333333333 del x184 - x352 = np.zeros((nocc, nocc), dtype=np.float64) + x352 = np.zeros((nocc, nocc), dtype=types[float]) x352 += einsum(l3, (0, 1, 2, 3, 4, 5), x188, (3, 6, 4, 0, 2, 1), (5, 6)) * 2.333333333333333 del x188 - x353 = np.zeros((nocc, nocc), dtype=np.float64) + x353 = np.zeros((nocc, nocc), dtype=types[float]) x353 += einsum(l2, (0, 1, 2, 3), x190, (3, 4, 0, 1), (2, 4)) * 8.00000000000032 - x354 = np.zeros((nocc, nocc), dtype=np.float64) + x354 = np.zeros((nocc, nocc), dtype=types[float]) x354 += einsum(x246, (0, 1), (0, 1)) * 4.00000000000016 del x246 x354 += einsum(x182, (0, 1), (0, 1)) @@ -2848,30 +2849,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x352 x354 += einsum(x353, (0, 1), (0, 1)) del x353 - x355 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x355 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x355 += einsum(x354, (0, 1), v.ovov, (2, 3, 1, 4), (2, 0, 4, 3)) * 0.24999999999999 del x354 - x356 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x356 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x356 += einsum(t1, (0, 1), x212, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 - x357 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x357 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x357 += einsum(v.ovov, (0, 1, 2, 3), x356, (0, 4, 5, 2), (4, 5, 3, 1)) * 0.5 del x356 - x358 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x358 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x358 += einsum(x36, (0, 1), x212, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 - x359 = np.zeros((nocc, nocc), dtype=np.float64) + x359 = np.zeros((nocc, nocc), dtype=types[float]) x359 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x360 = np.zeros((nocc, nocc), dtype=np.float64) + x360 = np.zeros((nocc, nocc), dtype=types[float]) x360 += einsum(f.oo, (0, 1), (0, 1)) x360 += einsum(x359, (0, 1), (1, 0)) del x359 - x361 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x361 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x361 += einsum(x360, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) - x362 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x362 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x362 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) x362 += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) - x363 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x363 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x363 += einsum(f.ov, (0, 1), x362, (2, 3, 0, 4), (2, 3, 4, 1)) - x364 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x364 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x364 += einsum(x276, (0, 1, 2, 3), (0, 1, 2, 3)) del x276 x364 += einsum(x277, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2923,40 +2924,40 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x364, (0, 1, 2, 3), (3, 2, 0, 1)) l2new += einsum(x364, (0, 1, 2, 3), (2, 3, 1, 0)) del x364 - x365 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x365 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x365 += einsum(l1, (0, 1), v.ooov, (2, 1, 3, 4), (2, 3, 0, 4)) - x366 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x366 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x366 += einsum(l2, (0, 1, 2, 3), x99, (2, 4, 5, 1), (3, 4, 0, 5)) - x367 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x367 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x367 += einsum(x122, (0, 1, 2, 3), x8, (1, 2, 4, 5), (0, 4, 3, 5)) - x368 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x368 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x368 += einsum(v.ooov, (0, 1, 2, 3), x165, (4, 1, 2, 5), (4, 0, 5, 3)) - x369 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x369 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x369 += einsum(v.ooov, (0, 1, 2, 3), x149, (1, 4, 5, 3), (0, 2, 4, 5)) del x149 - x370 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x370 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x370 += einsum(x99, (0, 1, 2, 3), x118, (0, 4, 5, 1, 3, 6), (4, 5, 6, 2)) - x371 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x371 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x371 += einsum(l3, (0, 1, 2, 3, 4, 5), x57, (5, 3, 4, 6, 7, 2), (6, 7, 0, 1)) del x57 - x372 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x372 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x372 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 2, 6, 1, 0), (6, 4, 5, 3)) - x373 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x373 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x373 += einsum(x372, (0, 1, 2, 3), x8, (0, 4, 5, 3), (5, 4, 1, 2)) - x374 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x374 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x374 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 0, 1, 5), (4, 2, 3, 5)) - x375 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x375 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x375 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 2), (0, 3, 4, 5)) - x376 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x376 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x376 += einsum(v.ovov, (0, 1, 2, 3), t3, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x377 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x377 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x377 += einsum(t2, (0, 1, 2, 3), x8, (4, 0, 1, 5), (4, 2, 3, 5)) - x378 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x378 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x378 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 x378 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) - x379 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x379 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x379 += einsum(v.ovov, (0, 1, 2, 3), x378, (0, 2, 4, 5, 3, 6), (4, 1, 5, 6)) * 0.49999999999998 - x380 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x380 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x380 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x380 += einsum(x283, (0, 1, 2, 3), (0, 3, 2, 1)) del x283 @@ -2970,35 +2971,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x377 x380 += einsum(x379, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x379 - x381 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x381 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x381 += einsum(x380, (0, 1, 2, 3), l3, (4, 2, 1, 5, 6, 0), (5, 6, 4, 3)) del x380 - x382 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x382 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x382 += einsum(v.ovov, (0, 1, 2, 3), x378, (2, 4, 5, 3, 1, 6), (0, 4, 5, 6)) * 0.49999999999998 del x378 - x383 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x383 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x383 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x383 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x383 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x383 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x384 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x384 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x384 += einsum(t2, (0, 1, 2, 3), x383, (4, 1, 5, 3), (0, 4, 5, 2)) del x383 - x385 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x385 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x385 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x385 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) - x386 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x386 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x386 += einsum(t2, (0, 1, 2, 3), x385, (4, 1, 5, 2), (0, 4, 5, 3)) - x387 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x387 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x387 += einsum(x67, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) - x388 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x388 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x388 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x388 += einsum(x5, (0, 1, 2, 3), (2, 1, 3, 0)) x388 += einsum(x65, (0, 1, 2, 3), (3, 1, 2, 0)) - x389 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x389 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x389 += einsum(t1, (0, 1), x388, (0, 2, 3, 4), (2, 3, 4, 1)) del x388 - x390 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x390 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x390 += einsum(v.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x390 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x390 += einsum(x218, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -3015,57 +3016,57 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x387 x390 += einsum(x389, (0, 1, 2, 3), (0, 2, 1, 3)) del x389 - x391 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x391 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x391 += einsum(x390, (0, 1, 2, 3), l3, (4, 5, 3, 6, 1, 0), (6, 2, 4, 5)) del x390 - x392 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x392 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x392 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 2, 4, 5), (0, 3, 4, 5)) - x393 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x393 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x393 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x393 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x394 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x394 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x394 += einsum(t2, (0, 1, 2, 3), x393, (1, 3, 4, 5), (0, 2, 4, 5)) * 0.5 - x395 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x395 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x395 += einsum(x392, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.5 del x392 x395 += einsum(x394, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x394 - x396 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x396 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x396 += einsum(x395, (0, 1, 2, 3), l3, (4, 3, 1, 5, 6, 0), (5, 6, 4, 2)) * 2.0 del x395 - x397 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x397 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x397 += einsum(t2, (0, 1, 2, 3), x385, (4, 5, 1, 2), (0, 4, 5, 3)) del x385 - x398 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x398 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x398 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x398 += einsum(x90, (0, 1, 2, 3), (1, 0, 3, 2)) - x399 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x399 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x399 += einsum(t1, (0, 1), x398, (2, 3, 1, 4), (0, 2, 3, 4)) del x398 - x400 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x400 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x400 += einsum(t1, (0, 1), x40, (2, 3, 4, 1), (0, 2, 3, 4)) del x40 - x401 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x401 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x401 += einsum(t1, (0, 1), x400, (2, 3, 4, 0), (2, 4, 3, 1)) del x400 - x402 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x402 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x402 += einsum(x397, (0, 1, 2, 3), (1, 0, 2, 3)) del x397 x402 += einsum(x399, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x399 x402 += einsum(x401, (0, 1, 2, 3), (0, 2, 1, 3)) del x401 - x403 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x403 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x403 += einsum(x402, (0, 1, 2, 3), l3, (4, 5, 3, 6, 1, 0), (6, 2, 4, 5)) del x402 - x404 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x404 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x404 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x405 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x405 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x405 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) - x406 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x406 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x406 += einsum(t2, (0, 1, 2, 3), x43, (1, 4, 3, 5), (0, 4, 2, 5)) del x43 - x407 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x407 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x407 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x407 += einsum(x404, (0, 1, 2, 3), (0, 1, 2, 3)) del x404 @@ -3073,83 +3074,83 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x405 x407 += einsum(x406, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x406 - x408 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x408 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x408 += einsum(x407, (0, 1, 2, 3), x118, (4, 0, 5, 1, 6, 2), (4, 5, 6, 3)) del x407 - x409 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x409 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x409 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 3, 1, 6, 0), (6, 4, 5, 2)) - x410 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x410 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x410 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 5, 1, 6, 0), (6, 4, 5, 3)) - x411 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x411 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x411 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x411 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) * -1.0 x411 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * 0.5 x411 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 1, 0, 2)) * 2.0 - x412 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x412 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x412 += einsum(t2, (0, 1, 2, 3), x411, (0, 4, 1, 2, 5, 6), (4, 3, 5, 6)) del x411 - x413 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x413 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x413 += einsum(x409, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 del x409 x413 += einsum(x410, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x413 += einsum(x410, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x413 += einsum(x412, (0, 1, 2, 3), (0, 2, 3, 1)) del x412 - x414 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x414 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x414 += einsum(v.ovvv, (0, 1, 2, 3), x413, (4, 5, 2, 3), (0, 4, 1, 5)) del x413 - x415 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x415 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 5.0 x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x415 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 5.0 - x416 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x416 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x416 += einsum(l3, (0, 1, 2, 3, 4, 5), x415, (5, 6, 4, 2, 7, 1), (3, 6, 0, 7)) del x415 - x417 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x417 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x417 += einsum(l3, (0, 1, 2, 3, 4, 5), x161, (5, 6, 3, 0, 2, 7), (4, 6, 1, 7)) del x161 - x418 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x418 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x418 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x418 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) * -1.0 - x419 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x419 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x419 += einsum(t3, (0, 1, 2, 3, 4, 5), x418, (1, 2, 6, 5, 7, 4), (0, 6, 3, 7)) del x418 - x420 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x420 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x420 += einsum(l3, (0, 1, 2, 3, 4, 5), x265, (5, 6, 4, 2, 1, 7), (3, 6, 0, 7)) del x265 - x421 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x421 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x421 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x421 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) - x422 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x422 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x422 += einsum(l3, (0, 1, 2, 3, 4, 5), x421, (3, 6, 5, 2, 1, 7), (4, 6, 0, 7)) del x421 - x423 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x423 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x423 += einsum(x118, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 x423 += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -0.5 x423 += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) x423 += einsum(x112, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * -0.25 x423 += einsum(x112, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) * 0.25 - x424 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x424 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x424 += einsum(t2, (0, 1, 2, 3), x423, (4, 0, 1, 5, 6, 2), (4, 5, 3, 6)) * 8.00000000000032 del x423 - x425 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x425 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x425 += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x425 += einsum(x112, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) - x426 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x426 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x426 += einsum(t2, (0, 1, 2, 3), x425, (0, 1, 4, 5, 6, 3), (4, 5, 2, 6)) * 2.00000000000008 del x425 - x427 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x427 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x427 += einsum(x197, (0, 1, 2, 3), x77, (0, 4, 2, 5), (4, 1, 5, 3)) * 8.00000000000032 del x197 - x428 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x428 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x428 += einsum(x125, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) del x125 - x429 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x429 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x429 += einsum(x117, (0, 1, 2, 3), l3, (2, 4, 3, 0, 5, 6), (6, 5, 1, 4)) * 0.3333333333333333 - x430 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x430 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x430 += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) x430 += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x430 += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 @@ -3157,10 +3158,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x430 += einsum(x428, (0, 1, 2, 3), (1, 0, 2, 3)) x430 += einsum(x429, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x429 - x431 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x431 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x431 += einsum(t1, (0, 1), x430, (2, 0, 3, 4), (2, 3, 1, 4)) * 6.00000000000024 del x430 - x432 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x432 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x432 += einsum(x194, (0, 1, 2, 3), (0, 1, 2, 3)) del x194 x432 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 4.00000000000016 @@ -3183,33 +3184,33 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x427 x432 += einsum(x431, (0, 1, 2, 3), (0, 1, 3, 2)) del x431 - x433 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x433 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x433 += einsum(v.ovov, (0, 1, 2, 3), x432, (4, 2, 5, 3), (0, 4, 1, 5)) * 0.24999999999999 del x432 - x434 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x434 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x434 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) - x435 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x435 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x435 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 1, 7, 2), (4, 6, 0, 7)) - x436 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x436 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x436 += einsum(t2, (0, 1, 2, 3), x118, (4, 0, 1, 5, 6, 2), (4, 5, 6, 3)) - x437 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x437 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x437 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 x437 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 x437 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) - x438 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x438 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x438 += einsum(l3, (0, 1, 2, 3, 4, 5), x437, (4, 6, 5, 1, 7, 2), (3, 6, 0, 7)) del x437 - x439 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x439 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x439 += einsum(l3, (0, 1, 2, 3, 4, 5), x196, (5, 6, 3, 0, 2, 7), (4, 6, 1, 7)) del x196 - x440 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x440 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x440 += einsum(x117, (0, 1, 2, 3), x112, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 2.00000000000008 - x441 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x441 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x441 += einsum(l2, (0, 1, 2, 3), x77, (3, 4, 1, 5), (2, 4, 0, 5)) * 4.00000000000016 - x442 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x442 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x442 += einsum(t1, (0, 1), x336, (2, 0, 3, 4), (2, 3, 1, 4)) * 2.00000000000008 del x336 - x443 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x443 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x443 += einsum(x434, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.00000000000016 del x434 x443 += einsum(x435, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -3228,136 +3229,136 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x441 x443 += einsum(x442, (0, 1, 2, 3), (0, 1, 3, 2)) del x442 - x444 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x444 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x444 += einsum(v.ovov, (0, 1, 2, 3), x443, (4, 2, 5, 1), (0, 4, 3, 5)) * 0.24999999999999 del x443 - x445 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x445 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x445 += einsum(x217, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x445 += einsum(x217, (0, 1, 2, 3), (0, 2, 1, 3)) del x217 - x446 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x446 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x446 += einsum(x445, (0, 1, 2, 3), l3, (4, 5, 3, 1, 6, 2), (6, 0, 4, 5)) * 0.5 del x445 - x447 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x447 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x447 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x447 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) - x448 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x448 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x448 += einsum(x447, (0, 1, 2, 3), x112, (4, 0, 5, 1, 6, 2), (4, 5, 6, 3)) del x447 - x449 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x449 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x449 += einsum(x117, (0, 1, 2, 3), l3, (4, 5, 2, 1, 6, 0), (6, 4, 5, 3)) * 0.5 del x117 - x450 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x450 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x450 += einsum(x372, (0, 1, 2, 3), (0, 1, 2, 3)) x450 += einsum(x449, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x449 - x451 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x451 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x451 += einsum(v.ovvv, (0, 1, 2, 3), x450, (4, 5, 3, 1), (0, 4, 2, 5)) del x450 - x452 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x452 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x452 += einsum(t1, (0, 1), x8, (2, 0, 3, 4), (2, 3, 1, 4)) - x453 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x453 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x453 += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x453 += einsum(x452, (0, 1, 2, 3), (0, 1, 2, 3)) del x452 - x454 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x454 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x454 += einsum(x453, (0, 1, 2, 3), x112, (4, 0, 5, 1, 6, 2), (4, 5, 6, 3)) del x453 - x455 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x455 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x455 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) x455 += einsum(x199, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x199 - x456 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x456 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x456 += einsum(v.ovvv, (0, 1, 2, 3), x455, (4, 5, 0, 3), (4, 5, 1, 2)) del x455 - x457 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x457 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x457 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x457 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * 2.0 - x458 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x458 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x458 += einsum(t1, (0, 1), x457, (2, 1, 3, 4), (0, 2, 3, 4)) del x457 - x459 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x459 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x459 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x459 += einsum(x458, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x458 - x460 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x460 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x460 += einsum(l2, (0, 1, 2, 3), x459, (3, 4, 5, 1), (2, 4, 0, 5)) del x459 - x461 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x461 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x461 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x461 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x462 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x462 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x462 += einsum(x212, (0, 1, 2, 3), x461, (0, 4, 2, 5), (1, 4, 3, 5)) * -0.5 del x461 - x463 = np.zeros((nvir, nvir), dtype=np.float64) + x463 = np.zeros((nvir, nvir), dtype=types[float]) x463 += einsum(v.ovov, (0, 1, 2, 3), x190, (0, 2, 4, 1), (3, 4)) - x464 = np.zeros((nvir, nvir), dtype=np.float64) + x464 = np.zeros((nvir, nvir), dtype=types[float]) x464 += einsum(t1, (0, 1), x393, (0, 1, 2, 3), (2, 3)) * 0.5 - x465 = np.zeros((nvir, nvir), dtype=np.float64) + x465 = np.zeros((nvir, nvir), dtype=types[float]) x465 += einsum(x463, (0, 1), (0, 1)) del x463 x465 += einsum(x464, (0, 1), (1, 0)) * -1.0 del x464 - x466 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x466 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x466 += einsum(x465, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) * 2.0 del x465 - x467 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x467 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x467 += einsum(x171, (0, 1, 2, 3), (0, 1, 2, 3)) del x171 x467 += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0000000000000804 del x176 - x468 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x468 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x468 += einsum(v.ovov, (0, 1, 2, 3), x467, (4, 5, 0, 2), (4, 5, 3, 1)) * 0.49999999999997996 del x467 - x469 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x469 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x469 += einsum(x122, (0, 1, 2, 3), x263, (1, 4, 2, 5), (0, 4, 3, 5)) del x263 - x470 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x470 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x470 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x470 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) x470 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -3.0 - x471 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x471 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x471 += einsum(t2, (0, 1, 2, 3), x470, (1, 4, 5, 6, 2, 3), (0, 4, 5, 6)) del x470 - x472 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x472 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x472 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 0.3333333333333333 x472 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) x472 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -0.3333333333333333 - x473 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x473 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x473 += einsum(t2, (0, 1, 2, 3), x472, (1, 4, 5, 6, 3, 2), (0, 4, 5, 6)) * 3.0 del x472 - x474 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x474 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x474 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 x474 += einsum(x471, (0, 1, 2, 3), (2, 1, 0, 3)) del x471 x474 += einsum(x473, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x473 - x475 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x475 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x475 += einsum(v.ooov, (0, 1, 2, 3), x474, (4, 0, 1, 5), (2, 4, 3, 5)) * 0.5 del x474 - x476 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x476 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x476 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x476 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x477 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x477 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x477 += einsum(x476, (0, 1, 2, 3), x8, (0, 4, 2, 5), (4, 1, 5, 3)) del x476 - x478 = np.zeros((nocc, nocc), dtype=np.float64) + x478 = np.zeros((nocc, nocc), dtype=types[float]) x478 += einsum(t1, (0, 1), x36, (2, 1), (0, 2)) * 2.0 - x479 = np.zeros((nocc, nocc), dtype=np.float64) + x479 = np.zeros((nocc, nocc), dtype=types[float]) x479 += einsum(x271, (0, 1), (1, 0)) del x271 x479 += einsum(x273, (0, 1), (1, 0)) del x273 x479 += einsum(x478, (0, 1), (0, 1)) del x478 - x480 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x480 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x480 += einsum(x479, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) - x481 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x481 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x481 += einsum(x67, (0, 1), x362, (2, 3, 0, 4), (2, 3, 4, 1)) del x67, x362 - x482 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x482 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x482 += einsum(f.ov, (0, 1), x212, (2, 3, 0, 4), (2, 3, 4, 1)) * -0.5 - x483 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x483 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x483 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) x483 += einsum(x365, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x365 @@ -3425,31 +3426,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new += einsum(x483, (0, 1, 2, 3), (2, 3, 0, 1)) l2new += einsum(x483, (0, 1, 2, 3), (3, 2, 1, 0)) del x483 - x484 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x484 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x484 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x484 += einsum(x65, (0, 1, 2, 3), (1, 3, 0, 2)) x484 += einsum(x20, (0, 1, 2, 3), (0, 2, 1, 3)) - x485 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x485 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x485 += einsum(x484, (0, 1, 2, 3), l3, (4, 5, 6, 0, 7, 2), (7, 1, 3, 4, 6, 5)) * 0.5 del x484 l3new += einsum(x485, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 0, 2)) * -1.0 l3new += einsum(x485, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) del x485 - x486 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x486 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x486 += einsum(x20, (0, 1, 2, 3), l3, (4, 5, 6, 7, 1, 0), (7, 2, 3, 4, 6, 5)) del x20 - x487 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x487 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x487 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x487 += einsum(x5, (0, 1, 2, 3), (2, 1, 0, 3)) x487 += einsum(x65, (0, 1, 2, 3), (1, 3, 0, 2)) del x65 - x488 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x488 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x488 += einsum(x487, (0, 1, 2, 3), l3, (4, 5, 6, 0, 2, 7), (7, 1, 3, 4, 6, 5)) del x487 - x489 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x489 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x489 += einsum(x360, (0, 1), l3, (2, 3, 4, 0, 5, 6), (6, 5, 1, 2, 4, 3)) del x360 - x490 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x490 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x490 += einsum(x486, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x486 x490 += einsum(x488, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -3459,7 +3460,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x490, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) l3new += einsum(x490, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 2, 0)) * -1.0 del x490 - x491 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x491 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x491 += einsum(l2, (0, 1, 2, 3), v.ooov, (4, 3, 5, 6), (2, 4, 5, 0, 1, 6)) l3new += einsum(x491, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * -1.0 l3new += einsum(x491, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 1, 2)) @@ -3474,25 +3475,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x491, (0, 1, 2, 3, 4, 5), (3, 4, 5, 2, 1, 0)) l3new += einsum(x491, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * -1.0 del x491 - x492 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x492 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x492 += einsum(f.vv, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 6, 5, 0, 2, 3)) - x493 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x493 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x493 += einsum(f.ov, (0, 1), x112, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) - x494 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x494 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x494 += einsum(v.vvvv, (0, 1, 2, 3), l3, (4, 3, 1, 5, 6, 7), (5, 7, 6, 4, 0, 2)) - x495 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x495 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x495 += einsum(v.ovvv, (0, 1, 2, 3), x112, (4, 5, 6, 0, 7, 3), (4, 5, 6, 7, 1, 2)) - x496 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x496 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x496 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 5, 6, 7), (5, 7, 6, 0, 1, 4)) - x497 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x497 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x497 += einsum(x496, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x496 x497 += einsum(x151, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x151 - x498 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x498 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x498 += einsum(v.ovov, (0, 1, 2, 3), x497, (4, 5, 6, 2, 0, 7), (4, 5, 6, 1, 3, 7)) del x497 - x499 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x499 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x499 += einsum(x492, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x492 x499 += einsum(x493, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3506,14 +3507,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x499, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) l3new += einsum(x499, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -1.0 del x499 - x500 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x500 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x500 += einsum(l2, (0, 1, 2, 3), v.ovvv, (4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x501 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x501 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x501 += einsum(l2, (0, 1, 2, 3), x8, (3, 4, 5, 6), (2, 4, 5, 0, 1, 6)) - x502 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x502 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x502 += einsum(v.ovov, (0, 1, 2, 3), x122, (4, 5, 2, 6), (4, 5, 0, 6, 1, 3)) del x122 - x503 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x503 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x503 += einsum(x500, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x500 x503 += einsum(x501, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3533,21 +3534,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x503, (0, 1, 2, 3, 4, 5), (3, 5, 4, 2, 1, 0)) l3new += einsum(x503, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 del x503 - x504 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x504 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x504 += einsum(v.vvvv, (0, 1, 2, 3), l3, (1, 4, 3, 5, 6, 7), (5, 7, 6, 4, 0, 2)) - x505 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x505 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x505 += einsum(t2, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 7), (5, 7, 6, 0, 1, 4)) - x506 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x506 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x506 += einsum(t1, (0, 1), x112, (2, 3, 4, 5, 1, 6), (2, 3, 4, 0, 5, 6)) - x507 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x507 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x507 += einsum(x505, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x505 x507 += einsum(x506, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x506 - x508 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x508 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x508 += einsum(v.ovov, (0, 1, 2, 3), x507, (4, 5, 6, 2, 0, 7), (4, 5, 6, 1, 3, 7)) * 0.5 del x507 - x509 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x509 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x509 += einsum(x504, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.5 del x504 x509 += einsum(x508, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -3555,7 +3556,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x509, (0, 1, 2, 3, 4, 5), (4, 3, 5, 1, 2, 0)) * -1.0 l3new += einsum(x509, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) del x509 - x510 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x510 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x510 += einsum(v.ovov, (0, 1, 2, 3), x212, (4, 5, 2, 6), (0, 4, 5, 3, 1, 6)) * -0.5 del x212 l3new += einsum(x510, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) @@ -3567,7 +3568,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x510, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -1.0 l3new += einsum(x510, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) del x510 - x511 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x511 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x511 += einsum(v.ovov, (0, 1, 2, 3), x165, (4, 5, 2, 6), (4, 5, 0, 6, 1, 3)) del x165 l3new += einsum(x511, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) * -1.0 @@ -3583,42 +3584,42 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x511, (0, 1, 2, 3, 4, 5), (3, 5, 4, 2, 1, 0)) l3new += einsum(x511, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 del x511 - x512 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x512 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x512 += einsum(v.ooov, (0, 1, 2, 3), x112, (4, 5, 1, 2, 6, 7), (4, 5, 0, 6, 7, 3)) - x513 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x513 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x513 += einsum(v.ovvv, (0, 1, 2, 3), x118, (4, 5, 6, 0, 3, 7), (5, 4, 6, 7, 1, 2)) - x514 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x514 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x514 += einsum(x8, (0, 1, 2, 3), x112, (4, 5, 0, 1, 6, 7), (4, 5, 2, 6, 7, 3)) - x515 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x515 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x515 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x515 += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) del x90 x515 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.00000000000001 del x70 l3new += einsum(x515, (0, 1, 2, 3), l3, (4, 2, 5, 6, 0, 7), (4, 3, 5, 6, 1, 7)) * -1.0 - x516 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x516 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x516 += einsum(x515, (0, 1, 2, 3), l3, (4, 5, 2, 6, 0, 7), (7, 6, 1, 4, 5, 3)) - x517 = np.zeros((nvir, nvir), dtype=np.float64) + x517 = np.zeros((nvir, nvir), dtype=types[float]) x517 += einsum(v.ovov, (0, 1, 2, 3), x190, (0, 2, 4, 1), (3, 4)) * 2.0 del x190 - x518 = np.zeros((nvir, nvir), dtype=np.float64) + x518 = np.zeros((nvir, nvir), dtype=types[float]) x518 += einsum(t1, (0, 1), x393, (0, 1, 2, 3), (2, 3)) del x393 - x519 = np.zeros((nvir, nvir), dtype=np.float64) + x519 = np.zeros((nvir, nvir), dtype=types[float]) x519 += einsum(x517, (0, 1), (0, 1)) del x517 x519 += einsum(x518, (0, 1), (1, 0)) * -1.0 del x518 - x520 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x520 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x520 += einsum(x519, (0, 1), l3, (2, 3, 1, 4, 5, 6), (6, 4, 5, 2, 3, 0)) del x519 - x521 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x521 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x521 += einsum(x36, (0, 1), x112, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x36 - x522 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x522 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x522 += einsum(v.ovov, (0, 1, 2, 3), x428, (4, 5, 2, 6), (0, 5, 4, 3, 1, 6)) * 1.5 del x428 - x523 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x523 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x523 += einsum(x512, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x512 x523 += einsum(x513, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3636,7 +3637,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x523, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * -1.0 l3new += einsum(x523, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) del x523 - x524 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x524 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x524 += einsum(v.ovov, (0, 1, 2, 3), x155, (4, 5, 6, 1), (0, 2, 4, 3, 5, 6)) * -0.5 del x155 l3new += einsum(x524, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 0, 1)) * -1.0 @@ -3648,7 +3649,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x524, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 0, 2)) l3new += einsum(x524, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) * -1.0 del x524 - x525 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x525 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x525 += einsum(v.ovov, (0, 1, 2, 3), x410, (4, 5, 6, 3), (4, 0, 2, 6, 5, 1)) del x410 l3new += einsum(x525, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) * 0.5 @@ -3656,7 +3657,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x525, (0, 1, 2, 3, 4, 5), (3, 5, 4, 2, 1, 0)) * -0.5 l3new += einsum(x525, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * 0.5 del x525 - x526 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x526 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x526 += einsum(v.ovov, (0, 1, 2, 3), x167, (4, 5, 2, 6), (4, 5, 0, 6, 1, 3)) del x167 l3new += einsum(x526, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * 0.5 @@ -3664,27 +3665,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x526, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) * -0.5 l3new += einsum(x526, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * 0.5 del x526 - x527 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x527 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x527 += einsum(x5, (0, 1, 2, 3), l3, (4, 5, 6, 7, 2, 0), (7, 1, 3, 4, 6, 5)) - x528 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x528 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x528 += einsum(v.ooov, (0, 1, 2, 3), x118, (4, 1, 5, 2, 6, 7), (4, 5, 0, 6, 7, 3)) - x529 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x529 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x529 += einsum(x8, (0, 1, 2, 3), x118, (0, 4, 5, 1, 6, 7), (4, 5, 2, 7, 6, 3)) - x530 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x530 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x530 += einsum(x515, (0, 1, 2, 3), l3, (4, 2, 5, 0, 6, 7), (7, 6, 1, 4, 5, 3)) - x531 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x531 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x531 += einsum(x479, (0, 1), l3, (2, 3, 4, 0, 5, 6), (6, 5, 1, 2, 4, 3)) del x479 - x532 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x532 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x532 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -0.5 x532 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) - x533 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x533 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x533 += einsum(t2, (0, 1, 2, 3), x532, (0, 4, 1, 5, 6, 2), (4, 3, 5, 6)) * 2.0 del x532 - x534 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x534 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x534 += einsum(v.ovov, (0, 1, 2, 3), x533, (4, 1, 5, 6), (0, 2, 4, 3, 6, 5)) del x533 - x535 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x535 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x535 += einsum(x527, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x527 x535 += einsum(x528, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3700,7 +3701,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x535, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) l3new += einsum(x535, (0, 1, 2, 3, 4, 5), (3, 5, 4, 2, 1, 0)) * -1.0 del x535 - x536 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x536 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x536 += einsum(v.ovov, (0, 1, 2, 3), x372, (4, 5, 6, 3), (4, 0, 2, 5, 6, 1)) del x372 l3new += einsum(x536, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * -1.0 @@ -3712,22 +3713,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x536, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) l3new += einsum(x536, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 del x536 - x537 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x537 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x537 += einsum(v.ooov, (0, 1, 2, 3), x112, (4, 0, 5, 1, 6, 7), (4, 5, 2, 6, 7, 3)) - x538 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x538 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x538 += einsum(x8, (0, 1, 2, 3), x112, (4, 0, 5, 2, 6, 7), (4, 5, 1, 6, 7, 3)) - x539 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x539 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x539 += einsum(v.ovov, (0, 1, 2, 3), x77, (2, 4, 3, 5), (0, 4, 1, 5)) * 1.00000000000001 - x540 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x540 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x540 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x540 += einsum(x99, (0, 1, 2, 3), (0, 1, 3, 2)) x540 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.00000000000001 x540 += einsum(x539, (0, 1, 2, 3), (1, 0, 3, 2)) del x539 - x541 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x541 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x541 += einsum(x540, (0, 1, 2, 3), l3, (4, 5, 2, 6, 7, 0), (6, 7, 1, 4, 5, 3)) del x540 - x542 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x542 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x542 += einsum(x537, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x537 x542 += einsum(x538, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3745,15 +3746,15 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x542, (0, 1, 2, 3, 4, 5), (3, 4, 5, 2, 1, 0)) l3new += einsum(x542, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * -1.0 del x542 - x543 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x543 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x543 += einsum(v.ooov, (0, 1, 2, 3), x112, (4, 1, 5, 2, 6, 7), (4, 5, 0, 6, 7, 3)) - x544 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x544 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x544 += einsum(x8, (0, 1, 2, 3), x112, (4, 0, 5, 1, 6, 7), (4, 5, 2, 6, 7, 3)) del x8 - x545 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x545 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x545 += einsum(x515, (0, 1, 2, 3), l3, (4, 5, 2, 6, 7, 0), (6, 7, 1, 4, 5, 3)) del x515 - x546 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x546 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x546 += einsum(x543, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x543 x546 += einsum(x544, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -3765,19 +3766,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new += einsum(x546, (0, 1, 2, 3, 4, 5), (3, 4, 5, 2, 1, 0)) * -1.0 l3new += einsum(x546, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) del x546 - x547 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x547 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x547 += einsum(v.ovvv, (0, 1, 2, 3), x112, (4, 5, 6, 0, 3, 7), (5, 4, 6, 7, 1, 2)) del x112 l3new += einsum(x547, (0, 1, 2, 3, 4, 5), (4, 3, 5, 0, 2, 1)) * -1.0 l3new += einsum(x547, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) del x547 - x548 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x548 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x548 += einsum(x5, (0, 1, 2, 3), l3, (4, 5, 6, 0, 7, 2), (7, 1, 3, 4, 6, 5)) del x5 l3new += einsum(x548, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) * -1.0 l3new += einsum(x548, (0, 1, 2, 3, 4, 5), (3, 5, 4, 2, 0, 1)) del x548 - x549 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x549 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x549 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.99999999999999 x549 += einsum(x99, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.99999999999999 del x99 @@ -3787,7 +3788,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x96 l3new += einsum(x549, (0, 1, 2, 3), x141, (4, 5, 0, 2, 6, 7), (6, 3, 7, 5, 1, 4)) * 1.00000000000001 del x141, x549 - x550 = np.zeros((nvir, nvir), dtype=np.float64) + x550 = np.zeros((nvir, nvir), dtype=types[float]) x550 += einsum(f.vv, (0, 1), (0, 1)) x550 += einsum(v.ovov, (0, 1, 2, 3), x77, (0, 2, 1, 4), (4, 3)) * -1.0 del x77 @@ -3795,12 +3796,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x54 l3new += einsum(x550, (0, 1), l3, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) del x550 - x551 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x551 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x551 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x551 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l3new += einsum(x551, (0, 1, 2, 3), x118, (4, 5, 0, 1, 6, 7), (7, 3, 6, 5, 2, 4)) * -1.0 del x118, x551 - x552 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x552 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x552 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x552 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l3new += einsum(x68, (0, 1), x552, (2, 3, 4, 5), (5, 1, 4, 3, 0, 2)) * -1.0 @@ -3812,49 +3813,49 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 rdm1_f_oo += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 5, 3, 1, 0, 2), (6, 4)) * 0.16666666666666 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 0, 6, 2), (1, 6)) * 0.49999999999998 rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.14285714285714288 x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 0.14285714285714288 x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) x1 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -0.14285714285714288 rdm1_f_oo += einsum(l3, (0, 1, 2, 3, 4, 5), x1, (4, 6, 3, 0, 2, 1), (6, 5)) * -1.16666666666662 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x2 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 3.0 x2 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) x2 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 rdm1_f_oo += einsum(l3, (0, 1, 2, 3, 4, 5), x2, (3, 5, 6, 0, 2, 1), (6, 4)) * -0.16666666666666 del x2 - x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x3 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x3 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 rdm1_f_oo += einsum(l3, (0, 1, 2, 3, 4, 5), x3, (3, 6, 4, 0, 1, 2), (6, 5)) * 0.16666666666666 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x4, (2, 4, 0, 1), (4, 3)) * -2.0 del x4 - x5 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), l3, (2, 1, 3, 4, 5, 6), (4, 6, 5, 0, 2, 3)) rdm1_f_ov += einsum(t3, (0, 1, 2, 3, 4, 5), x5, (0, 2, 1, 6, 3, 5), (6, 4)) * -0.49999999999998 del x5 - x6 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 6, 5, 0, 2, 3)) - x7 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x7 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x7 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.999999999999999 x7 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) @@ -3863,36 +3864,36 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x7 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 rdm1_f_ov += einsum(x6, (0, 1, 2, 3, 4, 5), x7, (0, 1, 2, 5, 6, 4), (3, 6)) * -0.16666666666666 del x7 - x8 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x8 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x8 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x8 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) rdm1_f_ov += einsum(x6, (0, 1, 2, 3, 4, 5), x8, (0, 2, 1, 5, 4, 6), (3, 6)) * 0.16666666666666 del x6, x8 - x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x9 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x9 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 6.0 x9 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) x9 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 rdm1_f_ov += einsum(l2, (0, 1, 2, 3), x9, (2, 4, 3, 1, 0, 5), (4, 5)) * 0.5 del x9 - x10 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x10 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x10 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 rdm1_f_ov += einsum(l2, (0, 1, 2, 3), x10, (3, 4, 2, 1, 0, 5), (4, 5)) * -0.5 del x10 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.3333333333333333 x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum(x12, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (1, 6, 5, 4)) * 0.75 del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x14 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x15 += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x11 @@ -3903,37 +3904,37 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x14 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x15, (0, 1, 4, 2), (4, 3)) * -2.0 del x15 - x16 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x16 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) * -1.0 x16 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x16 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) * -1.0 x17 += einsum(t2, (0, 1, 2, 3), x16, (1, 4, 5, 3, 2, 6), (4, 5, 0, 6)) del x16 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x17, (0, 1, 4, 3), (4, 2)) * -1.0 del x17 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm1_f_ov += einsum(l1, (0, 1), x18, (1, 2, 0, 3), (2, 3)) * 4.0 del x18 - x19 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x19 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x19 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x19 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 6.999999999999999 x19 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 - x20 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x20 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x20 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x20 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 3.0 - x21 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x21 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x21 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 0, 2, 1)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x22 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x23 = np.zeros((nocc, nocc), dtype=np.float64) + x23 = np.zeros((nocc, nocc), dtype=types[float]) x23 += einsum(x0, (0, 1), (0, 1)) del x0 x23 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 5, 4, 1, 0, 2), (3, 6)) * 0.08333333333333 @@ -3947,7 +3948,7 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x22 rdm1_f_ov += einsum(t1, (0, 1), x23, (0, 2), (2, 1)) * -2.0 del x23 - x24 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x24 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.14285714285714288 x24 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -0.14285714285714288 x24 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) @@ -3956,13 +3957,13 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x24 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -0.14285714285714288 rdm1_f_vv += einsum(l3, (0, 1, 2, 3, 4, 5), x24, (5, 3, 4, 1, 2, 6), (0, 6)) * 1.16666666666662 del x24 - x25 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x25 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x25 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x25 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) rdm1_f_vv += einsum(l3, (0, 1, 2, 3, 4, 5), x25, (5, 4, 3, 1, 6, 2), (0, 6)) * -0.16666666666666 del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x26 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) rdm1_f_vv += einsum(t2, (0, 1, 2, 3), x26, (0, 1, 2, 4), (4, 3)) * 4.0 @@ -3976,59 +3977,59 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 4, 1, 2, 0), (3, 5, 6, 7)) rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * -0.16666666666667 rdm2_f_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * -0.16666666666667 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) @@ -4042,14 +4043,14 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 2, 1)) * -1.0 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 5, 1, 0, 2), (3, 4, 6, 7)) - x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x3 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x3 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum(l3, (0, 1, 2, 3, 4, 5), x3, (5, 6, 7, 1, 0, 2), (3, 4, 6, 7)) * 0.16666666666667 - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.16666666666667 x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x4 @@ -4058,12 +4059,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 0, 1)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(x6, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) - x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x8 += einsum(t1, (0, 1), x7, (2, 3, 4, 1), (0, 2, 3, 4)) * -0.5 rdm2_f_oooo += einsum(x8, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(x8, (0, 1, 2, 3), (3, 0, 1, 2)) @@ -4074,44 +4075,44 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oooo += einsum(x8, (0, 1, 2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(x8, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.3333333333333333 x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(x9, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) - x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x11 += einsum(t1, (0, 1), x10, (2, 3, 4, 1), (0, 3, 2, 4)) * 1.5 rdm2_f_oooo += einsum(x11, (0, 1, 2, 3), (0, 3, 1, 2)) rdm2_f_oooo += einsum(x11, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_oooo += einsum(x11, (0, 1, 2, 3), (0, 3, 1, 2)) rdm2_f_oooo += einsum(x11, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 5, 4, 1, 0, 2), (3, 6)) - x13 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x13 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x13 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.999999999999999 x13 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) x13 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(l3, (0, 1, 2, 3, 4, 5), x13, (3, 6, 4, 1, 2, 0), (5, 6)) * 0.041666666666665 - x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x15 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x15 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x15 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 3.0 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum(l3, (0, 1, 2, 3, 4, 5), x15, (5, 6, 3, 0, 2, 1), (4, 6)) * 0.041666666666665 - x17 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x17 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x17 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 0, 2, 1)) - x18 = np.zeros((nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc), dtype=types[float]) x18 += einsum(t3, (0, 1, 2, 3, 4, 5), x17, (1, 2, 6, 5, 4, 3), (0, 6)) * 0.041666666666665 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x19 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum(l2, (0, 1, 2, 3), x19, (3, 4, 0, 1), (2, 4)) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum(x12, (0, 1), (0, 1)) * 0.041666666666665 x21 += einsum(x14, (0, 1), (0, 1)) del x14 @@ -4133,197 +4134,197 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oooo += einsum(delta.oo, (0, 1), x21, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x21, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x21, (2, 3), (3, 0, 2, 1)) * -2.0 - x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x22 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x22, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x22, (0, 1, 2, 3), (3, 2, 1, 0)) - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x23, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_ovoo += einsum(x23, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x23, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x23, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x24 += einsum(t1, (0, 1), x23, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x24, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x24, (0, 1, 2, 3), (3, 2, 1, 0)) - x25 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x25 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) x25 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oooo += einsum(x25, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x25, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x25, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x25, (0, 1, 2, 3), (2, 3, 0, 1)) - x26 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x26 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.3333333333333333 x26 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 0.3333333333333333 x26 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 += einsum(l3, (0, 1, 2, 3, 4, 5), x26, (4, 6, 7, 1, 0, 2), (5, 3, 6, 7)) * 0.50000000000001 del x26 rdm2_f_oooo += einsum(x27, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x27, (0, 1, 2, 3), (3, 2, 1, 0)) del x27 - x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x28 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) rdm2_f_ovoo += einsum(x29, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_ovoo += einsum(x29, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x29, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x29, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x30 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x30 += einsum(t1, (0, 1), x29, (2, 3, 4, 1), (2, 3, 0, 4)) - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.50000000000001 x31 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oooo += einsum(x31, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x31, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x31, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x31, (0, 1, 2, 3), (3, 2, 1, 0)) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x32 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(x32, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 0), (5, 6, 1, 4)) - x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x34 += einsum(t1, (0, 1), x33, (2, 3, 4, 1), (0, 2, 3, 4)) * -0.5 rdm2_f_oooo += einsum(x34, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(x34, (0, 1, 2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(x34, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(x34, (0, 1, 2, 3), (0, 3, 2, 1)) - x35 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), l3, (2, 1, 3, 4, 5, 6), (4, 6, 5, 0, 2, 3)) - x36 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(t1, (0, 1), x35, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x36, (0, 4, 1, 5, 6, 2), (4, 5, 6, 3)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x37, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x37, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x37, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x37, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x37, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x37, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x37, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x37, (0, 1, 2, 3), (2, 1, 3, 0)) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) rdm2_f_ooov += einsum(x38, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x38, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x38, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x38, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(l2, (0, 1, 2, 3), t3, (4, 3, 5, 0, 6, 1), (2, 4, 5, 6)) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (0, 2, 6, 7, 3, 5), (6, 7, 1, 4)) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), x29, (1, 4, 5, 2), (4, 0, 5, 3)) - x42 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(t1, (0, 1), l3, (2, 3, 1, 4, 5, 6), (4, 6, 5, 0, 2, 3)) - x43 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -1.0 x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 5.0 x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) x43 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(x42, (0, 1, 2, 3, 4, 5), x43, (2, 6, 0, 4, 7, 5), (1, 3, 6, 7)) * 0.25 del x43 - x45 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x45 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x45 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x45 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(x42, (0, 1, 2, 3, 4, 5), x45, (0, 6, 1, 5, 7, 4), (2, 3, 6, 7)) * 0.25 - x47 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x47 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 3, 1, 0, 6), (6, 4, 5, 2)) - x48 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x48 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x48 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) x48 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 0, 2)) * 0.5 x48 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) * -0.5 - x49 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x48, (1, 4, 0, 5, 6, 2), (4, 3, 5, 6)) del x48 - x50 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x50 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x50 += einsum(x49, (0, 1, 2, 3), (0, 3, 2, 1)) del x49 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(t2, (0, 1, 2, 3), x50, (4, 3, 2, 5), (0, 1, 4, 5)) * 0.5 del x50 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 5, 1, 6), (5, 6, 0, 4)) - x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x53 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 5, 6, 1), (5, 6, 0, 4)) - x54 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x54 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x54 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) - x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x55 += einsum(t2, (0, 1, 2, 3), x54, (1, 4, 5, 3, 6, 2), (0, 4, 5, 6)) del x54 - x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x56 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 del x52 x56 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x56 += einsum(x53, (0, 1, 2, 3), (1, 0, 2, 3)) x56 += einsum(x55, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x55 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) x57 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x57 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum(x56, (0, 1, 2, 3), x57, (1, 4, 5, 3), (0, 2, 4, 5)) * 0.5 del x57 - x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x59 += einsum(x6, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 0), (5, 6, 1, 4)) - x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 x60 += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), x60, (1, 4, 5, 3), (0, 4, 5, 2)) * 0.5 del x60 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x62 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(t2, (0, 1, 2, 3), x62, (1, 4, 5, 2), (0, 4, 5, 3)) del x62 - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x64 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(t2, (0, 1, 2, 3), x64, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x64 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x66 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x67 += einsum(t1, (0, 1), x66, (2, 3, 4, 1), (0, 2, 3, 4)) del x66 - x68 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x68 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) x68 += einsum(x67, (0, 1, 2, 3), (2, 1, 3, 0)) del x67 - x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x69 += einsum(t1, (0, 1), x68, (0, 2, 3, 4), (2, 3, 4, 1)) del x68 - x70 = np.zeros((nocc, nocc), dtype=np.float64) + x70 = np.zeros((nocc, nocc), dtype=types[float]) x70 += einsum(l3, (0, 1, 2, 3, 4, 5), x13, (3, 6, 4, 1, 2, 0), (5, 6)) * 0.08333333333333 del x13 - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum(l3, (0, 1, 2, 3, 4, 5), x15, (5, 6, 3, 0, 2, 1), (4, 6)) * 0.08333333333333 del x15 - x72 = np.zeros((nocc, nocc), dtype=np.float64) + x72 = np.zeros((nocc, nocc), dtype=types[float]) x72 += einsum(t3, (0, 1, 2, 3, 4, 5), x17, (1, 2, 6, 5, 4, 3), (0, 6)) * 0.08333333333333 del x17 - x73 = np.zeros((nocc, nocc), dtype=np.float64) + x73 = np.zeros((nocc, nocc), dtype=types[float]) x73 += einsum(l2, (0, 1, 2, 3), x19, (3, 4, 0, 1), (2, 4)) * 2.0 - x74 = np.zeros((nocc, nocc), dtype=np.float64) + x74 = np.zeros((nocc, nocc), dtype=types[float]) x74 += einsum(x1, (0, 1), (0, 1)) x74 += einsum(x12, (0, 1), (0, 1)) * 0.08333333333333 x74 += einsum(x70, (0, 1), (0, 1)) @@ -4334,7 +4335,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_ooov += einsum(t1, (0, 1), x74, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x74, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x74, (2, 3), (0, 3, 1, 2)) * -1.0 - x75 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x75 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x75 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) x75 += einsum(x39, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 @@ -4362,63 +4363,63 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x75, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x75, (0, 1, 2, 3), (2, 0, 3, 1)) del x75 - x76 = np.zeros((nocc, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nvir), dtype=types[float]) x76 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (2, 0, 1, 6, 5, 3), (6, 4)) - x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 6.999999999999999 x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) x77 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -1.0 - x78 = np.zeros((nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir), dtype=types[float]) x78 += einsum(x42, (0, 1, 2, 3, 4, 5), x77, (0, 1, 2, 5, 4, 6), (3, 6)) * 0.08333333333333 - x79 = np.zeros((nocc, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nvir), dtype=types[float]) x79 += einsum(x42, (0, 1, 2, 3, 4, 5), x45, (2, 0, 1, 6, 5, 4), (3, 6)) * 0.08333333333333 - x80 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x80 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) x80 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x80 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) x80 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * 6.0 - x81 = np.zeros((nocc, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nvir), dtype=types[float]) x81 += einsum(l2, (0, 1, 2, 3), x80, (2, 3, 4, 1, 0, 5), (4, 5)) * 0.25 - x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x82 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 0.5 x82 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) - x83 = np.zeros((nocc, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir), dtype=types[float]) x83 += einsum(l2, (0, 1, 2, 3), x82, (3, 4, 2, 0, 5, 1), (4, 5)) * 0.5 - x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x84 += einsum(x9, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 0.375 - x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x85 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x85 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) * -1.0 - x86 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x86 += einsum(x6, (0, 1, 2, 3), x85, (0, 4, 5, 3, 2, 6), (1, 4, 5, 6)) * 0.25 del x85 - x87 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x87 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x87 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) x87 += einsum(x84, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x87 += einsum(x84, (0, 1, 2, 3), (0, 1, 2, 3)) del x84 x87 += einsum(x86, (0, 1, 2, 3), (1, 2, 0, 3)) - x88 = np.zeros((nocc, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir), dtype=types[float]) x88 += einsum(t2, (0, 1, 2, 3), x87, (0, 1, 4, 3), (4, 2)) * 2.0 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x89 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 - x90 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x90 += einsum(x89, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) * 3.0 - x91 = np.zeros((nocc, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), x90, (0, 1, 4, 2), (4, 3)) * 0.5 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x92 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x93 = np.zeros((nocc, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nvir), dtype=types[float]) x93 += einsum(l1, (0, 1), x92, (1, 2, 3, 0), (2, 3)) - x94 = np.zeros((nocc, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir), dtype=types[float]) x94 += einsum(t1, (0, 1), x74, (0, 2), (2, 1)) - x95 = np.zeros((nocc, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir), dtype=types[float]) x95 += einsum(x76, (0, 1), (0, 1)) * 0.24999999999999 x95 += einsum(x78, (0, 1), (0, 1)) x95 += einsum(x79, (0, 1), (0, 1)) * -1.0 @@ -4437,24 +4438,24 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x95, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x95, (2, 3), (2, 0, 3, 1)) * -1.0 del x95 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x96 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x97 += einsum(x96, (0, 1, 2, 3), t3, (4, 0, 5, 3, 2, 6), (4, 5, 1, 6)) * 2.0 rdm2_f_ooov += einsum(x97, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_ooov += einsum(x97, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovo += einsum(x97, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_oovo += einsum(x97, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x97 - x98 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x98 += einsum(t1, (0, 1), x42, (2, 3, 4, 5, 1, 6), (3, 2, 4, 5, 0, 6)) - x99 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x99 += einsum(x98, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 x99 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 x99 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x99 += einsum(x36, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) - x100 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x100 += einsum(t2, (0, 1, 2, 3), x99, (1, 4, 0, 5, 6, 2), (4, 5, 6, 3)) * 0.5 del x99 rdm2_f_ooov += einsum(x100, (0, 1, 2, 3), (2, 1, 0, 3)) @@ -4462,28 +4463,28 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x100, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x100, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x100 - x101 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x101 += einsum(l3, (0, 1, 2, 3, 4, 5), x3, (5, 6, 7, 1, 0, 2), (3, 4, 6, 7)) - x102 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x102 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) del x2 x102 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x101 - x103 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x103 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -0.3333333333333333 x103 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) - x104 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x104 += einsum(l3, (0, 1, 2, 3, 4, 5), x103, (4, 6, 7, 0, 1, 2), (3, 5, 6, 7)) * 3.0 del x103 - x105 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x105 += einsum(l3, (0, 1, 2, 3, 4, 5), x3, (4, 6, 7, 1, 0, 2), (5, 3, 6, 7)) - x106 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x106 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) x106 += einsum(x102, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x106 += einsum(x104, (0, 1, 2, 3), (1, 0, 2, 3)) x106 += einsum(x105, (0, 1, 2, 3), (1, 0, 2, 3)) del x105 - x107 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x107 += einsum(t1, (0, 1), x106, (2, 0, 3, 4), (2, 3, 4, 1)) * 0.16666666666667 del x106 rdm2_f_ooov += einsum(x107, (0, 1, 2, 3), (2, 1, 0, 3)) @@ -4491,87 +4492,87 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x107, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x107, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x107 - x108 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x108 += einsum(l2, (0, 1, 2, 3), t3, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) rdm2_f_ooov += einsum(x108, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x108, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x108, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x108, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x109 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x109 += einsum(t3, (0, 1, 2, 3, 4, 5), x42, (0, 2, 6, 7, 3, 4), (6, 7, 1, 5)) rdm2_f_ooov += einsum(x109, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 rdm2_f_ooov += einsum(x109, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 rdm2_f_oovo += einsum(x109, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.5 rdm2_f_oovo += einsum(x109, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.5 - x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x110 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (2, 6, 1, 7, 5, 3), (6, 7, 0, 4)) rdm2_f_ooov += einsum(x110, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 rdm2_f_ooov += einsum(x110, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.5 rdm2_f_oovo += einsum(x110, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.5 rdm2_f_oovo += einsum(x110, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.5 - x111 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x111 += einsum(t3, (0, 1, 2, 3, 4, 5), x42, (0, 2, 6, 7, 5, 3), (6, 7, 1, 4)) rdm2_f_ooov += einsum(x111, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_ooov += einsum(x111, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_oovo += einsum(x111, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 rdm2_f_oovo += einsum(x111, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 - x112 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x112 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (2, 1, 6, 7, 5, 4), (6, 7, 0, 3)) rdm2_f_ooov += einsum(x112, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_ooov += einsum(x112, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 del x112 - x113 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x113 += einsum(t2, (0, 1, 2, 3), x47, (4, 2, 3, 5), (4, 0, 1, 5)) rdm2_f_ooov += einsum(x113, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x113, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_oovo += einsum(x113, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x113, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x114 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) x114 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x114 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 4.0 - x115 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x115 += einsum(x114, (0, 1, 2, 3, 4, 5), x42, (1, 6, 0, 7, 3, 4), (6, 7, 2, 5)) * 0.25 del x114 rdm2_f_ooov += einsum(x115, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x115, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x115 - x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x116 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x116 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) - x117 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x117 += einsum(x116, (0, 1, 2, 3, 4, 5), x35, (2, 0, 6, 7, 3, 5), (6, 7, 1, 4)) * 0.25 del x116 rdm2_f_ooov += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) del x117 - x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x118 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) x118 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 - x119 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x119 += einsum(l2, (0, 1, 2, 3), x118, (3, 4, 5, 0, 1, 6), (2, 4, 5, 6)) * 0.5 del x118 rdm2_f_ooov += einsum(x119, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x119, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x119 - x120 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x120 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x120 += einsum(x36, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) - x121 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x121 += einsum(t2, (0, 1, 2, 3), x120, (1, 0, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.5 rdm2_f_ooov += einsum(x121, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x121, (0, 1, 2, 3), (2, 1, 0, 3)) del x121 - x122 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x122 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x122 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x123 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x123 += einsum(x122, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 0.5 rdm2_f_vooo += einsum(x123, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x123, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x124 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x124 += einsum(x32, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 0), (5, 6, 1, 4)) * 0.5 - x125 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x125 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x125 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 x125 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -4580,7 +4581,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x125 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) * 1.5 x125 += einsum(x123, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x125 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x126 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x126 += einsum(t2, (0, 1, 2, 3), x125, (4, 1, 5, 3), (0, 4, 5, 2)) del x125 rdm2_f_ooov += einsum(x126, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 @@ -4588,38 +4589,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x126, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x126, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 del x126 - x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x127 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) * -1.0 x127 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) - x128 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x128 += einsum(t2, (0, 1, 2, 3), x127, (0, 1, 4, 5, 2, 6), (4, 3, 5, 6)) - x129 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x129 += einsum(t2, (0, 1, 2, 3), x128, (4, 5, 2, 3), (0, 1, 4, 5)) * -0.5 rdm2_f_ooov += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_ooov += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) del x129 - x130 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x130 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x130 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x130 += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) - x131 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x131 += einsum(t2, (0, 1, 2, 3), x130, (1, 4, 5, 2), (0, 4, 5, 3)) * 0.5 rdm2_f_ooov += einsum(x131, (0, 1, 2, 3), (2, 0, 1, 3)) rdm2_f_ooov += einsum(x131, (0, 1, 2, 3), (2, 0, 1, 3)) del x131 - x132 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x132 += einsum(t2, (0, 1, 2, 3), l3, (2, 4, 3, 1, 5, 6), (6, 5, 0, 4)) - x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x133 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x133 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 0, 2)) * -0.5 - x134 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x134 += einsum(t2, (0, 1, 2, 3), x133, (1, 4, 5, 6, 3, 2), (0, 4, 5, 6)) - x135 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x135 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x135 += einsum(x132, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 x135 += einsum(x134, (0, 1, 2, 3), (1, 2, 0, 3)) del x134 - x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x136 += einsum(t2, (0, 1, 2, 3), x135, (4, 1, 5, 2), (0, 4, 5, 3)) del x135 rdm2_f_ooov += einsum(x136, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -4627,7 +4628,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x136, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x136, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 del x136 - x137 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x137 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x137 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) x137 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) x137 += einsum(x31, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -4636,7 +4637,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x137 += einsum(x34, (0, 1, 2, 3), (1, 2, 3, 0)) x137 += einsum(x34, (0, 1, 2, 3), (2, 1, 0, 3)) del x34 - x138 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x138 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x138 += einsum(t1, (0, 1), x137, (0, 2, 3, 4), (2, 3, 4, 1)) del x137 rdm2_f_ooov += einsum(x138, (0, 1, 2, 3), (2, 1, 0, 3)) @@ -4644,7 +4645,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(x138, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x138, (0, 1, 2, 3), (1, 2, 3, 0)) del x138 - x139 = np.zeros((nocc, nvir), dtype=np.float64) + x139 = np.zeros((nocc, nvir), dtype=types[float]) x139 += einsum(t1, (0, 1), (0, 1)) * -1.0 x139 += einsum(x76, (0, 1), (0, 1)) * 0.24999999999999 x139 += einsum(x78, (0, 1), (0, 1)) @@ -4666,86 +4667,86 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_ooov += einsum(delta.oo, (0, 1), x139, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_ooov += einsum(delta.oo, (0, 1), x139, (2, 3), (0, 2, 1, 3)) * -1.0 del x139 - x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x140 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (2, 1, 6, 7, 5, 3), (6, 7, 0, 4)) rdm2_f_oovo += einsum(x140, (0, 1, 2, 3), (2, 1, 3, 0)) * 0.25 rdm2_f_oovo += einsum(x140, (0, 1, 2, 3), (2, 1, 3, 0)) * 0.25 - x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x141 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 x141 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x141 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 4.0 - x142 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x142 += einsum(x141, (0, 1, 2, 3, 4, 5), x42, (1, 6, 0, 7, 4, 3), (6, 7, 2, 5)) * 0.25 del x141 rdm2_f_oovo += einsum(x142, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x142, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x142 - x143 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x143 += einsum(x35, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x143 += einsum(x35, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 - x144 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x144 += einsum(t3, (0, 1, 2, 3, 4, 5), x143, (1, 2, 6, 7, 4, 5), (0, 6, 7, 3)) * 0.25 rdm2_f_oovo += einsum(x144, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x144, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 del x144 - x145 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x145 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 x145 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) - x146 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x146 += einsum(l2, (0, 1, 2, 3), x145, (2, 4, 5, 0, 1, 6), (3, 4, 5, 6)) * 0.5 rdm2_f_oovo += einsum(x146, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x146, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x146 - x147 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x147 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x147 += einsum(x36, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 - x148 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x148 += einsum(t2, (0, 1, 2, 3), x147, (1, 0, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.5 del x147 rdm2_f_oovo += einsum(x148, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x148, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 del x148 - x149 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x149 += einsum(t2, (0, 1, 2, 3), x128, (4, 5, 3, 2), (0, 1, 4, 5)) * -0.5 rdm2_f_oovo += einsum(x149, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_oovo += einsum(x149, (0, 1, 2, 3), (1, 0, 3, 2)) - x150 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x150 += einsum(x6, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 0), (5, 6, 1, 4)) * 0.5 rdm2_f_ovoo += einsum(x150, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 rdm2_f_ovoo += einsum(x150, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x150, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 rdm2_f_vooo += einsum(x150, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x151 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x151 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x151 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) x151 += einsum(x150, (0, 1, 2, 3), (1, 0, 2, 3)) del x150 - x152 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x152 += einsum(t2, (0, 1, 2, 3), x151, (1, 4, 5, 2), (0, 4, 5, 3)) rdm2_f_oovo += einsum(x152, (0, 1, 2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(x152, (0, 1, 2, 3), (0, 2, 3, 1)) del x152 - x153 = np.zeros((nocc, nvir), dtype=np.float64) + x153 = np.zeros((nocc, nvir), dtype=types[float]) x153 += einsum(x42, (0, 1, 2, 3, 4, 5), x77, (0, 1, 2, 5, 4, 6), (3, 6)) - x154 = np.zeros((nocc, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nvir), dtype=types[float]) x154 += einsum(x42, (0, 1, 2, 3, 4, 5), x45, (2, 0, 1, 6, 5, 4), (3, 6)) - x155 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x155 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) x155 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x155 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) x155 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * 6.000000000000001 - x156 = np.zeros((nocc, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nvir), dtype=types[float]) x156 += einsum(l2, (0, 1, 2, 3), x155, (2, 3, 4, 1, 0, 5), (4, 5)) * 3.00000000000012 del x155 - x157 = np.zeros((nocc, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nvir), dtype=types[float]) x157 += einsum(l2, (0, 1, 2, 3), x82, (3, 4, 2, 0, 5, 1), (4, 5)) * 6.00000000000024 - x158 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x158 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.33333333333333326 x158 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x159 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x159 += einsum(x158, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 0.37500000000000006 del x158 - x160 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x160 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x160 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x160 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) x160 += einsum(x159, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -4753,23 +4754,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x159 x160 += einsum(x86, (0, 1, 2, 3), (1, 2, 0, 3)) del x86 - x161 = np.zeros((nocc, nvir), dtype=np.float64) + x161 = np.zeros((nocc, nvir), dtype=types[float]) x161 += einsum(t2, (0, 1, 2, 3), x160, (1, 0, 4, 2), (4, 3)) * 24.00000000000096 del x160 - x162 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x162 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x162 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x162 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.33333333333333326 - x163 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x163 += einsum(x162, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) * 3.0000000000000004 del x162 - x164 = np.zeros((nocc, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nvir), dtype=types[float]) x164 += einsum(t2, (0, 1, 2, 3), x163, (0, 1, 4, 2), (4, 3)) * 6.00000000000024 del x163 - x165 = np.zeros((nocc, nvir), dtype=np.float64) + x165 = np.zeros((nocc, nvir), dtype=types[float]) x165 += einsum(l1, (0, 1), x92, (1, 2, 3, 0), (2, 3)) * 12.00000000000048 - x166 = np.zeros((nocc, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nvir), dtype=types[float]) x166 += einsum(t1, (0, 1), x74, (0, 2), (2, 1)) * 12.00000000000048 - x167 = np.zeros((nocc, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nvir), dtype=types[float]) x167 += einsum(t1, (0, 1), (0, 1)) * -12.00000000000048 x167 += einsum(x76, (0, 1), (0, 1)) * 3.0 x167 += einsum(x153, (0, 1), (0, 1)) @@ -4791,9 +4792,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovo += einsum(delta.oo, (0, 1), x167, (2, 3), (2, 0, 3, 1)) * -0.08333333333333 rdm2_f_oovo += einsum(delta.oo, (0, 1), x167, (2, 3), (2, 0, 3, 1)) * -0.08333333333333 del x167 - x168 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x168 += einsum(x32, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) * 0.5 - x169 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x169 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x169 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovoo += einsum(x169, (0, 1, 2, 3), (2, 3, 0, 1)) @@ -4805,59 +4806,59 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vooo += einsum(x169, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x169, (0, 1, 2, 3), (3, 2, 1, 0)) del x169 - x170 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x170 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x170 += einsum(x9, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 1.5 rdm2_f_ovoo += einsum(x170, (0, 1, 2, 3), (2, 3, 1, 0)) rdm2_f_ovoo += einsum(x170, (0, 1, 2, 3), (2, 3, 1, 0)) del x170 - x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x171 += einsum(t3, (0, 1, 2, 3, 4, 5), x36, (1, 0, 2, 6, 7, 4), (6, 7, 3, 5)) rdm2_f_oovv += einsum(x171, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.16666666666667 rdm2_f_oovv += einsum(x171, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.16666666666667 del x171 - x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x172 += einsum(t3, (0, 1, 2, 3, 4, 5), x36, (0, 1, 2, 6, 7, 4), (6, 7, 3, 5)) rdm2_f_oovv += einsum(x172, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 rdm2_f_oovv += einsum(x172, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 del x172 - x173 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x173 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x173 += einsum(x1, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) - x174 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x174 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x174 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 2, 5, 6, 7), (5, 7, 6, 0, 1, 4)) - x175 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x175 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x175 += einsum(t3, (0, 1, 2, 3, 4, 5), x174, (0, 1, 2, 6, 7, 3), (6, 7, 5, 4)) - x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x176 += einsum(t2, (0, 1, 2, 3), x35, (4, 1, 0, 5, 6, 3), (4, 5, 6, 2)) rdm2_f_ovvo += einsum(x176, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x176, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x176, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x176, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x177 += einsum(t2, (0, 1, 2, 3), x176, (1, 4, 3, 5), (4, 0, 2, 5)) - x178 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x178 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x178 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x178 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 - x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x179 += einsum(x174, (0, 1, 2, 3, 4, 5), x178, (1, 2, 0, 6, 5, 7), (3, 4, 6, 7)) * 0.08333333333333 - x180 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x180 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x180 += einsum(x122, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 0.5 del x122 - x181 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x181 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x181 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x181 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) x181 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) x181 += einsum(x180, (0, 1, 2, 3), (1, 0, 2, 3)) del x180 - x182 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x182 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x182 += einsum(x181, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (4, 2, 5, 6)) * 0.5 del x181 - x183 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x183 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x183 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (5, 6, 3, 1, 7, 2), (4, 6, 0, 7)) - x184 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x184 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x184 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 7, 2, 1), (4, 6, 0, 7)) rdm2_f_vovo += einsum(x184, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 rdm2_f_vovo += einsum(x184, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 - x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x185 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 0.2 x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.2 @@ -4866,30 +4867,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -0.2 x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -0.2 x185 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x186 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x186 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x186 += einsum(l3, (0, 1, 2, 3, 4, 5), x185, (5, 6, 4, 2, 7, 1), (3, 6, 0, 7)) * 1.25 del x185 - x187 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x187 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x187 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x187 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) - x188 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x188 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x188 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x188 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) - x189 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x189 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x189 += einsum(x187, (0, 1, 2, 3, 4, 5), x188, (1, 6, 0, 5, 4, 7), (2, 6, 3, 7)) * 0.25 del x187 - x190 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x190 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x190 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x190 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x191 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x191 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x191 += einsum(l3, (0, 1, 2, 3, 4, 5), x190, (3, 5, 6, 0, 2, 7), (4, 6, 1, 7)) * 0.25 del x190 - x192 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x192 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x192 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x192 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 2.0 - x193 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x193 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x193 += einsum(t2, (0, 1, 2, 3), x192, (1, 4, 2, 5), (0, 4, 3, 5)) - x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x194 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x194 += einsum(x183, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 x194 += einsum(x184, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x184 @@ -4901,12 +4902,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x191 x194 += einsum(x193, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x193 - x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x195 += einsum(t2, (0, 1, 2, 3), x194, (1, 4, 3, 5), (0, 4, 2, 5)) del x194 - x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x196 += einsum(x7, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 3), (4, 2, 5, 6)) * -0.25 - x197 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x197 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x197 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) rdm2_f_ovov += einsum(x197, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_ovov += einsum(x197, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 @@ -4916,73 +4917,73 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x197, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.25 rdm2_f_vovo += einsum(x197, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 rdm2_f_vovo += einsum(x197, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 - x198 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x198 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 5.0 x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 x198 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x199 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x199 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x199 += einsum(l3, (0, 1, 2, 3, 4, 5), x198, (5, 6, 4, 2, 7, 1), (3, 6, 0, 7)) - x200 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x200 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x200 += einsum(l3, (0, 1, 2, 3, 4, 5), x45, (5, 6, 3, 1, 7, 2), (4, 6, 0, 7)) - x201 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x201 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x201 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) x201 += einsum(x199, (0, 1, 2, 3), (0, 1, 2, 3)) del x199 x201 += einsum(x200, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x200 - x202 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x202 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x202 += einsum(t2, (0, 1, 2, 3), x201, (1, 4, 2, 5), (0, 4, 3, 5)) * 0.25 del x201 - x203 = np.zeros((nvir, nvir), dtype=np.float64) + x203 = np.zeros((nvir, nvir), dtype=types[float]) x203 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 0, 6, 2), (1, 6)) - x204 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x204 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) x204 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 6.999999999999999 - x205 = np.zeros((nvir, nvir), dtype=np.float64) + x205 = np.zeros((nvir, nvir), dtype=types[float]) x205 += einsum(l3, (0, 1, 2, 3, 4, 5), x204, (4, 3, 5, 1, 6, 2), (0, 6)) * 0.08333333333333 - x206 = np.zeros((nvir, nvir), dtype=np.float64) + x206 = np.zeros((nvir, nvir), dtype=types[float]) x206 += einsum(l3, (0, 1, 2, 3, 4, 5), x45, (4, 5, 3, 6, 1, 2), (0, 6)) * 0.08333333333333 - x207 = np.zeros((nvir, nvir), dtype=np.float64) + x207 = np.zeros((nvir, nvir), dtype=types[float]) x207 += einsum(t2, (0, 1, 2, 3), x96, (0, 1, 2, 4), (3, 4)) * 2.0 - x208 = np.zeros((nvir, nvir), dtype=np.float64) + x208 = np.zeros((nvir, nvir), dtype=types[float]) x208 += einsum(x203, (0, 1), (0, 1)) * 0.24999999999999 x208 += einsum(x205, (0, 1), (0, 1)) x208 += einsum(x206, (0, 1), (0, 1)) * -1.0 x208 += einsum(x207, (0, 1), (1, 0)) - x209 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x209 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x209 += einsum(x208, (0, 1), t2, (2, 3, 0, 4), (2, 3, 4, 1)) del x208 - x210 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x210 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x210 += einsum(t1, (0, 1), x56, (0, 2, 3, 4), (2, 3, 1, 4)) del x56 - x211 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x211 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x211 += einsum(x210, (0, 1, 2, 3), x32, (0, 4, 5, 3), (4, 1, 5, 2)) * 0.5 del x210 - x212 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x212 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x212 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x212 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x213 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x213 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x213 += einsum(t2, (0, 1, 2, 3), x212, (4, 1, 5, 2), (0, 4, 5, 3)) del x212 - x214 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x214 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x214 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x214 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) - x215 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x215 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x215 += einsum(t2, (0, 1, 2, 3), x214, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x214 - x216 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x216 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x216 += einsum(t1, (0, 1), x7, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 - x217 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x217 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x217 += einsum(t1, (0, 1), x216, (2, 3, 0, 4), (3, 2, 4, 1)) * 0.5 del x216 - x218 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x218 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x218 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) x218 += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x39 @@ -5004,10 +5005,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x215 x218 += einsum(x217, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x217 - x219 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x219 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x219 += einsum(t1, (0, 1), x218, (0, 2, 3, 4), (2, 3, 1, 4)) del x218 - x220 = np.zeros((nocc, nocc), dtype=np.float64) + x220 = np.zeros((nocc, nocc), dtype=types[float]) x220 += einsum(x12, (0, 1), (0, 1)) * 0.08333333333333 del x12 x220 += einsum(x70, (0, 1), (0, 1)) @@ -5018,48 +5019,48 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x72 x220 += einsum(x73, (0, 1), (0, 1)) del x73 - x221 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x221 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x221 += einsum(x220, (0, 1), t2, (2, 0, 3, 4), (2, 1, 4, 3)) del x220 - x222 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x222 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x222 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x222 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) - x223 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x223 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x223 += einsum(t2, (0, 1, 2, 3), x222, (1, 4, 5, 6, 2, 3), (4, 5, 0, 6)) - x224 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x224 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x224 += einsum(t1, (0, 1), x223, (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 del x223 - x225 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x225 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x225 += einsum(t2, (0, 1, 2, 3), x224, (0, 1, 4, 5), (5, 4, 3, 2)) * 0.5 del x224 - x226 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x226 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x226 += einsum(t1, (0, 1), x10, (2, 3, 4, 1), (0, 3, 2, 4)) * 3.0 - x227 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x227 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x227 += einsum(t2, (0, 1, 2, 3), x226, (4, 0, 1, 5), (4, 5, 2, 3)) * 0.25 del x226 - x228 = np.zeros((nocc, nvir), dtype=np.float64) + x228 = np.zeros((nocc, nvir), dtype=types[float]) x228 += einsum(x42, (0, 1, 2, 3, 4, 5), x77, (0, 1, 2, 5, 4, 6), (3, 6)) * 0.041666666666665 del x77 - x229 = np.zeros((nocc, nvir), dtype=np.float64) + x229 = np.zeros((nocc, nvir), dtype=types[float]) x229 += einsum(x42, (0, 1, 2, 3, 4, 5), x45, (2, 0, 1, 6, 5, 4), (3, 6)) * 0.041666666666665 - x230 = np.zeros((nocc, nvir), dtype=np.float64) + x230 = np.zeros((nocc, nvir), dtype=types[float]) x230 += einsum(l2, (0, 1, 2, 3), x80, (2, 3, 4, 1, 0, 5), (4, 5)) * 0.125 del x80 - x231 = np.zeros((nocc, nvir), dtype=np.float64) + x231 = np.zeros((nocc, nvir), dtype=types[float]) x231 += einsum(l2, (0, 1, 2, 3), x82, (3, 4, 2, 0, 5, 1), (4, 5)) * 0.25 del x82 - x232 = np.zeros((nocc, nvir), dtype=np.float64) + x232 = np.zeros((nocc, nvir), dtype=types[float]) x232 += einsum(t2, (0, 1, 2, 3), x87, (0, 1, 4, 3), (4, 2)) del x87 - x233 = np.zeros((nocc, nvir), dtype=np.float64) + x233 = np.zeros((nocc, nvir), dtype=types[float]) x233 += einsum(t2, (0, 1, 2, 3), x90, (0, 1, 4, 2), (4, 3)) * 0.25 del x90 - x234 = np.zeros((nocc, nvir), dtype=np.float64) + x234 = np.zeros((nocc, nvir), dtype=types[float]) x234 += einsum(l1, (0, 1), x92, (1, 2, 3, 0), (2, 3)) * 0.5 - x235 = np.zeros((nocc, nvir), dtype=np.float64) + x235 = np.zeros((nocc, nvir), dtype=types[float]) x235 += einsum(t1, (0, 1), x74, (0, 2), (2, 1)) * 0.5 del x74 - x236 = np.zeros((nocc, nvir), dtype=np.float64) + x236 = np.zeros((nocc, nvir), dtype=types[float]) x236 += einsum(x76, (0, 1), (0, 1)) * 0.124999999999995 x236 += einsum(x228, (0, 1), (0, 1)) x236 += einsum(x229, (0, 1), (0, 1)) * -1.0 @@ -5070,7 +5071,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x236 += einsum(x234, (0, 1), (0, 1)) * -1.0 x236 += einsum(x235, (0, 1), (0, 1)) del x235 - x237 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x237 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x237 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) x237 += einsum(x175, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.08333333333333 del x175 @@ -5105,50 +5106,50 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x237, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x237, (0, 1, 2, 3), (1, 0, 3, 2)) del x237 - x238 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x238 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x238 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x238 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) - x239 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x239 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x239 += einsum(x174, (0, 1, 2, 3, 4, 5), x238, (1, 2, 0, 6, 7, 5), (3, 4, 6, 7)) * 0.08333333333333 - x240 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x240 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x240 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 5.000000000000001 x240 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x241 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x241 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x241 += einsum(x240, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (1, 5, 6, 4)) * 0.16666666666666666 del x240 - x242 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x242 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x242 += einsum(x9, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 0.5 - x243 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x243 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x243 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x243 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x243 += einsum(x241, (0, 1, 2, 3), (1, 2, 0, 3)) del x241 x243 += einsum(x242, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x242 - x244 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x244 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x244 += einsum(x243, (0, 1, 2, 3), t3, (4, 0, 1, 5, 3, 6), (2, 4, 6, 5)) * 1.5 del x243 - x245 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x245 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x245 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 2.0 x245 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 1, 2)) * -1.0 - x246 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x246 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x246 += einsum(x6, (0, 1, 2, 3), x245, (0, 4, 5, 3, 2, 6), (4, 5, 1, 6)) del x245 - x247 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x247 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x247 += einsum(x246, (0, 1, 2, 3), t3, (4, 1, 0, 5, 3, 6), (2, 4, 6, 5)) * 0.25 del x246 - x248 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x248 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x248 += einsum(x6, (0, 1, 2, 3), x42, (1, 4, 0, 5, 2, 6), (4, 5, 6, 3)) - x249 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x249 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x249 += einsum(x248, (0, 1, 2, 3), x32, (0, 4, 5, 2), (1, 4, 3, 5)) * -1.0 - x250 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x250 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x250 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x250 += einsum(x42, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 - x251 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x251 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x251 += einsum(t2, (0, 1, 2, 3), x250, (0, 1, 4, 5, 3, 6), (4, 5, 6, 2)) - x252 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x252 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x252 += einsum(t2, (0, 1, 2, 3), x251, (1, 4, 2, 5), (4, 0, 5, 3)) * -0.5 - x253 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x253 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x253 += einsum(x239, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x239 x253 += einsum(x244, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -5164,109 +5165,109 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x253, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x253, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x253 - x254 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x254 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x254 += einsum(l1, (0, 1), t3, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) - x255 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x255 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x255 += einsum(t2, (0, 1, 2, 3), x24, (1, 0, 4, 5), (5, 4, 2, 3)) rdm2_f_oovv += einsum(x255, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x255, (0, 1, 2, 3), (0, 1, 2, 3)) - x256 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x256 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x256 += einsum(t2, (0, 1, 2, 3), l3, (2, 4, 3, 5, 6, 7), (5, 7, 6, 0, 1, 4)) - x257 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x257 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x257 += einsum(t3, (0, 1, 2, 3, 4, 5), x256, (2, 0, 1, 6, 7, 4), (6, 7, 5, 3)) del x256 - x258 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x258 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x258 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 5, 6, 0, 1), (6, 4, 5, 3)) - x259 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x259 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x259 += einsum(x258, (0, 1, 2, 3), t3, (4, 0, 5, 2, 6, 1), (4, 5, 3, 6)) - x260 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x260 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x260 += einsum(x89, (0, 1, 2, 3), l3, (4, 5, 2, 6, 0, 1), (6, 4, 5, 3)) * 6.0 del x89 - x261 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x261 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x261 += einsum(x258, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x261 += einsum(x258, (0, 1, 2, 3), (0, 2, 1, 3)) * -2.0 x261 += einsum(x260, (0, 1, 2, 3), (0, 1, 2, 3)) del x260 x261 += einsum(x128, (0, 1, 2, 3), (0, 2, 3, 1)) - x262 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x262 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x262 += einsum(x261, (0, 1, 2, 3), t3, (4, 0, 5, 2, 1, 6), (4, 5, 3, 6)) * 0.25 del x261 - x263 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x263 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x263 += einsum(t2, (0, 1, 2, 3), l3, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x263, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x263, (0, 1, 2, 3), (1, 2, 0, 3)) - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x263, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x263, (0, 1, 2, 3), (2, 1, 3, 0)) - x264 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x264 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x264 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) * 1.5 x264 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.5 x264 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) - x265 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x265 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x265 += einsum(t2, (0, 1, 2, 3), x264, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 0.6666666666666666 del x264 - x266 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x266 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x266 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.6666666666666666 x266 += einsum(x265, (0, 1, 2, 3), (0, 1, 2, 3)) del x265 - x267 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x267 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x267 += einsum(x266, (0, 1, 2, 3), t3, (4, 0, 5, 1, 2, 6), (4, 5, 3, 6)) * 0.75 del x266 - x268 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x268 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x268 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) * 0.5 x268 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -0.5 x268 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) - x269 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x269 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x269 += einsum(t2, (0, 1, 2, 3), x268, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 2.0 del x268 - x270 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x270 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x270 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x270 += einsum(x269, (0, 1, 2, 3), (0, 1, 2, 3)) del x269 - x271 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x271 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x271 += einsum(x270, (0, 1, 2, 3), t3, (4, 0, 5, 2, 6, 1), (4, 5, 3, 6)) * 0.25 - x272 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x272 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x272 += einsum(t2, (0, 1, 2, 3), x96, (1, 4, 3, 5), (0, 4, 2, 5)) - x273 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x273 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x273 += einsum(t2, (0, 1, 2, 3), x272, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x272 - x274 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x274 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x274 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x274 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x275 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x275 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x275 += einsum(t2, (0, 1, 2, 3), x274, (1, 4, 2, 5), (4, 0, 5, 3)) - x276 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x276 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x276 += einsum(t2, (0, 1, 2, 3), x275, (1, 4, 2, 5), (4, 0, 5, 3)) * -1.0 del x275 - x277 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x277 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x277 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 7, 2, 1, 0), (5, 3, 6, 7)) - x278 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x278 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x278 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) x278 += einsum(x277, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.24999999999999 del x277 - x279 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x279 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x279 += einsum(t2, (0, 1, 2, 3), x278, (0, 1, 4, 5), (4, 5, 2, 3)) del x278 - x280 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x280 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x280 += einsum(t2, (0, 1, 2, 3), x98, (1, 4, 0, 5, 6, 2), (4, 6, 5, 3)) del x98 - x281 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x281 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x281 += einsum(x96, (0, 1, 2, 3), t3, (4, 0, 5, 3, 2, 6), (4, 5, 1, 6)) - x282 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x282 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x282 += einsum(t1, (0, 1), x25, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x25 - x283 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x283 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x283 += einsum(x280, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x280 x283 += einsum(x281, (0, 1, 2, 3), (2, 1, 0, 3)) del x281 x283 += einsum(x282, (0, 1, 2, 3), (0, 2, 1, 3)) del x282 - x284 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x284 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x284 += einsum(t1, (0, 1), x283, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x283 - x285 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x285 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x285 += einsum(x254, (0, 1, 2, 3), (0, 1, 2, 3)) x285 += einsum(x255, (0, 1, 2, 3), (0, 1, 2, 3)) del x255 @@ -5293,26 +5294,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x285, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x285, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x285 - x286 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x286 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x286 += einsum(t3, (0, 1, 2, 3, 4, 5), x174, (0, 1, 2, 6, 7, 4), (6, 7, 3, 5)) - x287 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x287 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x287 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x287 += einsum(x42, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 x287 += einsum(x42, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * 2.0 - x288 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x288 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x288 += einsum(t2, (0, 1, 2, 3), x287, (0, 1, 4, 5, 6, 3), (4, 5, 6, 2)) * 0.5 - x289 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x289 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x289 += einsum(x288, (0, 1, 2, 3), x6, (0, 4, 5, 2), (1, 4, 3, 5)) del x288 - x290 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x290 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x290 += einsum(t1, (0, 1), x10, (2, 3, 4, 1), (0, 3, 2, 4)) - x291 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x291 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x291 += einsum(t1, (0, 1), x290, (2, 3, 0, 4), (3, 2, 4, 1)) * 3.0 del x290 - x292 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x292 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x292 += einsum(t1, (0, 1), x291, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x291 - x293 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x293 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x293 += einsum(x286, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.08333333333333 del x286 x293 += einsum(x289, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -5324,50 +5325,50 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x293, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x293, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x293 - x294 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x294 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x294 += einsum(t3, (0, 1, 2, 3, 4, 5), x36, (0, 1, 2, 6, 7, 3), (6, 7, 5, 4)) - x295 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x295 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x295 += einsum(x178, (0, 1, 2, 3, 4, 5), x36, (1, 0, 2, 6, 7, 4), (6, 7, 3, 5)) * 0.16666666666667 - x296 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x296 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x296 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x296 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) * -0.5 - x297 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x297 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x297 += einsum(x296, (0, 1, 2, 3, 4, 5), x3, (0, 6, 7, 5, 4, 3), (1, 2, 6, 7)) del x3, x296 - x298 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x298 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x298 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 0.5 x298 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 3, 5, 0, 2, 1)) - x299 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x299 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x299 += einsum(t3, (0, 1, 2, 3, 4, 5), x298, (6, 7, 2, 4, 5, 3), (6, 7, 0, 1)) del x298 - x300 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x300 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x300 += einsum(x297, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x297 x300 += einsum(x299, (0, 1, 2, 3), (1, 0, 2, 3)) del x299 - x301 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x301 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x301 += einsum(t2, (0, 1, 2, 3), x300, (0, 1, 4, 5), (4, 5, 2, 3)) * 0.16666666666666 del x300 - x302 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x302 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x302 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x302 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -0.5 x302 += einsum(x36, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * 0.5 - x303 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x303 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x303 += einsum(t2, (0, 1, 2, 3), x302, (0, 4, 1, 5, 6, 3), (4, 5, 6, 2)) * 5.99999999999988 del x302 - x304 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x304 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x304 += einsum(t1, (0, 1), x102, (2, 0, 3, 4), (2, 3, 4, 1)) del x102 - x305 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x305 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x305 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) * -5.99999999999988 x305 += einsum(x303, (0, 1, 2, 3), (0, 1, 2, 3)) del x303 x305 += einsum(x304, (0, 1, 2, 3), (0, 1, 2, 3)) del x304 - x306 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x306 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x306 += einsum(t1, (0, 1), x305, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.16666666666667 del x305 - x307 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x307 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x307 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x307 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * -1.0 x307 += einsum(x294, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.16666666666667 @@ -5383,7 +5384,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x307, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x307, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x307 - x308 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x308 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x308 += einsum(t2, (0, 1, 2, 3), x251, (1, 4, 3, 5), (4, 0, 5, 2)) * -1.0 rdm2_f_oovv += einsum(x308, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x308, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -5394,9 +5395,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x308, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x308, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 del x308 - x309 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x309 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x309 += einsum(t2, (0, 1, 2, 3), x42, (1, 4, 0, 5, 6, 2), (4, 5, 6, 3)) - x310 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x310 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x310 += einsum(x309, (0, 1, 2, 3), x32, (0, 4, 5, 2), (4, 1, 5, 3)) rdm2_f_oovv += einsum(x310, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x310, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 @@ -5407,127 +5408,127 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x310, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x310, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x310 - x311 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x311 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x311 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x311 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 0, 2)) * 0.3333333333333333 - x312 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x312 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x312 += einsum(t1, (0, 1), x311, (2, 3, 4, 1, 5, 6), (0, 2, 3, 4, 5, 6)) * 3.0 del x311 - x313 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x313 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x313 += einsum(t1, (0, 1), x312, (2, 3, 4, 5, 1, 6), (0, 4, 3, 5, 2, 6)) * 0.3333333333333333 del x312 - x314 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x314 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x314 += einsum(t3, (0, 1, 2, 3, 4, 5), x313, (6, 0, 2, 1, 7, 4), (6, 7, 5, 3)) * 0.50000000000001 del x313 rdm2_f_oovv += einsum(x314, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x314, (0, 1, 2, 3), (1, 0, 2, 3)) del x314 - x315 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x315 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x315 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x315 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) - x316 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x316 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x316 += einsum(l1, (0, 1), x315, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) rdm2_f_oovv += einsum(x316, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x316, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x316 - x317 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x317 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x317 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x317 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 - x318 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x318 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x318 += einsum(l3, (0, 1, 2, 3, 4, 5), x317, (4, 6, 7, 1, 2, 0), (3, 5, 6, 7)) - x319 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x319 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x319 += einsum(x318, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x318 x319 += einsum(x104, (0, 1, 2, 3), (1, 0, 2, 3)) del x104 - x320 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x320 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x320 += einsum(t1, (0, 1), x319, (0, 2, 3, 4), (2, 3, 4, 1)) del x319 - x321 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x321 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x321 += einsum(t1, (0, 1), x320, (0, 2, 3, 4), (2, 3, 1, 4)) * 0.16666666666667 del x320 rdm2_f_oovv += einsum(x321, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x321, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x321 - x322 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x322 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x322 += einsum(t2, (0, 1, 2, 3), x42, (4, 0, 1, 5, 2, 6), (4, 5, 6, 3)) - x323 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x323 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x323 += einsum(t2, (0, 1, 2, 3), x322, (1, 4, 2, 5), (4, 0, 3, 5)) del x322 rdm2_f_oovv += einsum(x323, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x323, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x323 - x324 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x324 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x324 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x325 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x325 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x325 += einsum(t2, (0, 1, 2, 3), x324, (1, 4, 2, 5), (4, 0, 5, 3)) del x324 rdm2_f_oovv += einsum(x325, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x325, (0, 1, 2, 3), (0, 1, 2, 3)) del x325 - x326 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x326 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x326 += einsum(t1, (0, 1), x24, (0, 2, 3, 4), (2, 4, 3, 1)) del x24 - x327 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x327 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x327 += einsum(t1, (0, 1), x326, (0, 2, 3, 4), (2, 3, 1, 4)) del x326 rdm2_f_oovv += einsum(x327, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x327, (0, 1, 2, 3), (0, 1, 2, 3)) del x327 - x328 = np.zeros((nocc, nvir), dtype=np.float64) + x328 = np.zeros((nocc, nvir), dtype=types[float]) x328 += einsum(t1, (0, 1), x1, (0, 2), (2, 1)) del x1 rdm2_f_oovv += einsum(t1, (0, 1), x328, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x328, (2, 3), (0, 2, 1, 3)) * -1.0 - x329 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x329 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x329 += einsum(t2, (0, 1, 2, 3), x28, (0, 1, 4, 5), (4, 5, 2, 3)) - x330 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x330 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x330 += einsum(x258, (0, 1, 2, 3), t3, (4, 5, 0, 2, 6, 1), (4, 5, 3, 6)) - x331 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x331 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x331 += einsum(t2, (0, 1, 2, 3), l3, (4, 2, 3, 1, 5, 6), (6, 5, 0, 4)) - x332 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x332 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x332 += einsum(t1, (0, 1), x331, (2, 3, 4, 1), (2, 3, 0, 4)) - x333 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x333 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x333 += einsum(t2, (0, 1, 2, 3), x332, (1, 0, 4, 5), (4, 5, 3, 2)) del x332 - x334 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x334 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x334 += einsum(x270, (0, 1, 2, 3), t3, (4, 5, 0, 1, 6, 2), (4, 5, 3, 6)) * 0.25 - x335 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x335 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x335 += einsum(x174, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x174 x335 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 1.0000000000000602 del x36 - x336 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x336 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x336 += einsum(t3, (0, 1, 2, 3, 4, 5), x335, (0, 2, 1, 6, 7, 3), (6, 7, 5, 4)) * 0.49999999999997996 del x335 - x337 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x337 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x337 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x337 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x337 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x168 x337 += einsum(x123, (0, 1, 2, 3), (1, 0, 2, 3)) del x123 - x338 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x338 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x338 += einsum(x337, (0, 1, 2, 3), t3, (0, 4, 1, 3, 5, 6), (2, 4, 6, 5)) * 0.5 del x337 - x339 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x339 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x339 += einsum(x7, (0, 1, 2, 3), t3, (0, 4, 1, 5, 6, 3), (4, 2, 5, 6)) * -0.25 del x7 - x340 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x340 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x340 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 7, 0, 2), (4, 6, 1, 7)) - x341 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x341 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x341 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x341 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -0.25 x341 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.25 - x342 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x342 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x342 += einsum(l3, (0, 1, 2, 3, 4, 5), x341, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) del x341 rdm2_f_ovvo += einsum(x342, (0, 1, 2, 3), (0, 3, 2, 1)) rdm2_f_ovvo += einsum(x342, (0, 1, 2, 3), (0, 3, 2, 1)) - x343 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x343 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x343 += einsum(l3, (0, 1, 2, 3, 4, 5), x188, (3, 6, 5, 0, 2, 7), (4, 6, 1, 7)) * 0.25 del x188 - x344 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x344 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x344 += einsum(x183, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 x344 += einsum(x340, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x340 @@ -5535,56 +5536,56 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x342 x344 += einsum(x343, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x343 - x345 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x345 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x345 += einsum(t2, (0, 1, 2, 3), x344, (1, 4, 2, 5), (4, 0, 5, 3)) del x344 - x346 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x346 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x346 += einsum(t2, (0, 1, 2, 3), x143, (0, 1, 4, 5, 6, 2), (4, 5, 3, 6)) - x347 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x347 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x347 += einsum(t2, (0, 1, 2, 3), x346, (1, 4, 5, 2), (4, 0, 5, 3)) * -0.5 del x346 - x348 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x348 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x348 += einsum(t2, (0, 1, 2, 3), x23, (4, 1, 5, 3), (4, 5, 0, 2)) - x349 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x349 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x349 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 x349 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 x349 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) - x350 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x350 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x350 += einsum(x349, (0, 1, 2, 3, 4, 5), x42, (2, 6, 0, 7, 5, 3), (1, 6, 7, 4)) * 0.5 - x351 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x351 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x351 += einsum(x35, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x351 += einsum(x35, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) - x352 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x352 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x352 += einsum(t3, (0, 1, 2, 3, 4, 5), x351, (1, 2, 6, 7, 4, 5), (6, 7, 0, 3)) * 0.5 del x351 - x353 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x353 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x353 += einsum(l2, (0, 1, 2, 3), x145, (2, 4, 5, 0, 1, 6), (3, 4, 5, 6)) del x145 - x354 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x354 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x354 += einsum(t2, (0, 1, 2, 3), x133, (1, 4, 5, 6, 3, 2), (0, 4, 5, 6)) * 2.0 del x133 - x355 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x355 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x355 += einsum(x132, (0, 1, 2, 3), (1, 0, 2, 3)) del x132 x355 += einsum(x354, (0, 1, 2, 3), (1, 2, 0, 3)) del x354 - x356 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x356 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x356 += einsum(t2, (0, 1, 2, 3), x355, (4, 1, 5, 2), (4, 5, 0, 3)) del x355 - x357 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x357 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x357 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x357 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x358 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x358 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x358 += einsum(x23, (0, 1, 2, 3), x357, (0, 4, 3, 5), (4, 1, 2, 5)) * 2.0 - x359 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x359 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x359 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) del x28 x359 += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.99999999999996 del x30 - x360 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x360 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x360 += einsum(t1, (0, 1), x359, (2, 0, 3, 4), (2, 3, 4, 1)) * 1.00000000000002 del x359 - x361 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x361 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x361 += einsum(x348, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x348 x361 += einsum(x140, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -5607,13 +5608,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x358 x361 += einsum(x360, (0, 1, 2, 3), (0, 1, 2, 3)) del x360 - x362 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x362 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x362 += einsum(t1, (0, 1), x361, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x361 - x363 = np.zeros((nocc, nvir), dtype=np.float64) + x363 = np.zeros((nocc, nvir), dtype=types[float]) x363 += einsum(t1, (0, 1), x21, (0, 2), (2, 1)) del x21 - x364 = np.zeros((nocc, nvir), dtype=np.float64) + x364 = np.zeros((nocc, nvir), dtype=types[float]) x364 += einsum(x76, (0, 1), (0, 1)) * 0.124999999999995 del x76 x364 += einsum(x228, (0, 1), (0, 1)) @@ -5632,7 +5633,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x234 x364 += einsum(x363, (0, 1), (0, 1)) del x363 - x365 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x365 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x365 += einsum(x254, (0, 1, 2, 3), (0, 1, 2, 3)) del x254 x365 += einsum(x329, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.49999999999997996 @@ -5668,50 +5669,50 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x365, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x365, (0, 1, 2, 3), (1, 0, 3, 2)) del x365 - x366 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x366 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x366 += einsum(x29, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 3), (2, 4, 5, 6)) - x367 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x367 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x367 += einsum(x263, (0, 1, 2, 3), t3, (4, 5, 0, 6, 2, 1), (4, 5, 3, 6)) - x368 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x368 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x368 += einsum(x128, (0, 1, 2, 3), t3, (4, 5, 0, 6, 2, 3), (4, 5, 6, 1)) * -0.5 - x369 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x369 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x369 += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) x369 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x124 - x370 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x370 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x370 += einsum(x369, (0, 1, 2, 3), t3, (4, 0, 1, 5, 6, 3), (2, 4, 5, 6)) del x369 - x371 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x371 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x371 += einsum(t2, (0, 1, 2, 3), x250, (0, 1, 4, 5, 3, 6), (4, 5, 6, 2)) * 0.5 - x372 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x372 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x372 += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) x372 += einsum(x371, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x371 - x373 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x373 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x373 += einsum(t2, (0, 1, 2, 3), x372, (1, 4, 2, 5), (4, 0, 5, 3)) del x372 - x374 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x374 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x374 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (5, 6, 3, 2, 1, 7), (4, 6, 0, 7)) rdm2_f_ovov += einsum(x374, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 rdm2_f_ovov += einsum(x374, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 rdm2_f_vovo += einsum(x374, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.5 rdm2_f_vovo += einsum(x374, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.5 - x375 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x375 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x375 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 4, 5, 0, 7, 2), (3, 6, 1, 7)) rdm2_f_ovov += einsum(x375, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 rdm2_f_ovov += einsum(x375, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 rdm2_f_vovo += einsum(x375, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.5 rdm2_f_vovo += einsum(x375, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.5 - x376 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x376 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x376 += einsum(x374, (0, 1, 2, 3), (0, 1, 2, 3)) x376 += einsum(x375, (0, 1, 2, 3), (0, 1, 2, 3)) - x377 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x377 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x377 += einsum(t2, (0, 1, 2, 3), x376, (1, 4, 2, 5), (4, 0, 5, 3)) * 0.5 del x376 - x378 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x378 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x378 += einsum(x9, (0, 1, 2, 3), l3, (4, 2, 3, 5, 0, 6), (6, 5, 1, 4)) * 3.0 del x9 - x379 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x379 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x379 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) x379 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) * -3.0 x379 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -5719,30 +5720,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x53 x379 += einsum(x378, (0, 1, 2, 3), (1, 0, 2, 3)) x379 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x380 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x380 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x380 += einsum(t1, (0, 1), x379, (0, 2, 3, 4), (2, 3, 4, 1)) del x379 - x381 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x381 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x381 += einsum(t2, (0, 1, 2, 3), x380, (1, 4, 3, 5), (4, 0, 5, 2)) * 0.5 del x380 - x382 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x382 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x382 += einsum(t2, (0, 1, 2, 3), x23, (4, 1, 5, 2), (4, 5, 0, 3)) - x383 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x383 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x383 += einsum(t2, (0, 1, 2, 3), x120, (0, 1, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.5 del x120 - x384 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x384 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x384 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x29 x384 += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) del x59 - x385 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x385 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x385 += einsum(t2, (0, 1, 2, 3), x384, (1, 4, 5, 2), (4, 5, 0, 3)) * 0.5 del x384 - x386 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x386 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x386 += einsum(t1, (0, 1), x33, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 - x387 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x387 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x387 += einsum(t1, (0, 1), x386, (2, 3, 0, 4), (3, 2, 4, 1)) * 0.5 - x388 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x388 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x388 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x38 x388 += einsum(x108, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -5761,13 +5762,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x385 x388 += einsum(x387, (0, 1, 2, 3), (0, 1, 2, 3)) del x387 - x389 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x389 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x389 += einsum(t1, (0, 1), x388, (0, 2, 3, 4), (2, 3, 4, 1)) del x388 - x390 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x390 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x390 += einsum(t2, (0, 1, 2, 3), x386, (4, 0, 1, 5), (4, 5, 3, 2)) * 0.5 del x386 - x391 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x391 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x391 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) del x173 x391 += einsum(x366, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -5795,7 +5796,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x391, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x391, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x391 - x392 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x392 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x392 += einsum(t2, (0, 1, 2, 3), x251, (1, 4, 3, 5), (4, 0, 5, 2)) * -0.5 del x251 rdm2_f_oovv += einsum(x392, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -5803,7 +5804,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x392, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x392, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x392 - x393 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x393 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x393 += einsum(t2, (0, 1, 2, 3), x309, (1, 4, 3, 5), (4, 0, 2, 5)) del x309 rdm2_f_oovv += einsum(x393, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 @@ -5811,111 +5812,111 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_oovv += einsum(x393, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 rdm2_f_oovv += einsum(x393, (0, 1, 2, 3), (1, 0, 2, 3)) del x393 - x394 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x394 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x394 += einsum(t2, (0, 1, 2, 3), x287, (0, 1, 4, 5, 6, 3), (4, 5, 6, 2)) * 0.25 del x287 - x395 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x395 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x395 += einsum(t2, (0, 1, 2, 3), x192, (1, 4, 3, 5), (0, 4, 2, 5)) del x192 - x396 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x396 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x396 += einsum(x394, (0, 1, 2, 3), (0, 1, 2, 3)) del x394 x396 += einsum(x395, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x395 - x397 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x397 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x397 += einsum(t2, (0, 1, 2, 3), x396, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x396 rdm2_f_oovv += einsum(x397, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x397, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x397 - x398 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x398 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x398 += einsum(t2, (0, 1, 2, 3), x248, (1, 4, 3, 5), (4, 0, 5, 2)) * -1.0 del x248 rdm2_f_oovv += einsum(x398, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x398, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x398 - x399 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x399 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x399 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x399, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x399, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x399, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x399, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x400 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x400 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x400 += einsum(t2, (0, 1, 2, 3), x42, (0, 4, 1, 5, 2, 6), (4, 5, 6, 3)) rdm2_f_ovov += einsum(x400, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x400, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x400, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x400, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x401 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x401 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x401 += einsum(x399, (0, 1, 2, 3), (0, 1, 2, 3)) x401 += einsum(x400, (0, 1, 2, 3), (0, 1, 2, 3)) - x402 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x402 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x402 += einsum(t2, (0, 1, 2, 3), x401, (1, 4, 2, 5), (4, 0, 5, 3)) del x401 rdm2_f_oovv += einsum(x402, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_oovv += einsum(x402, (0, 1, 2, 3), (1, 0, 2, 3)) del x402 - x403 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x403 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x403 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x403 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - x404 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x404 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x404 += einsum(x22, (0, 1, 2, 3), x403, (0, 1, 4, 5), (2, 3, 4, 5)) del x22, x403 rdm2_f_oovv += einsum(x404, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_oovv += einsum(x404, (0, 1, 2, 3), (1, 0, 3, 2)) del x404 - x405 = np.zeros((nocc, nvir), dtype=np.float64) + x405 = np.zeros((nocc, nvir), dtype=types[float]) x405 += einsum(t1, (0, 1), (0, 1)) x405 += einsum(x328, (0, 1), (0, 1)) * -1.0 del x328 rdm2_f_oovv += einsum(t1, (0, 1), x405, (2, 3), (2, 0, 3, 1)) rdm2_f_oovv += einsum(t1, (0, 1), x405, (2, 3), (2, 0, 3, 1)) del x405 - x406 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x406 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x406 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 5, 4, 1, 7, 2), (3, 6, 0, 7)) rdm2_f_ovov += einsum(x406, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_ovov += einsum(x406, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.25 rdm2_f_voov += einsum(x406, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.25 rdm2_f_voov += einsum(x406, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.25 del x406 - x407 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x407 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x407 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 0.2 x407 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -0.2 x407 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -0.2 x407 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) - x408 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x408 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x408 += einsum(l3, (0, 1, 2, 3, 4, 5), x407, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) * 1.25 del x407 rdm2_f_ovov += einsum(x408, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovov += einsum(x408, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x408 - x409 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x409 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x409 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x409 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) - x410 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x410 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x410 += einsum(t3, (0, 1, 2, 3, 4, 5), x409, (2, 1, 6, 5, 7, 3), (6, 0, 7, 4)) * 0.25 del x409 rdm2_f_ovov += einsum(x410, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ovov += einsum(x410, (0, 1, 2, 3), (1, 2, 0, 3)) del x410 - x411 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x411 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x411 += einsum(l3, (0, 1, 2, 3, 4, 5), x317, (5, 6, 3, 1, 7, 2), (4, 6, 0, 7)) * 0.25 rdm2_f_ovov += einsum(x411, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x411, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovvo += einsum(x411, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_ovvo += einsum(x411, (0, 1, 2, 3), (1, 2, 3, 0)) del x411 - x412 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x412 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x412 += einsum(t2, (0, 1, 2, 3), x250, (0, 1, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.5 rdm2_f_ovov += einsum(x412, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x412, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x412, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x412, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x412 - x413 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x413 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x413 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 x413 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 - x414 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x414 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x414 += einsum(t2, (0, 1, 2, 3), x413, (4, 0, 1, 5, 6, 3), (4, 5, 6, 2)) del x413 rdm2_f_ovov += einsum(x414, (0, 1, 2, 3), (1, 2, 0, 3)) @@ -5923,12 +5924,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_ovvo += einsum(x414, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x414, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 del x414 - x415 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x415 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x415 += einsum(l2, (0, 1, 2, 3), x32, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x415, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x415, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x415 - x416 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x416 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x416 += einsum(l2, (0, 1, 2, 3), x19, (3, 4, 5, 1), (2, 4, 0, 5)) * 2.0 del x19 rdm2_f_ovov += einsum(x416, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -5936,17 +5937,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x416, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x416, (0, 1, 2, 3), (2, 1, 0, 3)) del x416 - x417 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x417 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x417 += einsum(x32, (0, 1, 2, 3), l3, (4, 2, 3, 5, 6, 0), (5, 6, 1, 4)) - x418 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x418 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x418 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x418 += einsum(x417, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x417 - x419 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x419 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x419 += einsum(x418, (0, 1, 2, 3), (0, 1, 2, 3)) x419 += einsum(x418, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x419 += einsum(x378, (0, 1, 2, 3), (1, 0, 2, 3)) - x420 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x420 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x420 += einsum(t1, (0, 1), x419, (2, 0, 3, 4), (2, 3, 4, 1)) * 0.5 del x419 rdm2_f_ovov += einsum(x420, (0, 1, 2, 3), (1, 2, 0, 3)) @@ -5958,9 +5959,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovo += einsum(x420, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x420, (0, 1, 2, 3), (2, 1, 3, 0)) del x420 - x421 = np.zeros((nvir, nvir), dtype=np.float64) + x421 = np.zeros((nvir, nvir), dtype=types[float]) x421 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x422 = np.zeros((nvir, nvir), dtype=np.float64) + x422 = np.zeros((nvir, nvir), dtype=types[float]) x422 += einsum(x421, (0, 1), (0, 1)) x422 += einsum(x203, (0, 1), (0, 1)) * 0.24999999999999 x422 += einsum(x205, (0, 1), (0, 1)) @@ -5981,31 +5982,31 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovo += einsum(delta.oo, (0, 1), x422, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x422, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x422, (2, 3), (2, 0, 3, 1)) - x423 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x423 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x423 += einsum(t2, (0, 1, 2, 3), x143, (0, 1, 4, 5, 2, 6), (4, 5, 3, 6)) * 0.5 rdm2_f_ovov += einsum(x423, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 rdm2_f_ovov += einsum(x423, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 rdm2_f_vovo += einsum(x423, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 rdm2_f_vovo += einsum(x423, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 del x423 - x424 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x424 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x424 += einsum(t1, (0, 1), x151, (0, 2, 3, 4), (2, 3, 1, 4)) rdm2_f_ovov += einsum(x424, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 rdm2_f_ovov += einsum(x424, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 del x424 - x425 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x425 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x425 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 1, 7, 2), (4, 6, 0, 7)) rdm2_f_ovvo += einsum(x425, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.25 rdm2_f_ovvo += einsum(x425, (0, 1, 2, 3), (1, 2, 3, 0)) * 0.25 rdm2_f_vovo += einsum(x425, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 rdm2_f_vovo += einsum(x425, (0, 1, 2, 3), (2, 1, 3, 0)) * -0.25 del x425 - x426 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x426 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x426 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x426 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 x426 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 x426 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 5.0 - x427 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x427 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x427 += einsum(l3, (0, 1, 2, 3, 4, 5), x426, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) * 0.25 del x426 rdm2_f_ovvo += einsum(x427, (0, 1, 2, 3), (0, 3, 2, 1)) @@ -6013,19 +6014,19 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x427, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x427, (0, 1, 2, 3), (3, 0, 1, 2)) del x427 - x428 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x428 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x428 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x428 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 - x429 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x429 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x429 += einsum(l3, (0, 1, 2, 3, 4, 5), x428, (5, 6, 4, 2, 1, 7), (6, 3, 7, 0)) * 0.25 del x428 rdm2_f_ovvo += einsum(x429, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_ovvo += einsum(x429, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x429 - x430 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x430 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x430 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x430 += einsum(x42, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) - x431 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x431 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x431 += einsum(t2, (0, 1, 2, 3), x430, (0, 1, 4, 5, 6, 2), (4, 5, 6, 3)) * 0.5 del x430 rdm2_f_ovvo += einsum(x431, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -6033,17 +6034,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x431, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x431, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x431 - x432 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x432 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x432 += einsum(t2, (0, 1, 2, 3), x274, (1, 4, 5, 2), (4, 0, 5, 3)) rdm2_f_ovvo += einsum(x432, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x432, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x432, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x432, (0, 1, 2, 3), (2, 1, 3, 0)) del x432 - x433 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x433 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x433 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 2.0 x433 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x434 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x434 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x434 += einsum(t2, (0, 1, 2, 3), x433, (1, 4, 5, 3), (4, 0, 5, 2)) del x433 rdm2_f_ovvo += einsum(x434, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -6051,40 +6052,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovo += einsum(x434, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x434, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x434 - x435 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x435 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x435 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (6, 3, 5, 0, 7, 2), (4, 6, 1, 7)) rdm2_f_ovvo += einsum(x435, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.25 rdm2_f_ovvo += einsum(x435, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.25 rdm2_f_voov += einsum(x435, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.25 rdm2_f_voov += einsum(x435, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.25 - x436 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x436 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x436 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 6, 5, 1, 7, 2), (4, 6, 0, 7)) rdm2_f_ovvo += einsum(x436, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.25 rdm2_f_ovvo += einsum(x436, (0, 1, 2, 3), (1, 2, 3, 0)) * -0.25 rdm2_f_voov += einsum(x436, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.25 rdm2_f_voov += einsum(x436, (0, 1, 2, 3), (2, 1, 0, 3)) * -0.25 del x436 - x437 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x437 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x437 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x437, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x437, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x437, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x437, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x438 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x438 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x438 += einsum(t3, (0, 1, 2, 3, 4, 5), x127, (1, 2, 6, 5, 4, 7), (0, 6, 3, 7)) * 0.25 rdm2_f_ovvo += einsum(x438, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_ovvo += einsum(x438, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_voov += einsum(x438, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(x438, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x438 - x439 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x439 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x439 += einsum(t2, (0, 1, 2, 3), x250, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 0.5 rdm2_f_ovvo += einsum(x439, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x439, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x439, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x439, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x439 - x440 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x440 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x440 += einsum(l2, (0, 1, 2, 3), x92, (3, 4, 5, 1), (2, 4, 0, 5)) del x92 rdm2_f_ovvo += einsum(x440, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -6092,30 +6093,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_voov += einsum(x440, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x440, (0, 1, 2, 3), (2, 1, 0, 3)) del x440 - x441 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x441 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x441 += einsum(t1, (0, 1), x130, (2, 0, 3, 4), (2, 3, 1, 4)) * 0.5 rdm2_f_ovvo += einsum(x441, (0, 1, 2, 3), (1, 3, 2, 0)) * -1.0 rdm2_f_ovvo += einsum(x441, (0, 1, 2, 3), (1, 3, 2, 0)) * -1.0 del x441 - x442 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x442 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x442 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) x442 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * -1.0 - x443 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x443 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x443 += einsum(t3, (0, 1, 2, 3, 4, 5), x442, (2, 1, 6, 5, 7, 3), (6, 0, 7, 4)) * 0.25 del x442 rdm2_f_voov += einsum(x443, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_voov += einsum(x443, (0, 1, 2, 3), (2, 1, 0, 3)) del x443 - x444 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x444 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x444 += einsum(l3, (0, 1, 2, 3, 4, 5), x317, (5, 6, 3, 2, 7, 1), (4, 6, 0, 7)) * 0.25 del x317 rdm2_f_voov += einsum(x444, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x444, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x444 - x445 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x445 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x445 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -0.5 x445 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) - x446 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x446 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x446 += einsum(t2, (0, 1, 2, 3), x445, (4, 0, 1, 5, 6, 2), (4, 5, 6, 3)) * 2.0 del x445 rdm2_f_voov += einsum(x446, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 @@ -6123,112 +6124,112 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovo += einsum(x446, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x446, (0, 1, 2, 3), (2, 1, 3, 0)) del x446 - x447 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x447 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x447 += einsum(l2, (0, 1, 2, 3), x6, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_voov += einsum(x447, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x447, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x447 - x448 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x448 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x448 += einsum(l3, (0, 1, 2, 3, 4, 5), x349, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) * 0.25 rdm2_f_voov += einsum(x448, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x448, (0, 1, 2, 3), (3, 0, 1, 2)) del x448 - x449 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x449 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x449 += einsum(t1, (0, 1), x151, (2, 0, 3, 4), (2, 3, 1, 4)) del x151 rdm2_f_voov += einsum(x449, (0, 1, 2, 3), (3, 1, 0, 2)) * -1.0 rdm2_f_voov += einsum(x449, (0, 1, 2, 3), (3, 1, 0, 2)) * -1.0 del x449 - x450 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x450 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x450 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * 5.0 x450 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * -1.0 - x451 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x451 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x451 += einsum(t3, (0, 1, 2, 3, 4, 5), x450, (2, 6, 1, 5, 7, 4), (6, 0, 7, 3)) * 0.25 del x450 rdm2_f_vovo += einsum(x451, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x451, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x451 - x452 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x452 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x452 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 x452 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) x452 += einsum(t3, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) - x453 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x453 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x453 += einsum(l3, (0, 1, 2, 3, 4, 5), x452, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) * 0.25 del x452 rdm2_f_vovo += einsum(x453, (0, 1, 2, 3), (3, 0, 2, 1)) rdm2_f_vovo += einsum(x453, (0, 1, 2, 3), (3, 0, 2, 1)) del x453 - x454 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x454 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x454 += einsum(l3, (0, 1, 2, 3, 4, 5), x315, (5, 6, 4, 2, 1, 7), (3, 6, 0, 7)) * 0.25 del x315 rdm2_f_vovo += einsum(x454, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x454, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x454 - x455 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x455 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x455 += einsum(t1, (0, 1), x130, (0, 2, 3, 4), (2, 3, 1, 4)) * 0.5 rdm2_f_vovo += einsum(x455, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 rdm2_f_vovo += einsum(x455, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 del x455 - x456 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x456 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x456 += einsum(t3, (0, 1, 2, 3, 4, 5), x42, (2, 0, 1, 6, 7, 4), (6, 7, 5, 3)) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(x456, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.50000000000001 rdm2_f_ovvv += einsum(x456, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.50000000000001 - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(x456, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.50000000000001 rdm2_f_vovv += einsum(x456, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.50000000000001 del x456 - x457 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x457 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x457 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (0, 1, 2, 6, 4, 7), (6, 7, 3, 5)) rdm2_f_ovvv += einsum(x457, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.16666666666667 rdm2_f_ovvv += einsum(x457, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.16666666666667 rdm2_f_vovv += einsum(x457, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 rdm2_f_vovv += einsum(x457, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 del x457 - x458 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x458 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x458 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x458, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x458, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x458, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x458, (0, 1, 2, 3), (1, 0, 3, 2)) - x459 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x459 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x459 += einsum(t2, (0, 1, 2, 3), x263, (1, 3, 4, 5), (0, 4, 2, 5)) - x460 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x460 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x460 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (0, 1, 2, 6, 3, 7), (6, 7, 5, 4)) - x461 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x461 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x461 += einsum(x238, (0, 1, 2, 3, 4, 5), x35, (0, 1, 2, 6, 7, 4), (6, 3, 5, 7)) * 0.16666666666667 - x462 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x462 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x462 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x462 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x463 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x463 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x463 += einsum(x462, (0, 1, 2, 3), t3, (4, 1, 0, 5, 6, 3), (4, 2, 5, 6)) * 0.5 del x462 - x464 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x464 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x464 += einsum(l3, (0, 1, 2, 3, 4, 5), x198, (5, 6, 4, 2, 7, 1), (3, 6, 0, 7)) * 0.25 del x198 - x465 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x465 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x465 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) x465 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) x465 += einsum(t3, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 - x466 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x466 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x466 += einsum(l3, (0, 1, 2, 3, 4, 5), x465, (5, 6, 3, 2, 7, 1), (6, 4, 7, 0)) * 0.25 del x465 - x467 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x467 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x467 += einsum(x42, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x467 += einsum(x35, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 x467 += einsum(x35, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * 0.5 x467 += einsum(x35, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -0.5 - x468 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x468 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x468 += einsum(t2, (0, 1, 2, 3), x467, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) del x467 - x469 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x469 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x469 += einsum(l2, (0, 1, 2, 3), x357, (3, 4, 1, 5), (4, 2, 5, 0)) - x470 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x470 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x470 += einsum(l2, (0, 1, 2, 3), x32, (2, 4, 1, 5), (3, 4, 0, 5)) - x471 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x471 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x471 += einsum(t1, (0, 1), x418, (2, 0, 3, 4), (2, 3, 4, 1)) * 0.5 del x418 - x472 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x472 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x472 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 del x197 x472 += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -6244,23 +6245,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x470 x472 += einsum(x471, (0, 1, 2, 3), (0, 1, 2, 3)) del x471 - x473 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x473 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x473 += einsum(t1, (0, 1), x472, (0, 2, 3, 4), (2, 3, 4, 1)) del x472 - x474 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x474 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x474 += einsum(t2, (0, 1, 2, 3), x222, (1, 4, 5, 6, 2, 3), (4, 5, 0, 6)) * 0.5 del x222 - x475 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x475 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x475 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x475 += einsum(x474, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x474 - x476 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x476 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x476 += einsum(t2, (0, 1, 2, 3), x475, (1, 0, 4, 5), (4, 5, 2, 3)) del x475 - x477 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x477 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x477 += einsum(t2, (0, 1, 2, 3), x378, (1, 0, 4, 5), (4, 5, 2, 3)) * 0.25 del x378 - x478 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x478 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x478 += einsum(x458, (0, 1, 2, 3), (0, 1, 2, 3)) del x458 x478 += einsum(x459, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -6288,7 +6289,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x478, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x478, (0, 1, 2, 3), (1, 0, 3, 2)) del x478 - x479 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x479 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x479 += einsum(t2, (0, 1, 2, 3), x128, (1, 4, 5, 3), (0, 2, 5, 4)) * -1.0 rdm2_f_ovvv += einsum(x479, (0, 1, 2, 3), (0, 2, 1, 3)) rdm2_f_ovvv += einsum(x479, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 @@ -6299,7 +6300,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x479, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vovv += einsum(x479, (0, 1, 2, 3), (2, 0, 3, 1)) * 0.5 del x479 - x480 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x480 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x480 += einsum(x258, (0, 1, 2, 3), x6, (0, 4, 2, 5), (4, 1, 3, 5)) rdm2_f_ovvv += einsum(x480, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_ovvv += einsum(x480, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -6310,63 +6311,63 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x480, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x480, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x480 - x481 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x481 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x481 += einsum(x238, (0, 1, 2, 3, 4, 5), x35, (0, 2, 1, 6, 7, 5), (6, 3, 4, 7)) * 0.16666666666667 rdm2_f_ovvv += einsum(x481, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovvv += einsum(x481, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x481 - x482 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x482 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x482 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.3333333333333333 x482 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x483 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x483 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x483 += einsum(x482, (0, 1, 2, 3), t3, (4, 1, 0, 5, 3, 6), (4, 2, 6, 5)) * 1.5 del x482 rdm2_f_ovvv += einsum(x483, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_ovvv += einsum(x483, (0, 1, 2, 3), (0, 1, 3, 2)) del x483 - x484 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x484 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x484 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 5, 6, 0, 1), (6, 4, 5, 2)) - x485 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x485 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x485 += einsum(t2, (0, 1, 2, 3), l3, (4, 3, 5, 0, 6, 1), (6, 4, 5, 2)) - x486 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x486 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x486 += einsum(x484, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x486 += einsum(x485, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x486 += einsum(x485, (0, 1, 2, 3), (0, 2, 1, 3)) - x487 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x487 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x487 += einsum(x32, (0, 1, 2, 3), x486, (0, 4, 3, 5), (1, 4, 5, 2)) * 0.5 del x486 rdm2_f_ovvv += einsum(x487, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x487, (0, 1, 2, 3), (0, 1, 2, 3)) del x487 - x488 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x488 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x488 += einsum(t2, (0, 1, 2, 3), x270, (1, 4, 2, 5), (0, 4, 5, 3)) * 0.5 del x270 rdm2_f_ovvv += einsum(x488, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x488, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x488 - x489 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x489 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x489 += einsum(x6, (0, 1, 2, 3), l3, (4, 5, 2, 6, 0, 1), (6, 4, 5, 3)) - x490 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x490 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x490 += einsum(t2, (0, 1, 2, 3), x489, (1, 4, 3, 5), (0, 4, 5, 2)) * -1.0 rdm2_f_ovvv += einsum(x490, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_ovvv += einsum(x490, (0, 1, 2, 3), (0, 1, 3, 2)) del x490 - x491 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x491 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x491 += einsum(t1, (0, 1), x10, (2, 0, 3, 4), (2, 3, 1, 4)) * 3.0 - x492 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x492 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x492 += einsum(t1, (0, 1), x491, (0, 2, 3, 4), (2, 4, 3, 1)) * 0.5 del x491 rdm2_f_ovvv += einsum(x492, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x492, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x492 - x493 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x493 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x493 += einsum(l2, (0, 1, 2, 3), t3, (4, 2, 3, 5, 6, 1), (4, 0, 5, 6)) rdm2_f_ovvv += einsum(x493, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x493, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x493, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x493, (0, 1, 2, 3), (1, 0, 3, 2)) del x493 - x494 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x494 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x494 += einsum(t3, (0, 1, 2, 3, 4, 5), x42, (2, 0, 1, 6, 5, 7), (6, 7, 3, 4)) del x42 rdm2_f_ovvv += einsum(x494, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.50000000000001 @@ -6374,14 +6375,14 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x494, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.50000000000001 rdm2_f_vovv += einsum(x494, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.50000000000001 del x494 - x495 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x495 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x495 += einsum(t3, (0, 1, 2, 3, 4, 5), x35, (0, 2, 1, 6, 7, 5), (6, 7, 3, 4)) rdm2_f_ovvv += einsum(x495, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.50000000000001 rdm2_f_ovvv += einsum(x495, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.50000000000001 rdm2_f_vovv += einsum(x495, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.50000000000001 rdm2_f_vovv += einsum(x495, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.50000000000001 del x495 - x496 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x496 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x496 += einsum(x274, (0, 1, 2, 3), t3, (0, 4, 1, 5, 6, 3), (4, 2, 5, 6)) * 0.5 del x274 rdm2_f_ovvv += einsum(x496, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -6389,67 +6390,67 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x496, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x496, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x496 - x497 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x497 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x497 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) x497 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x497 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 2, 1)) x497 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 0, 1, 2)) * -1.0 - x498 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x498 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x498 += einsum(t2, (0, 1, 2, 3), x497, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) del x497 - x499 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x499 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x499 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x499 += einsum(x263, (0, 1, 2, 3), (0, 2, 1, 3)) x499 += einsum(x498, (0, 1, 2, 3), (0, 1, 2, 3)) del x498 - x500 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x500 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x500 += einsum(t2, (0, 1, 2, 3), x499, (1, 4, 3, 5), (0, 4, 5, 2)) del x499 rdm2_f_ovvv += einsum(x500, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_ovvv += einsum(x500, (0, 1, 2, 3), (0, 1, 3, 2)) del x500 - x501 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x501 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x501 += einsum(t2, (0, 1, 2, 3), x127, (0, 1, 4, 5, 2, 6), (4, 3, 5, 6)) * 0.5 del x127 rdm2_f_vvov += einsum(x501, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vvov += einsum(x501, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vvvo += einsum(x501, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 rdm2_f_vvvo += einsum(x501, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 - x502 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x502 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x502 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) x502 += einsum(x501, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x501 - x503 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x503 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x503 += einsum(t2, (0, 1, 2, 3), x502, (1, 4, 2, 5), (0, 4, 5, 3)) rdm2_f_ovvv += einsum(x503, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovvv += einsum(x503, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x503 - x504 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x504 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x504 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x504 += einsum(x128, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 - x505 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x505 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x505 += einsum(t2, (0, 1, 2, 3), x504, (1, 2, 4, 5), (0, 4, 5, 3)) * 0.5 del x504 rdm2_f_ovvv += einsum(x505, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x505, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x505 - x506 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x506 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x506 += einsum(l3, (0, 1, 2, 3, 4, 5), x349, (4, 6, 5, 1, 7, 2), (6, 3, 7, 0)) * 0.125 del x349 - x507 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x507 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x507 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) x507 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 - x508 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x508 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x508 += einsum(t3, (0, 1, 2, 3, 4, 5), x507, (1, 2, 6, 4, 5, 7), (6, 0, 7, 3)) * 0.125 - x509 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x509 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x509 += einsum(t2, (0, 1, 2, 3), x250, (0, 1, 4, 5, 3, 6), (4, 5, 6, 2)) * 0.25 del x250 - x510 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x510 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x510 += einsum(l2, (0, 1, 2, 3), x357, (3, 4, 1, 5), (4, 2, 5, 0)) * 0.5 - x511 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x511 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x511 += einsum(t1, (0, 1), x130, (2, 0, 3, 4), (2, 3, 1, 4)) * 0.25 del x130 - x512 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x512 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x512 += einsum(x437, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x437 x512 += einsum(x435, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.125 @@ -6468,7 +6469,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x510 x512 += einsum(x511, (0, 1, 2, 3), (0, 1, 3, 2)) del x511 - x513 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x513 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x513 += einsum(t1, (0, 1), x512, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x512 rdm2_f_ovvv += einsum(x513, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -6476,12 +6477,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x513, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x513, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x513 - x514 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x514 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x514 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) del x23 x514 += einsum(x331, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x331 - x515 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x515 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x515 += einsum(t2, (0, 1, 2, 3), x514, (0, 1, 4, 5), (4, 5, 3, 2)) del x514 rdm2_f_ovvv += einsum(x515, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -6489,7 +6490,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x515, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x515, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x515 - x516 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x516 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x516 += einsum(t2, (0, 1, 2, 3), x33, (0, 1, 4, 5), (4, 3, 2, 5)) * -0.5 del x33 rdm2_f_ovvv += einsum(x516, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 @@ -6497,10 +6498,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x516, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_vovv += einsum(x516, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x516 - x517 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x517 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x517 += einsum(t2, (0, 1, 2, 3), x143, (0, 1, 4, 5, 6, 2), (4, 5, 3, 6)) * 0.5 del x143 - x518 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x518 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x518 += einsum(x399, (0, 1, 2, 3), (0, 1, 2, 3)) del x399 x518 += einsum(x374, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -6511,7 +6512,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x400 x518 += einsum(x517, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x517 - x519 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x519 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x519 += einsum(t1, (0, 1), x518, (0, 2, 3, 4), (2, 3, 4, 1)) del x518 rdm2_f_ovvv += einsum(x519, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -6519,16 +6520,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(x519, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x519, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x519 - x520 = np.zeros((nvir, nvir), dtype=np.float64) + x520 = np.zeros((nvir, nvir), dtype=types[float]) x520 += einsum(l3, (0, 1, 2, 3, 4, 5), x204, (4, 3, 5, 1, 6, 2), (0, 6)) * 0.041666666666665 del x204 - x521 = np.zeros((nvir, nvir), dtype=np.float64) + x521 = np.zeros((nvir, nvir), dtype=types[float]) x521 += einsum(l3, (0, 1, 2, 3, 4, 5), x45, (4, 5, 3, 6, 1, 2), (0, 6)) * 0.041666666666665 del x45 - x522 = np.zeros((nvir, nvir), dtype=np.float64) + x522 = np.zeros((nvir, nvir), dtype=types[float]) x522 += einsum(t2, (0, 1, 2, 3), x96, (0, 1, 2, 4), (3, 4)) del x96 - x523 = np.zeros((nvir, nvir), dtype=np.float64) + x523 = np.zeros((nvir, nvir), dtype=types[float]) x523 += einsum(x421, (0, 1), (0, 1)) * 0.5 del x421 x523 += einsum(x203, (0, 1), (0, 1)) * 0.124999999999995 @@ -6544,104 +6545,104 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vovv += einsum(t1, (0, 1), x523, (2, 3), (2, 0, 3, 1)) * 2.0 rdm2_f_vovv += einsum(t1, (0, 1), x523, (2, 3), (2, 0, 3, 1)) * 2.0 del x523 - x524 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x524 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x524 += einsum(x178, (0, 1, 2, 3, 4, 5), x35, (0, 2, 1, 6, 7, 5), (6, 7, 3, 4)) * 0.16666666666667 del x35, x178 rdm2_f_vovv += einsum(x524, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x524, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x524 - x525 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x525 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x525 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x525 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 3.0 - x526 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x526 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x526 += einsum(x525, (0, 1, 2, 3), t3, (4, 1, 0, 5, 3, 6), (4, 2, 6, 5)) * 0.5 del x525 rdm2_f_vovv += einsum(x526, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x526, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x526 - x527 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x527 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x527 += einsum(x484, (0, 1, 2, 3), (0, 1, 2, 3)) del x484 x527 += einsum(x485, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x527 += einsum(x485, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 - x528 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x528 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x528 += einsum(x32, (0, 1, 2, 3), x527, (0, 4, 3, 5), (1, 4, 5, 2)) del x527 rdm2_f_vovv += einsum(x528, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x528, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x528 - x529 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x529 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x529 += einsum(x489, (0, 1, 2, 3), x6, (0, 4, 2, 5), (4, 1, 3, 5)) * -1.0 del x6, x489 rdm2_f_vovv += einsum(x529, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x529, (0, 1, 2, 3), (1, 0, 3, 2)) del x529 - x530 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x530 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x530 += einsum(t2, (0, 1, 2, 3), x128, (1, 4, 5, 2), (0, 3, 5, 4)) * -0.5 rdm2_f_vovv += einsum(x530, (0, 1, 2, 3), (2, 0, 1, 3)) rdm2_f_vovv += einsum(x530, (0, 1, 2, 3), (2, 0, 1, 3)) del x530 - x531 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x531 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x531 += einsum(t1, (0, 1), x10, (2, 0, 3, 4), (2, 3, 1, 4)) del x10 - x532 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x532 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x532 += einsum(t1, (0, 1), x531, (0, 2, 3, 4), (2, 4, 3, 1)) * 1.5 del x531 rdm2_f_vovv += einsum(x532, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x532, (0, 1, 2, 3), (1, 0, 3, 2)) del x532 - x533 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x533 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x533 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 2, 1)) x533 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) * -1.0 x533 += einsum(l3, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 0, 2)) * 4.0 - x534 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x534 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x534 += einsum(t2, (0, 1, 2, 3), x533, (0, 1, 4, 2, 5, 6), (4, 5, 6, 3)) del x533 - x535 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x535 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x535 += einsum(l3, (0, 1, 2, 3, 4, 5), (5, 3, 4, 0, 1, 2)) x535 += einsum(l3, (0, 1, 2, 3, 4, 5), (3, 5, 4, 0, 2, 1)) - x536 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x536 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x536 += einsum(t2, (0, 1, 2, 3), x535, (1, 4, 0, 5, 6, 3), (4, 5, 6, 2)) * 2.0 del x535 - x537 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x537 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x537 += einsum(x485, (0, 1, 2, 3), (0, 1, 2, 3)) x537 += einsum(x485, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x537 += einsum(x534, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x534 x537 += einsum(x536, (0, 1, 2, 3), (0, 1, 2, 3)) del x536 - x538 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x538 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x538 += einsum(t2, (0, 1, 2, 3), x537, (1, 3, 4, 5), (0, 4, 5, 2)) * 0.5 del x537 rdm2_f_vovv += einsum(x538, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_vovv += einsum(x538, (0, 1, 2, 3), (1, 0, 2, 3)) del x538 - x539 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x539 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x539 += einsum(t2, (0, 1, 2, 3), x507, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) - x540 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x540 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x540 += einsum(x47, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x47 x540 += einsum(x539, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x539 - x541 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x541 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x541 += einsum(t2, (0, 1, 2, 3), x540, (1, 2, 4, 5), (0, 4, 5, 3)) * 0.5 del x540 rdm2_f_vovv += einsum(x541, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x541, (0, 1, 2, 3), (1, 0, 3, 2)) del x541 - x542 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x542 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x542 += einsum(t2, (0, 1, 2, 3), x502, (1, 2, 4, 5), (0, 4, 5, 3)) del x502 rdm2_f_vovv += einsum(x542, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x542, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x542 - x543 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x543 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x543 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) rdm2_f_vvov += einsum(x543, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x543, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvvo += einsum(x543, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x543, (0, 1, 2, 3), (2, 1, 3, 0)) - x544 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x544 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x544 += einsum(x543, (0, 1, 2, 3), (0, 1, 2, 3)) x544 += einsum(x485, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x485 @@ -6654,7 +6655,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vvvo += einsum(x544, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x544, (0, 1, 2, 3), (2, 1, 3, 0)) del x544 - x545 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x545 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x545 += einsum(x357, (0, 1, 2, 3), l3, (4, 2, 5, 1, 0, 6), (6, 3, 4, 5)) del x357 rdm2_f_vvov += einsum(x545, (0, 1, 2, 3), (3, 2, 0, 1)) @@ -6662,41 +6663,41 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vvvo += einsum(x545, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 rdm2_f_vvvo += einsum(x545, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x545 - x546 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x546 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x546 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 1, 7), (0, 2, 6, 7)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x546, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.50000000000001 rdm2_f_vvvv += einsum(x546, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.50000000000001 del x546 - x547 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x547 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x547 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (5, 3, 4, 6, 2, 7), (0, 1, 6, 7)) rdm2_f_vvvv += einsum(x547, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 rdm2_f_vvvv += einsum(x547, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 del x547 - x548 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x548 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x548 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) rdm2_f_vvvv += einsum(x548, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x548, (0, 1, 2, 3), (1, 0, 3, 2)) - x549 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x549 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x549 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (5, 3, 4, 2, 6, 7), (0, 1, 7, 6)) - x550 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x550 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x550 += einsum(l3, (0, 1, 2, 3, 4, 5), x238, (3, 5, 4, 6, 2, 7), (6, 7, 0, 1)) * 0.16666666666667 - x551 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x551 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x551 += einsum(x32, (0, 1, 2, 3), l3, (4, 5, 2, 6, 0, 1), (6, 4, 5, 3)) del x32 - x552 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x552 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x552 += einsum(t2, (0, 1, 2, 3), x507, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 0.5 del x507 - x553 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x553 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x553 += einsum(x543, (0, 1, 2, 3), (0, 1, 2, 3)) x553 += einsum(x551, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x551 x553 += einsum(x552, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x552 - x554 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x554 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x554 += einsum(t1, (0, 1), x553, (0, 2, 3, 4), (2, 3, 4, 1)) del x553 - x555 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x555 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x555 += einsum(x548, (0, 1, 2, 3), (1, 0, 3, 2)) del x548 x555 += einsum(x549, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.16666666666667 @@ -6710,7 +6711,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vvvv += einsum(x555, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvvv += einsum(x555, (0, 1, 2, 3), (0, 1, 2, 3)) del x555 - x556 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x556 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x556 += einsum(t1, (0, 1), x258, (0, 2, 3, 4), (2, 3, 1, 4)) del x258 rdm2_f_vvvv += einsum(x556, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -6718,24 +6719,24 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vvvv += einsum(x556, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvvv += einsum(x556, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x556 - x557 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x557 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x557 += einsum(l3, (0, 1, 2, 3, 4, 5), x238, (3, 5, 4, 6, 7, 2), (6, 7, 0, 1)) * 0.16666666666667 del x238 rdm2_f_vvvv += einsum(x557, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vvvv += einsum(x557, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x557 - x558 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x558 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x558 += einsum(t1, (0, 1), x543, (0, 2, 3, 4), (3, 2, 4, 1)) del x543 rdm2_f_vvvv += einsum(x558, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x558, (0, 1, 2, 3), (1, 0, 3, 2)) del x558 - x559 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x559 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x559 += einsum(l3, (0, 1, 2, 3, 4, 5), t3, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) - x560 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x560 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x560 += einsum(t1, (0, 1), x263, (0, 2, 3, 4), (2, 3, 1, 4)) del x263 - x561 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x561 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x561 += einsum(x559, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.50000000000001 del x559 x561 += einsum(x560, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -6745,7 +6746,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_vvvv += einsum(x561, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvvv += einsum(x561, (0, 1, 2, 3), (1, 0, 3, 2)) del x561 - x562 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x562 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x562 += einsum(t1, (0, 1), x128, (0, 2, 3, 4), (1, 3, 4, 2)) * -0.5 del x128 rdm2_f_vvvv += einsum(x562, (0, 1, 2, 3), (1, 2, 3, 0)) diff --git a/ebcc/codegen/RCCSD_SD_1_1.py b/ebcc/codegen/RCCSD_SD_1_1.py index 33fdb091..616bb75f 100644 --- a/ebcc/codegen/RCCSD_SD_1_1.py +++ b/ebcc/codegen/RCCSD_SD_1_1.py @@ -2,13 +2,14 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("iajb->jiab", v.ovov) * -0.5 x0 += einsum("iajb->jiba", v.ovov) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum("ia,ijab->jb", t1, x0) e_cc = 0 e_cc += einsum("ijab,ijab->", t2, x0) * 2 @@ -16,7 +17,7 @@ def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=No x1 += einsum("ia->ia", f.ov) e_cc += einsum("ia,ia->", t1, x1) * 2 del x1 - x2 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x2 += einsum("wia->wia", u11) x2 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x2) * 2 @@ -35,159 +36,159 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2 and U11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jbka->ijkb", t1, v.ovov) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ijka", x0) * 2 x1 += einsum("ijka->ikja", x0) * -1 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ijab,kjla->kilb", t2, x0) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 -= einsum("ijka->ikja", x34) del x34 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 -= einsum("ijka->ijka", x0) x35 += einsum("ijka->ikja", x0) * 2 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ijab,klia->jklb", t2, x35) del x35 x40 += einsum("ijka->jkia", x36) del x36 - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum("ijab,klja->kilb", t2, x0) - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 -= einsum("ijka->kija", x64) del x64 - x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x86 += einsum("ia,jkla->jilk", t1, x0) del x0 - x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x87 += einsum("ijkl->lkji", x86) - x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x88 += einsum("ijkl->lkji", x86) del x86 x1 += einsum("ijka->jika", v.ooov) * -1 x1 += einsum("ijka->jkia", v.ooov) * 2 - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kjib->ka", t2, x1) * -1 del x1 - x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x2 += einsum("iabc->ibac", v.ovvv) * -0.5 x2 += einsum("iabc->ibca", v.ovvv) t1new += einsum("ijab,icba->jc", t2, x2) * 2 del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("w,wia->ia", s1, g.bov) - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum("ia->ia", x3) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x3) * 0.5 - x104 = np.zeros((nocc, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nvir), dtype=types[float]) x104 += einsum("ia->ia", x3) del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("iajb->jiab", v.ovov) * 2 x4 -= einsum("iajb->jiba", v.ovov) - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum("ia,ijba->jb", t1, x4) x6 += einsum("ia->ia", x5) del x5 - x97 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x97 += einsum("wia,ijba->wjb", u11, x4) del x4 - x99 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x99 += einsum("wia->wia", x97) - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("wia,xia->xw", u11, x97) * 2 del x97 x6 += einsum("ia->ia", f.ov) - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum("ia,jkab->jkib", x6, t2) x67 += einsum("ijka->kjia", x66) del x66 - x69 = np.zeros((nocc, nocc), dtype=np.float64) + x69 = np.zeros((nocc, nocc), dtype=types[float]) x69 += einsum("ia,ja->ij", t1, x6) - x70 = np.zeros((nocc, nocc), dtype=np.float64) + x70 = np.zeros((nocc, nocc), dtype=types[float]) x70 += einsum("ij->ij", x69) del x69 - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x6, u11) * 2 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum("ijab->jiab", t2) * 2 x7 -= einsum("ijab->jiba", t2) - x46 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x46 += einsum("wia,ijba->wjb", g.bov, x7) - x48 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x48 += einsum("wia->wia", x46) del x46 t1new += einsum("ia,ijba->jb", x6, x7) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum("iabj->ijba", v.ovvo) * 2 x8 -= einsum("ijab->ijab", v.oovv) t1new += einsum("ia,ijba->jb", t1, x8) - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new += einsum("wia,ijba->wjb", u11, x8) del x8 - x9 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x9 += einsum("ia,wja->wji", t1, g.bov) - x10 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x10 += einsum("wij->wij", x9) del x9 x10 += einsum("wij->wij", g.boo) - x47 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x47 += einsum("ia,wij->wja", t1, x10) x48 -= einsum("wia->wia", x47) del x47 t1new -= einsum("wia,wij->ja", u11, x10) del x10 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum("w,wij->ij", s1, g.boo) - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ij->ij", x11) x70 += einsum("ij->ji", x11) del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("wia,wja->ij", g.bov, u11) x20 += einsum("ij->ij", x12) - x52 = np.zeros((nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc), dtype=types[float]) x52 += einsum("ij->ij", x12) del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum("iajb->jiab", v.ovov) x13 += einsum("iajb->jiba", v.ovov) * -0.5 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("ijab,ikba->jk", t2, x13) * 2 x20 += einsum("ij->ji", x14) del x14 - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia,ijba->jb", t1, x13) x18 += einsum("ia->ia", x17) del x17 - x78 = np.zeros((nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir), dtype=types[float]) x78 += einsum("ijab,ijbc->ac", t2, x13) - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ab,ijbc->ijca", x78, t2) * 2 del x78 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("ijab->jiab", x79) del x79 - x102 = np.zeros((nocc, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nvir), dtype=types[float]) x102 += einsum("ia,ijba->jb", t1, x13) * 2 del x13 - x103 = np.zeros((nvir, nvir), dtype=np.float64) + x103 = np.zeros((nvir, nvir), dtype=types[float]) x103 += einsum("ia,ib->ab", t1, x102) * -1 del x102 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ikja", v.ooov) x15 += einsum("ijka->kija", v.ooov) * -0.5 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ia,jika->jk", t1, x15) * 2 del x15 x20 += einsum("ij->ij", x16) del x16 x18 += einsum("ia->ia", f.ov) * 0.5 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum("ia,ja->ij", t1, x18) * 2 del x18 x20 += einsum("ij->ji", x19) @@ -196,117 +197,117 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t1new += einsum("ia,ij->ja", t1, x20) * -1 u11new += einsum("ij,wia->wja", x20, u11) * -1 del x20 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum("w,wab->ab", s1, g.bvv) - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum("ab->ab", x21) - x72 = np.zeros((nvir, nvir), dtype=np.float64) + x72 = np.zeros((nvir, nvir), dtype=types[float]) x72 += einsum("ab->ab", x21) x103 += einsum("ab->ab", x21) del x21 - x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x22 += einsum("iabc->ibac", v.ovvv) * 2 x22 -= einsum("iabc->ibca", v.ovvv) - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum("ia,ibac->bc", t1, x22) x24 += einsum("ab->ab", x23) - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 -= einsum("ab->ab", x23) del x23 - x106 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x106 += einsum("wia,ibac->wbc", u11, x22) del x22 x24 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x24) del x24 - x25 = np.zeros((nbos), dtype=np.float64) + x25 = np.zeros((nbos), dtype=types[float]) x25 += einsum("ia,wia->w", t1, g.bov) - x26 = np.zeros((nbos), dtype=np.float64) + x26 = np.zeros((nbos), dtype=types[float]) x26 += einsum("w->w", x25) * 2 del x25 x26 += einsum("w->w", G) t1new += einsum("w,wia->ia", x26, u11) s1new += einsum("w,wx->x", x26, s2) del x26 - x27 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x27 += einsum("ia,bcda->ibdc", t1, v.vvvv) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum("ia,jbca->ijbc", t1, x27) del x27 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum("ijab,kjca->kibc", t2, x28) del x28 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("ijab->ijab", x29) del x29 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 -= einsum("iajb->jiab", v.ovov) x30 += einsum("iajb->jiba", v.ovov) * 2 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum("ijab,ikbc->jkac", t2, x30) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum("ijab,kica->jkbc", t2, x31) del x31 x54 += einsum("ijab->ijab", x32) del x32 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ijab,ikac->jkbc", t2, x30) * 2 del x30 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum("ijab,jkla->ilkb", t2, v.ooov) x40 -= einsum("ijka->ijka", x33) del x33 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("ia,jbca->ijcb", t1, v.ovvv) - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("ijab->jiab", x37) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ijab,kjca->kibc", t2, x37) del x37 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("ijab->ijab", x56) del x56 x38 += einsum("iabj->ijba", v.ovvo) - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum("ia,jkba->ijkb", t1, x38) del x38 x40 += einsum("ijka->ijka", x39) del x39 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum("ia,jikb->jkab", t1, x40) del x40 x54 += einsum("ijab->ijab", x41) del x41 - x42 = np.zeros((nvir, nvir), dtype=np.float64) + x42 = np.zeros((nvir, nvir), dtype=types[float]) x42 += einsum("wia,wib->ab", g.bov, u11) x43 += einsum("ab->ba", x42) - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ab,ijbc->ijca", x43, t2) del x43 x54 += einsum("ijab->jiab", x44) del x44 x103 += einsum("ab->ba", x42) * -1 del x42 - x45 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x45 += einsum("ia,wba->wib", t1, g.bvv) x48 += einsum("wia->wia", x45) del x45 x48 += einsum("wai->wia", g.bvo) - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("wia,wjb->ijab", u11, x48) del x48 x54 -= einsum("ijab->jiba", x49) del x49 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum("ijka->ikja", v.ooov) * 2 x50 -= einsum("ijka->kija", v.ooov) - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum("ia,jika->jk", t1, x50) x52 += einsum("ij->ij", x51) del x51 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum("ij,ikab->kjab", x52, t2) del x52 x54 += einsum("ijab->ijba", x53) @@ -314,61 +315,61 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijab", x54) t2new -= einsum("ijab->jiba", x54) del x54 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum("ijab,kila->jklb", t2, x50) x67 += einsum("ijka->jika", x65) del x65 - x105 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x105 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x105 += einsum("wia,jika->wjk", u11, x50) del x50 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ia,bjca->ijbc", t1, v.vovv) x74 -= einsum("ijab->ijab", x55) del x55 - x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x57 -= einsum("iabc->ibac", v.ovvv) x57 += einsum("iabc->ibca", v.ovvv) * 2 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum("ia,jbac->ijbc", t1, x57) del x57 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ijab,kica->jkbc", t2, x58) del x58 x74 -= einsum("ijab->jiab", x59) del x59 - x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum("ia,jkba->ijkb", t1, v.oovv) x67 += einsum("ijka->jika", x60) del x60 - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum("ijab,klja->iklb", t2, v.ooov) x67 -= einsum("ijka->jika", x61) del x61 - x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x62 += einsum("ia,jkla->ijlk", t1, v.ooov) - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum("ia,jkil->jkla", t1, x62) x67 -= einsum("ijka->jika", x63) del x63 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum("ia,ijkb->jkab", t1, x67) del x67 x74 += einsum("ijab->ijab", x68) del x68 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ijab,kijl->klab", t2, x62) del x62 t2new += einsum("ijab->ijba", x75) t2new += einsum("ijab->jiab", x75) del x75 x70 += einsum("ij->ji", f.oo) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum("ij,jkab->kiab", x70, t2) del x70 x74 += einsum("ijab->jiba", x71) del x71 x72 += einsum("ab->ab", f.vv) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ab,ijbc->ijca", x72, t2) del x72 x74 -= einsum("ijab->jiba", x73) @@ -376,20 +377,20 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijba", x74) t2new -= einsum("ijab->jiab", x74) del x74 - x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x76 += einsum("ijab,kbca->jikc", t2, v.ovvv) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("ia,jkib->jkab", t1, x76) del x76 x83 += einsum("ijab->ijab", x77) del x77 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum("iajb->jiab", v.ovov) * -0.5 x80 += einsum("iajb->jiba", v.ovov) - x81 = np.zeros((nocc, nocc), dtype=np.float64) + x81 = np.zeros((nocc, nocc), dtype=types[float]) x81 += einsum("ijab,ikab->jk", t2, x80) del x80 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ij,jkab->kiab", x81, t2) * 2 del x81 x83 += einsum("ijab->ijba", x82) @@ -401,7 +402,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x84 -= einsum("ijab->jiab", v.oovv) t2new += einsum("ijab,kica->kjcb", t2, x84) del x84 - x85 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x85 += einsum("ijab,kbla->ijlk", t2, v.ovov) x87 += einsum("ijkl->lkji", x85) * 0.9999999999999993 x88 += einsum("ijkl->lkji", x85) @@ -410,34 +411,34 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->klab", t2, x87) del x87 x88 += einsum("ijkl->kilj", v.oooo) - x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x89 += einsum("ia,ijkl->lkja", t1, x88) del x88 x89 += einsum("ijak->jkia", v.oovo) * -1 t2new += einsum("ia,jkib->jkab", t1, x89) del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 -= einsum("iabj->jiba", v.ovvo) x90 += einsum("ijab,jakc->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkac", t2, x90) del x90 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 -= einsum("ijab->jiab", v.oovv) x91 += einsum("ijab,jcka->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkca", t2, x91) del x91 - x92 = np.zeros((nbos, nbos), dtype=np.float64) + x92 = np.zeros((nbos, nbos), dtype=types[float]) x92 += einsum("wia,xia->wx", gc.bov, u11) - x96 = np.zeros((nbos, nbos), dtype=np.float64) + x96 = np.zeros((nbos, nbos), dtype=types[float]) x96 += einsum("wx->wx", x92) * 2 del x92 - x93 = np.zeros((nbos, nbos), dtype=np.float64) + x93 = np.zeros((nbos, nbos), dtype=types[float]) x93 += einsum("wia,xia->wx", g.bov, u11) - x94 = np.zeros((nbos, nbos), dtype=np.float64) + x94 = np.zeros((nbos, nbos), dtype=types[float]) x94 += einsum("wx->wx", x93) * 2 del x93 x94 += einsum("wx->wx", w) - x95 = np.zeros((nbos, nbos), dtype=np.float64) + x95 = np.zeros((nbos, nbos), dtype=types[float]) x95 += einsum("wx,wy->xy", s2, x94) x96 += einsum("wx->wx", x95) del x95 @@ -446,7 +447,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x96 u11new += einsum("wx,wia->xia", x94, u11) del x94 - x98 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x98 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x98 += einsum("wx,xia->wia", s2, g.bov) x99 += einsum("wia->wia", x98) del x98 @@ -455,12 +456,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new += einsum("wia,ijba->wjb", x99, x7) del x99 del x7 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum("iajb->jiab", v.ovov) * -1 x100 += einsum("iajb->jiba", v.ovov) * 2 x103 += einsum("ijab,ijcb->ac", t2, x100) * -1 del x100 - x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x101 += einsum("iabc->ibac", v.ovvv) x101 += einsum("iabc->ibca", v.ovvv) * -0.5 x103 += einsum("ia,ibac->bc", t1, x101) * 2 @@ -507,54 +508,54 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 , LS2 and LU11 amplitudes - x0 = np.zeros((nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir), dtype=types[float]) x0 += einsum("w,wia->ia", s1, g.bov) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum("ia->ia", x0) - x57 = np.zeros((nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir), dtype=types[float]) x57 += einsum("ia->ia", x0) - x67 = np.zeros((nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nvir), dtype=types[float]) x67 += einsum("ia->ia", x0) * 0.5 - x100 = np.zeros((nocc, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir), dtype=types[float]) x100 += einsum("ia->ia", x0) - x136 = np.zeros((nocc, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nvir), dtype=types[float]) x136 += einsum("ia->ia", x0) del x0 x1 += einsum("ia->ia", f.ov) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum("ia,jkab->jkib", x1, t2) * 0.25 del x1 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ijka->jkia", x2) x20 += einsum("ijka->ikja", x2) * -2 del x2 - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum("ijab,kacb->ijkc", t2, v.ovvv) - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum("ijka->ijka", x3) * -0.5 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ia,jkba->jikb", t1, x4) x11 += einsum("ijka->ijka", x5) * -0.5 del x5 - x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x131 += einsum("ijab->ijab", x4) del x4 - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum("ijab,kbla->ijlk", t2, v.ovov) - x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x9 += einsum("ijkl->jilk", x6) - x178 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x178 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x178 += einsum("ijkl->lkji", x6) del x6 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum("ia,jakb->ikjb", t1, v.ovov) - x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x8 += einsum("ia,jkla->ijkl", t1, x7) x9 += einsum("ijkl->ijkl", x8) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("ia,jkil->jkla", t1, x9) * 0.5 del x9 x11 += einsum("ijka->jika", x10) @@ -564,110 +565,110 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x11 x178 += einsum("ijkl->lkji", x8) del x8 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ijka", x7) * -1 x15 += einsum("ijka->ikja", x7) * 2 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum("ijka->ijka", x7) * 2 x24 -= einsum("ijka->ikja", x7) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 -= einsum("ijka->ijka", x7) x25 += einsum("ijka->ikja", x7) * 2 - x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x55 += einsum("ijka->jkia", x7) * -1 x55 += einsum("ijka->kjia", x7) * 2 - x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x125 += einsum("ai,ijkb->jkab", l1, x7) - x143 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x143 += einsum("ijab->ijab", x125) del x125 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum("iajb->jiab", v.ovov) x12 += einsum("iajb->jiba", v.ovov) * -0.5 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum("ia,ijba->jb", t1, x12) - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum("ia,jkab->jkib", x13, t2) * 0.5 x20 += einsum("ijka->jkia", x14) x20 += einsum("ijka->ikja", x14) * -2 del x14 x67 += einsum("ia->ia", x13) del x13 - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ia,ijba->jb", t1, x12) * 2 x57 += einsum("ia->ia", x56) del x56 - x175 = np.zeros((nocc, nocc), dtype=np.float64) + x175 = np.zeros((nocc, nocc), dtype=types[float]) x175 += einsum("ijab,ikba->jk", t2, x12) del x12 - x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x176 += einsum("ij,abik->kjab", x175, l2) * 2 del x175 - x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x177 += einsum("ijab->ijba", x176) del x176 x15 += einsum("ijka->jika", v.ooov) * 2 x15 += einsum("ijka->jkia", v.ooov) * -1 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum("ijab->jiab", t2) x16 += einsum("ijab->jiba", t2) * -0.5 x20 += einsum("ijka,klba->ijlb", x15, x16) * -0.5 del x15 - x33 = np.zeros((nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc), dtype=types[float]) x33 += einsum("abij,ikba->jk", l2, x16) * 2 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ia,jk->jkia", t1, x33) * -0.5 - x95 = np.zeros((nocc, nocc), dtype=np.float64) + x95 = np.zeros((nocc, nocc), dtype=types[float]) x95 += einsum("ij->ij", x33) - x108 = np.zeros((nocc, nocc), dtype=np.float64) + x108 = np.zeros((nocc, nocc), dtype=types[float]) x108 += einsum("ij->ij", x33) del x33 - x76 = np.zeros((nocc, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nvir), dtype=types[float]) x76 += einsum("iabc,ijca->jb", v.ovvv, x16) - x86 = np.zeros((nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc), dtype=types[float]) x86 += einsum("abij,ikba->jk", l2, x16) - x87 = np.zeros((nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc), dtype=types[float]) x87 += einsum("ij->ij", x86) - x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x171 += einsum("ij,jakb->kiab", x86, v.ovov) * 2 del x86 - x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x172 += einsum("ijab->jiba", x171) del x171 - x92 = np.zeros((nvir, nvir), dtype=np.float64) + x92 = np.zeros((nvir, nvir), dtype=types[float]) x92 += einsum("abij,ijca->bc", l2, x16) - x93 = np.zeros((nvir, nvir), dtype=np.float64) + x93 = np.zeros((nvir, nvir), dtype=types[float]) x93 += einsum("ab->ab", x92) - x170 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x170 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x170 += einsum("ab,ibjc->ijca", x92, v.ovov) * 2 x172 += einsum("ijab->jiba", x170) del x170 - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("ijab->baij", x172) * -1 l2new += einsum("ijab->abji", x172) * -1 del x172 - x180 = np.zeros((nvir, nvir), dtype=np.float64) + x180 = np.zeros((nvir, nvir), dtype=types[float]) x180 += einsum("ab->ab", x92) del x92 - x179 = np.zeros((nocc, nvir), dtype=np.float64) + x179 = np.zeros((nocc, nvir), dtype=types[float]) x179 += einsum("iabc,ijca->jb", v.ovvv, x16) * 2 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum("iabj->ijba", v.ovvo) * 2 x17 += einsum("ijab->ijab", v.oovv) * -1 x20 += einsum("ia,jkba->ijkb", t1, x17) * -0.25 del x17 - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum("ia,jkla->ijlk", t1, v.ooov) - x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x19 += einsum("ijkl->jkli", x18) x19 += einsum("ijkl->kjli", x18) * -0.5 - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 -= einsum("ijkl->ijkl", x18) x27 += einsum("ijkl->ikjl", x18) * 2 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum("ia,jikl->jkla", t1, x27) del x27 - x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x128 += einsum("abij,jkli->klba", l2, x18) del x18 x143 -= einsum("ijab->ijab", x128) @@ -678,17 +679,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x19 x20 += einsum("ijak->jika", v.oovo) * -0.5 x20 += einsum("ijak->kija", v.oovo) * 0.25 - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum("abij,jkia->bk", l2, x20) * 4 del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 -= einsum("ijab->jiab", t2) x21 += einsum("ijab->jiba", t2) * 2 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 -= einsum("abij,ikac->jkbc", l2, x21) del x21 x22 += einsum("abij,jkac->ikbc", l2, t2) - x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x23 -= einsum("iabc->ibca", v.ovvv) x23 += einsum("iabc->ibac", v.ovvv) * 2 l1new -= einsum("ijab,jabc->ci", x22, x23) @@ -702,16 +703,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x25 -= einsum("ijka->jkia", v.ooov) x28 += einsum("ijab,kilb->klja", t2, x25) del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 -= einsum("iabj->ijba", v.ovvo) x26 += einsum("ijab->ijab", v.oovv) * 2 x28 -= einsum("ia,jkba->ijkb", t1, x26) del x26 l1new += einsum("abij,jkib->ak", l2, x28) del x28 - x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x29 += einsum("ia,bacd->icbd", t1, v.vvvv) - x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x30 += einsum("iabc->iabc", x29) x30 += einsum("iabc->ibac", x29) * -0.5 del x29 @@ -719,101 +720,101 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x30 += einsum("aibc->ibac", v.vovv) l1new += einsum("abij,ibac->cj", l2, x30) * 2 del x30 - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum("ia,abjk->kjib", t1, l2) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum("ijka->ijka", x31) * 2 x32 += einsum("ijka->jika", x31) * -1 x34 += einsum("ijab,ikla->kljb", t2, x32) * -0.5 del x32 x34 += einsum("ijab,jkla->klib", t2, x31) * 0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 -= einsum("ijka->ijka", x31) x36 += einsum("ijka->jika", x31) * 2 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("ia,ijkb->jkba", t1, x36) l1new -= einsum("iabc,jiba->cj", v.ovvv, x37) del x37 l1new -= einsum("iabj,kjib->ak", v.ovvo, x36) del x36 - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum("ijka->ijka", x31) * 2 x38 -= einsum("ijka->jika", x31) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ia,ijkb->jkba", t1, x38) l1new -= einsum("iabc,jibc->aj", v.ovvv, x39) del x39 - x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x157 += einsum("ijka,jlkb->liba", x38, x7) - x169 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x169 -= einsum("ijab->jiba", x157) del x157 l1new -= einsum("ijab,kjia->bk", v.oovv, x38) del x38 - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum("ijab,kjla->klib", t2, x31) - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum("ijka->ijka", x42) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum("ijka->ijka", x42) del x42 - x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x47 += einsum("ia,jkla->kjli", t1, x31) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum("ia,ijkl->jlka", t1, x47) x49 += einsum("ijka->ijka", x48) * -2.0000000000000013 x49 += einsum("ijka->ikja", x48) del x48 - x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x51 += einsum("ijkl->ijkl", x47) x51 += einsum("ijkl->ijlk", x47) * -0.5 l1new += einsum("ijka,ljki->al", v.ooov, x51) * 2 del x51 l2new += einsum("iajb,klij->abkl", v.ovov, x47) del x47 - x81 = np.zeros((nocc, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nvir), dtype=types[float]) x81 += einsum("ijab,ijkb->ka", x16, x31) - x89 = np.zeros((nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nvir), dtype=types[float]) x89 += einsum("ia->ia", x81) del x81 - x127 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x127 += einsum("ijka,jlkb->liba", v.ooov, x31) x143 -= einsum("ijab->ijab", x127) del x127 - x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x129 += einsum("ijka,iklb->jlab", x31, x7) x143 -= einsum("ijab->ijab", x129) del x129 - x146 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x146 += einsum("ijka,jlib->lkba", v.ooov, x31) x169 += einsum("ijab->ijab", x146) del x146 - x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x147 += einsum("iabc,jkib->kjac", v.ovvv, x31) x169 -= einsum("ijab->ijab", x147) del x147 - x148 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x148 += einsum("ijka,jklb->ilab", x31, x7) del x7 x169 += einsum("ijab->ijab", x148) del x148 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 -= einsum("iajb->jiab", v.ovov) x35 += einsum("iajb->jiba", v.ovov) * 2 l1new += einsum("ijka,kjab->bi", x34, x35) * 2 del x34 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("abij,jkca->ikbc", l2, t2) - x41 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x41 += einsum("iabc->ibca", v.ovvv) * 2 x41 -= einsum("iabc->ibac", v.ovvv) - x104 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x104 += einsum("wia,ibca->wbc", u11, x41) - x115 = np.zeros((nvir, nvir), dtype=np.float64) + x115 = np.zeros((nvir, nvir), dtype=types[float]) x115 += einsum("ia,ibca->bc", t1, x41) - x116 = np.zeros((nvir, nvir), dtype=np.float64) + x116 = np.zeros((nvir, nvir), dtype=types[float]) x116 += einsum("ab->ab", x115) - x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x164 += einsum("ab,acij->ijcb", x115, l2) del x115 x169 += einsum("ijab->jiab", x164) @@ -821,40 +822,40 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new -= einsum("ijab,jabc->ci", x40, x41) del x40 del x41 - x43 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x43 += einsum("abij,klab->ijkl", l2, t2) - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum("ia,jikl->jkla", t1, x43) x45 += einsum("ijka->ijka", x44) * -0.5 x45 += einsum("ijka->ikja", x44) del x44 l1new += einsum("iajb,kjib->ak", v.ovov, x45) * 2 del x45 - x50 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x50 += einsum("ijkl->jikl", x43) * -0.5 x50 += einsum("ijkl->jilk", x43) l1new += einsum("ijka,jlik->al", v.ooov, x50) * 2 del x50 l2new += einsum("iajb,klij->balk", v.ovov, x43) del x43 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum("ai,jkab->ikjb", l1, t2) x49 += einsum("ijka->ijka", x46) * -1 x49 += einsum("ijka->ikja", x46) * 2 del x46 l1new += einsum("iajb,kjia->bk", v.ovov, x49) * -1 del x49 - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("w,wai->ia", s1, g.bvo) x76 += einsum("ia->ia", x52) * 0.5 x179 += einsum("ia->ia", x52) del x52 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum("wab,wib->ia", g.bvv, u11) x76 += einsum("ia->ia", x53) * 0.5 x179 += einsum("ia->ia", x53) del x53 - x54 = np.zeros((nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir), dtype=types[float]) x54 += einsum("ijab,ikja->kb", t2, v.ooov) x76 += einsum("ia->ia", x54) * 0.5 x179 += einsum("ia->ia", x54) @@ -867,49 +868,49 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x76 += einsum("ia,ijba->jb", x57, x16) x179 += einsum("ia,ijba->jb", x57, x16) * 2 del x16 - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("w,ia->wai", ls1, x57) * 2 del x57 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum("iabj->ijba", v.ovvo) x58 += einsum("ijab->ijab", v.oovv) * -0.5 x76 += einsum("ia,ijba->jb", t1, x58) x179 += einsum("ia,ijba->jb", t1, x58) * 2 del x58 - x59 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x59 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x59 += einsum("ia,wja->wji", t1, g.bov) - x60 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x60 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x60 += einsum("wij->wij", x59) - x110 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x110 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x110 += einsum("wij->wij", x59) del x59 x60 += einsum("wij->wij", g.boo) x76 += einsum("wia,wij->ja", u11, x60) * -0.5 x179 += einsum("wia,wij->ja", u11, x60) * -1 del x60 - x61 = np.zeros((nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc), dtype=types[float]) x61 += einsum("w,wij->ij", s1, g.boo) - x69 = np.zeros((nocc, nocc), dtype=np.float64) + x69 = np.zeros((nocc, nocc), dtype=types[float]) x69 += einsum("ij->ij", x61) - x138 = np.zeros((nocc, nocc), dtype=np.float64) + x138 = np.zeros((nocc, nocc), dtype=types[float]) x138 += einsum("ij->ij", x61) del x61 - x62 = np.zeros((nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc), dtype=types[float]) x62 += einsum("wia,wja->ij", g.bov, u11) x69 += einsum("ij->ij", x62) x138 += einsum("ij->ij", x62) del x62 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum("iajb->jiab", v.ovov) * -0.5 x63 += einsum("iajb->jiba", v.ovov) - x64 = np.zeros((nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc), dtype=types[float]) x64 += einsum("ijab,ikab->jk", t2, x63) * 2 x69 += einsum("ij->ji", x64) del x64 - x173 = np.zeros((nvir, nvir), dtype=np.float64) + x173 = np.zeros((nvir, nvir), dtype=types[float]) x173 += einsum("ijab,ijcb->ac", t2, x63) del x63 - x174 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x174 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x174 += einsum("ab,acij->ijcb", x173, l2) * 2 del x173 x177 += einsum("ijab->jiab", x174) @@ -917,16 +918,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x177) * -1 l2new += einsum("ijab->baji", x177) * -1 del x177 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum("ijka->ikja", v.ooov) * -0.5 x65 += einsum("ijka->kija", v.ooov) - x66 = np.zeros((nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc), dtype=types[float]) x66 += einsum("ia,ijka->jk", t1, x65) * 2 del x65 x69 += einsum("ij->ij", x66) del x66 x67 += einsum("ia->ia", f.ov) * 0.5 - x68 = np.zeros((nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc), dtype=types[float]) x68 += einsum("ia,ja->ij", t1, x67) * 2 del x67 x69 += einsum("ij->ji", x68) @@ -936,18 +937,18 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x179 += einsum("ia,ij->ja", t1, x69) * -1 l1new += einsum("ai,ji->aj", l1, x69) * -1 del x69 - x70 = np.zeros((nvir, nvir), dtype=np.float64) + x70 = np.zeros((nvir, nvir), dtype=types[float]) x70 += einsum("w,wab->ab", s1, g.bvv) - x73 = np.zeros((nvir, nvir), dtype=np.float64) + x73 = np.zeros((nvir, nvir), dtype=types[float]) x73 += einsum("ab->ab", x70) x116 += einsum("ab->ab", x70) - x134 = np.zeros((nvir, nvir), dtype=np.float64) + x134 = np.zeros((nvir, nvir), dtype=types[float]) x134 += einsum("ab->ab", x70) del x70 - x71 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x71 += einsum("iabc->ibca", v.ovvv) x71 += einsum("iabc->ibac", v.ovvv) * -0.5 - x72 = np.zeros((nvir, nvir), dtype=np.float64) + x72 = np.zeros((nvir, nvir), dtype=types[float]) x72 += einsum("ia,ibca->bc", t1, x71) * 2 del x71 x73 += einsum("ab->ab", x72) @@ -956,11 +957,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x76 += einsum("ia,ba->ib", t1, x73) * 0.5 x179 += einsum("ia,ba->ib", t1, x73) del x73 - x74 = np.zeros((nbos), dtype=np.float64) + x74 = np.zeros((nbos), dtype=types[float]) x74 += einsum("ia,wia->w", t1, g.bov) - x75 = np.zeros((nbos), dtype=np.float64) + x75 = np.zeros((nbos), dtype=types[float]) x75 += einsum("w->w", x74) * 2 - x120 = np.zeros((nbos), dtype=np.float64) + x120 = np.zeros((nbos), dtype=types[float]) x120 += einsum("w->w", x74) * 2 del x74 x75 += einsum("w->w", G) @@ -968,54 +969,54 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x179 += einsum("w,wia->ia", x75, u11) del x75 x76 += einsum("ai->ia", f.vo) * 0.5 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("abij->jiab", l2) * -1 x77 += einsum("abij->jiba", l2) * 2 l1new += einsum("ia,ijab->bj", x76, x77) * 2 del x76 del x77 - x78 = np.zeros((nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir), dtype=types[float]) x78 += einsum("w,wia->ia", ls1, u11) x89 += einsum("ia->ia", x78) * -0.5 del x78 - x79 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x79 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x79 += einsum("ia,waj->wji", t1, lu11) - x80 = np.zeros((nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nvir), dtype=types[float]) x80 += einsum("wia,wij->ja", u11, x79) x89 += einsum("ia->ia", x80) * 0.5 del x80 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ijab->jiab", t2) * -1 x82 += einsum("ijab->jiba", t2) * 2 - x83 = np.zeros((nocc, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir), dtype=types[float]) x83 += einsum("ai,ijab->jb", l1, x82) * 0.5 del x82 x89 += einsum("ia->ia", x83) * -1 del x83 - x84 = np.zeros((nocc, nocc), dtype=np.float64) + x84 = np.zeros((nocc, nocc), dtype=types[float]) x84 += einsum("ai,ja->ij", l1, t1) x87 += einsum("ij->ij", x84) * 0.5 x95 += einsum("ij->ij", x84) - x140 = np.zeros((nocc, nocc), dtype=np.float64) + x140 = np.zeros((nocc, nocc), dtype=types[float]) x140 += einsum("ij->ij", x84) - x85 = np.zeros((nocc, nocc), dtype=np.float64) + x85 = np.zeros((nocc, nocc), dtype=types[float]) x85 += einsum("wai,wja->ij", lu11, u11) x87 += einsum("ij->ij", x85) * 0.5 - x88 = np.zeros((nocc, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir), dtype=types[float]) x88 += einsum("ia,ij->ja", t1, x87) del x87 x89 += einsum("ia->ia", x88) del x88 x95 += einsum("ij->ij", x85) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new += einsum("ij,wji->w", x95, g.boo) * -2 x108 += einsum("ij->ij", x85) - x109 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x109 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x109 += einsum("w,ij->wij", s1, x108) l1new += einsum("ia,ji->aj", f.ov, x108) * -1 del x108 x140 += einsum("ij->ij", x85) - x141 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x141 += einsum("ij,jakb->kiab", x140, v.ovov) del x140 x143 += einsum("ijab->jiba", x141) @@ -1025,15 +1026,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x35 ls1new += einsum("ia,wia->w", x89, g.bov) * -4 del x89 - x90 = np.zeros((nvir, nvir), dtype=np.float64) + x90 = np.zeros((nvir, nvir), dtype=types[float]) x90 += einsum("ai,ib->ab", l1, t1) x93 += einsum("ab->ab", x90) * 0.5 ls1new += einsum("ab,wab->w", x90, g.bvv) * 2 del x90 - x91 = np.zeros((nvir, nvir), dtype=np.float64) + x91 = np.zeros((nvir, nvir), dtype=types[float]) x91 += einsum("wai,wib->ab", lu11, u11) x93 += einsum("ab->ab", x91) * 0.5 - x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x126 += einsum("ab,icjb->ijac", x91, v.ovov) x143 += einsum("ijab->ijab", x126) del x126 @@ -1041,45 +1042,45 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x91 ls1new += einsum("ab,wab->w", x180, g.bvv) * 4 del x180 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum("iabc->ibca", v.ovvv) * 2 x94 += einsum("iabc->ibac", v.ovvv) * -1 l1new += einsum("ab,iabc->ci", x93, x94) * 2 del x93 del x94 - x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x96 += einsum("ijka->ikja", v.ooov) * 2 x96 += einsum("ijka->kija", v.ooov) * -1 l1new += einsum("ij,jkia->ak", x95, x96) * -1 del x96 del x95 - x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x97 -= einsum("ijka->ikja", v.ooov) x97 += einsum("ijka->kija", v.ooov) * 2 - x103 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x103 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x103 += einsum("wia,ijka->wjk", u11, x97) - x160 = np.zeros((nocc, nocc), dtype=np.float64) + x160 = np.zeros((nocc, nocc), dtype=types[float]) x160 += einsum("ia,ijka->jk", t1, x97) del x97 - x162 = np.zeros((nocc, nocc), dtype=np.float64) + x162 = np.zeros((nocc, nocc), dtype=types[float]) x162 += einsum("ij->ij", x160) del x160 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum("iajb->jiab", v.ovov) * 2 x98 -= einsum("iajb->jiba", v.ovov) - x99 = np.zeros((nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir), dtype=types[float]) x99 += einsum("ia,ijba->jb", t1, x98) x100 += einsum("ia->ia", x99) - x161 = np.zeros((nocc, nocc), dtype=np.float64) + x161 = np.zeros((nocc, nocc), dtype=types[float]) x161 += einsum("ia,ja->ij", t1, x99) x162 += einsum("ij->ji", x161) del x161 - x163 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x163 += einsum("ij,abjk->kiab", x162, l2) del x162 x169 -= einsum("ijab->ijba", x163) del x163 - x167 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x167 += einsum("ia,jkib->jkba", x99, x31) x169 -= einsum("ijab->ijab", x167) del x167 @@ -1087,23 +1088,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new -= einsum("ij,ja->ai", x85, x99) del x99 del x85 - x101 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x101 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x101 += einsum("wia,ijba->wjb", u11, x98) del x98 - x102 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x102 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x102 += einsum("wia->wia", x101) - x114 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x114 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x114 += einsum("wia->wia", x101) - x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x168 += einsum("wai,wjb->ijab", lu11, x101) del x101 x169 += einsum("ijab->ijab", x168) del x168 x100 += einsum("ia->ia", f.ov) x103 += einsum("ia,wja->wij", x100, u11) - x119 = np.zeros((nbos), dtype=np.float64) + x119 = np.zeros((nbos), dtype=types[float]) x119 += einsum("ia,wia->w", x100, u11) - x122 = np.zeros((nbos), dtype=np.float64) + x122 = np.zeros((nbos), dtype=types[float]) x122 += einsum("w->w", x119) * 2 del x119 l1new -= einsum("ia,ji->aj", x100, x84) @@ -1121,14 +1122,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x104 += einsum("wx,wab->xab", s2, g.bvv) l1new += einsum("wai,wab->bi", lu11, x104) del x104 - x105 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x105 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x105 += einsum("wx,xai->wia", s2, lu11) - x107 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x107 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x107 += einsum("wia->wia", x105) - x165 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x165 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x165 += einsum("wia->wia", x105) del x105 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum("abij->jiab", l2) x106 += einsum("abij->jiba", l2) * -0.5 x107 += einsum("wia,ijba->wjb", u11, x106) * 2 @@ -1139,19 +1140,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("wia,wji->aj", g.bov, x109) * -1 del x109 x110 += einsum("wij->wij", g.boo) - x186 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x186 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x186 += einsum("ia,wij->wja", t1, x110) - x187 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x187 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x187 -= einsum("wia->wia", x186) del x186 - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 += einsum("abij->jiab", l2) * 2 x111 -= einsum("abij->jiba", l2) - x112 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x112 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x112 += einsum("wia,ijba->wjb", u11, x111) del x111 x165 += einsum("wia->wia", x112) - x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x166 += einsum("wia,wjb->ijab", g.bov, x165) del x165 x169 += einsum("ijab->ijab", x166) @@ -1160,7 +1161,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x110 l1new += einsum("wab,wia->bi", g.bvv, x112) del x112 - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum("iabj->ijba", v.ovvo) * 2 x113 -= einsum("ijab->ijab", v.oovv) l1new += einsum("ai,jiab->bj", l1, x113) @@ -1173,73 +1174,73 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x116 += einsum("ab->ab", f.vv) l1new += einsum("ai,ab->bi", l1, x116) del x116 - x117 = np.zeros((nbos), dtype=np.float64) + x117 = np.zeros((nbos), dtype=types[float]) x117 += einsum("w,wx->x", s1, w) x122 += einsum("w->w", x117) del x117 - x118 = np.zeros((nbos), dtype=np.float64) + x118 = np.zeros((nbos), dtype=types[float]) x118 += einsum("ia,wia->w", t1, gc.bov) x122 += einsum("w->w", x118) * 2 del x118 x120 += einsum("w->w", G) - x121 = np.zeros((nbos), dtype=np.float64) + x121 = np.zeros((nbos), dtype=types[float]) x121 += einsum("w,wx->x", x120, s2) x122 += einsum("w->w", x121) del x121 - x189 = np.zeros((nbos, nbos), dtype=np.float64) + x189 = np.zeros((nbos, nbos), dtype=types[float]) x189 += einsum("w,x->xw", ls1, x120) del x120 x122 += einsum("w->w", G) l1new += einsum("w,wai->ai", x122, lu11) ls1new += einsum("w,wx->x", x122, ls2) del x122 - x123 = np.zeros((nbos), dtype=np.float64) + x123 = np.zeros((nbos), dtype=types[float]) x123 += einsum("w->w", s1) x123 += einsum("w,xw->x", ls1, s2) x123 += einsum("ai,wia->w", l1, u11) * 2 l1new += einsum("w,wia->ai", x123, g.bov) del x123 - x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x124 += einsum("ai,jbac->ijbc", l1, v.ovvv) x143 -= einsum("ijab->ijab", x124) del x124 - x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x130 += einsum("ijab,kbic->jkac", t2, v.ovov) x131 -= einsum("ijab->ijab", x130) del x130 x131 += einsum("ijab->jiab", v.oovv) - x132 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x132 += einsum("abij,ikbc->jkac", l2, x131) x143 += einsum("ijab->ijab", x132) del x132 - x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x156 += einsum("abij,ikac->jkbc", l2, x131) del x131 x169 -= einsum("ijab->ijab", x156) del x156 - x133 = np.zeros((nvir, nvir), dtype=np.float64) + x133 = np.zeros((nvir, nvir), dtype=types[float]) x133 += einsum("wia,wib->ab", g.bov, u11) x134 -= einsum("ab->ba", x133) del x133 x134 += einsum("ab->ab", f.vv) - x135 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x135 += einsum("ab,acij->ijcb", x134, l2) del x134 x143 -= einsum("ijab->jiba", x135) del x135 x136 += einsum("ia->ia", f.ov) - x137 = np.zeros((nocc, nocc), dtype=np.float64) + x137 = np.zeros((nocc, nocc), dtype=types[float]) x137 += einsum("ia,ja->ij", t1, x136) x138 += einsum("ij->ji", x137) del x137 - x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x142 += einsum("ia,jkib->jkba", x136, x31) x143 += einsum("ijab->ijba", x142) del x142 x169 += einsum("ai,jb->jiba", l1, x136) del x136 x138 += einsum("ij->ij", f.oo) - x139 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x139 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x139 += einsum("ij,abjk->kiab", x138, l2) del x138 x143 += einsum("ijab->jiba", x139) @@ -1247,50 +1248,50 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->baij", x143) l2new -= einsum("ijab->abji", x143) del x143 - x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x144 += einsum("wia,wbj->ijab", gc.bov, lu11) x169 += einsum("ijab->ijab", x144) del x144 - x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x145 += einsum("ai,jikb->jkab", l1, v.ooov) x169 -= einsum("ijab->ijab", x145) del x145 - x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x149 -= einsum("abij->jiab", l2) x149 += einsum("abij->jiba", l2) * 2 lu11new += einsum("wai,ijab->wbj", g.bvo, x149) - x150 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x150 += einsum("ia,jbca->ijcb", t1, v.ovvv) - x154 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x154 += einsum("ijab->ijab", x150) del x150 - x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x151 += einsum("ijab,kaic->jkbc", t2, v.ovov) x154 -= einsum("ijab->ijab", x151) del x151 - x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x152 += einsum("ijab->jiab", t2) * 2 x152 -= einsum("ijab->jiba", t2) - x153 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x153 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x153 += einsum("iajb,ikca->jkbc", v.ovov, x152) x154 += einsum("ijab->jiba", x153) del x153 - x185 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x185 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x185 += einsum("wia,ijba->wjb", g.bov, x152) del x152 x187 += einsum("wia->wia", x185) del x185 x154 += einsum("iabj->jiba", v.ovvo) - x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x155 += einsum("ijab,ikac->jkbc", x149, x154) del x154 del x149 x169 += einsum("ijab->ijab", x155) del x155 - x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x158 += einsum("ijka->ikja", v.ooov) * 2 x158 -= einsum("ijka->kija", v.ooov) - x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x159 += einsum("ijka,lkib->ljba", x158, x31) del x158 del x31 @@ -1305,28 +1306,28 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x179 += einsum("ai->ia", f.vo) ls1new += einsum("ia,wai->w", x179, lu11) * 2 del x179 - x181 = np.zeros((nbos, nbos), dtype=np.float64) + x181 = np.zeros((nbos, nbos), dtype=types[float]) x181 += einsum("wx,yx->wy", ls2, w) x189 += einsum("wx->wx", x181) del x181 - x182 = np.zeros((nbos, nbos), dtype=np.float64) + x182 = np.zeros((nbos, nbos), dtype=types[float]) x182 += einsum("wia,xia->wx", g.bov, u11) - x183 = np.zeros((nbos, nbos), dtype=np.float64) + x183 = np.zeros((nbos, nbos), dtype=types[float]) x183 += einsum("wx,yx->yw", ls2, x182) del x182 x189 += einsum("wx->wx", x183) * 2 del x183 - x184 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x184 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x184 += einsum("ia,wba->wib", t1, g.bvv) x187 += einsum("wia->wia", x184) del x184 x187 += einsum("wai->wia", g.bvo) - x188 = np.zeros((nbos, nbos), dtype=np.float64) + x188 = np.zeros((nbos, nbos), dtype=types[float]) x188 += einsum("wai,xia->wx", lu11, x187) del x187 x189 += einsum("wx->xw", x188) * 2 del x188 - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("wx->wx", x189) ls2new += einsum("wx->xw", x189) del x189 @@ -1360,56 +1361,56 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("ai,ja->ij", l1, t1) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("ij->ij", x0) - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo -= einsum("ij->ij", x0) * 2 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("wai,wja->ij", lu11, u11) x8 += einsum("ij->ij", x1) rdm1_f_oo -= einsum("ij->ij", x1) * 2 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum("ijab->jiab", t2) * 2 x2 += einsum("ijab->jiba", t2) * -1 rdm1_f_oo += einsum("abij,ikba->jk", l2, x2) * -2 del x2 - x3 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x3 += einsum("ia,waj->wji", t1, lu11) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo -= einsum("wia,wij->aj", u11, x3) * 2 del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ia,abjk->kjib", t1, l2) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ijka->ijka", x4) * -1 x5 += einsum("ijka->jika", x4) * 2 del x4 rdm1_f_vo += einsum("ijab,jika->bk", t2, x5) * -2 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum("ijab->jiab", t2) * 2 x6 -= einsum("ijab->jiba", t2) rdm1_f_vo += einsum("ai,ijba->bj", l1, x6) * 2 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum("ijab->jiab", t2) * -0.5 x7 += einsum("ijab->jiba", t2) x8 += einsum("abij,ikab->jk", l2, x7) * 2 del x7 rdm1_f_vo += einsum("ia,ij->aj", t1, x8) * -2 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum("abij->jiab", l2) * -0.5 x9 += einsum("abij->jiba", l2) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("ijab,ijac->bc", t2, x9) * 4 del x9 rdm1_f_oo += einsum("ij->ji", delta_oo) * 2 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) * 2 rdm1_f_vo += einsum("ia->ai", t1) * 2 rdm1_f_vo += einsum("w,wia->ai", ls1, u11) * 2 @@ -1433,132 +1434,132 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2, t2) - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum("ia,jikl->jkla", t1, x0) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum("ijka->ijka", x23) * 4 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ijka->ajik", x23) * -2 rdm2_f_vooo += einsum("ijka->akij", x23) * 4 del x23 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum("ijkl->jkil", x0) * -2 rdm2_f_oooo += einsum("ijkl->jlik", x0) * 4 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ia,abjk->kjib", t1, l2) - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1, x1) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("ia,ijkl->jlka", t1, x2) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 -= einsum("ijka->ijka", x10) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ijka->ijka", x10) - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum("ia,ijkb->jkab", t1, x10) del x10 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum("ijab->ijab", x67) del x67 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ijab,jikl->lkab", t2, x2) - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum("ijab->ijab", x75) * 2.0000000000000013 del x75 rdm2_f_oooo += einsum("ijkl->ikjl", x2) * 4 rdm2_f_oooo -= einsum("ijkl->iljk", x2) * 2 del x2 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum("ijab,jkla->klib", t2, x1) x18 -= einsum("ijka->ijka", x9) del x9 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum("ijka->ijka", x1) * 2 x11 -= einsum("ijka->jika", x1) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ijab,ikla->kljb", t2, x11) x18 += einsum("ijka->ijka", x12) del x12 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum("ia,jikb->jkba", t1, x11) del x11 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->iabj", x51) * 2 - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->bjia", x51) * 2 del x51 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ijab,kjla->klib", t2, x1) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 -= einsum("ijka->ijka", x20) - x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x80 -= einsum("ijka->ijka", x20) del x20 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum("ijka->ijka", x1) x24 += einsum("ijka->jika", x1) * -0.5 - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum("ijab,jikb->ka", t2, x24) * 2 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum("ia->ia", x25) del x25 - x36 = np.zeros((nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nvir), dtype=types[float]) x36 += einsum("ijab,jikb->ka", t2, x24) del x24 - x38 = np.zeros((nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nvir), dtype=types[float]) x38 += einsum("ia->ia", x36) del x36 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum("ijab,kjlb->klia", t2, x1) x35 += einsum("ijka->ijka", x32) - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum("ijka->ijka", x32) del x32 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 -= einsum("ijka->ijka", x1) x43 += einsum("ijka->jika", x1) * 2 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum("ia,jikb->jkba", t1, x43) del x43 - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv -= einsum("ijab->ijba", x44) * 2 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo -= einsum("ijab->baij", x44) * 2 del x44 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum("ia,jikb->jkba", t1, x1) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum("ijab->ijab", x92) del x92 - x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum("ijab,ijkc->kcab", t2, x1) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->bica", x100) * 2 rdm2_f_vovv += einsum("iabc->ciba", x100) * -4 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->baci", x100) * -4 rdm2_f_vvvo += einsum("iabc->cabi", x100) * 2 del x100 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum("ijka->ikja", x1) * 2 rdm2_f_ooov -= einsum("ijka->jkia", x1) * 4 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo -= einsum("ijka->iajk", x1) * 4 rdm2_f_ovoo += einsum("ijka->jaik", x1) * 2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("ai,ja->ij", l1, t1) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum("ij->ij", x3) - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum("ia,ij->ja", t1, x3) - x31 = np.zeros((nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir), dtype=types[float]) x31 -= einsum("ia->ia", x30) del x30 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ij,kiab->jkab", x3, t2) - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ijab->ijab", x79) del x79 rdm2_f_oooo -= einsum("ij,kl->jikl", delta_oo, x3) * 4 @@ -1566,26 +1567,26 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jlki", delta_oo, x3) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x3) * 4 del x3 - x4 = np.zeros((nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc), dtype=types[float]) x4 += einsum("wai,wja->ij", lu11, u11) - x14 = np.zeros((nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nvir), dtype=types[float]) x14 += einsum("ia,ij->ja", t1, x4) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia->ia", x14) del x14 x21 += einsum("ij->ij", x4) x22 += einsum("ia,jk->jika", t1, x21) - x85 = np.zeros((nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nvir), dtype=types[float]) x85 += einsum("ia,ij->ja", t1, x21) del x21 - x86 = np.zeros((nocc, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nvir), dtype=types[float]) x86 += einsum("ia->ia", x85) - x87 = np.zeros((nocc, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nvir), dtype=types[float]) x87 += einsum("ia->ia", x85) del x85 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ij,kiab->kjab", x4, t2) - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum("ijab->ijab", x56) del x56 rdm2_f_oooo -= einsum("ij,kl->ijkl", delta_oo, x4) * 4 @@ -1593,32 +1594,32 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->kijl", delta_oo, x4) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x4) * 4 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum("ijab->jiab", t2) x5 += einsum("ijab->jiba", t2) * -0.5 - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum("abij,ikba->kj", l2, x5) del x5 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ia,ji->ja", t1, x6) * 2 x27 += einsum("ia->ia", x26) del x26 x28 += einsum("ij,ka->jika", delta_oo, x27) * -4 del x27 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ijka->ijak", x28) rdm2_f_oovo += einsum("ijka->ikaj", x28) * -0.5 del x28 - x37 = np.zeros((nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nvir), dtype=types[float]) x37 += einsum("ia,ji->ja", t1, x6) x38 += einsum("ia->ia", x37) del x37 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("ia,jb->ijab", t1, x38) * 8.000000000000005 rdm2_f_vooo += einsum("ij,ka->ajik", delta_oo, x38) * 4 rdm2_f_vooo += einsum("ij,ka->akij", delta_oo, x38) * -8 del x38 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ij,jkab->ikab", x6, t2) * 8 x74 += einsum("ijab->jiba", x73) del x73 @@ -1631,29 +1632,29 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ia,jk->aikj", t1, x6) * -8 rdm2_f_vooo += einsum("ia,jk->ajki", t1, x6) * 4 del x6 - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("ia,waj->wji", t1, lu11) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("wia,wjk->jkia", u11, x7) x18 += einsum("ijka->ijka", x8) x35 -= einsum("ijka->ijka", x8) del x8 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum("wia,wij->ja", u11, x7) x17 += einsum("ia->ia", x13) x86 += einsum("ia->ia", x13) x87 += einsum("ia->ia", x13) del x13 - x60 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x60 += einsum("ia,wij->wja", t1, x7) del x7 - x62 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x62 += einsum("wia->wia", x60) del x60 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 -= einsum("ijab->jiab", t2) x15 += einsum("ijab->jiba", t2) * 2 - x16 = np.zeros((nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir), dtype=types[float]) x16 += einsum("ai,ijab->jb", l1, x15) x17 -= einsum("ia->ia", x16) x18 += einsum("ij,ka->jika", delta_oo, x17) @@ -1665,21 +1666,21 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x17 x64 -= einsum("ia,jb->ijab", t1, x16) del x16 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("abij,ikac->kjcb", l2, x15) x93 -= einsum("ijab->jiba", x54) rdm2_f_vvoo -= einsum("ijab->abji", x54) * 2 del x54 - x61 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x61 += einsum("wai,ijab->wjb", lu11, x15) x62 -= einsum("wia->wia", x61) del x61 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum("wia,wjb->ijab", u11, x62) del x62 x64 += einsum("ijab->jiba", x63) del x63 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ai,jkab->ikjb", l1, t2) x22 += einsum("ijka->ijka", x19) rdm2_f_oovo += einsum("ijka->ijak", x22) * 2 @@ -1689,18 +1690,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x22 x80 += einsum("ijka->ijka", x19) del x19 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("ia,ijkb->jkba", t1, x80) del x80 x82 += einsum("ijab->ijba", x81) del x81 - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->aibj", x82) * 2 rdm2_f_vovo -= einsum("ijab->biaj", x82) * 4 rdm2_f_vovo -= einsum("ijab->ajbi", x82) * 4 rdm2_f_vovo += einsum("ijab->bjai", x82) * 2 del x82 - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum("w,wia->ia", ls1, u11) x31 += einsum("ia->ia", x29) x86 -= einsum("ia->ia", x29) @@ -1715,10 +1716,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ij,ka->akji", delta_oo, x31) * 4 rdm2_f_vooo -= einsum("ij,ka->aijk", delta_oo, x31) * 2 del x31 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ijab->jiab", t2) * 2 x33 -= einsum("ijab->jiba", t2) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ijka,ilba->ljkb", x1, x33) del x1 x35 -= einsum("ijka->jkia", x34) @@ -1727,61 +1728,61 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x35 x58 -= einsum("ijka->jkia", x34) del x34 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ia,ijkb->jkba", t1, x58) del x58 x64 -= einsum("ijab->ijba", x59) del x59 rdm2_f_vvoo -= einsum("abij,ikbc->cajk", l2, x33) * 2 del x33 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_oovv -= einsum("ijab->ijba", x39) * 2 rdm2_f_ovvo += einsum("ijab->iabj", x39) * 4 rdm2_f_voov += einsum("ijab->bjia", x39) * 4 rdm2_f_vvoo -= einsum("ijab->baij", x39) * 2 del x39 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 -= einsum("abij->jiab", l2) x40 += einsum("abij->jiba", l2) * 2 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum("ijab,ikac->kjcb", t2, x40) - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ijab,ikbc->kjca", t2, x41) x64 += einsum("ijab->ijab", x57) del x57 - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum("ijab,ikac->kjcb", t2, x41) x69 += einsum("ijab->ijab", x68) * 2 del x68 rdm2_f_oovv -= einsum("ijab->ijba", x41) * 2 del x41 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ijab,ikac->jkbc", x15, x40) del x40 del x15 rdm2_f_ovvo += einsum("ijab->jbai", x50) * 2 rdm2_f_voov += einsum("ijab->aijb", x50) * 2 del x50 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("abij->jiab", l2) * 2 x42 -= einsum("abij->jiba", l2) rdm2_f_oovv -= einsum("ijab,ikbc->kjac", t2, x42) * 2 del x42 - x45 = np.zeros((nvir, nvir), dtype=np.float64) + x45 = np.zeros((nvir, nvir), dtype=types[float]) x45 += einsum("ai,ib->ab", l1, t1) - x49 = np.zeros((nvir, nvir), dtype=np.float64) + x49 = np.zeros((nvir, nvir), dtype=types[float]) x49 += einsum("ab->ab", x45) * 0.5 - x53 = np.zeros((nvir, nvir), dtype=np.float64) + x53 = np.zeros((nvir, nvir), dtype=types[float]) x53 += einsum("ab->ab", x45) - x98 = np.zeros((nvir, nvir), dtype=np.float64) + x98 = np.zeros((nvir, nvir), dtype=types[float]) x98 += einsum("ab->ab", x45) del x45 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum("wai,wib->ab", lu11, u11) x49 += einsum("ab->ab", x46) * 0.5 x53 += einsum("ab->ab", x46) - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ab,ijca->ijcb", x46, t2) x64 += einsum("ijab->ijab", x55) del x55 @@ -1792,18 +1793,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x64 x98 += einsum("ab->ab", x46) del x46 - x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum("ia,bc->ibac", t1, x98) del x98 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("abij->jiab", l2) x47 += einsum("abij->jiba", l2) * -0.5 - x48 = np.zeros((nvir, nvir), dtype=np.float64) + x48 = np.zeros((nvir, nvir), dtype=types[float]) x48 += einsum("ijab,ijbc->ca", t2, x47) x49 += einsum("ab->ab", x48) rdm2_f_oovv += einsum("ij,ab->jiba", delta_oo, x49) * 8 del x49 - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum("ab,ijac->ijbc", x48, t2) * 8 x74 += einsum("ijab->jiba", x72) del x72 @@ -1817,7 +1818,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("ia,bc->abci", t1, x48) * -4 rdm2_f_vvvo += einsum("ia,bc->cbai", t1, x48) * 8 del x48 - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 += einsum("ijab,ijbc->ca", t2, x47) * 2 del x47 x53 += einsum("ab->ab", x52) @@ -1826,9 +1827,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ij,ab->bija", delta_oo, x53) * -2 rdm2_f_vvoo += einsum("ij,ab->baji", delta_oo, x53) * 4 del x53 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum("abij,kjbc->ikac", l2, t2) - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum("ijab,jkac->ikbc", t2, x65) del x65 x69 += einsum("ijab->ijab", x66) @@ -1837,22 +1838,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ijab->biaj", x69) * 2 rdm2_f_vovo += einsum("ijab->aibj", x69) * 4 del x69 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum("abij,kjac->ikbc", l2, t2) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum("ijab,jkac->ikbc", t2, x70) rdm2_f_vovo += einsum("ijab->ajbi", x71) * 4 rdm2_f_vovo -= einsum("ijab->bjai", x71) * 2 del x71 - x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x97 += einsum("ia,ijbc->jbac", t1, x70) del x70 x99 -= einsum("iabc->iabc", x97) del x97 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ijab->jiba", t2) x76 += einsum("ia,jb->ijab", t1, t1) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("ijkl,ijab->klab", x0, x76) * 2 del x0 del x76 @@ -1861,9 +1862,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo += einsum("ijab->ajbi", x78) * -1 rdm2_f_vovo += einsum("ijab->bjai", x78) * 2 del x78 - x83 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x83 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x83 += einsum("wx,xia->wia", ls2, u11) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("wia,wjb->jiba", u11, x83) del x83 rdm2_f_vovo -= einsum("ijab->biaj", x84) * 2 @@ -1873,34 +1874,34 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ia,jb->bjai", t1, x86) * 4 rdm2_f_vovo += einsum("ia,jb->ajbi", t1, x86) * 2 del x86 - x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x88 += einsum("ia,bcji->jbca", t1, l2) - x102 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x102 += einsum("ia,ibcd->cbda", t1, x88) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("abcd->cbda", x102) * 2 rdm2_f_vvvv += einsum("abcd->dbca", x102) * 4 del x102 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum("iabc->iacb", x88) * 4 rdm2_f_ovvv -= einsum("iabc->ibca", x88) * 2 - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->caib", x88) * 2 rdm2_f_vvov += einsum("iabc->cbia", x88) * 4 del x88 - x89 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x89 += einsum("ia,wbi->wba", t1, lu11) - x90 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x90 += einsum("wia,wbc->ibca", u11, x89) del x89 - x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x95 -= einsum("iabc->iabc", x90) del x90 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum("abij,kjca->ikbc", l2, t2) x93 += einsum("ijab->ijab", x91) del x91 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum("ia,ijbc->jbca", t1, x93) del x93 x95 += einsum("iabc->iacb", x94) @@ -1910,7 +1911,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x95) * 4 rdm2_f_vvvo += einsum("iabc->cabi", x95) * 2 del x95 - x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x96 += einsum("ai,jibc->jabc", l1, t2) x99 += einsum("iabc->iabc", x96) del x96 @@ -1919,7 +1920,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x99) * 2 rdm2_f_vvvo += einsum("iabc->cabi", x99) * 4 del x99 - x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x101 += einsum("abij,ijcd->abcd", l2, t2) rdm2_f_vvvv += einsum("abcd->cbda", x101) * -2 rdm2_f_vvvv += einsum("abcd->dbca", x101) * 4 @@ -1930,7 +1931,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kija", delta_oo, l1) * 2 rdm2_f_ovoo -= einsum("ij,ak->jaki", delta_oo, l1) * 2 rdm2_f_ovoo += einsum("ij,ak->kaji", delta_oo, l1) * 4 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov -= einsum("abij->jaib", l2) * 2 rdm2_f_ovov += einsum("abij->jbia", l2) * 4 rdm2_f_oovv -= einsum("ai,jb->ijba", l1, t1) * 2 @@ -1952,9 +1953,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("w->w", s1) dm_b_des += einsum("ai,wia->w", l1, u11) * 2 dm_b_des += einsum("w,xw->x", ls1, s2) @@ -1973,7 +1974,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wx,yx->wy", ls2, s2) rdm1_b += einsum("wai,xia->wx", lu11, u11) * 2 @@ -1993,75 +1994,75 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("ia,waj->wji", t1, lu11) - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum("wia,wij->ja", u11, x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) * 2 - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x0) * 2 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("ijab->jiab", t2) * 2 x1 -= einsum("ijab->jiba", t2) rdm_eb_cre_ov += einsum("wai,ijba->wjb", lu11, x1) * 2 - x2 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x2 += einsum("ai,wja->wij", l1, u11) - x21 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x21 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x21 += einsum("wij->wij", x2) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x2) * 2 del x2 - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 += einsum("wx,xai->wia", s2, lu11) - x6 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x6 += einsum("wia->wia", x3) - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x3) * 2 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("abij->jiab", l2) * 2 x4 -= einsum("abij->jiba", l2) - x5 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x5 += einsum("wia,ijba->wjb", u11, x4) del x4 x6 += einsum("wia->wia", x5) - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("ia,wja->wij", t1, x6) x21 += einsum("wij->wji", x7) - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x21) * 2 del x21 rdm_eb_des_oo -= einsum("wij->wij", x7) * 2 del x7 rdm_eb_des_ov += einsum("wia,ijba->wjb", x6, x1) * 2 del x1 - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("ia,wib->wba", t1, x6) * 2 del x6 rdm_eb_des_vo += einsum("wia->wai", x5) * 2 del x5 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("ai,ja->ij", l1, t1) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum("ij->ij", x8) - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ij->ij", x8) * 0.5 - x26 = np.zeros((nocc, nocc), dtype=np.float64) + x26 = np.zeros((nocc, nocc), dtype=types[float]) x26 += einsum("ij->ij", x8) * 0.49999999999999967 del x8 - x9 = np.zeros((nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc), dtype=types[float]) x9 += einsum("wai,wja->ij", lu11, u11) x11 += einsum("ij->ij", x9) x20 += einsum("ij->ij", x9) * 0.5 x26 += einsum("ij->ij", x9) * 0.49999999999999967 del x9 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum("ijab->jiab", t2) * -0.5 x10 += einsum("ijab->jiba", t2) x11 += einsum("abij,ikab->jk", l2, x10) * 2 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum("abij,ikab->jk", l2, x10) del x10 x20 += einsum("ij->ij", x19) @@ -2074,29 +2075,29 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x11 += einsum("ij->ji", delta_oo) * -1 rdm_eb_des_oo += einsum("w,ij->wji", s1, x11) * -2 del x11 - x12 = np.zeros((nbos), dtype=np.float64) + x12 = np.zeros((nbos), dtype=types[float]) x12 += einsum("w,xw->x", ls1, s2) - x14 = np.zeros((nbos), dtype=np.float64) + x14 = np.zeros((nbos), dtype=types[float]) x14 += einsum("w->w", x12) del x12 - x13 = np.zeros((nbos), dtype=np.float64) + x13 = np.zeros((nbos), dtype=types[float]) x13 += einsum("ai,wia->w", l1, u11) x14 += einsum("w->w", x13) * 2 del x13 rdm_eb_des_oo += einsum("w,ij->wji", x14, delta_oo) * 2 rdm_eb_des_ov += einsum("w,ia->wia", x14, t1) * 2 del x14 - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 += einsum("wai,wib->ab", lu11, u11) - x18 = np.zeros((nvir, nvir), dtype=np.float64) + x18 = np.zeros((nvir, nvir), dtype=types[float]) x18 += einsum("ab->ab", x15) - x28 = np.zeros((nvir, nvir), dtype=np.float64) + x28 = np.zeros((nvir, nvir), dtype=types[float]) x28 += einsum("ab->ab", x15) del x15 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum("abij->jiab", l2) * -0.5 x16 += einsum("abij->jiba", l2) - x17 = np.zeros((nvir, nvir), dtype=np.float64) + x17 = np.zeros((nvir, nvir), dtype=types[float]) x17 += einsum("ijab,ijac->cb", t2, x16) * 2 del x16 x18 += einsum("ab->ab", x17) @@ -2104,20 +2105,20 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x18 x28 += einsum("ab->ab", x17) del x17 - x22 = np.zeros((nbos, nbos), dtype=np.float64) + x22 = np.zeros((nbos, nbos), dtype=types[float]) x22 += einsum("wx,yw->xy", ls2, s2) x22 += einsum("wai,xia->wx", lu11, u11) * 2 rdm_eb_des_ov += einsum("wx,wia->xia", x22, u11) * 2 del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum("ia,abjk->kjib", t1, l2) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum("ijka->ijka", x23) * -0.5 x24 += einsum("ijka->jika", x23) del x23 x27 += einsum("ijab,jika->kb", t2, x24) * 2.0000000000000013 del x24 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum("ijab->jiab", t2) * 2 x25 += einsum("ijab->jiba", t2) * -1 x27 += einsum("ai,ijba->jb", l1, x25) * -1 @@ -2132,9 +2133,9 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_oo += einsum("w,ij->wji", ls1, delta_oo) * 2 rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) * 2 rdm_eb_cre_ov += einsum("wx,xia->wia", ls2, u11) * 2 - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) * 2 - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) * 2 rdm_eb_des_ov += einsum("wia->wia", u11) * 2 rdm_eb_des_vo += einsum("w,ai->wai", s1, l1) * 2 diff --git a/ebcc/codegen/RCCSD_SD_1_2.py b/ebcc/codegen/RCCSD_SD_1_2.py index 3b2ca0e4..9d2e2984 100644 --- a/ebcc/codegen/RCCSD_SD_1_2.py +++ b/ebcc/codegen/RCCSD_SD_1_2.py @@ -2,20 +2,21 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, u12=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("iajb->jiab", v.ovov) x0 += einsum("iajb->jiba", v.ovov) * -0.5 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("ijab->jiba", t2) x1 += einsum("ia,jb->ijab", t1, t1) e_cc = 0 e_cc += einsum("ijab,ijba->", x0, x1) * 2 del x0 del x1 - x2 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x2 += einsum("wia->wia", u11) x2 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x2) * 2 @@ -35,199 +36,199 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2, U11 and U12 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jbka->ijkb", t1, v.ovov) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ijka", x0) * 2 x1 += einsum("ijka->ikja", x0) * -1 - x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x28 += einsum("ia,jkla->jilk", t1, x0) - x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x88 += einsum("ijkl->lkji", x28) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum("ijab,klij->lkba", t2, x28) del x28 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ijab,kjla->kilb", t2, x0) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 -= einsum("ijka->ikja", x35) del x35 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ijka->ijka", x0) * 2 x36 -= einsum("ijka->ikja", x0) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum("ijab,kila->jklb", t2, x36) del x36 x41 += einsum("ijka->jkia", x37) del x37 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum("ijab,klja->kilb", t2, x0) - x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x69 -= einsum("ijka->kija", x65) del x65 - x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x136 -= einsum("ijka->jkia", x0) x136 += einsum("ijka->kjia", x0) * 2 del x0 x1 += einsum("ijka->jika", v.ooov) * -1 x1 += einsum("ijka->jkia", v.ooov) * 2 - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kjib->ka", t2, x1) * -1 del x1 - x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x2 += einsum("iabc->ibac", v.ovvv) x2 += einsum("iabc->ibca", v.ovvv) * -0.5 - x102 = np.zeros((nvir, nvir), dtype=np.float64) + x102 = np.zeros((nvir, nvir), dtype=types[float]) x102 += einsum("ia,ibac->bc", t1, x2) * 2 - x104 = np.zeros((nvir, nvir), dtype=np.float64) + x104 = np.zeros((nvir, nvir), dtype=types[float]) x104 += einsum("ab->ab", x102) - x135 = np.zeros((nvir, nvir), dtype=np.float64) + x135 = np.zeros((nvir, nvir), dtype=types[float]) x135 += einsum("ab->ab", x102) del x102 t1new += einsum("ijab,icab->jc", t2, x2) * 2 del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("w,wia->ia", s1, g.bov) - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum("ia->ia", x3) - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia->ia", x3) * 0.5 - x108 = np.zeros((nocc, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nvir), dtype=types[float]) x108 += einsum("ia->ia", x3) del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("iajb->jiab", v.ovov) * 2 x4 -= einsum("iajb->jiba", v.ovov) - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum("ia,ijba->jb", t1, x4) x6 += einsum("ia->ia", x5) del x5 - x97 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x97 += einsum("wia,ijba->wjb", u11, x4) - x99 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x99 += einsum("wia->wia", x97) - x117 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x117 += einsum("ia,wib->wab", t1, x97) - x118 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x118 += einsum("wab->wba", x117) del x117 - x125 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x125 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x125 += einsum("ia,wja->wij", t1, x97) - x126 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x126 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x126 += einsum("wij->wji", x125) del x125 - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("wia,xia->wx", u11, x97) * 2 del x97 - x133 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x133 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x133 += einsum("wxia,ijba->xwjb", u12, x4) del x4 x6 += einsum("ia->ia", f.ov) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum("ia,jkab->jkib", x6, t2) x69 += einsum("ijka->kjia", x68) del x68 - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum("ia,ja->ij", t1, x6) - x72 = np.zeros((nocc, nocc), dtype=np.float64) + x72 = np.zeros((nocc, nocc), dtype=types[float]) x72 += einsum("ij->ij", x71) del x71 - x120 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x120 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x120 += einsum("ia,wja->wji", x6, u11) - x123 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x123 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x123 += einsum("wij->wji", x120) del x120 - x137 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x137 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x137 += einsum("ia,wxja->xwij", x6, u12) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x6, u11) * 2 s2new += einsum("ia,wxia->xw", x6, u12) * 2 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum("ijab->jiab", t2) * 2 x7 -= einsum("ijab->jiba", t2) - x47 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x47 += einsum("wia,ijba->wjb", g.bov, x7) - x49 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x49 += einsum("wia->wia", x47) del x47 t1new += einsum("ia,ijba->jb", x6, x7) del x6 - u12new = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + u12new = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) u12new += einsum("wxia,ijba->xwjb", x133, x7) del x133 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum("iabj->ijba", v.ovvo) * 2 x8 -= einsum("ijab->ijab", v.oovv) t1new += einsum("ia,ijba->jb", t1, x8) - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new += einsum("wia,ijba->wjb", u11, x8) del x8 - x9 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x9 += einsum("ia,wja->wji", t1, g.bov) - x10 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x10 += einsum("wij->wij", x9) del x9 x10 += einsum("wij->wij", g.boo) - x48 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x48 += einsum("ia,wij->wja", t1, x10) x49 -= einsum("wia->wia", x48) del x48 t1new -= einsum("wia,wij->ja", u11, x10) u11new -= einsum("wij,wxia->xja", x10, u12) del x10 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum("w,wij->ij", s1, g.boo) - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ij->ij", x11) x72 += einsum("ij->ji", x11) del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("wia,wja->ij", g.bov, u11) x20 += einsum("ij->ij", x12) - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum("ij->ij", x12) del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum("iajb->jiab", v.ovov) x13 += einsum("iajb->jiba", v.ovov) * -0.5 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("ijab,ikba->jk", t2, x13) * 2 x20 += einsum("ij->ji", x14) del x14 - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum("ia,ijba->jb", t1, x13) x18 += einsum("ia->ia", x17) del x17 - x79 = np.zeros((nvir, nvir), dtype=np.float64) + x79 = np.zeros((nvir, nvir), dtype=types[float]) x79 += einsum("ijab,ijbc->ac", t2, x13) - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum("ab,ijbc->ijca", x79, t2) * 2 del x79 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("ijab->jiab", x80) del x80 - x81 = np.zeros((nocc, nocc), dtype=np.float64) + x81 = np.zeros((nocc, nocc), dtype=types[float]) x81 += einsum("ijab,ikba->jk", t2, x13) - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ij,jkab->kiab", x81, t2) * 2 del x81 x83 += einsum("ijab->ijba", x82) del x82 - x103 = np.zeros((nocc, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nvir), dtype=types[float]) x103 += einsum("ia,ijba->jb", t1, x13) * 2 del x13 x104 += einsum("ia,ib->ab", t1, x103) * -1 del x103 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ikja", v.ooov) x15 += einsum("ijka->kija", v.ooov) * -0.5 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ia,jika->jk", t1, x15) * 2 del x15 x20 += einsum("ij->ij", x16) del x16 x18 += einsum("ia->ia", f.ov) * 0.5 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum("ia,ja->ij", t1, x18) * 2 del x18 x20 += einsum("ij->ji", x19) @@ -237,37 +238,37 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new += einsum("ij,wia->wja", x20, u11) * -1 u12new += einsum("ij,wxia->xwja", x20, u12) * -1 del x20 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum("w,wab->ab", s1, g.bvv) - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum("ab->ab", x21) - x74 = np.zeros((nvir, nvir), dtype=np.float64) + x74 = np.zeros((nvir, nvir), dtype=types[float]) x74 += einsum("ab->ab", x21) x104 += einsum("ab->ab", x21) x135 += einsum("ab->ab", x21) del x21 - x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x22 -= einsum("iabc->ibac", v.ovvv) x22 += einsum("iabc->ibca", v.ovvv) * 2 - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum("ia,ibca->bc", t1, x22) x24 += einsum("ab->ab", x23) - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 -= einsum("ab->ab", x23) del x23 - x111 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x111 += einsum("wia,ibca->wbc", u11, x22) del x22 - x112 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x112 += einsum("wab->wab", x111) x118 -= einsum("wab->wba", x111) del x111 x24 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x24) del x24 - x25 = np.zeros((nbos), dtype=np.float64) + x25 = np.zeros((nbos), dtype=types[float]) x25 += einsum("ia,wia->w", t1, g.bov) - x26 = np.zeros((nbos), dtype=np.float64) + x26 = np.zeros((nbos), dtype=types[float]) x26 += einsum("w->w", x25) * 2 del x25 x26 += einsum("w->w", G) @@ -275,60 +276,60 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb s1new += einsum("w,wx->x", x26, s2) u11new += einsum("w,wxia->xia", x26, u12) del x26 - x27 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x27 += einsum("ia,bacd->icbd", t1, v.vvvv) t2new += einsum("ia,jbca->ijbc", t1, x27) del x27 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum("ijab,kjca->kibc", t2, x29) del x29 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ijab->ijab", x30) del x30 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 -= einsum("iajb->jiab", v.ovov) x31 += einsum("iajb->jiba", v.ovov) * 2 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum("ijab,ikbc->jkac", t2, x31) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ijab,kica->jkbc", t2, x32) del x32 x55 += einsum("ijab->ijab", x33) del x33 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum("ijab,ikac->jkbc", t2, x31) * 2 del x31 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ijab,jkla->ilkb", t2, v.ooov) x41 -= einsum("ijka->ijka", x34) del x34 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("ia,jbca->ijcb", t1, v.ovvv) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ijab->jiab", x38) - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ijab,kjca->kibc", t2, x38) del x38 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ijab->ijab", x57) del x57 x39 += einsum("iabj->ijba", v.ovvo) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum("ia,jkba->ijkb", t1, x39) del x39 x41 += einsum("ijka->ijka", x40) del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ia,jikb->jkab", t1, x41) del x41 x55 += einsum("ijab->ijab", x42) del x42 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 += einsum("wia,wib->ab", g.bov, u11) x44 += einsum("ab->ba", x43) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ab,ijbc->ijca", x44, t2) del x44 x55 += einsum("ijab->jiab", x45) @@ -336,24 +337,24 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x104 += einsum("ab->ba", x43) * -1 x135 += einsum("ab->ba", x43) * -1 del x43 - x46 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x46 += einsum("ia,wba->wib", t1, g.bvv) x49 += einsum("wia->wia", x46) del x46 x49 += einsum("wai->wia", g.bvo) - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("wia,wjb->ijab", u11, x49) del x49 x55 -= einsum("ijab->jiba", x50) del x50 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum("ijka->ikja", v.ooov) * 2 x51 -= einsum("ijka->kija", v.ooov) - x52 = np.zeros((nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc), dtype=types[float]) x52 += einsum("ia,jika->jk", t1, x51) x53 += einsum("ij->ij", x52) del x52 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("ij,ikab->kjab", x53, t2) del x53 x55 += einsum("ijab->ijba", x54) @@ -361,71 +362,71 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijab", x55) t2new -= einsum("ijab->jiba", x55) del x55 - x107 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x107 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x107 += einsum("wia,jika->wjk", u11, x51) del x51 - x109 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x109 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x109 += einsum("wij->wij", x107) x126 += einsum("wij->wij", x107) del x107 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ia,bjca->ijbc", t1, v.vovv) x76 -= einsum("ijab->ijab", x56) del x56 - x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x58 += einsum("iabc->ibac", v.ovvv) * 2 x58 -= einsum("iabc->ibca", v.ovvv) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ia,jbca->ijbc", t1, x58) del x58 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ijab,kica->jkbc", t2, x59) x76 -= einsum("ijab->jiab", x60) del x60 - x134 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x134 += einsum("ijab->jiab", x59) del x59 - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum("ia,jkba->ijkb", t1, v.oovv) x69 += einsum("ijka->jika", x61) del x61 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum("ijab,klja->iklb", t2, v.ooov) x69 -= einsum("ijka->jika", x62) del x62 - x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x63 += einsum("ia,jkla->ijlk", t1, v.ooov) - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum("ia,jkil->jkla", t1, x63) x69 -= einsum("ijka->jika", x64) del x64 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ijab,kjil->klba", t2, x63) del x63 t2new += einsum("ijab->ijba", x84) t2new += einsum("ijab->jiab", x84) del x84 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 -= einsum("ijka->ikja", v.ooov) x66 += einsum("ijka->kija", v.ooov) * 2 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum("ijab,ikla->jklb", t2, x66) del x66 x69 += einsum("ijka->jika", x67) del x67 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum("ia,ijkb->jkab", t1, x69) del x69 x76 += einsum("ijab->ijab", x70) del x70 x72 += einsum("ij->ji", f.oo) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ij,jkab->kiab", x72, t2) del x72 x76 += einsum("ijab->jiba", x73) del x73 x74 += einsum("ab->ab", f.vv) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ab,ijbc->ijca", x74, t2) del x74 x76 -= einsum("ijab->jiba", x75) @@ -433,9 +434,9 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijba", x76) t2new -= einsum("ijab->jiab", x76) del x76 - x77 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x77 += einsum("ijab,kacb->ijkc", t2, v.ovvv) - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum("ia,jkib->jkab", t1, x77) del x77 x83 += einsum("ijab->ijab", x78) @@ -447,9 +448,9 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x85 -= einsum("ijab->jiab", v.oovv) t2new += einsum("ijab,kica->kjcb", t2, x85) del x85 - x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x86 += einsum("ijab,kbla->ijlk", t2, v.ovov) - x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x87 += einsum("ijkl->lkji", x86) x88 += einsum("ijkl->lkji", x86) del x86 @@ -457,39 +458,39 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->klab", t2, x87) del x87 x88 += einsum("ijkl->kilj", v.oooo) - x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x89 += einsum("ia,ijkl->lkja", t1, x88) del x88 x89 += einsum("ijak->jkia", v.oovo) * -1 t2new += einsum("ia,jkib->jkab", t1, x89) del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 -= einsum("iabj->jiba", v.ovvo) x90 += einsum("ijab,jakc->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkac", t2, x90) del x90 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 -= einsum("ijab->jiab", v.oovv) x91 += einsum("ijab,jcka->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkca", t2, x91) del x91 - x92 = np.zeros((nbos, nbos), dtype=np.float64) + x92 = np.zeros((nbos, nbos), dtype=types[float]) x92 += einsum("wia,xia->wx", gc.bov, u11) - x96 = np.zeros((nbos, nbos), dtype=np.float64) + x96 = np.zeros((nbos, nbos), dtype=types[float]) x96 += einsum("wx->wx", x92) * 2 del x92 - x93 = np.zeros((nbos, nbos), dtype=np.float64) + x93 = np.zeros((nbos, nbos), dtype=types[float]) x93 += einsum("wia,xia->wx", g.bov, u11) - x94 = np.zeros((nbos, nbos), dtype=np.float64) + x94 = np.zeros((nbos, nbos), dtype=types[float]) x94 += einsum("wx->wx", x93) * 2 - x115 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x115 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x115 += einsum("wx,ywia->xyia", x93, u12) del x93 - x132 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x132 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x132 -= einsum("wxia->wxia", x115) * 2 del x115 x94 += einsum("wx->wx", w) - x95 = np.zeros((nbos, nbos), dtype=np.float64) + x95 = np.zeros((nbos, nbos), dtype=types[float]) x95 += einsum("wx,wy->xy", s2, x94) x96 += einsum("wx->wx", x95) del x95 @@ -498,10 +499,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x96 u11new += einsum("wx,wia->xia", x94, u11) del x94 - x98 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x98 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x98 += einsum("wx,xia->wia", s2, g.bov) x99 += einsum("wia->wia", x98) - x121 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x121 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x121 += einsum("wia->wia", x98) del x98 x99 += einsum("wia->wia", gc.bov) @@ -509,10 +510,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new += einsum("wia,ijba->wjb", x99, x7) del x99 del x7 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum("iajb->jiab", v.ovov) * -1 x100 += einsum("iajb->jiba", v.ovov) * 2 - x101 = np.zeros((nvir, nvir), dtype=np.float64) + x101 = np.zeros((nvir, nvir), dtype=types[float]) x101 += einsum("ijab,ijcb->ac", t2, x100) del x100 x104 += einsum("ab->ab", x101) * -1 @@ -521,17 +522,17 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x104 += einsum("ab->ab", f.vv) u11new += einsum("ab,wib->wia", x104, u11) del x104 - x105 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x105 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x105 += einsum("wx,xij->wij", s2, g.boo) x109 += einsum("wij->wij", x105) x123 += einsum("wij->wij", x105) del x105 - x106 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x106 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x106 += einsum("wia,xwja->xij", g.bov, u12) x109 += einsum("wij->wij", x106) x126 += einsum("wij->wij", x106) del x106 - x127 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x127 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x127 += einsum("wia,xij->wxja", u11, x126) del x126 x132 += einsum("wxia->wxia", x127) @@ -542,53 +543,53 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x109 += einsum("wij->wij", gc.boo) u11new -= einsum("ia,wij->wja", t1, x109) del x109 - x110 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x110 += einsum("wx,xab->wab", s2, g.bvv) x112 += einsum("wab->wab", x110) - x128 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x128 += einsum("wab->wab", x110) del x110 x112 += einsum("wab->wab", gc.bvv) u11new += einsum("ia,wba->wib", t1, x112) del x112 - x113 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x113 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x113 += einsum("wia,xyia->wxy", g.bov, u12) u12new += einsum("wia,wxy->yxia", u11, x113) * 2 del x113 - x114 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x114 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x114 += einsum("wx,ywia->yxia", w, u12) x132 -= einsum("wxia->wxia", x114) del x114 - x116 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x116 += einsum("wia,xwib->xab", g.bov, u12) x118 += einsum("wab->wab", x116) del x116 - x119 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x119 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x119 += einsum("wia,xab->wxib", u11, x118) del x118 x132 += einsum("wxia->wxia", x119) del x119 x121 += einsum("wia->wia", gc.bov) - x122 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x122 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x122 += einsum("ia,wja->wij", t1, x121) x123 += einsum("wij->wji", x122) del x122 - x130 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x130 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x130 += einsum("wia,xja->wxij", u11, x121) del x121 - x131 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x131 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x131 += einsum("ia,wxji->xwja", t1, x130) del x130 x132 += einsum("wxia->wxia", x131) del x131 x123 += einsum("wij->wij", gc.boo) - x124 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x124 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x124 += einsum("wia,xij->wxja", u11, x123) del x123 x132 += einsum("wxia->xwia", x124) del x124 x128 += einsum("wab->wab", gc.bvv) - x129 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x129 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x129 += einsum("wia,xba->wxib", u11, x128) del x128 x132 -= einsum("wxia->xwia", x129) @@ -639,56 +640,56 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1, LS2, LU11 and LU12 amplitudes - x0 = np.zeros((nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir), dtype=types[float]) x0 += einsum("w,wia->ia", s1, g.bov) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum("ia->ia", x0) - x52 = np.zeros((nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nvir), dtype=types[float]) x52 += einsum("ia->ia", x0) * 0.5 - x64 = np.zeros((nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nvir), dtype=types[float]) x64 += einsum("ia->ia", x0) - x112 = np.zeros((nocc, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nvir), dtype=types[float]) x112 += einsum("ia->ia", x0) - x163 = np.zeros((nocc, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nvir), dtype=types[float]) x163 += einsum("ia->ia", x0) del x0 x1 += einsum("ia->ia", f.ov) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum("ia,jkab->jkib", x1, t2) * 0.5 del x1 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ijka->ikja", x2) x20 += einsum("ijka->jkia", x2) * -2 del x2 - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum("ijab,kbca->jikc", t2, v.ovvv) - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum("ijka->ijka", x3) * -1 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("ia,jbca->ijcb", t1, v.ovvv) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ia,jkba->ijkb", t1, x4) x11 += einsum("ijka->ijka", x5) * -1 del x5 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum("ijab->jiab", x4) - x178 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x178 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x178 += einsum("ijab->ijab", x4) del x4 - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum("ijab,kalb->ijkl", t2, v.ovov) - x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x9 += einsum("ijkl->jilk", x6) - x192 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x192 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x192 += einsum("ijkl->lkji", x6) del x6 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum("ia,jbka->ijkb", t1, v.ovov) - x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x8 += einsum("ia,jkla->ijkl", t1, x7) x9 += einsum("ijkl->ijkl", x8) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("ia,jkil->jkla", t1, x9) del x9 x11 += einsum("ijka->jika", x10) @@ -698,66 +699,66 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x11 x192 += einsum("ijkl->lkji", x8) del x8 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ikja", x7) * -0.5 x15 += einsum("ijka->ijka", x7) - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum("ijka->ikja", x7) * 2 x16 += einsum("ijka->ijka", x7) * -1 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum("ijka->ikja", x7) * 2 x24 -= einsum("ijka->ijka", x7) - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum("ijka->jkia", x7) * -0.5 x51 += einsum("ijka->kjia", x7) - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum("ijka->jkia", x7) * -1 x62 += einsum("ijka->kjia", x7) * 2 - x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x152 += einsum("ai,ijkb->jkab", l1, x7) - x170 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x170 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x170 += einsum("ijab->ijab", x152) del x152 - x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x158 += einsum("ijka->ijka", x7) - x239 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x239 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x239 -= einsum("ijka->ikja", x7) x239 += einsum("ijka->ijka", x7) * 2 del x7 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum("iajb->jiab", v.ovov) x12 += einsum("iajb->jiba", v.ovov) * -0.5 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum("ia,ijba->jb", t1, x12) - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum("ia,jkab->jkib", x13, t2) x20 += einsum("ijka->ikja", x14) x20 += einsum("ijka->jkia", x14) * -2 del x14 x52 += einsum("ia->ia", x13) del x13 - x54 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x54 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x54 += einsum("wia,ijba->wjb", u11, x12) - x63 = np.zeros((nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nvir), dtype=types[float]) x63 += einsum("ia,ijba->jb", t1, x12) * 2 x64 += einsum("ia->ia", x63) del x63 - x124 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x124 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x124 += einsum("wia,ijba->wjb", u11, x12) * 2 - x125 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x125 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x125 += einsum("wia->wia", x124) - x194 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x194 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x194 += einsum("wia->wia", x124) - x199 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x199 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x199 += einsum("wia->wia", x124) del x124 - x139 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x139 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x139 += einsum("wxia,ijba->wxjb", u12, x12) del x12 - x140 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x140 += einsum("wxai,xwjb->jiba", lu12, x139) del x139 - x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x145 += einsum("ijab->jiba", x140) del x140 x15 += einsum("ijka->jkia", v.ooov) @@ -768,23 +769,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x16 += einsum("ijka->jika", v.ooov) * 2 x20 += einsum("ijab,kilb->klja", t2, x16) * 0.5 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum("ijab->ijab", v.oovv) * 2 x17 += einsum("iabj->ijba", v.ovvo) * -1 x20 += einsum("ia,jkba->ijkb", t1, x17) * -0.5 del x17 - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum("ia,jkla->ijlk", t1, v.ooov) - x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x19 += einsum("ijkl->jkil", x18) * -0.5 x19 += einsum("ijkl->kjil", x18) - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 -= einsum("ijkl->ikjl", x18) x27 += einsum("ijkl->ijkl", x18) * 2 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum("ia,jikl->jkla", t1, x27) del x27 - x154 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x154 += einsum("abij,jkli->klba", l2, x18) del x18 x170 -= einsum("ijab->ijab", x154) @@ -795,30 +796,30 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x19 x20 += einsum("ijak->kija", v.oovo) * -1 x20 += einsum("ijak->jika", v.oovo) * 0.5 - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum("abij,ikja->bk", l2, x20) * 2 del x20 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum("abij->jiab", l2) * -1 x21 += einsum("abij->jiba", l2) * 2 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum("ijab,ikac->kjcb", t2, x21) * -1 del x21 x22 += einsum("wxai,wxjb->ijab", lu12, u12) * -0.5 x22 += einsum("abij,kjbc->ikac", l2, t2) - x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x23 -= einsum("iabc->ibac", v.ovvv) x23 += einsum("iabc->ibca", v.ovvv) * 2 - x123 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x123 += einsum("wia,ibca->wbc", u11, x23) - x129 = np.zeros((nvir, nvir), dtype=np.float64) + x129 = np.zeros((nvir, nvir), dtype=types[float]) x129 += einsum("ia,ibca->bc", t1, x23) - x130 = np.zeros((nvir, nvir), dtype=np.float64) + x130 = np.zeros((nvir, nvir), dtype=types[float]) x130 += einsum("ab->ab", x129) - x187 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x187 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x187 += einsum("ab,acij->ijbc", x129, l2) del x129 - x191 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x191 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x191 += einsum("ijab->jiba", x187) del x187 l1new += einsum("ijab,jacb->ci", x22, x23) * -1 @@ -826,32 +827,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x23 x24 -= einsum("ijka->jkia", v.ooov) x24 += einsum("ijka->jika", v.ooov) * 2 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum("ijab->jiab", t2) * 2 x25 -= einsum("ijab->jiba", t2) x28 -= einsum("ijka,klba->ijlb", x24, x25) del x24 - x224 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x224 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x224 += einsum("wia,ijba->wjb", g.bov, x25) - x225 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x225 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x225 += einsum("wia->wia", x224) del x224 - x237 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x237 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x237 += einsum("wxai,ijba->xwjb", lu12, x25) del x25 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum("iabj->ijba", v.ovvo) * 2 x26 -= einsum("ijab->ijab", v.oovv) x28 -= einsum("ia,jkba->ijkb", t1, x26) l1new += einsum("abij,ikjb->ak", l2, x28) del x28 l1new += einsum("ai,jiab->bj", l1, x26) - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("wai,jiab->wbj", lu11, x26) del x26 - x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x29 += einsum("ia,bcda->ibdc", t1, v.vvvv) - x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x30 += einsum("iabc->iabc", x29) x30 += einsum("iabc->ibac", x29) * -0.5 del x29 @@ -859,67 +860,67 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x30 += einsum("aibc->ibac", v.vovv) l1new += einsum("abij,ibac->cj", l2, x30) * 2 del x30 - x31 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x31 += einsum("ia,wxaj->wxji", t1, lu12) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("wxia,wxjk->jkia", u12, x31) * -0.25 - x86 = np.zeros((nocc, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nvir), dtype=types[float]) x86 += einsum("wxia,wxij->ja", u12, x31) - x99 = np.zeros((nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir), dtype=types[float]) x99 += einsum("ia->ia", x86) * 0.5 del x86 - x221 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x221 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x221 += einsum("wia,xwij->xja", u11, x31) - x222 = np.zeros((nbos, nbos), dtype=np.float64) + x222 = np.zeros((nbos, nbos), dtype=types[float]) x222 += einsum("wia,xia->wx", g.bov, x221) del x221 - x228 = np.zeros((nbos, nbos), dtype=np.float64) + x228 = np.zeros((nbos, nbos), dtype=types[float]) x228 -= einsum("wx->wx", x222) * 2 del x222 - lu12new = np.zeros((nbos, nbos, nvir, nocc), dtype=np.float64) + lu12new = np.zeros((nbos, nbos, nvir, nocc), dtype=types[float]) lu12new -= einsum("ijka,wxik->xwaj", x239, x31) del x239 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum("ia,bajk->jkib", t1, l2) x34 += einsum("ijab,kjlb->klia", t2, x32) * 0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 -= einsum("ijka->ijka", x32) x36 += einsum("ijka->jika", x32) * 2 - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum("ijka->ijka", x32) * 2 x38 -= einsum("ijka->jika", x32) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum("ijab,kjla->klib", t2, x32) - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum("ijka->ijka", x43) * 2 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum("ijka->ijka", x43) del x43 - x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x47 += einsum("ia,jkla->jkil", t1, x32) - x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x48 += einsum("ijkl->ijkl", x47) - x57 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x57 += einsum("ijkl->ijkl", x47) * 2 x57 += einsum("ijkl->ijlk", x47) * -1 l1new += einsum("ijka,ljki->al", v.ooov, x57) del x57 - x193 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x193 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x193 += einsum("ijkl->ijkl", x47) del x47 - x173 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x173 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x173 += einsum("iabc,jkib->kjac", v.ovvv, x32) x191 -= einsum("ijab->ijab", x173) del x173 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ijab->jiab", t2) * 2 x33 += einsum("ijab->jiba", t2) * -1 x34 += einsum("ijka,ilba->jklb", x32, x33) * -0.5 - x88 = np.zeros((nocc, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir), dtype=types[float]) x88 += einsum("ai,ijba->jb", l1, x33) x99 += einsum("ia->ia", x88) * -1 del x88 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 -= einsum("iajb->jiab", v.ovov) x35 += einsum("iajb->jiba", v.ovov) * 2 l1new += einsum("ijka,jkba->bi", x34, x35) * 2 @@ -929,37 +930,37 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new -= einsum("ijka,kjab->bi", x36, x37) del x36 del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ijab->jiab", x39) - x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x156 += einsum("ijab->ijab", x39) del x39 x40 += einsum("ijab->ijab", v.oovv) l1new -= einsum("ijka,kjab->bi", x38, x40) del x40 - x41 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x41 += einsum("iabc->ibac", v.ovvv) * 2 x41 -= einsum("iabc->ibca", v.ovvv) - x238 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x238 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x238 += einsum("ia,jbca->jibc", t1, x41) - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("abij,kjac->ikbc", l2, t2) l1new -= einsum("iabc,jiac->bj", x41, x42) del x41 del x42 - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum("ai,jkba->ijkb", l1, t2) x45 += einsum("ijka->ikja", x44) x45 += einsum("ijka->ijka", x44) * -2 del x44 l1new += einsum("iajb,kija->bk", v.ovov, x45) del x45 - x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x46 += einsum("abij,klba->ijlk", l2, t2) x48 += einsum("ijkl->jilk", x46) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum("ia,ijkl->jkla", t1, x48) del x48 x50 += einsum("ijka->ijka", x49) @@ -967,35 +968,35 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x49 l1new += einsum("iajb,kijb->ak", v.ovov, x50) * -1 del x50 - x56 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x56 += einsum("ijkl->jikl", x46) * 2 x56 += einsum("ijkl->jilk", x46) * -1 l1new += einsum("ijka,jlki->al", v.ooov, x56) del x56 x193 += einsum("ijkl->jilk", x46) del x46 - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("iajb,klji->ablk", v.ovov, x193) del x193 x51 += einsum("ijka->ikja", v.ooov) x51 += einsum("ijka->kija", v.ooov) * -0.5 - x55 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x55 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x55 += einsum("wxia,jika->xwjk", u12, x51) del x51 x52 += einsum("ia->ia", f.ov) * 0.5 x55 += einsum("ia,wxja->xwij", x52, u12) - x74 = np.zeros((nocc, nocc), dtype=np.float64) + x74 = np.zeros((nocc, nocc), dtype=types[float]) x74 += einsum("ia,ja->ji", t1, x52) * 2 - x75 = np.zeros((nocc, nocc), dtype=np.float64) + x75 = np.zeros((nocc, nocc), dtype=types[float]) x75 += einsum("ij->ij", x74) del x74 - x128 = np.zeros((nbos, nbos), dtype=np.float64) + x128 = np.zeros((nbos, nbos), dtype=types[float]) x128 += einsum("ia,wxia->xw", x52, u12) * 2 - x200 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x200 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x200 += einsum("ia,wja->wij", x52, u11) * 2 lu11new += einsum("w,ia->wai", ls1, x52) * 4 del x52 - x53 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x53 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x53 += einsum("wx,xia->wia", s2, g.bov) x54 += einsum("wia->wia", x53) * 0.5 x194 += einsum("wia->wia", x53) @@ -1005,81 +1006,81 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x54 l1new += einsum("wxai,wxji->aj", lu12, x55) * -1 del x55 - x58 = np.zeros((nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nvir), dtype=types[float]) x58 += einsum("w,wai->ia", s1, g.bvo) - x82 = np.zeros((nocc, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nvir), dtype=types[float]) x82 += einsum("ia->ia", x58) - x213 = np.zeros((nocc, nvir), dtype=np.float64) + x213 = np.zeros((nocc, nvir), dtype=types[float]) x213 += einsum("ia->ia", x58) * 0.5 del x58 - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 += einsum("wab,wib->ia", g.bvv, u11) x82 += einsum("ia->ia", x59) x213 += einsum("ia->ia", x59) * 0.5 del x59 - x60 = np.zeros((nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir), dtype=types[float]) x60 += einsum("ijab,jkib->ka", t2, v.ooov) x82 += einsum("ia->ia", x60) x213 += einsum("ia->ia", x60) * 0.5 del x60 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ijab->jiab", t2) * -0.5 x61 += einsum("ijab->jiba", t2) - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum("iajb,ikab->kj", v.ovov, x61) * 2 x75 += einsum("ij->ji", x71) del x71 x82 += einsum("iabc,ijac->jb", v.ovvv, x61) * 2 - x96 = np.zeros((nocc, nocc), dtype=np.float64) + x96 = np.zeros((nocc, nocc), dtype=types[float]) x96 += einsum("abij,ikab->kj", l2, x61) * 2 - x97 = np.zeros((nocc, nocc), dtype=np.float64) + x97 = np.zeros((nocc, nocc), dtype=types[float]) x97 += einsum("ij->ji", x96) - x148 = np.zeros((nocc, nocc), dtype=np.float64) + x148 = np.zeros((nocc, nocc), dtype=types[float]) x148 += einsum("ij->ji", x96) - x215 = np.zeros((nocc, nocc), dtype=np.float64) + x215 = np.zeros((nocc, nocc), dtype=types[float]) x215 += einsum("ij->ji", x96) del x96 - x104 = np.zeros((nvir, nvir), dtype=np.float64) + x104 = np.zeros((nvir, nvir), dtype=types[float]) x104 += einsum("abij,ijac->cb", l2, x61) * 2 - x105 = np.zeros((nvir, nvir), dtype=np.float64) + x105 = np.zeros((nvir, nvir), dtype=types[float]) x105 += einsum("ab->ba", x104) - x146 = np.zeros((nvir, nvir), dtype=np.float64) + x146 = np.zeros((nvir, nvir), dtype=types[float]) x146 += einsum("ab->ba", x104) del x104 - x141 = np.zeros((nvir, nvir), dtype=np.float64) + x141 = np.zeros((nvir, nvir), dtype=types[float]) x141 += einsum("iajb,ijcb->ca", v.ovov, x61) * 2 - x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x142 += einsum("ab,acij->ijbc", x141, l2) del x141 x145 += einsum("ijab->jiba", x142) * -1 del x142 - x205 = np.zeros((nocc, nvir), dtype=np.float64) + x205 = np.zeros((nocc, nvir), dtype=types[float]) x205 += einsum("iabc,ijac->jb", v.ovvv, x61) x213 += einsum("ia->ia", x205) del x205 - x214 = np.zeros((nvir, nvir), dtype=np.float64) + x214 = np.zeros((nvir, nvir), dtype=types[float]) x214 += einsum("abij,ijac->bc", l2, x61) * 4 del x61 x62 += einsum("ijka->ikja", v.ooov) * 2 x82 += einsum("ijab,ijkb->ka", t2, x62) * -1 - x206 = np.zeros((nocc, nvir), dtype=np.float64) + x206 = np.zeros((nocc, nvir), dtype=types[float]) x206 += einsum("ijab,ijkb->ka", t2, x62) * 0.5 del x62 x213 += einsum("ia->ia", x206) * -1 del x206 x64 += einsum("ia->ia", f.ov) lu12new += einsum("wx,ia->xwai", ls2, x64) * 2 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum("ijab->jiab", t2) x65 += einsum("ijab->jiba", t2) * -0.5 x82 += einsum("ia,ijba->jb", x64, x65) * 2 - x87 = np.zeros((nocc, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nvir), dtype=types[float]) x87 += einsum("ijka,ijba->kb", x32, x65) * 2 x99 += einsum("ia->ia", x87) del x87 - x143 = np.zeros((nocc, nocc), dtype=np.float64) + x143 = np.zeros((nocc, nocc), dtype=types[float]) x143 += einsum("iajb,ikba->kj", v.ovov, x65) * 2 - x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x144 += einsum("ij,abik->jkab", x143, l2) del x143 x145 += einsum("ijab->jiba", x144) * -1 @@ -1087,51 +1088,51 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x145) l2new += einsum("ijab->baji", x145) del x145 - x207 = np.zeros((nocc, nvir), dtype=np.float64) + x207 = np.zeros((nocc, nvir), dtype=types[float]) x207 += einsum("ia,ijba->jb", x64, x65) del x65 x213 += einsum("ia->ia", x207) del x207 - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum("iabj->ijba", v.ovvo) x66 += einsum("ijab->ijab", v.oovv) * -0.5 x82 += einsum("ia,ijba->jb", t1, x66) * 2 - x208 = np.zeros((nocc, nvir), dtype=np.float64) + x208 = np.zeros((nocc, nvir), dtype=types[float]) x208 += einsum("ia,ijba->jb", t1, x66) del x66 x213 += einsum("ia->ia", x208) del x208 - x67 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x67 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x67 += einsum("ia,wja->wji", t1, g.bov) - x68 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x68 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x68 += einsum("wij->wij", x67) - x115 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x115 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x115 += einsum("wij->wij", x67) x68 += einsum("wij->wij", g.boo) x82 += einsum("wia,wij->ja", u11, x68) * -1 x200 += einsum("wx,wij->xij", s2, x68) - x204 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x204 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x204 += einsum("wij,wxia->xja", x68, u12) - x209 = np.zeros((nocc, nvir), dtype=np.float64) + x209 = np.zeros((nocc, nvir), dtype=types[float]) x209 += einsum("wia,wij->ja", u11, x68) * 0.5 del x68 x213 += einsum("ia->ia", x209) * -1 del x209 - x69 = np.zeros((nocc, nocc), dtype=np.float64) + x69 = np.zeros((nocc, nocc), dtype=types[float]) x69 += einsum("w,wij->ij", s1, g.boo) x75 += einsum("ij->ij", x69) - x165 = np.zeros((nocc, nocc), dtype=np.float64) + x165 = np.zeros((nocc, nocc), dtype=types[float]) x165 += einsum("ij->ij", x69) del x69 - x70 = np.zeros((nocc, nocc), dtype=np.float64) + x70 = np.zeros((nocc, nocc), dtype=types[float]) x70 += einsum("wia,wja->ij", g.bov, u11) x75 += einsum("ij->ij", x70) x165 += einsum("ij->ij", x70) del x70 - x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x72 += einsum("ijka->ikja", v.ooov) x72 += einsum("ijka->kija", v.ooov) * -0.5 - x73 = np.zeros((nocc, nocc), dtype=np.float64) + x73 = np.zeros((nocc, nocc), dtype=types[float]) x73 += einsum("ia,jika->jk", t1, x72) * 2 x75 += einsum("ij->ij", x73) del x73 @@ -1140,136 +1141,136 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x75 += einsum("ij->ij", f.oo) x82 += einsum("ia,ij->ja", t1, x75) * -1 x204 += einsum("ij,wia->wja", x75, u11) - x210 = np.zeros((nocc, nvir), dtype=np.float64) + x210 = np.zeros((nocc, nvir), dtype=types[float]) x210 += einsum("ia,ij->ja", t1, x75) * 0.5 x213 += einsum("ia->ia", x210) * -1 del x210 l1new += einsum("ai,ji->aj", l1, x75) * -1 lu12new += einsum("ij,wxaj->xwai", x75, lu12) * -1 del x75 - x76 = np.zeros((nvir, nvir), dtype=np.float64) + x76 = np.zeros((nvir, nvir), dtype=types[float]) x76 += einsum("w,wab->ab", s1, g.bvv) - x79 = np.zeros((nvir, nvir), dtype=np.float64) + x79 = np.zeros((nvir, nvir), dtype=types[float]) x79 += einsum("ab->ab", x76) x130 += einsum("ab->ab", x76) - x161 = np.zeros((nvir, nvir), dtype=np.float64) + x161 = np.zeros((nvir, nvir), dtype=types[float]) x161 += einsum("ab->ab", x76) - x198 = np.zeros((nvir, nvir), dtype=np.float64) + x198 = np.zeros((nvir, nvir), dtype=types[float]) x198 += einsum("ab->ab", x76) del x76 - x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x77 += einsum("iabc->ibac", v.ovvv) * -0.5 x77 += einsum("iabc->ibca", v.ovvv) - x78 = np.zeros((nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir), dtype=types[float]) x78 += einsum("ia,ibca->bc", t1, x77) * 2 x79 += einsum("ab->ab", x78) x198 += einsum("ab->ab", x78) del x78 - x201 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x201 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x201 += einsum("wia,ibca->wbc", u11, x77) * 2 del x77 x79 += einsum("ab->ab", f.vv) x82 += einsum("ia,ba->ib", t1, x79) - x211 = np.zeros((nocc, nvir), dtype=np.float64) + x211 = np.zeros((nocc, nvir), dtype=types[float]) x211 += einsum("ia,ba->ib", t1, x79) * 0.5 del x79 x213 += einsum("ia->ia", x211) del x211 - x80 = np.zeros((nbos), dtype=np.float64) + x80 = np.zeros((nbos), dtype=types[float]) x80 += einsum("ia,wia->w", t1, g.bov) - x81 = np.zeros((nbos), dtype=np.float64) + x81 = np.zeros((nbos), dtype=types[float]) x81 += einsum("w->w", x80) * 2 - x135 = np.zeros((nbos), dtype=np.float64) + x135 = np.zeros((nbos), dtype=types[float]) x135 += einsum("w->w", x80) * 2 del x80 x81 += einsum("w->w", G) x82 += einsum("w,wia->ia", x81, u11) x204 += einsum("w,wxia->xia", x81, u12) * -1 - x212 = np.zeros((nocc, nvir), dtype=np.float64) + x212 = np.zeros((nocc, nvir), dtype=types[float]) x212 += einsum("w,wia->ia", x81, u11) * 0.5 del x81 x213 += einsum("ia->ia", x212) del x212 x82 += einsum("ai->ia", f.vo) - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("abij->jiab", l2) * 2 x83 += einsum("abij->jiba", l2) * -1 l1new += einsum("ia,ijba->bj", x82, x83) del x82 del x83 - x84 = np.zeros((nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nvir), dtype=types[float]) x84 += einsum("w,wia->ia", ls1, u11) x99 += einsum("ia->ia", x84) * -1 del x84 - x85 = np.zeros((nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nvir), dtype=types[float]) x85 += einsum("wx,wxia->ia", ls2, u12) x99 += einsum("ia->ia", x85) * -0.5 del x85 - x89 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x89 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x89 += einsum("ia,waj->wji", t1, lu11) - x91 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x91 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x91 += einsum("wij->wij", x89) - x119 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x119 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x119 += einsum("wij->wij", x89) - x90 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x90 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x90 += einsum("wia,wxaj->xji", u11, lu12) x91 += einsum("wij->wij", x90) - x92 = np.zeros((nocc, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nvir), dtype=types[float]) x92 += einsum("wia,wij->ja", u11, x91) del x91 x99 += einsum("ia->ia", x92) del x92 x119 += einsum("wij->wij", x90) - x120 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x120 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x120 += einsum("wx,wij->xij", s2, x119) - x235 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x235 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x235 += einsum("wia,xji->xwja", g.bov, x119) - x236 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x236 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x236 += einsum("wxia->xwia", x235) del x235 - x218 = np.zeros((nbos, nbos), dtype=np.float64) + x218 = np.zeros((nbos, nbos), dtype=types[float]) x218 += einsum("wij,xji->wx", g.boo, x90) x228 -= einsum("wx->wx", x218) * 2 del x218 - x223 = np.zeros((nbos, nbos), dtype=np.float64) + x223 = np.zeros((nbos, nbos), dtype=types[float]) x223 += einsum("wij,xji->wx", x67, x90) del x90 del x67 x228 -= einsum("wx->wx", x223) * 2 del x223 - x93 = np.zeros((nocc, nocc), dtype=np.float64) + x93 = np.zeros((nocc, nocc), dtype=types[float]) x93 += einsum("ai,ja->ij", l1, t1) x97 += einsum("ij->ij", x93) - x167 = np.zeros((nocc, nocc), dtype=np.float64) + x167 = np.zeros((nocc, nocc), dtype=types[float]) x167 += einsum("ij->ij", x93) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new -= einsum("ij,wji->w", x93, g.boo) * 2 del x93 - x94 = np.zeros((nocc, nocc), dtype=np.float64) + x94 = np.zeros((nocc, nocc), dtype=types[float]) x94 += einsum("wai,wja->ij", lu11, u11) x97 += einsum("ij->ij", x94) x167 += einsum("ij->ij", x94) - x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x168 += einsum("ij,jakb->ikab", x167, v.ovov) del x167 x170 += einsum("ijab->ijba", x168) del x168 x215 += einsum("ij->ij", x94) del x94 - x95 = np.zeros((nocc, nocc), dtype=np.float64) + x95 = np.zeros((nocc, nocc), dtype=types[float]) x95 += einsum("wxai,wxja->ij", lu12, u12) x97 += einsum("ij->ij", x95) * 0.5 - x98 = np.zeros((nocc, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir), dtype=types[float]) x98 += einsum("ia,ij->ja", t1, x97) x99 += einsum("ia->ia", x98) del x98 l1new += einsum("ia,ji->aj", x64, x97) * -1 del x64 x148 += einsum("ij->ij", x95) * 0.5 - x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x149 += einsum("ij,jakb->ikab", x148, v.ovov) del x148 - x150 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x150 += einsum("ijab->ijba", x149) del x149 x215 += einsum("ij->ij", x95) * 0.5 @@ -1278,31 +1279,31 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x215 x99 += einsum("ia->ia", t1) * -1 ls1new += einsum("ia,wia->w", x99, g.bov) * -2 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum("iajb->jiab", v.ovov) * 2 x100 += einsum("iajb->jiba", v.ovov) * -1 l1new += einsum("ia,ijba->bj", x99, x100) * -1 del x99 del x100 - x101 = np.zeros((nvir, nvir), dtype=np.float64) + x101 = np.zeros((nvir, nvir), dtype=types[float]) x101 += einsum("ai,ib->ab", l1, t1) x105 += einsum("ab->ab", x101) ls1new += einsum("ab,wab->w", x101, g.bvv) * 2 del x101 - x102 = np.zeros((nvir, nvir), dtype=np.float64) + x102 = np.zeros((nvir, nvir), dtype=types[float]) x102 += einsum("wai,wib->ab", lu11, u11) x105 += einsum("ab->ab", x102) - x153 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x153 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x153 += einsum("ab,icjb->ijac", x102, v.ovov) x170 += einsum("ijab->ijab", x153) del x153 x214 += einsum("ab->ab", x102) * 2 del x102 - x103 = np.zeros((nvir, nvir), dtype=np.float64) + x103 = np.zeros((nvir, nvir), dtype=types[float]) x103 += einsum("wxai,wxib->ab", lu12, u12) x105 += einsum("ab->ab", x103) * 0.5 x146 += einsum("ab->ab", x103) * 0.5 - x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x147 += einsum("ab,ibjc->ijac", x146, v.ovov) del x146 x150 += einsum("ijab->jiab", x147) @@ -1314,61 +1315,61 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x103 ls1new += einsum("ab,wab->w", x214, g.bvv) del x214 - x106 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x106 += einsum("iabc->ibac", v.ovvv) * -1 x106 += einsum("iabc->ibca", v.ovvv) * 2 l1new += einsum("ab,iabc->ci", x105, x106) del x105 del x106 - x107 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x107 -= einsum("ijka->ikja", v.ooov) x107 += einsum("ijka->kija", v.ooov) * 2 l1new += einsum("ij,kjia->ak", x97, x107) * -1 del x97 del x107 - x108 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x108 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x108 += einsum("wia,wxja->xij", g.bov, u12) - x116 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x116 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x116 += einsum("wij->wij", x108) x200 += einsum("wij->wij", x108) del x108 - x109 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x109 += einsum("ijka->ikja", v.ooov) * 2 x109 -= einsum("ijka->kija", v.ooov) x116 += einsum("wia,jika->wjk", u11, x109) - x183 = np.zeros((nocc, nocc), dtype=np.float64) + x183 = np.zeros((nocc, nocc), dtype=types[float]) x183 += einsum("ia,jika->jk", t1, x109) - x185 = np.zeros((nocc, nocc), dtype=np.float64) + x185 = np.zeros((nocc, nocc), dtype=types[float]) x185 += einsum("ij->ij", x183) del x183 lu12new -= einsum("ijka,wxki->xwaj", x109, x31) del x109 - x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x110 += einsum("iajb->jiab", v.ovov) * 2 x110 -= einsum("iajb->jiba", v.ovov) - x111 = np.zeros((nocc, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nvir), dtype=types[float]) x111 += einsum("ia,ijba->jb", t1, x110) x112 += einsum("ia->ia", x111) - x184 = np.zeros((nocc, nocc), dtype=np.float64) + x184 = np.zeros((nocc, nocc), dtype=types[float]) x184 += einsum("ia,ja->ji", t1, x111) x185 += einsum("ij->ij", x184) del x184 - x186 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x186 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x186 += einsum("ij,abjk->ikab", x185, l2) del x185 x191 -= einsum("ijab->jiba", x186) del x186 - x189 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x189 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x189 += einsum("ia,jkib->jkab", x111, x32) x191 -= einsum("ijab->ijba", x189) del x189 x191 += einsum("ai,jb->ijab", l1, x111) del x111 - x113 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x113 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x113 += einsum("wia,ijba->wjb", u11, x110) - x114 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x114 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x114 += einsum("wia->wia", x113) - x190 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x190 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x190 += einsum("wai,wjb->jiba", lu11, x113) del x113 x191 += einsum("ijab->jiba", x190) @@ -1378,9 +1379,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x110 x112 += einsum("ia->ia", f.ov) x116 += einsum("ia,wja->wij", x112, u11) - x134 = np.zeros((nbos), dtype=np.float64) + x134 = np.zeros((nbos), dtype=types[float]) x134 += einsum("ia,wia->w", x112, u11) - x137 = np.zeros((nbos), dtype=np.float64) + x137 = np.zeros((nbos), dtype=types[float]) x137 += einsum("w->w", x134) * 2 del x134 lu12new -= einsum("ia,wxji->xwaj", x112, x31) @@ -1393,25 +1394,25 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x119 x115 += einsum("wij->wij", g.boo) x116 += einsum("wx,wij->xij", s2, x115) - x227 = np.zeros((nbos, nbos), dtype=np.float64) + x227 = np.zeros((nbos, nbos), dtype=types[float]) x227 += einsum("wij,xji->wx", x115, x89) del x89 x228 -= einsum("wx->wx", x227) * 2 del x227 - x234 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x234 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x234 += einsum("wai,xji->xwja", lu11, x115) x236 += einsum("wxia->wxia", x234) del x234 x116 += einsum("wij->wij", gc.boo) l1new -= einsum("wai,wji->aj", lu11, x116) del x116 - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum("abij->jiab", l2) * 2 x117 -= einsum("abij->jiba", l2) - x118 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x118 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x118 += einsum("wia,ijba->wjb", u11, x117) x120 += einsum("ia,wja->wji", t1, x118) - x122 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x122 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x122 += einsum("wia->wia", x118) l1new -= einsum("wij,wja->ai", x115, x118) del x115 @@ -1422,11 +1423,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x120 += einsum("wai,wxja->xij", lu11, u12) l1new -= einsum("wia,wji->aj", g.bov, x120) del x120 - x121 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x121 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x121 += einsum("wx,wai->xia", s2, lu11) x122 += einsum("wia->wia", x121) del x121 - x188 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x188 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x188 += einsum("wia,wjb->jiba", g.bov, x122) x191 += einsum("ijab->jiba", x188) del x188 @@ -1438,15 +1439,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x125 += einsum("wia->wia", gc.bov) * 2 x128 += einsum("wia,xia->xw", u11, x125) del x125 - x126 = np.zeros((nbos, nbos), dtype=np.float64) + x126 = np.zeros((nbos, nbos), dtype=types[float]) x126 += einsum("wia,xia->wx", g.bov, u11) - x127 = np.zeros((nbos, nbos), dtype=np.float64) + x127 = np.zeros((nbos, nbos), dtype=types[float]) x127 += einsum("wx->wx", x126) * 2 - x217 = np.zeros((nbos, nbos), dtype=np.float64) + x217 = np.zeros((nbos, nbos), dtype=types[float]) x217 += einsum("wx,yx->yw", ls2, x126) x228 += einsum("wx->wx", x217) * 2 del x217 - x233 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x233 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x233 += einsum("wx,xyai->wyia", x126, lu12) del x126 x236 -= einsum("wxia->wxia", x233) * 2 @@ -1460,20 +1461,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x130 += einsum("ab->ab", f.vv) l1new += einsum("ai,ab->bi", l1, x130) del x130 - x131 = np.zeros((nbos), dtype=np.float64) + x131 = np.zeros((nbos), dtype=types[float]) x131 += einsum("w,wx->x", s1, w) x137 += einsum("w->w", x131) del x131 - x132 = np.zeros((nbos), dtype=np.float64) + x132 = np.zeros((nbos), dtype=types[float]) x132 += einsum("ia,wia->w", t1, gc.bov) x137 += einsum("w->w", x132) * 2 del x132 - x133 = np.zeros((nbos), dtype=np.float64) + x133 = np.zeros((nbos), dtype=types[float]) x133 += einsum("wia,wxia->x", g.bov, u12) x137 += einsum("w->w", x133) * 2 del x133 x135 += einsum("w->w", G) - x136 = np.zeros((nbos), dtype=np.float64) + x136 = np.zeros((nbos), dtype=types[float]) x136 += einsum("w,wx->x", x135, s2) x137 += einsum("w->w", x136) del x136 @@ -1483,63 +1484,63 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("w,wai->ai", x137, lu11) ls1new += einsum("w,wx->x", x137, ls2) del x137 - x138 = np.zeros((nbos), dtype=np.float64) + x138 = np.zeros((nbos), dtype=types[float]) x138 += einsum("w->w", s1) x138 += einsum("w,xw->x", ls1, s2) x138 += einsum("ai,wia->w", l1, u11) * 2 x138 += einsum("wai,wxia->x", lu11, u12) * 2 l1new += einsum("w,wia->ai", x138, g.bov) del x138 - x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x151 += einsum("ai,jbac->ijbc", l1, v.ovvv) x170 -= einsum("ijab->ijab", x151) del x151 - x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x155 += einsum("ijab,kbic->jkac", t2, v.ovov) x156 -= einsum("ijab->ijab", x155) del x155 x156 += einsum("ijab->jiab", v.oovv) - x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x157 += einsum("abij,ikbc->kjca", l2, x156) x170 += einsum("ijab->jiba", x157) del x157 - x180 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x180 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x180 += einsum("abij,ikac->kjcb", l2, x156) del x156 x191 -= einsum("ijab->jiba", x180) del x180 x158 += einsum("ijka->jkia", v.ooov) - x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x159 += einsum("ijka,iljb->klab", x158, x32) x170 -= einsum("ijab->jiba", x159) del x159 - x181 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x181 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x181 += einsum("ijka,likb->ljba", x158, x38) del x38 x191 -= einsum("ijab->ijab", x181) del x181 - x182 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x182 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x182 += einsum("ijka,lijb->klab", x158, x32) del x158 x191 += einsum("ijab->jiba", x182) del x182 - x160 = np.zeros((nvir, nvir), dtype=np.float64) + x160 = np.zeros((nvir, nvir), dtype=types[float]) x160 += einsum("wia,wib->ab", g.bov, u11) x161 -= einsum("ab->ba", x160) x198 += einsum("ab->ba", x160) * -1 del x160 x161 += einsum("ab->ab", f.vv) - x162 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x162 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x162 += einsum("ab,acij->ijbc", x161, l2) del x161 x170 -= einsum("ijab->jiab", x162) del x162 x163 += einsum("ia->ia", f.ov) - x164 = np.zeros((nocc, nocc), dtype=np.float64) + x164 = np.zeros((nocc, nocc), dtype=types[float]) x164 += einsum("ia,ja->ji", t1, x163) x165 += einsum("ij->ij", x164) del x164 - x169 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x169 += einsum("ia,jkib->jkab", x163, x32) del x32 x170 += einsum("ijab->ijab", x169) @@ -1547,7 +1548,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x191 += einsum("ai,jb->jiba", l1, x163) del x163 x165 += einsum("ij->ij", f.oo) - x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x166 += einsum("ij,abjk->ikab", x165, l2) del x165 x170 += einsum("ijab->ijba", x166) @@ -1555,31 +1556,31 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->baij", x170) l2new -= einsum("ijab->abji", x170) del x170 - x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x171 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x171 += einsum("wia,wbj->ijab", gc.bov, lu11) x191 += einsum("ijab->ijab", x171) del x171 - x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x172 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x172 += einsum("ai,jikb->jkab", l1, v.ooov) x191 -= einsum("ijab->ijab", x172) del x172 - x174 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x174 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x174 -= einsum("abij->jiab", l2) x174 += einsum("abij->jiba", l2) * 2 - x175 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x175 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x175 += einsum("ijab,kaic->jkbc", t2, v.ovov) x178 -= einsum("ijab->ijab", x175) del x175 - x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x176 -= einsum("ijab->jiab", t2) x176 += einsum("ijab->jiba", t2) * 2 - x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x177 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x177 += einsum("iajb,ikac->kjcb", v.ovov, x176) del x176 x178 += einsum("ijab->ijab", x177) del x177 x178 += einsum("iabj->jiba", v.ovvo) - x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x179 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x179 += einsum("ijab,ikac->jkbc", x174, x178) del x178 del x174 @@ -1595,15 +1596,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x204 += einsum("wia,ijba->wjb", x194, x33) * -1 del x33 del x194 - x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x195 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x195 += einsum("iabj->ijba", v.ovvo) * 2 x195 += einsum("ijab->ijab", v.oovv) * -1 x204 += einsum("wia,ijba->wjb", u11, x195) * -1 del x195 - x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x196 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x196 += einsum("ijab->jiab", t2) * -1 x196 += einsum("ijab->jiba", t2) * 2 - x197 = np.zeros((nvir, nvir), dtype=np.float64) + x197 = np.zeros((nvir, nvir), dtype=types[float]) x197 += einsum("iajb,ijcb->ca", v.ovov, x196) del x196 x198 += einsum("ab->ab", x197) * -1 @@ -1621,9 +1622,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x201 += einsum("wab->wab", gc.bvv) x204 += einsum("ia,wba->wib", t1, x201) * -1 del x201 - x202 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x202 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x202 += einsum("ia,wba->wib", t1, g.bvv) - x203 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x203 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x203 += einsum("wia->wia", x202) x225 += einsum("wia->wia", x202) del x202 @@ -1636,26 +1637,26 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x204 x213 += einsum("ai->ia", f.vo) * 0.5 ls1new += einsum("ia,wai->w", x213, lu11) * 4 - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("ia,wxai->xw", x213, lu12) * 4 del x213 - x216 = np.zeros((nbos, nbos), dtype=np.float64) + x216 = np.zeros((nbos, nbos), dtype=types[float]) x216 += einsum("wx,yx->wy", ls2, w) x228 += einsum("wx->wx", x216) del x216 - x219 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x219 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x219 += einsum("wia,wxbi->xba", u11, lu12) - x220 = np.zeros((nbos, nbos), dtype=np.float64) + x220 = np.zeros((nbos, nbos), dtype=types[float]) x220 += einsum("wab,xab->wx", g.bvv, x219) x228 += einsum("wx->wx", x220) * 2 del x220 - x232 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x232 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x232 += einsum("wia,xba->wxib", g.bov, x219) del x219 x236 += einsum("wxia->wxia", x232) del x232 x225 += einsum("wai->wia", g.bvo) - x226 = np.zeros((nbos, nbos), dtype=np.float64) + x226 = np.zeros((nbos, nbos), dtype=types[float]) x226 += einsum("wai,xia->xw", lu11, x225) del x225 x228 += einsum("wx->wx", x226) * 2 @@ -1663,15 +1664,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls2new += einsum("wx->wx", x228) ls2new += einsum("wx->xw", x228) del x228 - x229 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x229 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x229 += einsum("wia,xyai->xyw", u11, lu12) lu12new += einsum("wia,xyw->yxai", g.bov, x229) * 2 del x229 - x230 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x230 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x230 += einsum("wx,xyai->ywia", w, lu12) x236 -= einsum("wxia->wxia", x230) del x230 - x231 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x231 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x231 += einsum("wab,xai->wxib", g.bvv, lu11) x236 -= einsum("wxia->wxia", x231) del x231 @@ -1715,66 +1716,66 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("wxai,wxja->ij", lu12, u12) - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum("ij->ij", x0) * 0.5 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum("ij->ij", x0) * -1 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("wai,wja->ij", lu11, u11) x10 += einsum("ij->ij", x1) rdm1_f_oo -= einsum("ij->ij", x1) * 2 del x1 - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("ai,ja->ij", l1, t1) x10 += einsum("ij->ij", x2) rdm1_f_oo -= einsum("ij->ij", x2) * 2 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum("ijab->jiab", t2) * -1 x3 += einsum("ijab->jiba", t2) * 2 rdm1_f_oo += einsum("abij,ikab->jk", l2, x3) * -2 del x3 - x4 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x4 += einsum("ia,wxaj->wxji", t1, lu12) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum("wxia,wxij->aj", u12, x4) * -1 del x4 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ia,bajk->jkib", t1, l2) - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum("ijka->ijka", x5) * 2 x6 += einsum("ijka->jika", x5) * -1 del x5 rdm1_f_vo += einsum("ijab,jikb->ak", t2, x6) * -2 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 -= einsum("ijab->jiab", t2) x7 += einsum("ijab->jiba", t2) * 2 rdm1_f_vo += einsum("ai,ijab->bj", l1, x7) * 2 del x7 - x8 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x8 += einsum("ia,waj->wji", t1, lu11) x8 += einsum("wia,wxaj->xji", u11, lu12) rdm1_f_vo -= einsum("wia,wij->aj", u11, x8) * 2 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum("ijab->jiab", t2) x9 += einsum("ijab->jiba", t2) * -0.5 x10 += einsum("abij,ikba->jk", l2, x9) * 2 del x9 rdm1_f_vo += einsum("ia,ij->aj", t1, x10) * -2 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum("abij->jiab", l2) x11 += einsum("abij->jiba", l2) * -0.5 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("ijab,ijbc->ac", t2, x11) * 4 del x11 rdm1_f_oo += einsum("ij->ji", delta_oo) * 2 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) * 2 rdm1_f_vo += einsum("wx,wxia->ai", ls2, u12) rdm1_f_vo += einsum("w,wia->ai", ls1, u11) * 2 @@ -1800,51 +1801,51 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11, u11) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum("ij->ij", x0) - x32 = np.zeros((nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir), dtype=types[float]) x32 += einsum("ia,ij->ja", t1, x0) - x37 = np.zeros((nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nvir), dtype=types[float]) x37 += einsum("ia->ia", x32) del x32 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum("ij,kiab->kjab", x0, t2) - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ijab->ijab", x65) del x65 - x111 = np.zeros((nocc, nocc), dtype=np.float64) + x111 = np.zeros((nocc, nocc), dtype=types[float]) x111 += einsum("ij->ij", x0) - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo -= einsum("ij,kl->ijkl", delta_oo, x0) * 4 rdm2_f_oooo += einsum("ij,kl->ilkj", delta_oo, x0) * 2 rdm2_f_oooo += einsum("ij,kl->kijl", delta_oo, x0) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x0) * 4 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("ai,ja->ij", l1, t1) x13 += einsum("ij->ij", x1) - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum("ia,jk->jika", t1, x13) del x13 - x41 = np.zeros((nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nvir), dtype=types[float]) x41 += einsum("ia,ij->ja", t1, x1) - x42 = np.zeros((nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nvir), dtype=types[float]) x42 += einsum("ia->ia", x41) * -1 del x41 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ij,kiab->jkab", x1, t2) - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum("ijab->ijab", x79) del x79 x111 += einsum("ij->ij", x1) - x112 = np.zeros((nocc, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nvir), dtype=types[float]) x112 += einsum("ia,ij->ja", t1, x111) del x111 - x113 = np.zeros((nocc, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nvir), dtype=types[float]) x113 += einsum("ia->ia", x112) - x114 = np.zeros((nocc, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nvir), dtype=types[float]) x114 += einsum("ia->ia", x112) del x112 rdm2_f_oooo -= einsum("ij,kl->jikl", delta_oo, x1) * 4 @@ -1852,141 +1853,141 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jlki", delta_oo, x1) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x1) * 4 del x1 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum("abij,klba->ijlk", l2, t2) - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ia,jikl->jkla", t1, x2) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum("ijka->ijka", x19) * -4 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum("ijka->ijka", x19) * 2 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum("ia,ijkb->kjba", t1, x19) del x19 - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 += einsum("ijab->ijab", x106) * 2.0000000000000013 del x106 - x107 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x107 += einsum("ijkl->jilk", x2) rdm2_f_oooo += einsum("ijkl->jkil", x2) * -2 rdm2_f_oooo += einsum("ijkl->jlik", x2) * 4 del x2 - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum("ia,bajk->jkib", t1, l2) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum("ia,jkla->kjli", t1, x3) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum("ia,ijkl->jlka", t1, x4) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 -= einsum("ijka->ijka", x29) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum("ijka->ijka", x29) - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum("ia,ijkb->jkab", t1, x29) del x29 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum("ijab->ijab", x89) del x89 x107 += einsum("ijkl->ijkl", x4) - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum("ijab,ijkl->klab", t2, x107) * 2 del x107 x109 += einsum("ijab->ijab", x108) del x108 - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->ajbi", x109) * -1 rdm2_f_vovo += einsum("ijab->bjai", x109) * 2 del x109 rdm2_f_oooo += einsum("ijkl->ikjl", x4) * 4 rdm2_f_oooo -= einsum("ijkl->iljk", x4) * 2 del x4 - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ijab,kjla->klib", t2, x3) x14 -= einsum("ijka->ijka", x12) - x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x84 -= einsum("ijka->ijka", x12) del x12 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum("ijka->ijka", x3) x21 += einsum("ijka->jika", x3) * -0.5 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("ijab,ijka->kb", t2, x21) * 4 - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 += einsum("ia->ia", x22) del x22 - x99 = np.zeros((nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir), dtype=types[float]) x99 += einsum("ijab,ijka->kb", t2, x21) * 4.000000000000003 del x21 - x102 = np.zeros((nocc, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nvir), dtype=types[float]) x102 += einsum("ia->ia", x99) del x99 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum("ijab,jkla->klib", t2, x3) x38 -= einsum("ijka->ijka", x28) del x28 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 -= einsum("ijka->ijka", x3) x30 += einsum("ijka->jika", x3) * 2 - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum("ijab,kila->kljb", t2, x30) x38 += einsum("ijka->ijka", x31) del x31 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("ia,ijkb->jkab", t1, x30) del x30 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->ibaj", x61) * 2 - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->ajib", x61) * 2 del x61 - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum("ijab,kjlb->klia", t2, x3) x47 += einsum("ijka->ijka", x44) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum("ijka->ijka", x44) del x44 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum("ijka->ijka", x3) * 2 x52 -= einsum("ijka->jika", x3) - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum("ia,ijkb->jkab", t1, x52) del x52 - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv -= einsum("ijab->ijab", x53) * 2 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo -= einsum("ijab->abij", x53) * 2 del x53 - x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum("ia,jikb->jkba", t1, x3) - x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x121 += einsum("ijab->ijab", x119) del x119 - x131 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x131 += einsum("ijab,ijkc->kcab", t2, x3) - x132 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x132 += einsum("iabc->iabc", x131) * 2 - x133 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x133 += einsum("iabc->iabc", x131) * 4 del x131 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum("ijka->ikja", x3) * 2 rdm2_f_ooov -= einsum("ijka->jkia", x3) * 4 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo -= einsum("ijka->iajk", x3) * 4 rdm2_f_ovoo += einsum("ijka->jaik", x3) * 2 - x5 = np.zeros((nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc), dtype=types[float]) x5 += einsum("wxai,wxja->ij", lu12, u12) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("ij->ij", x5) - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ij->ij", x5) * 0.5 - x100 = np.zeros((nocc, nocc), dtype=np.float64) + x100 = np.zeros((nocc, nocc), dtype=types[float]) x100 += einsum("ij->ij", x5) * 0.49999999999999967 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum("ijab->jiab", t2) x6 += einsum("ijab->jiba", t2) * -0.5 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("abij,ikba->kj", l2, x6) * 4 x8 += einsum("ij->ji", x7) del x7 @@ -1995,53 +1996,53 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->kjil", delta_oo, x8) rdm2_f_oooo += einsum("ij,kl->klij", delta_oo, x8) * -2 del x8 - x15 = np.zeros((nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc), dtype=types[float]) x15 += einsum("abij,ikba->kj", l2, x6) * 2 x16 += einsum("ij->ji", x15) - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("ia,ij->ja", t1, x16) * 2 x24 += einsum("ia->ia", x23) del x23 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum("ij,ikab->jkab", x16, t2) * 4 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum("ijab->jiba", x98) del x98 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ia,jk->jiak", t1, x16) * 2 rdm2_f_oovo += einsum("ia,jk->jkai", t1, x16) * -4 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ia,jk->aijk", t1, x16) * -4 rdm2_f_vooo += einsum("ia,jk->akji", t1, x16) * 2 del x16 x100 += einsum("ij->ji", x15) del x15 - x101 = np.zeros((nocc, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir), dtype=types[float]) x101 += einsum("ia,ij->ja", t1, x100) * 2.0000000000000013 del x100 x102 += einsum("ia->ia", x101) del x101 - x93 = np.zeros((nbos, nbos, nocc, nvir), dtype=np.float64) + x93 = np.zeros((nbos, nbos, nocc, nvir), dtype=types[float]) x93 += einsum("wxai,ijba->wxjb", lu12, x6) * 2 del x6 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum("wxia,xwjb->ijab", u12, x93) * 2 del x93 x103 += einsum("ijab->jiba", x94) * -1 del x94 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum("ai,jkba->ijkb", l1, t2) x14 += einsum("ijka->ijka", x9) x84 += einsum("ijka->ijka", x9) del x9 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum("ia,ijkb->jkab", t1, x84) del x84 x86 += einsum("ijab->ijab", x85) del x85 - x10 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x10 += einsum("wia,wxaj->xji", u11, lu12) - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum("wia,wjk->jika", u11, x10) x14 += einsum("ijka->ijka", x11) del x11 @@ -2050,36 +2051,36 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo -= einsum("ijka->ajik", x14) * 4 rdm2_f_vooo += einsum("ijka->akij", x14) * 2 del x14 - x35 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x35 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x35 += einsum("wij->wij", x10) - x74 = np.zeros((nocc, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nvir), dtype=types[float]) x74 += einsum("wia,wij->ja", u11, x10) - x75 = np.zeros((nocc, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nvir), dtype=types[float]) x75 += einsum("ia->ia", x74) del x74 - x82 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x82 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x82 += einsum("ia,wij->wja", t1, x10) del x10 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("wia,wjb->ijba", u11, x82) del x82 x86 += einsum("ijab->ijab", x83) del x83 - x17 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x17 += einsum("ia,wxaj->wxji", t1, lu12) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum("wxia,wxjk->jkia", u12, x17) x25 += einsum("ijka->ijka", x18) * 2 x43 += einsum("ijka->ijka", x18) * -1 rdm2_f_vooo += einsum("ijka->ajik", x43) * -1 rdm2_f_vooo += einsum("ijka->akij", x43) * 2 del x43 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum("ia,ijkb->jkab", t1, x18) del x18 x103 += einsum("ijab->ijab", x92) * 2 del x92 - x20 = np.zeros((nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir), dtype=types[float]) x20 += einsum("wxia,wxij->ja", u12, x17) x24 += einsum("ia->ia", x20) x25 += einsum("ij,ka->jika", delta_oo, x24) * 2 @@ -2093,10 +2094,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x20 x103 += einsum("ia,jb->ijab", t1, x102) * 2 del x102 - x80 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x80 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x80 += einsum("wia,wxij->xja", u11, x17) del x17 - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("wia,wjb->jiab", u11, x80) del x80 x86 += einsum("ijab->ijab", x81) @@ -2106,34 +2107,34 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ijab->ajbi", x86) * 4 rdm2_f_vovo += einsum("ijab->bjai", x86) * 2 del x86 - x26 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x26 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x26 += einsum("ia,waj->wji", t1, lu11) - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum("wia,wjk->jkia", u11, x26) x38 += einsum("ijka->ijka", x27) x47 -= einsum("ijka->ijka", x27) del x27 x35 += einsum("wij->wij", x26) - x36 = np.zeros((nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nvir), dtype=types[float]) x36 += einsum("wia,wij->ja", u11, x35) del x35 x37 += einsum("ia->ia", x36) del x36 - x70 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x70 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x70 += einsum("ia,wij->wja", t1, x26) - x72 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x72 += einsum("wia->wia", x70) del x70 - x110 = np.zeros((nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nvir), dtype=types[float]) x110 += einsum("wia,wij->ja", u11, x26) del x26 x113 += einsum("ia->ia", x110) x114 += einsum("ia->ia", x110) del x110 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 -= einsum("ijab->jiab", t2) x33 += einsum("ijab->jiba", t2) * 2 - x34 = np.zeros((nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nvir), dtype=types[float]) x34 += einsum("ai,ijab->jb", l1, x33) x37 -= einsum("ia->ia", x34) x38 += einsum("ij,ka->jika", delta_oo, x37) @@ -2147,28 +2148,28 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x34 x76 += einsum("ia,jb->ijab", t1, x75) del x75 - x71 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x71 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x71 += einsum("wai,ijab->wjb", lu11, x33) x72 -= einsum("wia->wia", x71) del x71 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("wia,wjb->ijab", u11, x72) del x72 x76 += einsum("ijab->jiba", x73) del x73 - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum("abij,ikac->kjcb", l2, x33) x121 -= einsum("ijab->jiba", x120) del x120 rdm2_f_vvoo -= einsum("abij,ikcb->cajk", l2, x33) * 2 del x33 - x39 = np.zeros((nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nvir), dtype=types[float]) x39 += einsum("w,wia->ia", ls1, u11) x42 += einsum("ia->ia", x39) x113 += einsum("ia->ia", x39) * -1 x114 += einsum("ia->ia", x39) * -1 del x39 - x40 = np.zeros((nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nvir), dtype=types[float]) x40 += einsum("wx,wxia->ia", ls2, u12) x42 += einsum("ia->ia", x40) * 0.5 x113 += einsum("ia->ia", x40) * -0.5 @@ -2183,10 +2184,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ij,ka->aijk", delta_oo, x42) * -2 rdm2_f_vooo += einsum("ij,ka->akji", delta_oo, x42) * 4 del x42 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ijab->jiab", t2) * 2 x45 -= einsum("ijab->jiba", t2) - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum("ijka,ilba->ljkb", x3, x45) del x3 x47 -= einsum("ijka->jkia", x46) @@ -2195,24 +2196,24 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x47 x68 -= einsum("ijka->jkia", x46) del x46 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum("ia,ijkb->jkab", t1, x68) del x68 x76 -= einsum("ijab->ijab", x69) del x69 rdm2_f_vvoo -= einsum("abij,ikca->cbjk", l2, x45) * 2 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("wxai,wxjb->ijab", lu12, u12) - x130 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x130 += einsum("ia,ijbc->jbac", t1, x48) x132 += einsum("iabc->iabc", x130) * -1 - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->bica", x132) rdm2_f_vovv += einsum("iabc->ciba", x132) * -2 del x132 x133 += einsum("iabc->iabc", x130) * -2 del x130 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->baci", x133) * -1 rdm2_f_vvvo += einsum("iabc->cabi", x133) * 0.5 del x133 @@ -2221,17 +2222,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ijab->bjia", x48) * 2 rdm2_f_vvoo += einsum("ijab->baij", x48) * -1 del x48 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_oovv -= einsum("ijab->ijba", x49) * 2 rdm2_f_ovvo += einsum("ijab->iabj", x49) * 4 rdm2_f_voov += einsum("ijab->bjia", x49) * 4 rdm2_f_vvoo -= einsum("ijab->baij", x49) * 2 del x49 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 -= einsum("abij->jiab", l2) x50 += einsum("abij->jiba", l2) * 2 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ijab,ikbc->jkac", x45, x50) del x45 rdm2_f_ovvo += einsum("ijab->jbai", x60) * 2 @@ -2239,36 +2240,36 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x60 rdm2_f_oovv -= einsum("ijab,ikac->kjbc", t2, x50) * 2 del x50 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum("abij->jiab", l2) * 2 x51 -= einsum("abij->jiba", l2) - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum("ijab,ikca->kjcb", t2, x51) - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum("ijab,ikbc->kjca", t2, x66) x76 += einsum("ijab->ijab", x67) del x67 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum("ijab,ikac->kjcb", t2, x66) del x66 x91 += einsum("ijab->ijab", x90) * 2 del x90 rdm2_f_oovv -= einsum("ijab,ikbc->kjac", t2, x51) * 2 del x51 - x54 = np.zeros((nvir, nvir), dtype=np.float64) + x54 = np.zeros((nvir, nvir), dtype=types[float]) x54 += einsum("ai,ib->ab", l1, t1) - x59 = np.zeros((nvir, nvir), dtype=np.float64) + x59 = np.zeros((nvir, nvir), dtype=types[float]) x59 += einsum("ab->ab", x54) * 0.5 - x63 = np.zeros((nvir, nvir), dtype=np.float64) + x63 = np.zeros((nvir, nvir), dtype=types[float]) x63 += einsum("ab->ab", x54) - x128 = np.zeros((nvir, nvir), dtype=np.float64) + x128 = np.zeros((nvir, nvir), dtype=types[float]) x128 += einsum("ab->ab", x54) del x54 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum("wai,wib->ab", lu11, u11) x59 += einsum("ab->ab", x55) * 0.5 x63 += einsum("ab->ab", x55) - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum("ab,ijac->jicb", x55, t2) x76 += einsum("ijab->ijab", x64) del x64 @@ -2279,39 +2280,39 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x76 x128 += einsum("ab->ab", x55) del x55 - x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x129 += einsum("ia,bc->ibac", t1, x128) del x128 - x56 = np.zeros((nvir, nvir), dtype=np.float64) + x56 = np.zeros((nvir, nvir), dtype=types[float]) x56 += einsum("wxai,wxib->ab", lu12, u12) x59 += einsum("ab->ab", x56) * 0.25 x63 += einsum("ab->ab", x56) * 0.5 - x96 = np.zeros((nvir, nvir), dtype=np.float64) + x96 = np.zeros((nvir, nvir), dtype=types[float]) x96 += einsum("ab->ab", x56) del x56 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("abij->jiab", l2) x57 += einsum("abij->jiba", l2) * -0.5 - x58 = np.zeros((nvir, nvir), dtype=np.float64) + x58 = np.zeros((nvir, nvir), dtype=types[float]) x58 += einsum("ijab,ijca->cb", t2, x57) x59 += einsum("ab->ab", x58) del x58 rdm2_f_oovv += einsum("ij,ab->jiba", delta_oo, x59) * 8 rdm2_f_vvoo += einsum("ij,ab->baji", delta_oo, x59) * 8 del x59 - x62 = np.zeros((nvir, nvir), dtype=np.float64) + x62 = np.zeros((nvir, nvir), dtype=types[float]) x62 += einsum("ijab,ijca->cb", t2, x57) * 2 x63 += einsum("ab->ab", x62) del x62 rdm2_f_ovvo += einsum("ij,ab->jabi", delta_oo, x63) * -2 rdm2_f_voov += einsum("ij,ab->bija", delta_oo, x63) * -2 del x63 - x95 = np.zeros((nvir, nvir), dtype=np.float64) + x95 = np.zeros((nvir, nvir), dtype=types[float]) x95 += einsum("ijab,ijca->cb", t2, x57) * 4 del x57 x96 += einsum("ab->ab", x95) del x95 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum("ab,ijac->ijbc", x96, t2) * 2 x103 += einsum("ijab->jiba", x97) del x97 @@ -2325,17 +2326,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("ia,bc->abci", t1, x96) * -1 rdm2_f_vvvo += einsum("ia,bc->cbai", t1, x96) * 2 del x96 - x77 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x77 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x77 += einsum("wx,xia->wia", ls2, u11) - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum("wia,wjb->jiba", u11, x77) del x77 rdm2_f_vovo -= einsum("ijab->biaj", x78) * 2 rdm2_f_vovo += einsum("ijab->bjai", x78) * 4 del x78 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum("abij,kjbc->ikac", l2, t2) - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum("ijab,jkac->ikbc", t2, x87) del x87 x91 += einsum("ijab->ijab", x88) @@ -2344,14 +2345,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ijab->biaj", x91) * 2 rdm2_f_vovo += einsum("ijab->aibj", x91) * 4 del x91 - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum("abij,kjac->ikbc", l2, t2) - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum("ijab,jkac->ikbc", t2, x104) rdm2_f_vovo += einsum("ijab->ajbi", x105) * 4 rdm2_f_vovo -= einsum("ijab->bjai", x105) * 2 del x105 - x127 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x127 += einsum("ia,ijbc->jbac", t1, x104) del x104 x129 -= einsum("iabc->iabc", x127) @@ -2360,34 +2361,34 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo += einsum("ia,jb->aibj", t1, x113) * -4 rdm2_f_vovo += einsum("ia,jb->biaj", t1, x113) * 2 del x113 - x115 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x115 += einsum("ia,bcji->jbca", t1, l2) - x135 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x135 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x135 += einsum("ia,ibcd->cbda", t1, x115) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("abcd->cbda", x135) * 2 rdm2_f_vvvv += einsum("abcd->dbca", x135) * 4 del x135 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum("iabc->iacb", x115) * 4 rdm2_f_ovvv -= einsum("iabc->ibca", x115) * 2 - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->caib", x115) * 2 rdm2_f_vvov += einsum("iabc->cbia", x115) * 4 del x115 - x116 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x116 += einsum("ia,wbi->wba", t1, lu11) - x117 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x117 += einsum("wia,wbc->ibca", u11, x116) del x116 - x123 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x123 -= einsum("iabc->iabc", x117) del x117 - x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum("abij,kjca->ikbc", l2, t2) x121 += einsum("ijab->ijab", x118) del x118 - x122 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x122 += einsum("ia,ijbc->jabc", t1, x121) del x121 x123 += einsum("iabc->ibac", x122) @@ -2397,13 +2398,13 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x123) * 4 rdm2_f_vvvo += einsum("iabc->cabi", x123) * 2 del x123 - x124 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x124 += einsum("ai,jibc->jabc", l1, t2) x129 += einsum("iabc->iabc", x124) del x124 - x125 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x125 += einsum("wia,xwbi->xba", u11, lu12) - x126 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x126 += einsum("wia,wbc->ibac", u11, x125) del x125 x129 += einsum("iabc->iabc", x126) @@ -2413,7 +2414,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x129) * 2 rdm2_f_vvvo += einsum("iabc->cabi", x129) * 4 del x129 - x134 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x134 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x134 += einsum("abij,ijcd->abcd", l2, t2) rdm2_f_vvvv += einsum("abcd->cbda", x134) * -2 rdm2_f_vvvv += einsum("abcd->dbca", x134) * 4 @@ -2424,7 +2425,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kija", delta_oo, l1) * 2 rdm2_f_ovoo -= einsum("ij,ak->jaki", delta_oo, l1) * 2 rdm2_f_ovoo += einsum("ij,ak->kaji", delta_oo, l1) * 4 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov -= einsum("abij->jaib", l2) * 2 rdm2_f_ovov += einsum("abij->jbia", l2) * 4 rdm2_f_oovv -= einsum("ai,jb->ijba", l1, t1) * 2 @@ -2446,9 +2447,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("wai,xwia->x", lu11, u12) * 2 dm_b_des += einsum("w,xw->x", ls1, s2) dm_b_des += einsum("w->w", s1) @@ -2468,7 +2469,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("wxai,yxia->wy", lu12, u12) * 2 rdm1_b += einsum("wx,yx->wy", ls2, s2) rdm1_b += einsum("w,x->wx", ls1, s1) @@ -2489,83 +2490,83 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("wia,xwaj->xji", u11, lu12) - x5 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x5 += einsum("wij->wij", x0) - x8 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x8 += einsum("wx,xij->wij", s2, x0) - x30 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x30 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x30 += einsum("wij->wij", x8) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x8) * 2 del x8 - x36 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x36 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x36 += einsum("wij->wij", x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) * 2 del x0 - x1 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x1 += einsum("ia,waj->wji", t1, lu11) x5 += einsum("wij->wij", x1) - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x5) * 2 - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov -= einsum("wij,wxia->xja", x5, u12) * 2 del x5 x36 += einsum("wij->wij", x1) - x38 = np.zeros((nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nvir), dtype=types[float]) x38 += einsum("wia,wij->ja", u11, x36) * 0.9999999999999993 del x36 rdm_eb_cre_oo -= einsum("wij->wji", x1) * 2 del x1 - x2 = np.zeros((nbos, nbos, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nbos, nbos, nocc, nocc), dtype=types[float]) x2 += einsum("ia,wxaj->wxji", t1, lu12) - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 += einsum("wia,xwij->xja", u11, x2) rdm_eb_cre_ov -= einsum("wia->wia", x3) * 2 rdm_eb_des_ov -= einsum("wx,xia->wia", s2, x3) * 2 del x3 x38 += einsum("wxia,wxij->ja", u12, x2) * 0.49999999999999967 del x2 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 -= einsum("ijab->jiab", t2) x4 += einsum("ijab->jiba", t2) * 2 rdm_eb_cre_ov += einsum("wai,ijab->wjb", lu11, x4) * 2 - x6 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x6 += einsum("wia,xwbi->xba", u11, lu12) - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("wab->wab", x6) * 2 rdm_eb_des_ov -= einsum("wab,xwia->xib", x6, u12) * 2 - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("wx,xab->wab", s2, x6) * 2 del x6 - x7 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x7 += einsum("wai,xwja->xij", lu11, u12) x30 += einsum("wij->wij", x7) rdm_eb_des_oo -= einsum("wij->wji", x7) * 2 del x7 - x9 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x9 += einsum("ai,wja->wij", l1, u11) x30 += einsum("wij->wij", x9) rdm_eb_des_oo -= einsum("wij->wji", x9) * 2 del x9 - x10 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x10 += einsum("wx,xai->wia", s2, lu11) - x13 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x13 += einsum("wia->wia", x10) - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x10) * 2 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum("abij->jiab", l2) * 2 x11 -= einsum("abij->jiba", l2) - x12 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x12 += einsum("wia,ijba->wjb", u11, x11) del x11 x13 += einsum("wia->wia", x12) del x12 - x14 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x14 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x14 += einsum("ia,wja->wji", t1, x13) x30 += einsum("wij->wij", x14) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x30) * 2 @@ -2576,31 +2577,31 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x4 rdm_eb_des_vv += einsum("ia,wib->wba", t1, x13) * 2 del x13 - x15 = np.zeros((nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc), dtype=types[float]) x15 += einsum("ai,ja->ij", l1, t1) - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ij->ij", x15) - x31 = np.zeros((nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc), dtype=types[float]) x31 += einsum("ij->ij", x15) - x37 = np.zeros((nocc, nocc), dtype=np.float64) + x37 = np.zeros((nocc, nocc), dtype=types[float]) x37 += einsum("ij->ij", x15) del x15 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("wai,wja->ij", lu11, u11) x20 += einsum("ij->ij", x16) x31 += einsum("ij->ij", x16) x37 += einsum("ij->ij", x16) del x16 - x17 = np.zeros((nocc, nocc), dtype=np.float64) + x17 = np.zeros((nocc, nocc), dtype=types[float]) x17 += einsum("wxai,wxja->ij", lu12, u12) x20 += einsum("ij->ij", x17) * 0.5 x31 += einsum("ij->ij", x17) * 0.5 x37 += einsum("ij->ij", x17) * 0.5 del x17 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum("ijab->jiab", t2) x18 += einsum("ijab->jiba", t2) * -0.5 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum("abij,ikba->jk", l2, x18) * 2 x20 += einsum("ij->ij", x19) x31 += einsum("ij->ij", x19) @@ -2614,39 +2615,39 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x20 += einsum("ij->ji", delta_oo) * -1 rdm_eb_des_oo += einsum("w,ij->wji", s1, x20) * -2 del x20 - x21 = np.zeros((nbos), dtype=np.float64) + x21 = np.zeros((nbos), dtype=types[float]) x21 += einsum("w,xw->x", ls1, s2) - x24 = np.zeros((nbos), dtype=np.float64) + x24 = np.zeros((nbos), dtype=types[float]) x24 += einsum("w->w", x21) del x21 - x22 = np.zeros((nbos), dtype=np.float64) + x22 = np.zeros((nbos), dtype=types[float]) x22 += einsum("ai,wia->w", l1, u11) x24 += einsum("w->w", x22) * 2 del x22 - x23 = np.zeros((nbos), dtype=np.float64) + x23 = np.zeros((nbos), dtype=types[float]) x23 += einsum("wai,xwia->x", lu11, u12) x24 += einsum("w->w", x23) * 2 del x23 rdm_eb_des_oo += einsum("w,ij->wji", x24, delta_oo) * 2 rdm_eb_des_ov += einsum("w,ia->wia", x24, t1) * 2 del x24 - x25 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x25 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x25 += einsum("wia,xyai->xyw", u11, lu12) rdm_eb_des_ov += einsum("wxy,wxia->yia", x25, u12) * 2 del x25 - x26 = np.zeros((nvir, nvir), dtype=np.float64) + x26 = np.zeros((nvir, nvir), dtype=types[float]) x26 += einsum("wai,wib->ab", lu11, u11) - x29 = np.zeros((nvir, nvir), dtype=np.float64) + x29 = np.zeros((nvir, nvir), dtype=types[float]) x29 += einsum("ab->ab", x26) - x40 = np.zeros((nvir, nvir), dtype=np.float64) + x40 = np.zeros((nvir, nvir), dtype=types[float]) x40 += einsum("ab->ab", x26) * 2 del x26 - x27 = np.zeros((nvir, nvir), dtype=np.float64) + x27 = np.zeros((nvir, nvir), dtype=types[float]) x27 += einsum("wxai,wxib->ab", lu12, u12) x29 += einsum("ab->ab", x27) * 0.5 x40 += einsum("ab->ab", x27) del x27 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("abij->jiab", l2) * -0.5 x28 += einsum("abij->jiba", l2) x29 += einsum("ijab,ijcb->ca", t2, x28) * 2 @@ -2654,21 +2655,21 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x29 x40 += einsum("ijab,ijcb->ca", t2, x28) * 4 del x28 - x32 = np.zeros((nbos, nbos), dtype=np.float64) + x32 = np.zeros((nbos, nbos), dtype=types[float]) x32 += einsum("wx,yw->xy", ls2, s2) x32 += einsum("wai,xia->wx", lu11, u11) * 2 x32 += einsum("wxai,ywia->xy", lu12, u12) * 2 rdm_eb_des_ov += einsum("wx,wia->xia", x32, u11) * 2 del x32 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum("ia,abjk->kjib", t1, l2) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ijka->ijka", x33) * -0.5 x34 += einsum("ijka->jika", x33) del x33 x38 += einsum("ijab,ijkb->ka", t2, x34) * 2 del x34 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum("ijab->jiab", t2) * -1 x35 += einsum("ijab->jiba", t2) * 2 x38 += einsum("ai,ijab->jb", l1, x35) * -0.9999999999999993 @@ -2678,7 +2679,7 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x38 += einsum("wx,wxia->ia", ls2, u12) * -0.49999999999999967 rdm_eb_des_ov += einsum("w,ia->wia", s1, x38) * -2.0000000000000013 del x38 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 -= einsum("abij->jiab", l2) x39 += einsum("abij->jiba", l2) * 2 rdm_eb_des_vo += einsum("wia,ijab->wbj", u11, x39) * 2 @@ -2689,7 +2690,7 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_oo += einsum("w,ij->wji", ls1, delta_oo) * 2 rdm_eb_cre_ov += einsum("wx,xia->wia", ls2, u11) * 2 rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) * 2 - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) * 2 rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) * 2 rdm_eb_des_ov += einsum("wia->wia", u11) * 2 diff --git a/ebcc/codegen/RCCSD_S_1_1.py b/ebcc/codegen/RCCSD_S_1_1.py index f4dfa80b..33607528 100644 --- a/ebcc/codegen/RCCSD_S_1_1.py +++ b/ebcc/codegen/RCCSD_S_1_1.py @@ -2,25 +2,26 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum("iajb->jiab", v.ovov) x0 += einsum("iajb->jiba", v.ovov) * -0.5 e_cc = 0 e_cc += einsum("ijab,ijba->", t2, x0) * 2 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("iajb->jiab", v.ovov) * -0.5 x1 += einsum("iajb->jiba", v.ovov) - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("ia,ijab->jb", t1, x1) del x1 x2 += einsum("ia->ia", f.ov) e_cc += einsum("ia,ia->", t1, x2) * 2 del x2 - x3 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x3 += einsum("wia->wia", u11) x3 += einsum("w,ia->wia", s1, t1) e_cc += einsum("wia,wia->", g.bov, x3) * 2 @@ -39,164 +40,164 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1 and U11 amplitudes - x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x0 += einsum("ia,jakb->ikjb", t1, v.ovov) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum("ijka->ijka", x0) * 2 x1 += einsum("ijka->ikja", x0) * -1 - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 += einsum("ia,jkla->jilk", t1, x0) - x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x88 += einsum("ijkl->lkji", x27) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum("ijab,klji->lkab", t2, x27) del x27 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ijab,kjla->kilb", t2, x0) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 -= einsum("ijka->ikja", x35) del x35 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 -= einsum("ijka->ijka", x0) x36 += einsum("ijka->ikja", x0) * 2 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum("ijab,klia->jklb", t2, x36) del x36 x41 += einsum("ijka->jkia", x37) del x37 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum("ijab,klja->kilb", t2, x0) del x0 - x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x69 -= einsum("ijka->kija", x65) del x65 x1 += einsum("ijka->jika", v.ooov) * -1 x1 += einsum("ijka->jkia", v.ooov) * 2 - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum("ijab,kija->kb", t2, x1) * -2 del x1 - x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x2 += einsum("iabc->ibac", v.ovvv) * -0.5 x2 += einsum("iabc->ibca", v.ovvv) t1new += einsum("ijab,icba->jc", t2, x2) * 4 del x2 - x3 = np.zeros((nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nvir), dtype=types[float]) x3 += einsum("w,wia->ia", s1, g.bov) - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum("ia->ia", x3) - x19 = np.zeros((nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir), dtype=types[float]) x19 += einsum("ia->ia", x3) * 0.5 - x98 = np.zeros((nocc, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir), dtype=types[float]) x98 += einsum("ia->ia", x3) del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum("iajb->jiab", v.ovov) * 2 x4 -= einsum("iajb->jiba", v.ovov) - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum("ia,ijba->jb", t1, x4) x6 += einsum("ia->ia", x5) del x5 - x92 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x92 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x92 += einsum("wia,ijba->wjb", u11, x4) del x4 - x93 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x93 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x93 += einsum("wia->wia", x92) del x92 x6 += einsum("ia->ia", f.ov) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum("ia,jkab->jkib", x6, t2) x69 += einsum("ijka->kjia", x68) del x68 - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum("ia,ja->ij", t1, x6) - x72 = np.zeros((nocc, nocc), dtype=np.float64) + x72 = np.zeros((nocc, nocc), dtype=types[float]) x72 += einsum("ij->ij", x71) del x71 - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x6, u11) * 2 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 -= einsum("ijab->jiab", t2) x7 += einsum("ijab->jiba", t2) * 2 t1new += einsum("ia,ijab->jb", x6, x7) * 2 del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum("iabj->ijba", v.ovvo) * 2 x8 -= einsum("ijab->ijab", v.oovv) t1new += einsum("ia,ijba->jb", t1, x8) * 2 - u11new = np.zeros((nbos, nocc, nvir), dtype=np.float64) + u11new = np.zeros((nbos, nocc, nvir), dtype=types[float]) u11new += einsum("wia,ijba->wjb", u11, x8) del x8 - x9 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x9 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x9 += einsum("ia,wja->wji", t1, g.bov) - x10 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x10 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x10 += einsum("wij->wij", x9) del x9 x10 += einsum("wij->wij", g.boo) - x49 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x49 += einsum("ia,wij->wja", t1, x10) - x50 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x50 -= einsum("wia->wia", x49) del x49 t1new -= einsum("wia,wij->ja", u11, x10) * 2 del x10 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum("w,wij->ij", s1, g.boo) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum("ij->ij", x11) x72 += einsum("ij->ji", x11) del x11 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum("wia,wja->ij", g.bov, u11) x21 += einsum("ij->ij", x12) - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum("ij->ij", x12) del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum("iajb->jiab", v.ovov) * -0.5 x13 += einsum("iajb->jiba", v.ovov) - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum("ijab,ikab->jk", t2, x13) * 2 x21 += einsum("ij->ji", x14) del x14 - x80 = np.zeros((nvir, nvir), dtype=np.float64) + x80 = np.zeros((nvir, nvir), dtype=types[float]) x80 += einsum("ijab,ijac->bc", t2, x13) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("ab,ijbc->ijca", x80, t2) * 2 del x80 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ijab->jiab", x81) del x81 - x82 = np.zeros((nocc, nocc), dtype=np.float64) + x82 = np.zeros((nocc, nocc), dtype=types[float]) x82 += einsum("ijab,ikab->jk", t2, x13) del x13 - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum("ij,jkab->kiab", x82, t2) * 2 del x82 x84 += einsum("ijab->ijba", x83) del x83 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum("ijka->ikja", v.ooov) x15 += einsum("ijka->kija", v.ooov) * -0.5 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ia,jika->jk", t1, x15) * 2 del x15 x21 += einsum("ij->ij", x16) del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum("iajb->jiab", v.ovov) x17 += einsum("iajb->jiba", v.ovov) * -0.5 - x18 = np.zeros((nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nvir), dtype=types[float]) x18 += einsum("ia,ijba->jb", t1, x17) x19 += einsum("ia->ia", x18) del x18 - x96 = np.zeros((nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir), dtype=types[float]) x96 += einsum("ia,ijba->jb", t1, x17) * 2 del x17 - x97 = np.zeros((nvir, nvir), dtype=np.float64) + x97 = np.zeros((nvir, nvir), dtype=types[float]) x97 += einsum("ia,ib->ab", t1, x96) * -1 del x96 x19 += einsum("ia->ia", f.ov) * 0.5 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum("ia,ja->ij", t1, x19) * 2 del x19 x21 += einsum("ij->ji", x20) @@ -205,127 +206,127 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t1new += einsum("ia,ij->ja", t1, x21) * -2 u11new += einsum("ij,wia->wja", x21, u11) * -1 del x21 - x22 = np.zeros((nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir), dtype=types[float]) x22 += einsum("w,wab->ab", s1, g.bvv) - x25 = np.zeros((nvir, nvir), dtype=np.float64) + x25 = np.zeros((nvir, nvir), dtype=types[float]) x25 += einsum("ab->ab", x22) - x74 = np.zeros((nvir, nvir), dtype=np.float64) + x74 = np.zeros((nvir, nvir), dtype=types[float]) x74 += einsum("ab->ab", x22) x97 += einsum("ab->ab", x22) del x22 - x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x23 -= einsum("iabc->ibac", v.ovvv) x23 += einsum("iabc->ibca", v.ovvv) * 2 - x24 = np.zeros((nvir, nvir), dtype=np.float64) + x24 = np.zeros((nvir, nvir), dtype=types[float]) x24 += einsum("ia,ibca->bc", t1, x23) x25 += einsum("ab->ab", x24) - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 -= einsum("ab->ab", x24) del x24 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ia,jbac->ijbc", t1, x23) - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum("ijab,kica->jkbc", t2, x59) del x59 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 -= einsum("ijab->jiab", x60) del x60 - x100 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x100 += einsum("wia,ibca->wbc", u11, x23) del x23 x25 += einsum("ab->ab", f.vv) t1new += einsum("ia,ba->ib", t1, x25) * 2 del x25 - x26 = np.zeros((nbos), dtype=np.float64) + x26 = np.zeros((nbos), dtype=types[float]) x26 += einsum("w->w", G) x26 += einsum("ia,wia->w", t1, g.bov) * 2 t1new += einsum("w,wia->ia", x26, u11) * 2 del x26 - x28 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x28 += einsum("ia,bacd->icbd", t1, v.vvvv) t2new += einsum("ia,jbca->ijbc", t1, x28) del x28 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum("ijab,kjca->kibc", t2, x29) del x29 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ijab->ijab", x30) del x30 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 -= einsum("iajb->jiab", v.ovov) x31 += einsum("iajb->jiba", v.ovov) * 2 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum("ijab,ikbc->jkac", t2, x31) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum("ijab,kica->jkbc", t2, x32) del x32 x56 += einsum("ijab->ijab", x33) del x33 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum("ijab,ikac->jkbc", t2, x31) * 2 del x31 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ijab,jkla->ilkb", t2, v.ooov) x41 -= einsum("ijka->ijka", x34) del x34 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("ia,jbca->ijcb", t1, v.ovvv) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ijab->jiab", x38) - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum("ijab,kjca->kibc", t2, x38) del x38 x76 += einsum("ijab->ijab", x58) del x58 x39 += einsum("iabj->ijba", v.ovvo) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum("ia,jkba->ijkb", t1, x39) del x39 x41 += einsum("ijka->ijka", x40) del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ia,jikb->jkab", t1, x41) del x41 x56 += einsum("ijab->ijab", x42) del x42 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 += einsum("wia,wib->ab", g.bov, u11) x44 += einsum("ab->ba", x43) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("ab,ijbc->ijca", x44, t2) del x44 x56 += einsum("ijab->jiab", x45) del x45 x97 += einsum("ab->ba", x43) * -1 del x43 - x46 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x46 += einsum("ia,wba->wib", t1, g.bvv) x50 += einsum("wia->wia", x46) del x46 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ijab->jiab", t2) * 2 x47 -= einsum("ijab->jiba", t2) - x48 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x48 += einsum("wia,ijba->wjb", g.bov, x47) del x47 x50 += einsum("wia->wia", x48) del x48 x50 += einsum("wai->wia", g.bvo) - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum("wia,wjb->ijab", u11, x50) del x50 x56 -= einsum("ijab->jiba", x51) del x51 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum("ijka->ikja", v.ooov) * 2 x52 -= einsum("ijka->kija", v.ooov) - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum("ia,jika->jk", t1, x52) x54 += einsum("ij->ij", x53) del x53 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ij,ikab->kjab", x54, t2) del x54 x56 += einsum("ijab->ijba", x55) @@ -333,54 +334,54 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijab", x56) t2new -= einsum("ijab->jiba", x56) del x56 - x99 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x99 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x99 += einsum("wia,jika->wjk", u11, x52) del x52 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ia,bjca->ijbc", t1, v.vovv) x76 -= einsum("ijab->ijab", x57) del x57 - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum("ia,jkba->ijkb", t1, v.oovv) x69 += einsum("ijka->jika", x61) del x61 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum("ijab,klja->iklb", t2, v.ooov) x69 -= einsum("ijka->jika", x62) del x62 - x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x63 += einsum("ia,jkla->ijlk", t1, v.ooov) - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum("ia,jkil->jkla", t1, x63) x69 -= einsum("ijka->jika", x64) del x64 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("ijab,kijl->klab", t2, x63) del x63 t2new += einsum("ijab->ijba", x77) t2new += einsum("ijab->jiab", x77) del x77 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 -= einsum("ijka->ikja", v.ooov) x66 += einsum("ijka->kija", v.ooov) * 2 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum("ijab,ikla->jklb", t2, x66) del x66 x69 += einsum("ijka->jika", x67) del x67 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum("ia,ijkb->jkab", t1, x69) del x69 x76 += einsum("ijab->ijab", x70) del x70 x72 += einsum("ij->ji", f.oo) - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ij,jkab->kiab", x72, t2) del x72 x76 += einsum("ijab->jiba", x73) del x73 x74 += einsum("ab->ab", f.vv) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ab,ijbc->ijca", x74, t2) del x74 x76 -= einsum("ijab->jiba", x75) @@ -388,9 +389,9 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new -= einsum("ijab->ijba", x76) t2new -= einsum("ijab->jiab", x76) del x76 - x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x78 += einsum("ijab,kacb->ijkc", t2, v.ovvv) - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ia,jkib->jkab", t1, x78) del x78 x84 += einsum("ijab->ijab", x79) @@ -402,9 +403,9 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x85 -= einsum("ijab->jiab", v.oovv) t2new += einsum("ijab,kica->kjcb", t2, x85) del x85 - x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x86 += einsum("ijab,kalb->ijkl", t2, v.ovov) - x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x87 += einsum("ijkl->lkji", x86) x88 += einsum("ijkl->lkji", x86) del x86 @@ -412,18 +413,18 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new += einsum("ijab,ijkl->lkba", t2, x87) del x87 x88 += einsum("ijkl->kilj", v.oooo) - x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x89 += einsum("ia,ijkl->lkja", t1, x88) * 0.9999999999999993 del x88 x89 += einsum("ijak->jkia", v.oovo) * -0.9999999999999993 t2new += einsum("ia,jkib->jkab", t1, x89) del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 -= einsum("iabj->jiba", v.ovvo) x90 += einsum("ijab,jakc->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkac", t2, x90) del x90 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 -= einsum("ijab->jiab", v.oovv) x91 += einsum("ijab,jcka->ikbc", t2, v.ovov) t2new += einsum("ijab,kicb->jkca", t2, x91) @@ -433,12 +434,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new += einsum("wia,ijab->wjb", x93, x7) del x93 del x7 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum("iajb->jiab", v.ovov) * -1 x94 += einsum("iajb->jiba", v.ovov) * 2 x97 += einsum("ijab,ijac->bc", t2, x94) * -1 del x94 - x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum("iabc->ibac", v.ovvv) x95 += einsum("iabc->ibca", v.ovvv) * -0.5 x97 += einsum("ia,ibac->bc", t1, x95) * 2 @@ -455,7 +456,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x100 += einsum("wab->wab", gc.bvv) u11new += einsum("ia,wba->wib", t1, x100) del x100 - x101 = np.zeros((nbos, nbos), dtype=np.float64) + x101 = np.zeros((nbos, nbos), dtype=types[float]) x101 += einsum("wx->wx", w) x101 += einsum("wia,xia->wx", g.bov, u11) * 2 u11new += einsum("wx,wia->xia", x101, u11) @@ -487,116 +488,116 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 and LU11 amplitudes - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("ai,ja->ij", l1, t1) - x87 = np.zeros((nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc), dtype=types[float]) x87 += einsum("ij->ij", x0) * 0.5 - x95 = np.zeros((nocc, nocc), dtype=np.float64) + x95 = np.zeros((nocc, nocc), dtype=types[float]) x95 += einsum("ij->ij", x0) - x114 = np.zeros((nocc, nocc), dtype=np.float64) + x114 = np.zeros((nocc, nocc), dtype=types[float]) x114 += einsum("ij->ij", x0) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new -= einsum("ij,wji->w", x0, g.boo) * 2 - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum("w,wia->ia", s1, g.bov) - x2 = np.zeros((nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nvir), dtype=types[float]) x2 += einsum("ia->ia", x1) - x60 = np.zeros((nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir), dtype=types[float]) x60 += einsum("ia->ia", x1) - x69 = np.zeros((nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nvir), dtype=types[float]) x69 += einsum("ia->ia", x1) * 0.5 - x99 = np.zeros((nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir), dtype=types[float]) x99 += einsum("ia->ia", x1) - x141 = np.zeros((nocc, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nvir), dtype=types[float]) x141 += einsum("ia->ia", x1) - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new -= einsum("ij,ja->ai", x0, x1) del x0 del x1 x2 += einsum("ia->ia", f.ov) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum("ia,jkab->jkib", x2, t2) * 2 del x2 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum("ijka->jkia", x3) * -1 x17 += einsum("ijka->ikja", x3) * 0.5 del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ijab,kbca->jikc", t2, v.ovvv) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum("ijka->ijka", x4) del x4 - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum("ijab,kalb->ijkl", t2, v.ovov) - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum("ia,jkli->jkla", t1, x5) x7 += einsum("ijka->ijka", x6) * -1 del x6 x17 += einsum("ijka->ikja", x7) x17 += einsum("ijka->jkia", x7) * -2 del x7 - x169 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x169 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x169 += einsum("ijkl->lkji", x5) del x5 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum("iajb->jiba", v.ovov) x8 += einsum("iajb->jiab", v.ovov) * -0.5 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum("ia,ijab->jb", t1, x8) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum("ia,jkab->jkib", x9, t2) * 4 x17 += einsum("ijka->jkia", x10) * -1 x17 += einsum("ijka->ikja", x10) * 0.5 del x10 x69 += einsum("ia->ia", x9) del x9 - x59 = np.zeros((nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nvir), dtype=types[float]) x59 += einsum("ia,ijab->jb", t1, x8) * 2 x60 += einsum("ia->ia", x59) - x177 = np.zeros((nvir, nvir), dtype=np.float64) + x177 = np.zeros((nvir, nvir), dtype=types[float]) x177 += einsum("ia,ib->ab", t1, x59) * -1 del x59 - x66 = np.zeros((nocc, nocc), dtype=np.float64) + x66 = np.zeros((nocc, nocc), dtype=types[float]) x66 += einsum("ijab,ikab->jk", t2, x8) * 2 - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum("ij->ji", x66) del x66 - x159 = np.zeros((nvir, nvir), dtype=np.float64) + x159 = np.zeros((nvir, nvir), dtype=types[float]) x159 += einsum("ijab,ijac->bc", t2, x8) del x8 - x160 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x160 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x160 += einsum("ab,acij->ijcb", x159, l2) * 2 del x159 - x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x164 += einsum("ijab->jiab", x160) del x160 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum("ia,jbka->ijkb", t1, v.ovov) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ijka->ijka", x11) * -0.5 x12 += einsum("ijka->ikja", x11) - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum("ijka->ijka", x11) * 2 x13 += einsum("ijka->ikja", x11) * -1 - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum("ia,jkla->jilk", t1, x11) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum("ia,jkil->kjla", t1, x20) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum("ijka->ijka", x21) * 2.0000000000000013 del x21 - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum("abij,ijkl->abkl", l2, x20) del x20 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum("ijka->ijka", x11) x23 += einsum("ijka->ikja", x11) * -0.5 - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum("ijka->jkia", x11) * -1 x58 += einsum("ijka->kjia", x11) * 2 - x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x144 += einsum("ai,ijkb->jkab", l1, x11) - x158 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x158 += einsum("ijab->ijab", x144) del x144 x12 += einsum("ijka->jika", v.ooov) @@ -607,23 +608,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x13 += einsum("ijka->jkia", v.ooov) * 2 x17 += einsum("ijab,kila->kljb", t2, x13) del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum("ijab->ijab", v.oovv) * 2 x14 += einsum("iabj->ijba", v.ovvo) * -1 x17 += einsum("ia,jkba->ijkb", t1, x14) * -1 del x14 - x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x15 += einsum("ia,jkla->ijlk", t1, v.ooov) - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum("ijkl->jkil", x15) * -0.5 x16 += einsum("ijkl->kjil", x15) - x26 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x26 += einsum("ijkl->ijkl", x15) x26 += einsum("ijkl->ikjl", x15) * -0.5 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum("ia,jikl->jkla", t1, x26) * 2 del x26 - x146 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x146 += einsum("abij,jkli->klba", l2, x15) del x15 x158 -= einsum("ijab->ijab", x146) @@ -636,57 +637,57 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x17 += einsum("ijak->kija", v.oovo) * -2 l1new += einsum("abij,jkib->ak", l2, x17) del x17 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum("ia,jabc->ijbc", t1, v.ovvv) - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ia,jkba->jikb", t1, x18) x22 += einsum("ijka->ijka", x19) * -2 del x19 x27 += einsum("ijka->ikja", x22) x27 += einsum("ijka->jkia", x22) * -0.5 del x22 - x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x129 += einsum("ijab->ijab", x18) del x18 x23 += einsum("ijka->jika", v.ooov) * -0.5 x23 += einsum("ijka->jkia", v.ooov) - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum("ijab->jiba", t2) * -1 x24 += einsum("ijab->jiab", t2) * 2 x27 += einsum("ijka,jlba->iklb", x23, x24) * -2 del x23 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum("iabj->ijba", v.ovvo) * 2 x25 += einsum("ijab->ijab", v.oovv) * -1 x27 += einsum("ia,jkba->ijkb", t1, x25) * -1 del x25 l1new += einsum("abij,jkia->bk", l2, x27) del x27 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum("ijab->jiba", t2) * 2 x28 -= einsum("ijab->jiab", t2) - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 -= einsum("abij,ikac->jkbc", l2, x28) - x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x125 += einsum("iajb,ikac->jkbc", v.ovov, x28) - x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x126 += einsum("ijab->jiba", x125) del x125 - x173 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x173 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x173 += einsum("wia,ijab->wjb", g.bov, x28) - x174 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x174 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x174 -= einsum("wai,ijab->wjb", lu11, x28) del x28 x29 += einsum("abij,kicb->jkac", l2, t2) - x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x30 -= einsum("iabc->ibac", v.ovvv) x30 += einsum("iabc->ibca", v.ovvv) * 2 l1new -= einsum("ijab,jacb->ci", x29, x30) del x29 del x30 - x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x31 += einsum("ia,bacd->icbd", t1, v.vvvv) - x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x32 += einsum("iabc->ibac", x31) * -0.5 x32 += einsum("iabc->iabc", x31) del x31 @@ -694,180 +695,180 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x32 += einsum("aibc->iabc", v.vovv) * -0.5 l1new += einsum("abij,ibac->cj", l2, x32) * 2 del x32 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum("ai,jkba->ijkb", l1, t2) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum("ijka->ijka", x33) * -2 x41 += einsum("ijka->ikja", x33) del x33 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum("ia,abjk->kjib", t1, l2) - x35 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x35 += einsum("ia,jkla->jkil", t1, x34) - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ia,jikl->jkla", t1, x35) x41 += einsum("ijka->ijka", x36) * -1 x41 += einsum("ijka->ikja", x36) * 2.0000000000000013 del x36 - x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x52 += einsum("ijkl->ijlk", x35) * 2 x52 += einsum("ijkl->ijkl", x35) * -1 l1new += einsum("ijka,ljik->al", v.ooov, x52) del x52 l2new += einsum("iajb,klij->balk", v.ovov, x35) del x35 - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum("ijka->ijka", x34) * -0.5 x37 += einsum("ijka->jika", x34) x41 += einsum("ijab,kila->kljb", t2, x37) * 2 - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum("ijab,kilb->klja", x24, x37) * -1 del x24 del x37 - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum("ijka->ijka", x34) * 2 x38 += einsum("ijka->jika", x34) * -1 x41 += einsum("ijab,kilb->klja", t2, x38) del x38 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum("ijka->ijka", x34) * 2 x46 -= einsum("ijka->jika", x34) - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum("ia,ijkb->jkba", t1, x46) l1new -= einsum("iabc,jibc->aj", v.ovvv, x47) del x47 - x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x131 += einsum("ijka,likb->jlab", x11, x46) - x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x142 -= einsum("ijab->jiba", x131) del x131 l1new -= einsum("iabj,jkib->ak", v.ovvo, x46) del x46 - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 -= einsum("ijka->ijka", x34) x48 += einsum("ijka->jika", x34) * 2 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum("ia,ijkb->jkba", t1, x48) l1new -= einsum("iabc,jiba->cj", v.ovvv, x49) del x49 l1new -= einsum("ijab,jkia->bk", v.oovv, x48) del x48 - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum("ijka,jlib->lkba", v.ooov, x34) x142 += einsum("ijab->ijab", x120) del x120 - x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x121 += einsum("iabc,jkib->kjac", v.ovvv, x34) x142 -= einsum("ijab->ijab", x121) del x121 - x122 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x122 += einsum("ijka,lijb->lkba", x11, x34) x142 += einsum("ijab->ijab", x122) del x122 - x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x147 += einsum("ijka,jlkb->liba", v.ooov, x34) x158 -= einsum("ijab->ijab", x147) del x147 - x148 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x148 += einsum("ijka,iljb->lkba", x11, x34) del x11 x158 -= einsum("ijab->ijab", x148) del x148 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("ijab->jiba", t2) x39 += einsum("ijab->jiab", t2) * -0.5 - x40 = np.zeros((nocc, nocc), dtype=np.float64) + x40 = np.zeros((nocc, nocc), dtype=types[float]) x40 += einsum("abij,ikab->jk", l2, x39) x41 += einsum("ia,jk->jkia", t1, x40) * 2 l1new += einsum("iajb,kjib->ak", v.ovov, x41) del x41 x87 += einsum("ij->ij", x40) - x167 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x167 += einsum("ij,jakb->kiab", x40, v.ovov) * 2 - x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x168 += einsum("ijab->jiba", x167) del x167 - x171 = np.zeros((nocc, nocc), dtype=np.float64) + x171 = np.zeros((nocc, nocc), dtype=types[float]) x171 += einsum("ij->ij", x40) l1new += einsum("ia,ji->aj", f.ov, x40) * -2 del x40 - x44 = np.zeros((nocc, nocc), dtype=np.float64) + x44 = np.zeros((nocc, nocc), dtype=types[float]) x44 += einsum("abij,ikab->jk", l2, x39) * 2 x45 += einsum("ia,jk->jkia", t1, x44) * -1 x95 += einsum("ij->ij", x44) - x110 = np.zeros((nocc, nocc), dtype=np.float64) + x110 = np.zeros((nocc, nocc), dtype=types[float]) x110 += einsum("ij->ij", x44) del x44 - x83 = np.zeros((nocc, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir), dtype=types[float]) x83 += einsum("ijka,jiba->kb", x34, x39) - x89 = np.zeros((nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nvir), dtype=types[float]) x89 += einsum("ia->ia", x83) del x83 - x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x42 += einsum("abij,klab->ijkl", l2, t2) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum("ia,jikl->jkla", t1, x42) x45 += einsum("ijka->ijka", x43) x45 += einsum("ijka->ikja", x43) * -0.5 del x43 l1new += einsum("iajb,kjia->bk", v.ovov, x45) * 2 del x45 - x53 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x53 += einsum("ijkl->jilk", x42) x53 += einsum("ijkl->jikl", x42) * -0.5 l1new += einsum("ijka,jlik->al", v.ooov, x53) * 2 del x53 l2new += einsum("iajb,klji->ablk", v.ovov, x42) del x42 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("abij,kibc->jkac", l2, t2) - x51 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x51 += einsum("iabc->ibac", v.ovvv) * 2 x51 -= einsum("iabc->ibca", v.ovvv) - x103 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x103 += einsum("wia,ibac->wbc", u11, x51) - x112 = np.zeros((nvir, nvir), dtype=np.float64) + x112 = np.zeros((nvir, nvir), dtype=types[float]) x112 += einsum("ia,ibac->bc", t1, x51) - x113 = np.zeros((nvir, nvir), dtype=np.float64) + x113 = np.zeros((nvir, nvir), dtype=types[float]) x113 += einsum("ab->ab", x112) - x137 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x137 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x137 += einsum("ab,acij->ijcb", x112, l2) del x112 x142 += einsum("ijab->jiab", x137) del x137 l1new -= einsum("ijab,jacb->ci", x50, x51) del x50 - x54 = np.zeros((nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nvir), dtype=types[float]) x54 += einsum("w,wai->ia", s1, g.bvo) - x78 = np.zeros((nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nvir), dtype=types[float]) x78 += einsum("ia->ia", x54) * 0.5 - x170 = np.zeros((nocc, nvir), dtype=np.float64) + x170 = np.zeros((nocc, nvir), dtype=types[float]) x170 += einsum("ia->ia", x54) del x54 - x55 = np.zeros((nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nvir), dtype=types[float]) x55 += einsum("wab,wib->ia", g.bvv, u11) x78 += einsum("ia->ia", x55) * 0.5 x170 += einsum("ia->ia", x55) del x55 - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum("ijab,jkib->ka", t2, v.ooov) x78 += einsum("ia->ia", x56) * 0.5 x170 += einsum("ia->ia", x56) del x56 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ijab->jiba", t2) * -0.5 x57 += einsum("ijab->jiab", t2) x78 += einsum("iabc,ijca->jb", v.ovvv, x57) - x93 = np.zeros((nvir, nvir), dtype=np.float64) + x93 = np.zeros((nvir, nvir), dtype=types[float]) x93 += einsum("abij,ijbc->ac", l2, x57) * 2 - x94 = np.zeros((nvir, nvir), dtype=np.float64) + x94 = np.zeros((nvir, nvir), dtype=types[float]) x94 += einsum("ab->ab", x93) - x178 = np.zeros((nvir, nvir), dtype=np.float64) + x178 = np.zeros((nvir, nvir), dtype=types[float]) x178 += einsum("ab->ab", x93) del x93 - x165 = np.zeros((nvir, nvir), dtype=np.float64) + x165 = np.zeros((nvir, nvir), dtype=types[float]) x165 += einsum("abij,ijbc->ac", l2, x57) - x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x166 += einsum("ab,ibjc->ijca", x165, v.ovov) * 2 del x165 x168 += einsum("ijab->jiba", x166) @@ -886,48 +887,48 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x170 += einsum("ia,ijab->jb", x60, x39) * 2 del x60 del x39 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum("iabj->ijba", v.ovvo) x61 += einsum("ijab->ijab", v.oovv) * -0.5 x78 += einsum("ia,ijba->jb", t1, x61) x170 += einsum("ia,ijba->jb", t1, x61) * 2 del x61 - x62 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x62 += einsum("ia,wja->wji", t1, g.bov) - x63 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x63 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x63 += einsum("wij->wij", x62) - x104 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x104 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x104 += einsum("wij->wij", x62) del x62 x63 += einsum("wij->wij", g.boo) x78 += einsum("wia,wij->ja", u11, x63) * -0.5 x170 += einsum("wia,wij->ja", u11, x63) * -1 del x63 - x64 = np.zeros((nocc, nocc), dtype=np.float64) + x64 = np.zeros((nocc, nocc), dtype=types[float]) x64 += einsum("w,wij->ij", s1, g.boo) x71 += einsum("ij->ij", x64) - x154 = np.zeros((nocc, nocc), dtype=np.float64) + x154 = np.zeros((nocc, nocc), dtype=types[float]) x154 += einsum("ij->ij", x64) del x64 - x65 = np.zeros((nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc), dtype=types[float]) x65 += einsum("wia,wja->ij", g.bov, u11) x71 += einsum("ij->ij", x65) x154 += einsum("ij->ij", x65) del x65 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum("ijka->ikja", v.ooov) * -0.5 x67 += einsum("ijka->kija", v.ooov) - x68 = np.zeros((nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc), dtype=types[float]) x68 += einsum("ia,ijka->jk", t1, x67) * 2 del x67 x71 += einsum("ij->ij", x68) del x68 x69 += einsum("ia->ia", f.ov) * 0.5 - x70 = np.zeros((nocc, nocc), dtype=np.float64) + x70 = np.zeros((nocc, nocc), dtype=types[float]) x70 += einsum("ia,ja->ij", t1, x69) * 2 x71 += einsum("ij->ji", x70) del x70 - lu11new = np.zeros((nbos, nvir, nocc), dtype=np.float64) + lu11new = np.zeros((nbos, nvir, nocc), dtype=types[float]) lu11new += einsum("w,ia->wai", ls1, x69) * 4 del x69 x71 += einsum("ij->ij", f.oo) @@ -936,19 +937,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new += einsum("ai,ji->aj", l1, x71) * -1 lu11new += einsum("ij,waj->wai", x71, lu11) * -1 del x71 - x72 = np.zeros((nvir, nvir), dtype=np.float64) + x72 = np.zeros((nvir, nvir), dtype=types[float]) x72 += einsum("w,wab->ab", s1, g.bvv) - x75 = np.zeros((nvir, nvir), dtype=np.float64) + x75 = np.zeros((nvir, nvir), dtype=types[float]) x75 += einsum("ab->ab", x72) x113 += einsum("ab->ab", x72) - x151 = np.zeros((nvir, nvir), dtype=np.float64) + x151 = np.zeros((nvir, nvir), dtype=types[float]) x151 += einsum("ab->ab", x72) x177 += einsum("ab->ab", x72) del x72 - x73 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x73 += einsum("iabc->ibac", v.ovvv) x73 += einsum("iabc->ibca", v.ovvv) * -0.5 - x74 = np.zeros((nvir, nvir), dtype=np.float64) + x74 = np.zeros((nvir, nvir), dtype=types[float]) x74 += einsum("ia,ibac->bc", t1, x73) * 2 del x73 x75 += einsum("ab->ab", x74) @@ -958,9 +959,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x78 += einsum("ia,ba->ib", t1, x75) * 0.5 x170 += einsum("ia,ba->ib", t1, x75) del x75 - x76 = np.zeros((nbos), dtype=np.float64) + x76 = np.zeros((nbos), dtype=types[float]) x76 += einsum("ia,wia->w", t1, g.bov) - x77 = np.zeros((nbos), dtype=np.float64) + x77 = np.zeros((nbos), dtype=types[float]) x77 += einsum("w->w", x76) * 2 del x76 x77 += einsum("w->w", G) @@ -968,35 +969,35 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x170 += einsum("w,wia->ia", x77, u11) del x77 x78 += einsum("ai->ia", f.vo) * 0.5 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("abij->jiba", l2) * 2 x79 += einsum("abij->jiab", l2) * -1 l1new += einsum("ia,ijab->bj", x78, x79) * 2 del x78 del x79 - x80 = np.zeros((nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nvir), dtype=types[float]) x80 += einsum("w,wia->ia", ls1, u11) x89 += einsum("ia->ia", x80) * -0.5 del x80 - x81 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x81 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x81 += einsum("ia,waj->wji", t1, lu11) - x82 = np.zeros((nocc, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nvir), dtype=types[float]) x82 += einsum("wia,wij->ja", u11, x81) x89 += einsum("ia->ia", x82) * 0.5 del x82 x174 += einsum("ia,wij->wja", t1, x81) - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum("ijab->jiba", t2) * 2 x84 += einsum("ijab->jiab", t2) * -1 - x85 = np.zeros((nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nvir), dtype=types[float]) x85 += einsum("ai,ijab->jb", l1, x84) * 0.5 del x84 x89 += einsum("ia->ia", x85) * -1 del x85 - x86 = np.zeros((nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc), dtype=types[float]) x86 += einsum("wai,wja->ij", lu11, u11) x87 += einsum("ij->ij", x86) * 0.5 - x88 = np.zeros((nocc, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir), dtype=types[float]) x88 += einsum("ia,ij->ja", t1, x87) del x87 x89 += einsum("ia->ia", x88) @@ -1004,11 +1005,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x95 += einsum("ij->ij", x86) lu11new += einsum("ij,wja->wai", x95, g.bov) * -1 x110 += einsum("ij->ij", x86) - x111 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x111 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x111 += einsum("w,ij->wij", s1, x110) * 0.5 del x110 x114 += einsum("ij->ij", x86) - x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x156 += einsum("ij,jakb->kiab", x114, v.ovov) x158 += einsum("ijab->jiba", x156) del x156 @@ -1018,30 +1019,30 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x171 x89 += einsum("ia->ia", t1) * -0.5 ls1new += einsum("ia,wia->w", x89, g.bov) * -4 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum("iajb->jiba", v.ovov) * 2 x90 -= einsum("iajb->jiab", v.ovov) - x98 = np.zeros((nocc, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir), dtype=types[float]) x98 += einsum("ia,ijab->jb", t1, x90) x99 += einsum("ia->ia", x98) - x115 = np.zeros((nocc, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nvir), dtype=types[float]) x115 += einsum("ia->ia", x98) - x134 = np.zeros((nocc, nocc), dtype=np.float64) + x134 = np.zeros((nocc, nocc), dtype=types[float]) x134 += einsum("ia,ja->ij", t1, x98) - x135 = np.zeros((nocc, nocc), dtype=np.float64) + x135 = np.zeros((nocc, nocc), dtype=types[float]) x135 += einsum("ij->ji", x134) del x134 - x138 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x138 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x138 += einsum("ia,jkib->jkba", x98, x34) x142 -= einsum("ijab->ijab", x138) del x138 x142 += einsum("ai,jb->ijab", l1, x98) del x98 - x100 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x100 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x100 += einsum("wia,ijab->wjb", u11, x90) - x101 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x101 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x101 += einsum("wia->wia", x100) - x139 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x139 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x139 += einsum("wai,wjb->ijab", lu11, x100) del x100 x142 += einsum("ijab->ijab", x139) @@ -1051,17 +1052,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new -= einsum("wia,ijab->wbj", x174, x90) del x90 del x174 - x91 = np.zeros((nvir, nvir), dtype=np.float64) + x91 = np.zeros((nvir, nvir), dtype=types[float]) x91 += einsum("ai,ib->ab", l1, t1) x94 += einsum("ab->ab", x91) del x91 - x92 = np.zeros((nvir, nvir), dtype=np.float64) + x92 = np.zeros((nvir, nvir), dtype=types[float]) x92 += einsum("wai,wib->ab", lu11, u11) x94 += einsum("ab->ab", x92) l1new += einsum("ab,iacb->ci", x94, x51) ls1new += einsum("ab,wab->w", x94, g.bvv) * 2 del x94 - x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x145 += einsum("ab,ibjc->jiac", x92, v.ovov) x158 += einsum("ijab->ijab", x145) del x145 @@ -1069,35 +1070,35 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x92 lu11new += einsum("ab,wib->wai", x178, g.bov) * -1 del x178 - x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x96 += einsum("ijka->ikja", v.ooov) * 2 x96 -= einsum("ijka->kija", v.ooov) l1new += einsum("ij,jkia->ak", x95, x96) * -1 del x95 lu11new -= einsum("wij,jkia->wak", x81, x96) del x96 - x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x97 -= einsum("ijka->ikja", v.ooov) x97 += einsum("ijka->kija", v.ooov) * 2 - x102 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x102 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x102 += einsum("wia,ijka->wjk", u11, x97) - x132 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x132 += einsum("ijka,lkjb->ilab", x34, x97) x142 -= einsum("ijab->ijab", x132) del x132 - x133 = np.zeros((nocc, nocc), dtype=np.float64) + x133 = np.zeros((nocc, nocc), dtype=types[float]) x133 += einsum("ia,ijka->jk", t1, x97) del x97 x135 += einsum("ij->ij", x133) del x133 - x136 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x136 += einsum("ij,abjk->kiab", x135, l2) del x135 x142 -= einsum("ijab->ijba", x136) del x136 x99 += einsum("ia->ia", f.ov) x102 += einsum("ia,wja->wij", x99, u11) - x116 = np.zeros((nbos), dtype=np.float64) + x116 = np.zeros((nbos), dtype=types[float]) x116 += einsum("ia,wia->w", x99, u11) * 2 del x99 x101 += einsum("wia->wia", gc.bov) @@ -1113,12 +1114,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x104 += einsum("wij->wij", g.boo) x173 -= einsum("ia,wij->wja", t1, x104) lu11new -= einsum("ai,wji->waj", l1, x104) - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum("abij->jiba", l2) * 2 x105 -= einsum("abij->jiab", l2) - x106 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x106 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x106 += einsum("wia,ijab->wjb", u11, x105) - x140 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x140 += einsum("wia,wjb->ijab", g.bov, x106) x142 += einsum("ijab->ijab", x140) del x140 @@ -1126,16 +1127,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x104 l1new += einsum("wab,wia->bi", g.bvv, x106) del x106 - x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x107 += einsum("iabj->ijba", v.ovvo) * 2 x107 -= einsum("ijab->ijab", v.oovv) l1new += einsum("ai,jiab->bj", l1, x107) lu11new += einsum("wai,jiab->wbj", lu11, x107) del x107 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum("abij->jiba", l2) x108 += einsum("abij->jiab", l2) * -0.5 - x109 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x109 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x109 += einsum("wia,ijab->wjb", u11, x108) del x108 x111 += einsum("ia,wja->wji", t1, x109) @@ -1155,43 +1156,43 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x116 += einsum("ia,wia->w", t1, gc.bov) * 2 l1new += einsum("w,wai->ai", x116, lu11) del x116 - x117 = np.zeros((nbos), dtype=np.float64) + x117 = np.zeros((nbos), dtype=types[float]) x117 += einsum("w->w", s1) x117 += einsum("ai,wia->w", l1, u11) * 2 l1new += einsum("w,wia->ai", x117, g.bov) del x117 - x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum("wia,wbj->ijab", gc.bov, lu11) x142 += einsum("ijab->ijab", x118) del x118 - x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum("ai,jikb->jkab", l1, v.ooov) x142 -= einsum("ijab->ijab", x119) del x119 - x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x123 += einsum("ia,jbca->ijcb", t1, v.ovvv) x126 += einsum("ijab->ijab", x123) del x123 - x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x124 += einsum("ijab,icka->jkbc", t2, v.ovov) x126 -= einsum("ijab->ijab", x124) del x124 x126 += einsum("iabj->jiba", v.ovvo) - x127 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x127 += einsum("ijab,ikac->jkbc", x105, x126) del x126 x142 += einsum("ijab->ijab", x127) del x127 - x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x128 += einsum("ijab,kbic->jkac", t2, v.ovov) x129 -= einsum("ijab->ijab", x128) del x128 x129 += einsum("ijab->jiab", v.oovv) - x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x130 += einsum("abij,ikac->jkbc", l2, x129) x142 -= einsum("ijab->ijab", x130) del x130 - x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x149 += einsum("abij,ikbc->jkac", l2, x129) del x129 x158 += einsum("ijab->ijab", x149) @@ -1201,11 +1202,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new += einsum("ijab->abij", x142) l2new += einsum("ijab->baji", x142) del x142 - x153 = np.zeros((nocc, nocc), dtype=np.float64) + x153 = np.zeros((nocc, nocc), dtype=types[float]) x153 += einsum("ia,ja->ij", t1, x141) x154 += einsum("ij->ji", x153) del x153 - x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x157 += einsum("ia,jkib->jkba", x141, x34) del x34 x158 += einsum("ijab->ijba", x157) @@ -1213,23 +1214,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new -= einsum("ia,wji->waj", x141, x81) del x81 del x141 - x143 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x143 += einsum("ai,jbac->ijbc", l1, v.ovvv) x158 -= einsum("ijab->ijab", x143) del x143 - x150 = np.zeros((nvir, nvir), dtype=np.float64) + x150 = np.zeros((nvir, nvir), dtype=types[float]) x150 += einsum("wia,wib->ab", g.bov, u11) x151 -= einsum("ab->ba", x150) x177 += einsum("ab->ba", x150) * -1 del x150 x151 += einsum("ab->ab", f.vv) - x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x152 += einsum("ab,acij->ijcb", x151, l2) del x151 x158 -= einsum("ijab->jiba", x152) del x152 x154 += einsum("ij->ij", f.oo) - x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x155 += einsum("ij,abjk->kiab", x154, l2) del x154 x158 += einsum("ijab->jiba", x155) @@ -1237,13 +1238,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new -= einsum("ijab->baij", x158) l2new -= einsum("ijab->abji", x158) del x158 - x161 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x161 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x161 += einsum("iajb->jiba", v.ovov) * -0.5 x161 += einsum("iajb->jiab", v.ovov) - x162 = np.zeros((nocc, nocc), dtype=np.float64) + x162 = np.zeros((nocc, nocc), dtype=types[float]) x162 += einsum("ijab,ikba->jk", t2, x161) del x161 - x163 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x163 += einsum("ij,abik->kjab", x162, l2) * 2 del x162 x164 += einsum("ijab->ijba", x163) @@ -1257,7 +1258,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x170 += einsum("ai->ia", f.vo) ls1new += einsum("ia,wai->w", x170, lu11) * 2 del x170 - x172 = np.zeros((nbos, nbos), dtype=np.float64) + x172 = np.zeros((nbos, nbos), dtype=types[float]) x172 += einsum("wai,xia->wx", lu11, u11) lu11new += einsum("wx,xia->wai", x172, g.bov) * 2 del x172 @@ -1266,12 +1267,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new += einsum("wia,ijab->wbj", x173, x105) del x105 del x173 - x175 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x175 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x175 += einsum("ia,wbi->wba", t1, lu11) lu11new += einsum("wab,iacb->wci", x175, x51) del x51 del x175 - x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x176 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x176 += einsum("iajb->jiba", v.ovov) * 2 x176 += einsum("iajb->jiab", v.ovov) * -1 x177 += einsum("ijab,ijac->bc", t2, x176) * -1 @@ -1279,7 +1280,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x177 += einsum("ab->ab", f.vv) lu11new += einsum("ab,wai->wbi", x177, lu11) del x177 - x179 = np.zeros((nbos, nbos), dtype=np.float64) + x179 = np.zeros((nbos, nbos), dtype=types[float]) x179 += einsum("wx->wx", w) x179 += einsum("wia,xia->wx", g.bov, u11) * 2 lu11new += einsum("wx,xai->wai", x179, lu11) @@ -1309,56 +1310,56 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 1RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11, u11) - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("ij->ij", x0) - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo -= einsum("ij->ij", x0) * 2 del x0 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum("ai,ja->ij", l1, t1) x8 += einsum("ij->ij", x1) rdm1_f_oo -= einsum("ij->ij", x1) * 2 del x1 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum("ijab->jiab", t2) * 2 x2 += einsum("ijab->jiba", t2) * -1 rdm1_f_oo += einsum("abij,ikba->jk", l2, x2) * -2 del x2 - x3 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x3 += einsum("ia,waj->wji", t1, lu11) - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo -= einsum("wia,wij->aj", u11, x3) * 2 del x3 - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum("ia,bajk->jkib", t1, l2) - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ijka->ijka", x4) * -1 x5 += einsum("ijka->jika", x4) * 2 del x4 rdm1_f_vo += einsum("ijab,ijkb->ak", t2, x5) * -2 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 -= einsum("ijab->jiab", t2) x6 += einsum("ijab->jiba", t2) * 2 rdm1_f_vo += einsum("ai,ijab->bj", l1, x6) * 2 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum("ijab->jiab", t2) x7 += einsum("ijab->jiba", t2) * -0.5 x8 += einsum("abij,ikba->jk", l2, x7) * 2 del x7 rdm1_f_vo += einsum("ia,ij->aj", t1, x8) * -2 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum("abij->jiab", l2) * -0.5 x9 += einsum("abij->jiba", l2) - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum("ijab,ijcb->ac", t2, x9) * 4 del x9 rdm1_f_oo += einsum("ij->ji", delta_oo) * 2 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum("ai->ia", l1) * 2 rdm1_f_vo += einsum("ia->ai", t1) * 2 rdm1_f_vo += einsum("w,wia->ai", ls1, u11) * 2 @@ -1382,79 +1383,79 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv = np.eye(nvir) # 2RDM - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11, u11) - x15 = np.zeros((nocc, nocc), dtype=np.float64) + x15 = np.zeros((nocc, nocc), dtype=types[float]) x15 += einsum("ij->ij", x0) - x24 = np.zeros((nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nvir), dtype=types[float]) x24 += einsum("ia,ij->ja", t1, x0) - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum("ia->ia", x24) del x24 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum("ij,kiab->kjab", x0, t2) - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum("ijab->ijab", x55) del x55 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo -= einsum("ij,kl->ijkl", delta_oo, x0) * 4 rdm2_f_oooo += einsum("ij,kl->ilkj", delta_oo, x0) * 2 rdm2_f_oooo += einsum("ij,kl->kijl", delta_oo, x0) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x0) * 4 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum("ijab->jiab", t2) * -0.5 x1 += einsum("ijab->jiba", t2) - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum("abij,ikab->kj", l2, x1) del x1 - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum("ia,ji->ja", t1, x2) * 2 - x11 = np.zeros((nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nvir), dtype=types[float]) x11 += einsum("ia->ia", x10) del x10 - x33 = np.zeros((nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nvir), dtype=types[float]) x33 += einsum("ia,ji->ja", t1, x2) - x34 = np.zeros((nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nvir), dtype=types[float]) x34 += einsum("ia->ia", x33) del x33 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum("ij,jkab->ikab", x2, t2) * 8 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum("ijab->jiba", x77) del x77 rdm2_f_oooo += einsum("ij,kl->jilk", delta_oo, x2) * -8 rdm2_f_oooo += einsum("ij,kl->jkli", delta_oo, x2) * 4 rdm2_f_oooo += einsum("ij,kl->ljik", delta_oo, x2) * 4 rdm2_f_oooo += einsum("ij,kl->lkij", delta_oo, x2) * -8 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum("ia,jk->kiaj", t1, x2) * 4 rdm2_f_oovo += einsum("ia,jk->kjai", t1, x2) * -8 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum("ia,jk->aikj", t1, x2) * -8 rdm2_f_vooo += einsum("ia,jk->ajki", t1, x2) * 4 del x2 - x3 = np.zeros((nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc), dtype=types[float]) x3 += einsum("ai,ja->ij", l1, t1) x15 += einsum("ij->ij", x3) - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum("ia,jk->jika", t1, x15) - x83 = np.zeros((nocc, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nvir), dtype=types[float]) x83 += einsum("ia,ij->ja", t1, x15) del x15 - x84 = np.zeros((nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nvir), dtype=types[float]) x84 += einsum("ia->ia", x83) - x85 = np.zeros((nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nvir), dtype=types[float]) x85 += einsum("ia->ia", x83) del x83 - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum("ia,ij->ja", t1, x3) - x31 = np.zeros((nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir), dtype=types[float]) x31 -= einsum("ia->ia", x30) del x30 - x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x65 += einsum("ij,kiab->jkab", x3, t2) - x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x68 += einsum("ijab->ijab", x65) del x65 rdm2_f_oooo -= einsum("ij,kl->jikl", delta_oo, x3) * 4 @@ -1462,58 +1463,58 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo += einsum("ij,kl->jlki", delta_oo, x3) * 2 rdm2_f_oooo -= einsum("ij,kl->klji", delta_oo, x3) * 4 del x3 - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum("abij,klab->ijkl", l2, t2) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum("ia,jikl->jkla", t1, x4) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum("ijka->ijka", x7) * 4 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum("ia,ijkb->kjba", t1, x7) - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum("ijab->ijab", x79) * 2.0000000000000013 del x79 rdm2_f_vooo += einsum("ijka->ajik", x7) * -2 rdm2_f_vooo += einsum("ijka->akij", x7) * 4 del x7 - x80 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x80 += einsum("ijkl->jilk", x4) rdm2_f_oooo += einsum("ijkl->jkil", x4) * -2 rdm2_f_oooo += einsum("ijkl->jlik", x4) * 4 del x4 - x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x5 += einsum("ia,bajk->jkib", t1, l2) - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum("ia,jkla->kjli", t1, x5) - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum("ia,ijkl->jlka", t1, x6) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 -= einsum("ijka->ijka", x20) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum("ijka->ijka", x20) - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum("ia,ijkb->jkab", t1, x20) del x20 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum("ijab->ijab", x71) del x71 x80 += einsum("ijkl->ijkl", x6) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum("ijab,ijkl->klab", t2, x80) * 2 del x80 x82 += einsum("ijab->jiba", x81) del x81 - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum("ijab->ajbi", x82) * -1 rdm2_f_vovo += einsum("ijab->bjai", x82) * 2 del x82 rdm2_f_oooo += einsum("ijkl->ikjl", x6) * 4 rdm2_f_oooo -= einsum("ijkl->iljk", x6) * 2 del x6 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum("ijka->ijka", x5) * -0.5 x8 += einsum("ijka->jika", x5) - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum("ijab,ijkb->ka", t2, x8) * 2 x11 += einsum("ia->ia", x9) del x9 @@ -1522,7 +1523,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo += einsum("ijka->ijak", x12) rdm2_f_oovo += einsum("ijka->ikaj", x12) * -0.5 del x12 - x32 = np.zeros((nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir), dtype=types[float]) x32 += einsum("ijab,ijkb->ka", t2, x8) del x8 x34 += einsum("ia->ia", x32) @@ -1531,69 +1532,69 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo += einsum("ij,ka->ajik", delta_oo, x34) * 4 rdm2_f_vooo += einsum("ij,ka->akij", delta_oo, x34) * -8 del x34 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum("ijab,kjla->klib", t2, x5) x16 -= einsum("ijka->ijka", x14) - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 -= einsum("ijka->ijka", x14) del x14 - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ijab,jkla->klib", t2, x5) x28 -= einsum("ijka->ijka", x19) del x19 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum("ijka->ijka", x5) * 2 x21 -= einsum("ijka->jika", x5) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum("ijab,ikla->kljb", t2, x21) x28 += einsum("ijka->ijka", x22) del x22 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum("ia,ijkb->jkab", t1, x21) del x21 - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv -= einsum("ijab->ijab", x42) * 2 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo -= einsum("ijab->abij", x42) * 2 del x42 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum("ijab,kjlb->klia", t2, x5) x37 += einsum("ijka->ijka", x35) - x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x58 += einsum("ijka->ijka", x35) del x35 - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 -= einsum("ijka->ijka", x5) x49 += einsum("ijka->jika", x5) * 2 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum("ia,ijkb->jkab", t1, x49) del x49 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo -= einsum("ijab->ibaj", x50) * 2 - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov -= einsum("ijab->ajib", x50) * 2 del x50 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum("ia,jikb->jkba", t1, x5) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum("ijab->ijab", x90) del x90 - x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum("ijab,jikc->kcba", t2, x5) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum("iabc->bica", x99) * 2 rdm2_f_vovv += einsum("iabc->ciba", x99) * -4 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum("iabc->baci", x99) * -4 rdm2_f_vvvo += einsum("iabc->cabi", x99) * 2 del x99 - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum("ijka->ikja", x5) * 2 rdm2_f_ooov -= einsum("ijka->jkia", x5) * 4 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo -= einsum("ijka->iajk", x5) * 4 rdm2_f_ovoo += einsum("ijka->jaik", x5) * 2 - x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x13 += einsum("ai,jkba->ijkb", l1, t2) x16 += einsum("ijka->ijka", x13) rdm2_f_oovo += einsum("ijka->ijak", x16) * 2 @@ -1603,7 +1604,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x16 x66 += einsum("ijka->ijka", x13) del x13 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum("ia,ijkb->jkab", t1, x66) del x66 x68 += einsum("ijab->ijab", x67) @@ -1613,29 +1614,29 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ijab->ajbi", x68) * 4 rdm2_f_vovo += einsum("ijab->bjai", x68) * 2 del x68 - x17 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x17 += einsum("ia,waj->wji", t1, lu11) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum("wia,wjk->jkia", u11, x17) x28 += einsum("ijka->ijka", x18) x37 -= einsum("ijka->ijka", x18) del x18 - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum("wia,wij->ja", u11, x17) x27 += einsum("ia->ia", x23) x84 += einsum("ia->ia", x23) x85 += einsum("ia->ia", x23) del x23 - x60 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x60 += einsum("ia,wij->wja", t1, x17) del x17 - x62 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x62 += einsum("wia->wia", x60) del x60 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum("ijab->jiab", t2) * 2 x25 -= einsum("ijab->jiba", t2) - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum("ai,ijba->jb", l1, x25) x27 -= einsum("ia->ia", x26) x28 += einsum("ij,ka->jika", delta_oo, x27) @@ -1647,7 +1648,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x27 x64 -= einsum("ia,jb->ijab", t1, x26) del x26 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum("ijab,iklb->jkla", x25, x5) del x5 x37 -= einsum("ijka->jkia", x36) @@ -1656,22 +1657,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x37 x58 -= einsum("ijka->jkia", x36) del x36 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum("ia,ijkb->jkab", t1, x58) del x58 x64 -= einsum("ijab->ijab", x59) del x59 - x61 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x61 += einsum("wai,ijba->wjb", lu11, x25) x62 -= einsum("wia->wia", x61) del x61 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum("wia,wjb->jiba", u11, x62) del x62 x64 += einsum("ijab->ijab", x63) del x63 rdm2_f_vvoo -= einsum("abij,ikca->cbjk", l2, x25) * 2 - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum("w,wia->ia", ls1, u11) x31 += einsum("ia->ia", x29) x84 -= einsum("ia->ia", x29) @@ -1686,57 +1687,57 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo -= einsum("ij,ka->aijk", delta_oo, x31) * 2 rdm2_f_vooo += einsum("ij,ka->akji", delta_oo, x31) * 4 del x31 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum("wai,wjb->ijab", lu11, u11) rdm2_f_oovv -= einsum("ijab->ijba", x38) * 2 rdm2_f_ovvo += einsum("ijab->iabj", x38) * 4 rdm2_f_voov += einsum("ijab->bjia", x38) * 4 rdm2_f_vvoo -= einsum("ijab->baij", x38) * 2 del x38 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum("abij->jiab", l2) * 2 x39 -= einsum("abij->jiba", l2) - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum("ijab,ikca->kjcb", t2, x39) - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum("ijab,ikac->kjcb", t2, x40) x73 += einsum("ijab->ijab", x72) * 2 del x72 rdm2_f_oovv -= einsum("ijab->ijba", x40) * 2 del x40 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum("ijab,ikcb->jkac", x25, x39) del x25 rdm2_f_ovvo += einsum("ijab->jbai", x48) * 2 rdm2_f_voov += einsum("ijab->aijb", x48) * 2 del x48 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum("ijab,ikcb->kjca", t2, x39) del x39 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum("ijab,ikac->kjcb", t2, x56) del x56 x64 += einsum("ijab->jiba", x57) del x57 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 -= einsum("abij->jiab", l2) x41 += einsum("abij->jiba", l2) * 2 rdm2_f_oovv -= einsum("ijab,ikcb->kjac", t2, x41) * 2 del x41 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 += einsum("ai,ib->ab", l1, t1) - x47 = np.zeros((nvir, nvir), dtype=np.float64) + x47 = np.zeros((nvir, nvir), dtype=types[float]) x47 += einsum("ab->ab", x43) * 0.5 - x52 = np.zeros((nvir, nvir), dtype=np.float64) + x52 = np.zeros((nvir, nvir), dtype=types[float]) x52 += einsum("ab->ab", x43) - x97 = np.zeros((nvir, nvir), dtype=np.float64) + x97 = np.zeros((nvir, nvir), dtype=types[float]) x97 += einsum("ab->ab", x43) del x43 - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 += einsum("wai,wib->ab", lu11, u11) x47 += einsum("ab->ab", x44) * 0.5 x52 += einsum("ab->ab", x44) - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum("ab,ijac->jicb", x44, t2) x64 += einsum("ijab->ijab", x54) del x54 @@ -1747,18 +1748,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x64 x97 += einsum("ab->ab", x44) del x44 - x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum("ia,bc->ibac", t1, x97) del x97 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum("abij->jiab", l2) x45 += einsum("abij->jiba", l2) * -0.5 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum("ijab,ijbc->ca", t2, x45) x47 += einsum("ab->ab", x46) rdm2_f_oovv += einsum("ij,ab->jiba", delta_oo, x47) * 8 del x47 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum("ab,ijac->ijbc", x46, t2) * 8 x78 += einsum("ijab->jiba", x76) del x76 @@ -1772,7 +1773,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo += einsum("ia,bc->abci", t1, x46) * -4 rdm2_f_vvvo += einsum("ia,bc->cbai", t1, x46) * 8 del x46 - x51 = np.zeros((nvir, nvir), dtype=np.float64) + x51 = np.zeros((nvir, nvir), dtype=types[float]) x51 += einsum("ijab,ijbc->ca", t2, x45) * 2 del x45 x52 += einsum("ab->ab", x51) @@ -1781,18 +1782,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov += einsum("ij,ab->bija", delta_oo, x52) * -2 rdm2_f_vvoo += einsum("ij,ab->baji", delta_oo, x52) * 4 del x52 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 -= einsum("ijab->jiab", t2) x53 += einsum("ijab->jiba", t2) * 2 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum("abij,ikac->kjcb", l2, x53) x92 -= einsum("ijab->jiba", x91) del x91 rdm2_f_vvoo -= einsum("abij,ikcb->cajk", l2, x53) * 2 del x53 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum("abij,kjbc->ikac", l2, t2) - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum("ijab,jkac->ikbc", t2, x69) del x69 x73 += einsum("ijab->ijab", x70) @@ -1801,14 +1802,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ijab->biaj", x73) * 2 rdm2_f_vovo += einsum("ijab->aibj", x73) * 4 del x73 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum("abij,kjac->ikbc", l2, t2) - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum("ijab,jkac->ikbc", t2, x74) rdm2_f_vovo += einsum("ijab->ajbi", x75) * 4 rdm2_f_vovo -= einsum("ijab->bjai", x75) * 2 del x75 - x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x96 += einsum("ia,ijbc->jbac", t1, x74) del x74 x98 -= einsum("iabc->iabc", x96) @@ -1817,34 +1818,34 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo -= einsum("ia,jb->aibj", t1, x84) * 4 rdm2_f_vovo += einsum("ia,jb->biaj", t1, x84) * 2 del x84 - x86 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x86 += einsum("ia,bcji->jbca", t1, l2) - x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x101 += einsum("ia,ibcd->cbda", t1, x86) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv -= einsum("abcd->cbda", x101) * 2 rdm2_f_vvvv += einsum("abcd->dbca", x101) * 4 del x101 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum("iabc->iacb", x86) * 4 rdm2_f_ovvv -= einsum("iabc->ibca", x86) * 2 - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov -= einsum("iabc->caib", x86) * 2 rdm2_f_vvov += einsum("iabc->cbia", x86) * 4 del x86 - x87 = np.zeros((nbos, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nbos, nvir, nvir), dtype=types[float]) x87 += einsum("ia,wbi->wba", t1, lu11) - x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x88 += einsum("wia,wbc->ibca", u11, x87) del x87 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 -= einsum("iabc->iabc", x88) del x88 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum("abij,kjca->ikbc", l2, t2) x92 += einsum("ijab->ijab", x89) del x89 - x93 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x93 += einsum("ia,ijbc->jabc", t1, x92) del x92 x94 += einsum("iabc->ibac", x93) @@ -1854,7 +1855,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x94) * 4 rdm2_f_vvvo += einsum("iabc->cabi", x94) * 2 del x94 - x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum("ai,jibc->jabc", l1, t2) x98 += einsum("iabc->iabc", x95) del x95 @@ -1863,7 +1864,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo -= einsum("iabc->baci", x98) * 2 rdm2_f_vvvo += einsum("iabc->cabi", x98) * 4 del x98 - x100 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x100 += einsum("abij,ijcd->abcd", l2, t2) rdm2_f_vvvv += einsum("abcd->cbda", x100) * -2 rdm2_f_vvvv += einsum("abcd->dbca", x100) * 4 @@ -1874,7 +1875,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ooov -= einsum("ij,ak->kija", delta_oo, l1) * 2 rdm2_f_ovoo -= einsum("ij,ak->jaki", delta_oo, l1) * 2 rdm2_f_ovoo += einsum("ij,ak->kaji", delta_oo, l1) * 4 - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov -= einsum("abij->jaib", l2) * 2 rdm2_f_ovov += einsum("abij->jbia", l2) * 4 rdm2_f_oovv -= einsum("ai,jb->ijba", l1, t1) * 2 @@ -1896,9 +1897,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("w->w", s1) dm_b_des += einsum("ai,wia->w", l1, u11) * 2 @@ -1916,7 +1917,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wai,xia->wx", lu11, u11) * 2 @@ -1935,39 +1936,39 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv = np.eye(nvir) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x0 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x0 += einsum("ia,waj->wji", t1, lu11) - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum("wia,wij->ja", u11, x0) - rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_cre_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_cre_oo -= einsum("wij->wji", x0) * 2 - rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_cre_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_cre_ov -= einsum("ia,wij->wja", t1, x0) * 2 del x0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 -= einsum("ijab->jiab", t2) x1 += einsum("ijab->jiba", t2) * 2 rdm_eb_cre_ov += einsum("wai,ijab->wjb", lu11, x1) * 2 - x2 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x2 += einsum("ai,wja->wij", l1, u11) - x17 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x17 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x17 += einsum("wij->wij", x2) - rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=np.float64) + rdm_eb_des_oo = np.zeros((nbos, nocc, nocc), dtype=types[float]) rdm_eb_des_oo -= einsum("wij->wji", x2) * 2 del x2 - x3 = np.zeros((nbos), dtype=np.float64) + x3 = np.zeros((nbos), dtype=types[float]) x3 += einsum("ai,wia->w", l1, u11) rdm_eb_des_oo += einsum("w,ij->wji", x3, delta_oo) * 4 - rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=np.float64) + rdm_eb_des_ov = np.zeros((nbos, nocc, nvir), dtype=types[float]) rdm_eb_des_ov += einsum("w,ia->wia", x3, t1) * 4 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 -= einsum("abij->jiab", l2) x4 += einsum("abij->jiba", l2) * 2 - x5 = np.zeros((nbos, nocc, nvir), dtype=np.float64) + x5 = np.zeros((nbos, nocc, nvir), dtype=types[float]) x5 += einsum("wia,ijab->wjb", u11, x4) del x4 - x6 = np.zeros((nbos, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nbos, nocc, nocc), dtype=types[float]) x6 += einsum("ia,wja->wij", t1, x5) x17 += einsum("wij->wji", x6) rdm_eb_des_ov -= einsum("ia,wij->wja", t1, x17) * 2 @@ -1976,30 +1977,30 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x6 rdm_eb_des_ov += einsum("wia,ijab->wjb", x5, x1) * 2 del x1 - rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_des_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_des_vo += einsum("wia->wai", x5) * 2 - rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_des_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_des_vv += einsum("ia,wib->wba", t1, x5) * 2 del x5 - x7 = np.zeros((nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc), dtype=types[float]) x7 += einsum("ai,ja->ij", l1, t1) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum("ij->ij", x7) - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum("ij->ij", x7) - x21 = np.zeros((nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc), dtype=types[float]) x21 += einsum("ij->ij", x7) * 0.49999999999999967 del x7 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum("wai,wja->ij", lu11, u11) x11 += einsum("ij->ij", x8) x16 += einsum("ij->ij", x8) x21 += einsum("ij->ij", x8) * 0.49999999999999967 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum("ijab->jiab", t2) x9 += einsum("ijab->jiba", t2) * -0.5 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum("abij,ikba->jk", l2, x9) * 2 x11 += einsum("ij->ij", x10) x16 += einsum("ij->ij", x10) @@ -2013,18 +2014,18 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x11 += einsum("ij->ji", delta_oo) * -1 rdm_eb_des_oo += einsum("w,ij->wji", s1, x11) * -2 del x11 - x12 = np.zeros((nbos, nbos), dtype=np.float64) + x12 = np.zeros((nbos, nbos), dtype=types[float]) x12 += einsum("wai,xia->wx", lu11, u11) rdm_eb_des_ov += einsum("wx,wia->xia", x12, u11) * 4 del x12 - x13 = np.zeros((nvir, nvir), dtype=np.float64) + x13 = np.zeros((nvir, nvir), dtype=types[float]) x13 += einsum("wai,wib->ab", lu11, u11) - x15 = np.zeros((nvir, nvir), dtype=np.float64) + x15 = np.zeros((nvir, nvir), dtype=types[float]) x15 += einsum("ab->ab", x13) - x23 = np.zeros((nvir, nvir), dtype=np.float64) + x23 = np.zeros((nvir, nvir), dtype=types[float]) x23 += einsum("ab->ab", x13) * 0.5 del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum("abij->jiab", l2) x14 += einsum("abij->jiba", l2) * -0.5 x15 += einsum("ijab,ijbc->ca", t2, x14) * 2 @@ -2032,15 +2033,15 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x15 x23 += einsum("ijab,ijbc->ca", t2, x14) del x14 - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum("ia,abjk->kjib", t1, l2) - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum("ijka->ijka", x18) * -0.5 x19 += einsum("ijka->jika", x18) del x18 x22 += einsum("ijab,ijkb->ka", t2, x19) * 2.0000000000000013 del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum("ijab->jiab", t2) * -1 x20 += einsum("ijab->jiba", t2) * 2 x22 += einsum("ai,ijab->jb", l1, x20) * -1 @@ -2054,9 +2055,9 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x23 rdm_eb_cre_oo += einsum("w,ij->wji", ls1, delta_oo) * 2 rdm_eb_cre_ov += einsum("w,ia->wia", ls1, t1) * 2 - rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=np.float64) + rdm_eb_cre_vo = np.zeros((nbos, nvir, nocc), dtype=types[float]) rdm_eb_cre_vo += einsum("wai->wai", lu11) * 2 - rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=np.float64) + rdm_eb_cre_vv = np.zeros((nbos, nvir, nvir), dtype=types[float]) rdm_eb_cre_vv += einsum("ia,wbi->wba", t1, lu11) * 2 rdm_eb_des_ov += einsum("wia->wia", u11) * 2 rdm_eb_des_vo += einsum("w,ai->wai", s1, l1) * 2 diff --git a/ebcc/codegen/RCCSDtp.py b/ebcc/codegen/RCCSDtp.py index f828dc4f..037133b6 100644 --- a/ebcc/codegen/RCCSDtp.py +++ b/ebcc/codegen/RCCSDtp.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 e_cc = 0 e_cc += einsum(t2, (0, 1, 2, 3), x0, (0, 1, 3, 2), ()) * 2.0 - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(f.ov, (0, 1), (0, 1)) x1 += einsum(t1, (0, 1), x0, (0, 2, 3, 1), (2, 3)) del x0 @@ -30,7 +31,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) sV = space.active[space.correlated][space.virtual[space.correlated]] # T amplitudes - t1new = np.zeros(((nocc, nvir)), dtype=np.float64) + t1new = np.zeros(((nocc, nvir)), dtype=types[float]) t1new[np.ix_(so,sv)] += einsum(f.ov, (0, 1), (0, 1)) t1new[np.ix_(so,sv)] += einsum(f.oo, (0, 1), t1[np.ix_(so,sv)], (1, 2), (0, 2)) * -1.0 t1new[np.ix_(so,sv)] += einsum(f.vv, (0, 1), t1[np.ix_(so,sv)], (2, 1), (2, 0)) @@ -70,7 +71,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 3, 4, 5), v.ovov, (0, 4, 3, 1), (2, 5)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t1[np.ix_(so,sv)], (2, 3), t1[np.ix_(so,sv)], (4, 5), v.ovov, (2, 1, 4, 3), (0, 5)) t1new[np.ix_(so,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t1[np.ix_(so,sv)], (2, 3), t1[np.ix_(so,sv)], (4, 5), v.ovov, (2, 3, 4, 1), (0, 5)) * -2.0 - t2new = np.zeros(((nocc, nocc, nvir, nvir)), dtype=np.float64) + t2new = np.zeros(((nocc, nocc, nvir, nvir)), dtype=types[float]) t2new[np.ix_(so,so,sv,sv)] += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(f.oo, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 1, 3, 4), (0, 2, 4, 3)) * -1.0 t2new[np.ix_(so,so,sv,sv)] += einsum(f.oo, (0, 1), t2[np.ix_(so,so,sv,sv)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 @@ -203,7 +204,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t1[np.ix_(so,sv)], (2, 3), t2[np.ix_(so,so,sv,sv)], (4, 5, 6, 7), v.ovov, (0, 1, 2, 7), (4, 5, 6, 3)) * -2.0 t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t1[np.ix_(so,sv)], (2, 3), t2[np.ix_(so,so,sv,sv)], (4, 5, 6, 7), v.ovov, (0, 7, 2, 1), (4, 5, 6, 3)) t2new[np.ix_(so,so,sv,sv)] += einsum(t1[np.ix_(so,sv)], (0, 1), t1[np.ix_(so,sv)], (2, 3), t1[np.ix_(so,sv)], (4, 5), t1[np.ix_(so,sv)], (6, 7), v.ovov, (4, 1, 6, 3), (0, 2, 5, 7)) - t3new = np.zeros(((naocc, naocc, naocc, navir, navir, navir)), dtype=np.float64) + t3new = np.zeros(((naocc, naocc, naocc, navir, navir, navir)), dtype=types[float]) t3new += einsum(f.OO, (0, 1), t3, (2, 3, 1, 4, 5, 6), (0, 3, 2, 4, 5, 6)) t3new += einsum(f.OO, (0, 1), t3, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -1.0 t3new += einsum(f.OO, (0, 1), t3, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) * -1.0 diff --git a/ebcc/codegen/RCCSDxTx.py b/ebcc/codegen/RCCSDxTx.py index ec6e2f56..beb73f76 100644 --- a/ebcc/codegen/RCCSDxTx.py +++ b/ebcc/codegen/RCCSDxTx.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) * 2.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) e_cc += einsum(x0, (0, 1, 2, 3), x1, (0, 1, 3, 2), ()) * 2.0 @@ -20,114 +21,114 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (4, 0, 3, 5)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (3, 2, 4, 1)) * -1.0 - x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 t1new += einsum(t2, (0, 1, 2, 3), x0, (1, 3, 2, 4), (0, 4)) * 2.0 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x2, (4, 0, 1, 2), (4, 3)) * -1.0 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), x3, (0, 2, 3, 1), (2, 3)) * 2.0 - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum(f.ov, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) del x4 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x6 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t1new += einsum(x5, (0, 1), x6, (0, 2, 3, 1), (2, 3)) del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x7 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 del x7 - x8 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x8 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x8 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 - x9 = np.zeros((nvir, nvir), dtype=np.float64) + x9 = np.zeros((nvir, nvir), dtype=types[float]) x9 += einsum(f.vv, (0, 1), (0, 1)) * 0.5 x9 += einsum(t1, (0, 1), x8, (0, 1, 2, 3), (3, 2)) del x8 t1new += einsum(t1, (0, 1), x9, (1, 2), (0, 2)) * 2.0 del x9 - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x10 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(t1, (0, 1), x5, (2, 1), (2, 0)) del x5 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(f.oo, (0, 1), (0, 1)) x12 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 3), (4, 0)) * 2.0 x12 += einsum(t1, (0, 1), x10, (2, 3, 0, 1), (3, 2)) * 2.0 x12 += einsum(x11, (0, 1), (0, 1)) t1new += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) * -1.0 del x12 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (4, 5, 1, 0), (4, 5, 3, 2)) del x16 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 1, 5, 3), (4, 0, 2, 5)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x20 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(x15, (0, 1, 2, 3), x20, (1, 4, 5, 2), (4, 0, 5, 3)) * 2.0 del x20 - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x1, (4, 5, 1, 2), (4, 0, 5, 3)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.5 x25 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x25 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(v.ooov, (0, 1, 2, 3), x25, (2, 4, 5, 3), (0, 1, 4, 5)) * 2.0 del x25 - x27 = np.zeros((nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), x3, (0, 2, 3, 1), (2, 3)) - x28 = np.zeros((nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir), dtype=types[float]) x28 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x28 += einsum(x27, (0, 1), (0, 1)) del x27 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(x28, (0, 1), t2, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x28 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(x22, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x22 x30 += einsum(x23, (0, 1, 2, 3), (2, 0, 1, 3)) @@ -138,17 +139,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x26 x30 += einsum(x29, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x29 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(t1, (0, 1), x30, (0, 2, 3, 4), (2, 3, 4, 1)) del x30 - x32 = np.zeros((nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc), dtype=types[float]) x32 += einsum(f.oo, (0, 1), (0, 1)) x32 += einsum(x11, (0, 1), (1, 0)) del x11 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(x32, (0, 1), t2, (2, 1, 3, 4), (0, 2, 4, 3)) del x32 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) del x14 x34 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -166,56 +167,56 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) t2new += einsum(x34, (0, 1, 2, 3), (1, 0, 2, 3)) del x34 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), x18, (4, 1, 5, 2), (4, 0, 3, 5)) del x18 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(t1, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x37 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), x37, (1, 4, 3, 5), (4, 0, 5, 2)) * 0.5 del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x36 x39 += einsum(x38, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(t2, (0, 1, 2, 3), x39, (4, 1, 5, 2), (4, 0, 5, 3)) * 2.0 del x39 - x41 = np.zeros((nvir, nvir), dtype=np.float64) + x41 = np.zeros((nvir, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 3, 4), (4, 2)) * 2.0 - x42 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x42 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x42 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 += einsum(t1, (0, 1), x42, (0, 1, 2, 3), (2, 3)) del x42 - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 += einsum(x41, (0, 1), (0, 1)) del x41 x44 += einsum(x43, (0, 1), (1, 0)) * -1.0 del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x44, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x44 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), (0, 4, 5, 3)) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x47 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x47, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x47 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x49 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x49, (4, 5, 3, 1), (5, 4, 0, 2)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(v.ovvv, (0, 1, 2, 3), x49, (4, 5, 3, 1), (0, 4, 5, 2)) - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) del x1 x51 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -224,24 +225,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x48 x51 += einsum(x50, (0, 1, 2, 3), (2, 1, 0, 3)) del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t1, (0, 1), x51, (2, 3, 0, 4), (2, 3, 4, 1)) del x51 - x53 = np.zeros((nocc, nocc), dtype=np.float64) + x53 = np.zeros((nocc, nocc), dtype=types[float]) x53 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 3), (4, 0)) del x3 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum(t1, (0, 1), x10, (2, 3, 0, 1), (2, 3)) del x10 - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum(x53, (0, 1), (0, 1)) del x53 x55 += einsum(x54, (0, 1), (1, 0)) del x54 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x55, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) * 2.0 del x55 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) del x35 x57 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -255,37 +256,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x57, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x57 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x58 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x59 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x59 += einsum(t2, (0, 1, 2, 3), x58, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x58 t2new += einsum(t2, (0, 1, 2, 3), x59, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x59 - x60 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x60 += einsum(v.ovov, (0, 1, 2, 3), x49, (4, 5, 1, 3), (4, 5, 0, 2)) del x49 - x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x61 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x61 += einsum(x60, (0, 1, 2, 3), (3, 1, 0, 2)) del x60 t2new += einsum(t2, (0, 1, 2, 3), x61, (0, 4, 5, 1), (5, 4, 3, 2)) - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x62 += einsum(t1, (0, 1), x61, (0, 2, 3, 4), (3, 2, 4, 1)) del x61 t2new += einsum(t1, (0, 1), x62, (2, 3, 0, 4), (2, 3, 1, 4)) del x62 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x63 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) del x13 t2new += einsum(t2, (0, 1, 2, 3), x63, (4, 1, 5, 2), (4, 0, 5, 3)) del x63 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x64 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x64, (4, 1, 5, 2), (0, 4, 5, 3)) @@ -298,617 +299,617 @@ def energy_perturbative(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, denom3 = 1 / direct_sum("ia+jb+kc->ijkabc", e_ia, e_ia, e_ia) # energy - x0 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), denom3, (6, 4, 3, 7, 0, 1), (4, 6, 2, 0, 7, 5)) - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(v.ovvv, (0, 1, 2, 3), x0, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) e_pert = 0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x1, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x1, (2, 1, 0, 3), ()) * -8.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(v.ovvv, (0, 1, 2, 3), x0, (4, 0, 5, 3, 1, 2), (4, 0, 5, 1)) del x0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x2, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x2, (0, 2, 1, 3), ()) * -8.0 del x2 - x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(l2, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 0), denom3, (6, 3, 4, 0, 7, 1), (3, 4, 6, 2, 7, 5)) - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 0, 5, 3, 2), (0, 4, 5, 3)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x4, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x4, (2, 0, 1, 3), ()) * -2.0 del x4 - x5 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x5 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), denom3, (6, 4, 3, 7, 0, 1), (4, 6, 2, 0, 7, 5)) - x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x6 += einsum(v.ovvv, (0, 1, 2, 3), x5, (4, 0, 5, 2, 1, 3), (4, 0, 5, 1)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x6, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x6, (2, 1, 0, 3), ()) * -2.0 del x6 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(v.ovvv, (0, 1, 2, 3), x5, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) del x5 e_pert += einsum(v.ooov, (0, 1, 2, 3), x7, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x7, (0, 2, 1, 3), ()) * -2.0 del x7 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 0, 5, 2, 3), (0, 4, 5, 2)) del x3 e_pert += einsum(v.ooov, (0, 1, 2, 3), x8, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x8, (1, 2, 0, 3), ()) * -2.0 del x8 - x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x9 += einsum(l2, (0, 1, 2, 3), v.ovvv, (2, 1, 4, 5), denom3, (2, 6, 7, 1, 0, 4), (7, 6, 3, 0, 4, 5)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), x9, (0, 1, 4, 2, 5, 3), (0, 1, 4, 5)) del x9 e_pert += einsum(v.ooov, (0, 1, 2, 3), x10, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x10, (2, 1, 0, 3), ()) * -2.0 del x10 - x11 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), v.ovvv, (3, 1, 4, 0), denom3, (3, 5, 6, 0, 7, 1), (6, 5, 2, 7, 4)) - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), x11, (0, 1, 4, 2, 3), (0, 1, 4, 2)) del x11 e_pert += einsum(v.ooov, (0, 1, 2, 3), x12, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x12, (2, 1, 0, 3), ()) * -8.0 del x12 - x13 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), v.ovvv, (2, 4, 5, 1), denom3, (2, 6, 7, 1, 0, 4), (7, 6, 3, 0, 4, 5)) - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(t2, (0, 1, 2, 3), x13, (1, 0, 4, 2, 5, 3), (0, 1, 4, 5)) del x13 e_pert += einsum(v.ooov, (0, 1, 2, 3), x14, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x14, (1, 2, 0, 3), ()) * -2.0 del x14 - x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x15 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), denom3, (6, 4, 2, 7, 0, 1), (4, 6, 3, 0, 7, 5)) - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(v.ovvv, (0, 1, 2, 3), x15, (4, 0, 5, 3, 1, 2), (4, 0, 5, 1)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x16, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x16, (2, 1, 0, 3), ()) * -2.0 del x16 - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(v.ovvv, (0, 1, 2, 3), x15, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) del x15 e_pert += einsum(v.ooov, (0, 1, 2, 3), x17, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x17, (0, 2, 1, 3), ()) * -2.0 del x17 - x18 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x18 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), denom3, (6, 4, 2, 7, 0, 1), (4, 6, 3, 0, 7, 5)) - x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x19 += einsum(v.ovvv, (0, 1, 2, 3), x18, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x19, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x19, (2, 1, 0, 3), ()) * -2.0 del x19 - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(v.ovvv, (0, 1, 2, 3), x18, (4, 0, 5, 3, 1, 2), (4, 0, 5, 1)) del x18 e_pert += einsum(v.ooov, (0, 1, 2, 3), x20, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x20, (0, 2, 1, 3), ()) * -8.0 del x20 - x21 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x21 += einsum(l2, (0, 1, 2, 3), v.ovvv, (3, 4, 5, 1), denom3, (3, 6, 7, 1, 0, 4), (7, 6, 2, 0, 4, 5)) - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x21, (0, 1, 4, 2, 5, 3), (0, 1, 4, 5)) del x21 e_pert += einsum(v.ooov, (0, 1, 2, 3), x22, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x22, (2, 1, 0, 3), ()) * -2.0 del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x23 += einsum(l2, (0, 1, 2, 3), v.ovvv, (3, 1, 4, 5), denom3, (3, 6, 7, 1, 0, 4), (7, 6, 2, 0, 4, 5)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x23, (1, 0, 4, 2, 5, 3), (0, 1, 4, 5)) del x23 e_pert += einsum(v.ooov, (0, 1, 2, 3), x24, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x24, (1, 2, 0, 3), ()) * -8.0 del x24 - x25 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x25 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), denom3, (6, 2, 3, 7, 5, 1), (2, 6, 4, 5, 7, 0)) - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(v.ovvv, (0, 1, 2, 3), x25, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x26, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x26, (2, 1, 0, 3), ()) * -8.0 del x26 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(v.ovvv, (0, 1, 2, 3), x25, (4, 0, 5, 2, 1, 3), (4, 0, 5, 1)) del x25 e_pert += einsum(v.ooov, (0, 1, 2, 3), x27, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x27, (1, 2, 0, 3), ()) * -8.0 del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x28 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), denom3, (6, 2, 3, 7, 5, 1), (2, 6, 4, 5, 7, 0)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(v.ovvv, (0, 1, 2, 3), x28, (4, 0, 5, 2, 1, 3), (4, 0, 5, 1)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x29, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x29, (2, 1, 0, 3), ()) * -2.0 del x29 - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(v.ovvv, (0, 1, 2, 3), x28, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) del x28 e_pert += einsum(v.ooov, (0, 1, 2, 3), x30, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x30, (1, 2, 0, 3), ()) * -2.0 del x30 - x31 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), denom3, (6, 0, 4, 2, 7, 3), (0, 4, 6, 1, 7, 5)) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(l2, (0, 1, 2, 3), x31, (2, 4, 3, 5, 0, 1), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x32, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x32, (2, 0, 1, 3), ()) * -2.0 del x32 - x33 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 3, 5, 2), denom3, (6, 0, 4, 3, 7, 2), (0, 4, 6, 1, 7, 5)) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(l2, (0, 1, 2, 3), x33, (2, 4, 3, 5, 0, 1), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x34, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x34, (1, 2, 0, 3), ()) * -2.0 del x34 - x35 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 2, 4, 5), denom3, (1, 6, 7, 2, 3, 4), (7, 6, 0, 3, 4, 5)) - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(l2, (0, 1, 2, 3), x35, (2, 3, 4, 1, 5, 0), (3, 2, 4, 5)) del x35 e_pert += einsum(v.ooov, (0, 1, 2, 3), x36, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x36, (2, 0, 1, 3), ()) * -2.0 del x36 - x37 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 3), denom3, (1, 6, 7, 3, 2, 4), (7, 6, 0, 2, 4, 5)) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum(l2, (0, 1, 2, 3), x37, (2, 3, 4, 1, 5, 0), (3, 2, 4, 5)) del x37 e_pert += einsum(v.ooov, (0, 1, 2, 3), x38, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x38, (2, 0, 1, 3), ()) * -2.0 del x38 - x39 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 3, 4, 2), denom3, (1, 5, 6, 3, 7, 2), (6, 5, 0, 7, 4)) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(l2, (0, 1, 2, 3), x39, (3, 2, 4, 0, 1), (2, 3, 4, 0)) del x39 e_pert += einsum(v.ooov, (0, 1, 2, 3), x40, (0, 2, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x40, (2, 0, 1, 3), ()) * -8.0 del x40 - x41 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x41 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), denom3, (6, 3, 2, 7, 5, 1), (3, 6, 4, 5, 7, 0)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(v.ovvv, (0, 1, 2, 3), x41, (4, 0, 5, 2, 1, 3), (4, 0, 5, 1)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x42, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x42, (2, 1, 0, 3), ()) * -2.0 del x42 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(v.ovvv, (0, 1, 2, 3), x41, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) del x41 e_pert += einsum(v.ooov, (0, 1, 2, 3), x43, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x43, (1, 2, 0, 3), ()) * -2.0 del x43 - x44 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x44 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), denom3, (6, 3, 2, 7, 5, 1), (3, 6, 4, 5, 7, 0)) - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum(v.ovvv, (0, 1, 2, 3), x44, (4, 0, 5, 1, 2, 3), (4, 0, 5, 2)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x45, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x45, (2, 1, 0, 3), ()) * -2.0 del x45 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(v.ovvv, (0, 1, 2, 3), x44, (4, 0, 5, 2, 1, 3), (4, 0, 5, 1)) del x44 e_pert += einsum(v.ooov, (0, 1, 2, 3), x46, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x46, (1, 2, 0, 3), ()) * -8.0 del x46 - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(l2, (0, 1, 2, 3), x31, (3, 4, 2, 5, 0, 1), (2, 4, 5, 0)) del x31 e_pert += einsum(v.ooov, (0, 1, 2, 3), x47, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x47, (1, 2, 0, 3), ()) * -2.0 del x47 - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(l2, (0, 1, 2, 3), x33, (3, 4, 2, 5, 0, 1), (2, 4, 5, 0)) del x33 e_pert += einsum(v.ooov, (0, 1, 2, 3), x48, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x48, (2, 0, 1, 3), ()) * -8.0 del x48 - x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 4, 5, 2), denom3, (1, 6, 7, 2, 3, 4), (7, 6, 0, 3, 4, 5)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(l2, (0, 1, 2, 3), x49, (2, 3, 4, 0, 5, 1), (2, 3, 4, 5)) del x49 e_pert += einsum(v.ooov, (0, 1, 2, 3), x50, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x50, (0, 2, 1, 3), ()) * -2.0 del x50 - x51 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x51 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 3, 4, 5), denom3, (1, 6, 7, 3, 2, 4), (7, 6, 0, 2, 4, 5)) - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum(l2, (0, 1, 2, 3), x51, (2, 3, 4, 0, 5, 1), (2, 3, 4, 5)) del x51 e_pert += einsum(v.ooov, (0, 1, 2, 3), x52, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x52, (0, 2, 1, 3), ()) * -8.0 del x52 - x53 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(t2, (0, 1, 2, 3), v.ovvv, (1, 2, 4, 3), denom3, (1, 5, 6, 2, 7, 3), (6, 5, 0, 7, 4)) - x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x54 += einsum(l2, (0, 1, 2, 3), x53, (2, 3, 4, 0, 1), (2, 3, 4, 0)) del x53 e_pert += einsum(v.ooov, (0, 1, 2, 3), x54, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x54, (0, 2, 1, 3), ()) * -2.0 del x54 - x55 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(l2, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 0), denom3, (6, 2, 4, 0, 7, 1), (2, 4, 6, 3, 7, 5)) - x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x56 += einsum(t2, (0, 1, 2, 3), x55, (1, 4, 0, 5, 3, 2), (0, 4, 5, 3)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x56, (2, 0, 1, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x56, (1, 2, 0, 3), ()) * -2.0 del x56 - x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), x55, (1, 4, 0, 5, 2, 3), (0, 4, 5, 2)) del x55 e_pert += einsum(v.ooov, (0, 1, 2, 3), x57, (1, 2, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x57, (2, 0, 1, 3), ()) * -8.0 del x57 - x58 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(l2, (0, 1, 2, 3), v.ovvv, (2, 1, 4, 0), denom3, (2, 5, 6, 0, 7, 1), (6, 5, 3, 7, 4)) - x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x58, (1, 0, 4, 2, 3), (0, 1, 4, 2)) del x58 e_pert += einsum(v.ooov, (0, 1, 2, 3), x59, (2, 1, 0, 3), ()) * 4.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x59, (1, 2, 0, 3), ()) * -2.0 del x59 - x60 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x60 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 0, 1), denom3, (2, 5, 6, 1, 7, 0), (6, 5, 3, 4, 7)) - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum(v.ooov, (0, 1, 2, 3), x60, (0, 2, 1, 4, 3), (0, 2, 4, 3)) del x60 e_pert += einsum(v.ooov, (0, 1, 2, 3), x61, (2, 0, 1, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x61, (1, 2, 0, 3), ()) * -4.0 del x61 - x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), denom3, (3, 6, 7, 1, 0, 5), (7, 6, 2, 4, 0, 5)) - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(v.ooov, (0, 1, 2, 3), x62, (0, 2, 4, 1, 3, 5), (0, 2, 4, 5)) del x62 e_pert += einsum(v.ooov, (0, 1, 2, 3), x63, (1, 2, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x63, (2, 1, 0, 3), ()) * -4.0 del x63 - x64 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 1, 0), denom3, (6, 3, 4, 0, 7, 1), (3, 4, 6, 2, 5, 7)) - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(v.ooov, (0, 1, 2, 3), x64, (1, 4, 2, 5, 0, 3), (4, 2, 5, 3)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x65, (2, 1, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x65, (0, 2, 1, 3), ()) * -4.0 del x65 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(v.ooov, (0, 1, 2, 3), x64, (2, 4, 0, 5, 1, 3), (4, 0, 5, 3)) del x64 e_pert += einsum(v.ooov, (0, 1, 2, 3), x66, (0, 2, 1, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x66, (2, 1, 0, 3), ()) * -4.0 del x66 - x67 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), denom3, (1, 5, 6, 2, 3, 7), (5, 6, 0, 4, 3, 7)) - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum(l2, (0, 1, 2, 3), x67, (4, 3, 5, 2, 1, 0), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x68, (1, 2, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x68, (2, 0, 1, 3), ()) * -4.0 del x68 - x69 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 1, 2), denom3, (1, 4, 6, 2, 3, 7), (4, 6, 0, 5, 3, 7)) - x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x70 += einsum(l2, (0, 1, 2, 3), x69, (4, 3, 5, 2, 1, 0), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x70, (2, 0, 1, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x70, (1, 2, 0, 3), ()) * -4.0 del x70 - x71 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x71 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), denom3, (6, 3, 4, 0, 7, 1), (3, 4, 6, 2, 5, 7)) - x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x72 += einsum(v.ooov, (0, 1, 2, 3), x71, (2, 4, 0, 5, 1, 3), (4, 0, 5, 3)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x72, (2, 1, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x72, (0, 2, 1, 3), ()) * -4.0 del x72 - x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), denom3, (1, 5, 6, 3, 2, 7), (5, 6, 0, 4, 2, 7)) - x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x74 += einsum(l2, (0, 1, 2, 3), x73, (4, 3, 5, 2, 1, 0), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x74, (2, 0, 1, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x74, (1, 2, 0, 3), ()) * -4.0 del x74 - x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), denom3, (2, 6, 7, 1, 0, 5), (7, 6, 3, 4, 0, 5)) - x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x76 += einsum(v.ooov, (0, 1, 2, 3), x75, (0, 2, 4, 1, 3, 5), (0, 2, 4, 5)) del x75 e_pert += einsum(v.ooov, (0, 1, 2, 3), x76, (1, 2, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x76, (2, 1, 0, 3), ()) * -4.0 del x76 - x77 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), denom3, (2, 6, 7, 1, 0, 5), (7, 6, 3, 4, 0, 5)) - x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x78 += einsum(v.ooov, (0, 1, 2, 3), x77, (2, 0, 4, 1, 3, 5), (0, 2, 4, 5)) del x77 e_pert += einsum(v.ooov, (0, 1, 2, 3), x78, (2, 1, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x78, (1, 2, 0, 3), ()) * -4.0 del x78 - x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x79 += einsum(l2, (0, 1, 2, 3), x69, (4, 2, 5, 3, 1, 0), (2, 4, 5, 0)) del x69 e_pert += einsum(v.ooov, (0, 1, 2, 3), x79, (1, 2, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x79, (2, 0, 1, 3), ()) * -4.0 del x79 - x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x80 += einsum(l2, (0, 1, 2, 3), x73, (4, 2, 5, 3, 1, 0), (2, 4, 5, 0)) del x73 e_pert += einsum(v.ooov, (0, 1, 2, 3), x80, (1, 2, 0, 3), ()) * 2.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x80, (2, 0, 1, 3), ()) * -4.0 del x80 - x81 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x81 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 0), denom3, (2, 5, 6, 1, 7, 0), (6, 5, 3, 4, 7)) - x82 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x82 += einsum(v.ooov, (0, 1, 2, 3), x81, (0, 2, 1, 4, 3), (0, 2, 4, 3)) del x81 e_pert += einsum(v.ooov, (0, 1, 2, 3), x82, (1, 2, 0, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x82, (2, 0, 1, 3), ()) * -4.0 del x82 - x83 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 5, 1), denom3, (3, 6, 7, 1, 0, 5), (7, 6, 2, 4, 0, 5)) - x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x84 += einsum(v.ooov, (0, 1, 2, 3), x83, (2, 0, 4, 1, 3, 5), (0, 2, 4, 5)) del x83 e_pert += einsum(v.ooov, (0, 1, 2, 3), x84, (2, 1, 0, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x84, (1, 2, 0, 3), ()) * -4.0 del x84 - x85 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x85 += einsum(v.ooov, (0, 1, 2, 3), x71, (1, 4, 2, 5, 0, 3), (4, 2, 5, 3)) del x71 e_pert += einsum(v.ooov, (0, 1, 2, 3), x85, (0, 2, 1, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x85, (2, 1, 0, 3), ()) * -4.0 del x85 - x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 5, 1, 3), denom3, (1, 4, 6, 3, 2, 7), (4, 6, 0, 5, 2, 7)) - x87 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x87 += einsum(l2, (0, 1, 2, 3), x86, (4, 3, 5, 2, 1, 0), (3, 4, 5, 0)) e_pert += einsum(v.ooov, (0, 1, 2, 3), x87, (1, 2, 0, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x87, (2, 0, 1, 3), ()) * -4.0 del x87 - x88 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x88 += einsum(l2, (0, 1, 2, 3), x67, (4, 2, 5, 3, 1, 0), (2, 4, 5, 0)) del x67 e_pert += einsum(v.ooov, (0, 1, 2, 3), x88, (2, 0, 1, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x88, (1, 2, 0, 3), ()) * -4.0 del x88 - x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x89 += einsum(l2, (0, 1, 2, 3), x86, (4, 2, 5, 3, 1, 0), (2, 4, 5, 0)) del x86 e_pert += einsum(v.ooov, (0, 1, 2, 3), x89, (2, 0, 1, 3), ()) * 8.0 e_pert += einsum(v.ooov, (0, 1, 2, 3), x89, (1, 2, 0, 3), ()) * -4.0 del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x90 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 4, 5, 3), denom3, (2, 6, 0, 3, 4, 1), (0, 6, 1, 4, 5)) - x91 = np.zeros((nocc, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), x90, (1, 0, 2, 4, 3), (0, 4)) e_pert += einsum(l1, (0, 1), x91, (1, 0), ()) * 2.0 del x91 - x92 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x92 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 1, 4, 5), denom3, (2, 6, 0, 3, 4, 1), (0, 6, 4, 3, 5)) - x93 = np.zeros((nocc, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nvir), dtype=types[float]) x93 += einsum(t2, (0, 1, 2, 3), x92, (1, 0, 4, 2, 3), (0, 4)) e_pert += einsum(l1, (0, 1), x93, (1, 0), ()) * 2.0 del x93 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 1, 4, 3), denom3, (2, 0, 5, 1, 6, 3), (0, 5, 6, 4)) - x95 = np.zeros((nocc, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir), dtype=types[float]) x95 += einsum(t2, (0, 1, 2, 3), x94, (1, 0, 3, 2), (0, 3)) e_pert += einsum(l1, (0, 1), x95, (1, 0), ()) * 2.0 del x95 - x96 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x96 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 4, 5, 1), denom3, (2, 6, 0, 3, 4, 1), (0, 6, 3, 4, 5)) - x97 = np.zeros((nocc, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir), dtype=types[float]) x97 += einsum(t2, (0, 1, 2, 3), x96, (1, 0, 3, 4, 2), (0, 4)) e_pert += einsum(l1, (0, 1), x97, (1, 0), ()) * 2.0 del x97 - x98 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 3), denom3, (2, 4, 0, 3, 6, 1), (0, 2, 4, 6, 5)) - x99 = np.zeros((nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir), dtype=types[float]) x99 += einsum(t2, (0, 1, 2, 3), x98, (0, 1, 4, 3, 2), (4, 3)) e_pert += einsum(l1, (0, 1), x99, (1, 0), ()) * 2.0 del x99 - x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum(t2, (0, 1, 2, 3), v.ovov, (0, 4, 1, 2), denom3, (0, 5, 1, 2, 4, 6), (5, 4, 6, 3)) - x101 = np.zeros((nocc, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir), dtype=types[float]) x101 += einsum(v.ovvv, (0, 1, 2, 3), x100, (0, 1, 2, 3), (0, 2)) e_pert += einsum(l1, (0, 1), x101, (1, 0), ()) * 2.0 del x101 - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 3, 4, 1), denom3, (2, 0, 5, 3, 6, 1), (0, 5, 6, 4)) - x103 = np.zeros((nocc, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nvir), dtype=types[float]) x103 += einsum(t2, (0, 1, 2, 3), x102, (1, 0, 2, 3), (0, 2)) e_pert += einsum(l1, (0, 1), x103, (1, 0), ()) * 8.0 del x103 - x104 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(v.ovov, (0, 1, 2, 3), v.ovvv, (2, 3, 4, 5), denom3, (2, 6, 0, 3, 4, 1), (0, 6, 4, 1, 5)) - x105 = np.zeros((nocc, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nvir), dtype=types[float]) x105 += einsum(t2, (0, 1, 2, 3), x104, (1, 0, 4, 3, 2), (0, 4)) e_pert += einsum(l1, (0, 1), x105, (1, 0), ()) * 8.0 del x105 - x106 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(t2, (0, 1, 2, 3), v.ovov, (0, 2, 1, 4), denom3, (0, 5, 1, 2, 4, 6), (5, 4, 6, 3)) - x107 = np.zeros((nocc, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nvir), dtype=types[float]) x107 += einsum(v.ovvv, (0, 1, 2, 3), x106, (0, 2, 1, 3), (0, 1)) e_pert += einsum(l1, (0, 1), x107, (1, 0), ()) * 8.0 del x107 - x108 = np.zeros((nocc, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nvir), dtype=types[float]) x108 += einsum(t2, (0, 1, 2, 3), x94, (1, 0, 2, 3), (0, 2)) del x94 e_pert += einsum(l1, (0, 1), x108, (1, 0), ()) * -4.0 del x108 - x109 = np.zeros((nocc, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nvir), dtype=types[float]) x109 += einsum(t2, (0, 1, 2, 3), x104, (1, 0, 4, 2, 3), (0, 4)) del x104 e_pert += einsum(l1, (0, 1), x109, (1, 0), ()) * -4.0 del x109 - x110 = np.zeros((nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nvir), dtype=types[float]) x110 += einsum(t2, (0, 1, 2, 3), x96, (1, 0, 2, 4, 3), (0, 4)) del x96 e_pert += einsum(l1, (0, 1), x110, (1, 0), ()) * -4.0 del x110 - x111 = np.zeros((nocc, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nvir), dtype=types[float]) x111 += einsum(t2, (0, 1, 2, 3), x102, (1, 0, 3, 2), (0, 3)) del x102 e_pert += einsum(l1, (0, 1), x111, (1, 0), ()) * -4.0 del x111 - x112 = np.zeros((nocc, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nvir), dtype=types[float]) x112 += einsum(t2, (0, 1, 2, 3), x90, (1, 0, 3, 4, 2), (0, 4)) del x90 e_pert += einsum(l1, (0, 1), x112, (1, 0), ()) * -4.0 del x112 - x113 = np.zeros((nocc, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nvir), dtype=types[float]) x113 += einsum(t2, (0, 1, 2, 3), x92, (1, 0, 4, 3, 2), (0, 4)) del x92 e_pert += einsum(l1, (0, 1), x113, (1, 0), ()) * -4.0 del x113 - x114 = np.zeros((nocc, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nvir), dtype=types[float]) x114 += einsum(t2, (0, 1, 2, 3), x98, (0, 1, 4, 2, 3), (4, 2)) del x98 e_pert += einsum(l1, (0, 1), x114, (1, 0), ()) * -4.0 del x114 - x115 = np.zeros((nocc, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nvir), dtype=types[float]) x115 += einsum(v.ovvv, (0, 1, 2, 3), x100, (0, 2, 1, 3), (0, 1)) del x100 e_pert += einsum(l1, (0, 1), x115, (1, 0), ()) * -4.0 del x115 - x116 = np.zeros((nocc, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nvir), dtype=types[float]) x116 += einsum(v.ovvv, (0, 1, 2, 3), x106, (0, 1, 2, 3), (0, 2)) del x106 e_pert += einsum(l1, (0, 1), x116, (1, 0), ()) * -4.0 del x116 - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (1, 3, 2, 4), denom3, (1, 5, 2, 3, 4, 6), (5, 0, 4, 6)) - x118 = np.zeros((nocc, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nvir), dtype=types[float]) x118 += einsum(t2, (0, 1, 2, 3), x117, (0, 1, 3, 2), (0, 2)) e_pert += einsum(l1, (0, 1), x118, (1, 0), ()) * 4.0 del x118 - x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x119 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x119 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (1, 4, 2, 3), denom3, (1, 5, 2, 3, 4, 6), (5, 0, 4, 6)) - x120 = np.zeros((nocc, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nvir), dtype=types[float]) x120 += einsum(t2, (0, 1, 2, 3), x119, (0, 1, 2, 3), (0, 3)) e_pert += einsum(l1, (0, 1), x120, (1, 0), ()) * 4.0 del x120 - x121 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=np.float64) + x121 = np.zeros((nocc, nocc, nocc, nocc, nvir), dtype=types[float]) x121 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), denom3, (5, 0, 4, 2, 6, 3), (0, 4, 5, 1, 6)) - x122 = np.zeros((nocc, nvir), dtype=np.float64) + x122 = np.zeros((nocc, nvir), dtype=types[float]) x122 += einsum(v.ooov, (0, 1, 2, 3), x121, (4, 2, 0, 1, 3), (4, 3)) e_pert += einsum(l1, (0, 1), x122, (1, 0), ()) * 4.0 del x122 - x123 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x123 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (4, 5, 2, 3), denom3, (2, 0, 4, 3, 6, 5), (0, 4, 1, 5, 6)) - x124 = np.zeros((nocc, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nvir), dtype=types[float]) x124 += einsum(t2, (0, 1, 2, 3), x123, (4, 0, 1, 3, 2), (4, 2)) e_pert += einsum(l1, (0, 1), x124, (1, 0), ()) * 4.0 del x124 - x125 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x125 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (4, 3, 1, 5), denom3, (1, 2, 4, 3, 6, 5), (2, 4, 0, 5, 6)) - x126 = np.zeros((nocc, nvir), dtype=np.float64) + x126 = np.zeros((nocc, nvir), dtype=types[float]) x126 += einsum(t2, (0, 1, 2, 3), x125, (4, 0, 1, 3, 2), (4, 2)) e_pert += einsum(l1, (0, 1), x126, (1, 0), ()) * 4.0 del x126 - x127 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x127 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x127 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (4, 3, 2, 5), denom3, (2, 0, 4, 3, 6, 5), (0, 4, 1, 5, 6)) - x128 = np.zeros((nocc, nvir), dtype=np.float64) + x128 = np.zeros((nocc, nvir), dtype=types[float]) x128 += einsum(t2, (0, 1, 2, 3), x127, (4, 0, 1, 2, 3), (4, 3)) e_pert += einsum(l1, (0, 1), x128, (1, 0), ()) * 4.0 del x128 - x129 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=np.float64) + x129 = np.zeros((nocc, nocc, nocc, nvir, nvir), dtype=types[float]) x129 += einsum(v.ooov, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), denom3, (1, 2, 4, 3, 6, 5), (2, 4, 0, 5, 6)) - x130 = np.zeros((nocc, nvir), dtype=np.float64) + x130 = np.zeros((nocc, nvir), dtype=types[float]) x130 += einsum(t2, (0, 1, 2, 3), x129, (4, 0, 1, 2, 3), (4, 3)) e_pert += einsum(l1, (0, 1), x130, (1, 0), ()) * 4.0 del x130 - x131 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x131 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x131 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 3), denom3, (1, 4, 5, 3, 6, 2), (4, 5, 0, 6)) - x132 = np.zeros((nocc, nvir), dtype=np.float64) + x132 = np.zeros((nocc, nvir), dtype=types[float]) x132 += einsum(v.ooov, (0, 1, 2, 3), x131, (2, 0, 1, 3), (0, 3)) e_pert += einsum(l1, (0, 1), x132, (1, 0), ()) * 4.0 del x132 - x133 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x133 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x133 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 3, 1, 2), denom3, (1, 4, 5, 3, 6, 2), (4, 5, 0, 6)) - x134 = np.zeros((nocc, nvir), dtype=np.float64) + x134 = np.zeros((nocc, nvir), dtype=types[float]) x134 += einsum(v.ooov, (0, 1, 2, 3), x133, (0, 2, 1, 3), (2, 3)) e_pert += einsum(l1, (0, 1), x134, (1, 0), ()) * 4.0 del x134 - x135 = np.zeros((nocc, nvir), dtype=np.float64) + x135 = np.zeros((nocc, nvir), dtype=types[float]) x135 += einsum(t2, (0, 1, 2, 3), x117, (0, 1, 2, 3), (0, 3)) del x117 e_pert += einsum(l1, (0, 1), x135, (1, 0), ()) * -2.0 del x135 - x136 = np.zeros((nocc, nvir), dtype=np.float64) + x136 = np.zeros((nocc, nvir), dtype=types[float]) x136 += einsum(v.ooov, (0, 1, 2, 3), x121, (4, 0, 2, 1, 3), (4, 3)) del x121 e_pert += einsum(l1, (0, 1), x136, (1, 0), ()) * -2.0 del x136 - x137 = np.zeros((nocc, nvir), dtype=np.float64) + x137 = np.zeros((nocc, nvir), dtype=types[float]) x137 += einsum(t2, (0, 1, 2, 3), x127, (4, 0, 1, 3, 2), (4, 2)) del x127 e_pert += einsum(l1, (0, 1), x137, (1, 0), ()) * -2.0 del x137 - x138 = np.zeros((nocc, nvir), dtype=np.float64) + x138 = np.zeros((nocc, nvir), dtype=types[float]) x138 += einsum(t2, (0, 1, 2, 3), x129, (4, 0, 1, 3, 2), (4, 2)) del x129 e_pert += einsum(l1, (0, 1), x138, (1, 0), ()) * -2.0 del x138 - x139 = np.zeros((nocc, nvir), dtype=np.float64) + x139 = np.zeros((nocc, nvir), dtype=types[float]) x139 += einsum(t2, (0, 1, 2, 3), x125, (4, 0, 1, 2, 3), (4, 3)) del x125 e_pert += einsum(l1, (0, 1), x139, (1, 0), ()) * -2.0 del x139 - x140 = np.zeros((nocc, nvir), dtype=np.float64) + x140 = np.zeros((nocc, nvir), dtype=types[float]) x140 += einsum(v.ooov, (0, 1, 2, 3), x133, (2, 0, 1, 3), (0, 3)) del x133 e_pert += einsum(l1, (0, 1), x140, (1, 0), ()) * -2.0 del x140 - x141 = np.zeros((nocc, nvir), dtype=np.float64) + x141 = np.zeros((nocc, nvir), dtype=types[float]) x141 += einsum(t2, (0, 1, 2, 3), x119, (0, 1, 3, 2), (0, 2)) del x119 e_pert += einsum(l1, (0, 1), x141, (1, 0), ()) * -8.0 del x141 - x142 = np.zeros((nocc, nvir), dtype=np.float64) + x142 = np.zeros((nocc, nvir), dtype=types[float]) x142 += einsum(t2, (0, 1, 2, 3), x123, (4, 0, 1, 2, 3), (4, 3)) del x123 e_pert += einsum(l1, (0, 1), x142, (1, 0), ()) * -8.0 del x142 - x143 = np.zeros((nocc, nvir), dtype=np.float64) + x143 = np.zeros((nocc, nvir), dtype=types[float]) x143 += einsum(v.ooov, (0, 1, 2, 3), x131, (0, 2, 1, 3), (2, 3)) del x131 e_pert += einsum(l1, (0, 1), x143, (1, 0), ()) * -8.0 del x143 - x144 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x144 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x144 += einsum(v.ovvv, (0, 1, 2, 3), v.ovvv, (0, 4, 5, 3), denom3, (0, 6, 7, 3, 1, 4), (7, 6, 1, 4, 2, 5)) - x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x145 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x145 += einsum(t2, (0, 1, 2, 3), x144, (0, 1, 4, 2, 3, 5), (0, 1, 4, 5)) del x144 - x146 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x146 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x146 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x146 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x147 = np.zeros((nocc, nvir, nvir, nvir, nvir, nvir), dtype=np.float64) + x147 = np.zeros((nocc, nvir, nvir, nvir, nvir, nvir), dtype=types[float]) x147 += einsum(v.ovvv, (0, 1, 2, 3), v.ovvv, (0, 4, 1, 5), (0, 1, 5, 2, 3, 4)) x147 += einsum(v.ovvv, (0, 1, 2, 3), x146, (0, 1, 4, 5), (0, 1, 2, 5, 4, 3)) * -1.0 del x146 - x148 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x148 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x148 += einsum(denom3, (0, 1, 2, 3, 4, 5), x147, (0, 3, 6, 4, 7, 5), (1, 2, 4, 5, 6, 7)) del x147 - x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x149 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x149 += einsum(t2, (0, 1, 2, 3), x148, (1, 0, 3, 4, 2, 5), (0, 1, 4, 5)) del x148 - x150 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x150 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x150 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x150 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x151 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x151 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x151 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x152 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x152 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x152 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x153 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x153 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x153 += einsum(v.ovvv, (0, 1, 2, 3), x151, (4, 0, 1, 5), (0, 4, 1, 5, 2, 3)) x153 += einsum(v.ovvv, (0, 1, 2, 3), x152, (4, 0, 2, 5), (0, 4, 2, 5, 3, 1)) * 0.5 del x152 - x154 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x154 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x154 += einsum(denom3, (0, 1, 2, 3, 4, 5), x153, (0, 1, 3, 6, 7, 4), (1, 2, 4, 5, 6, 7)) * 2.0 - x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x155 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x155 += einsum(x145, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x155 += einsum(x145, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x145 @@ -919,49 +920,49 @@ def energy_perturbative(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, del x154 e_pert += einsum(l2, (0, 1, 2, 3), x155, (3, 2, 0, 1), ()) * -2.0 del x155 - x156 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x156 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x156 += einsum(denom3, (0, 1, 2, 3, 4, 5), x153, (0, 1, 3, 6, 7, 4), (1, 2, 4, 5, 6, 7)) del x153 - x157 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x157 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x157 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x157 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x158 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=np.float64) + x158 = np.zeros((nocc, nocc, nvir, nvir, nvir, nvir), dtype=types[float]) x158 += einsum(x151, (0, 1, 2, 3), x157, (1, 2, 4, 5), denom3, (1, 0, 6, 2, 4, 7), (0, 6, 4, 7, 3, 5)) * -2.0 del x151, x157 - x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x159 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x159 += einsum(v.ovvv, (0, 1, 2, 3), x156, (4, 0, 2, 1, 3, 5), (4, 0, 1, 5)) * 2.0 del x156 x159 += einsum(v.ovvv, (0, 1, 2, 3), x158, (4, 0, 1, 2, 3, 5), (4, 0, 2, 5)) del x158 e_pert += einsum(l2, (0, 1, 2, 3), x159, (3, 2, 1, 0), ()) * -2.0 del x159 - x160 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x160 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x160 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x160 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x161 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x161 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x161 += einsum(v.ovvv, (0, 1, 2, 3), v.ovvv, (4, 3, 5, 1), denom3, (6, 0, 4, 1, 7, 3), (0, 4, 6, 7, 2, 5)) - x162 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x162 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x162 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x162 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 - x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x163 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x163 += einsum(v.ovvv, (0, 1, 2, 3), x162, (4, 3, 5, 1), denom3, (6, 0, 4, 1, 7, 3), (0, 4, 6, 7, 2, 5)) * 2.0 del x162 - x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x164 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x164 += einsum(l2, (0, 1, 2, 3), x161, (2, 4, 3, 0, 5, 1), (3, 4, 0, 5)) del x161 x164 += einsum(l2, (0, 1, 2, 3), x163, (3, 4, 2, 0, 5, 1), (2, 4, 0, 5)) * -1.0 del x163 e_pert += einsum(x160, (0, 1, 2, 3), x164, (0, 1, 3, 2), ()) * -2.0 del x160, x164 - x165 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x165 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x165 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x165 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x166 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x166 = np.zeros((nocc, nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x166 += einsum(v.ovvv, (0, 1, 2, 3), v.ovvv, (4, 1, 5, 3), denom3, (6, 0, 4, 1, 7, 3), (0, 4, 6, 7, 2, 5)) - x167 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=np.float64) + x167 = np.zeros((nocc, nocc, nvir, nvir, nvir), dtype=types[float]) x167 += einsum(v.ovvv, (0, 1, 2, 3), x150, (0, 3, 4, 1), denom3, (0, 5, 6, 1, 7, 3), (5, 6, 7, 4, 2)) * 2.0 del x150 - x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x168 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x168 += einsum(l2, (0, 1, 2, 3), x166, (2, 4, 3, 0, 5, 1), (4, 3, 0, 5)) del x166 x168 += einsum(l2, (0, 1, 2, 3), x167, (2, 3, 0, 1, 4), (2, 3, 0, 4)) * -1.0 diff --git a/ebcc/codegen/RDCD.py b/ebcc/codegen/RDCD.py index 59075742..44943719 100644 --- a/ebcc/codegen/RDCD.py +++ b/ebcc/codegen/RDCD.py @@ -2,10 +2,11 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 e_cc = 0 @@ -16,24 +17,24 @@ def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # T amplitudes - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t2, (0, 1, 2, 3), v.oooo, (4, 1, 5, 0), (4, 5, 3, 2)) t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (0, 4, 3, 5)) - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) del x2 x5 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -43,27 +44,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x5, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 3), (0, 4, 2, 5)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x8 = np.zeros((nvir, nvir), dtype=np.float64) + x8 = np.zeros((nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 2), (3, 4)) del x7 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1), t2, (2, 3, 1, 4), (2, 3, 4, 0)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x10 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x10, (1, 4, 3, 2), (0, 4)) del x10 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(x11, (0, 1), t2, (2, 1, 3, 4), (2, 0, 4, 3)) del x11 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x6 x13 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -73,13 +74,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x13, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x14 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) del x1 t2new += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 5, 2), (4, 0, 5, 3)) del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x15 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.25 x15 += einsum(x0, (0, 1, 2, 3), (0, 1, 2, 3)) diff --git a/ebcc/codegen/RDCSD.py b/ebcc/codegen/RDCSD.py index 0f967e8c..abc01173 100644 --- a/ebcc/codegen/RDCSD.py +++ b/ebcc/codegen/RDCSD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy e_cc = 0 e_cc += einsum(f.ov, (0, 1), t1, (0, 1), ()) * 2.0 - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) e_cc += einsum(x0, (0, 1, 2, 3), x1, (0, 1, 2, 3), ()) * 2.0 @@ -20,119 +21,119 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(f.ov, (0, 1), (0, 1)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 t2new += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (3, 2, 4, 1)) * -1.0 t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t2, (0, 1, 2, 3), v.oooo, (4, 0, 5, 1), (4, 5, 2, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) t2new += einsum(v.vvvv, (0, 1, 2, 3), x0, (4, 5, 3, 1), (5, 4, 0, 2)) - x1 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x1 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x1 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 t1new += einsum(x0, (0, 1, 2, 3), x1, (0, 2, 3, 4), (1, 4)) * 2.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x3 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x3 += einsum(x2, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new += einsum(t2, (0, 1, 2, 3), x3, (4, 0, 1, 2), (4, 3)) * -1.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x4 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x5 = np.zeros((nocc, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nvir), dtype=types[float]) x5 += einsum(t1, (0, 1), x4, (0, 2, 1, 3), (2, 3)) * 2.0 - x6 = np.zeros((nocc, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nvir), dtype=types[float]) x6 += einsum(f.ov, (0, 1), (0, 1)) x6 += einsum(x5, (0, 1), (0, 1)) del x5 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x7 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) t1new += einsum(x6, (0, 1), x7, (0, 2, 1, 3), (2, 3)) * 2.0 del x7 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x8 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x8, (0, 2, 1, 3), (2, 3)) * 2.0 del x8 - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x9 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x10 = np.zeros((nocc, nocc), dtype=np.float64) + x10 = np.zeros((nocc, nocc), dtype=types[float]) x10 += einsum(t1, (0, 1), x9, (2, 3, 0, 1), (2, 3)) * 2.0 del x9 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(f.oo, (0, 1), (0, 1)) x11 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) x11 += einsum(x0, (0, 1, 2, 3), x4, (0, 4, 2, 3), (4, 1)) * 2.0 x11 += einsum(x10, (0, 1), (1, 0)) t1new += einsum(t1, (0, 1), x11, (0, 2), (2, 1)) * -1.0 del x11 - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new += einsum(x12, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x14 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x14 += einsum(t1, (0, 1), x2, (2, 3, 4, 1), (2, 0, 4, 3)) t2new += einsum(t2, (0, 1, 2, 3), x14, (4, 5, 0, 1), (5, 4, 3, 2)) del x14 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (0, 4, 3, 5)) - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum(t1, (0, 1), v.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 0, 1), (4, 5, 2, 3)) del x18 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x16, (4, 1, 2, 5), (4, 0, 3, 5)) - x21 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x21 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x21 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t1, (0, 1), x21, (2, 1, 3, 4), (2, 0, 3, 4)) * 2.0 del x21 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x22, (1, 4, 5, 3), (4, 0, 5, 2)) del x22 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(t1, (0, 1), v.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x2, (4, 5, 1, 2), (4, 0, 5, 3)) - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) * 0.5 x27 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x27 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(v.ooov, (0, 1, 2, 3), x27, (2, 4, 5, 3), (4, 0, 1, 5)) * 2.0 del x27 - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum(t1, (0, 1), x4, (0, 2, 1, 3), (2, 3)) - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x30 += einsum(x29, (0, 1), (0, 1)) del x29 - x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x31 += einsum(x30, (0, 1), t2, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x30 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(x24, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 del x24 x32 += einsum(x25, (0, 1, 2, 3), (2, 0, 1, 3)) @@ -143,20 +144,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x28 x32 += einsum(x31, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x31 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t1, (0, 1), x32, (0, 2, 3, 4), (2, 3, 4, 1)) del x32 - x34 = np.zeros((nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc), dtype=types[float]) x34 += einsum(t1, (0, 1), x6, (2, 1), (2, 0)) * 0.5 del x6 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x35 += einsum(x34, (0, 1), (1, 0)) del x34 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(x35, (0, 1), t2, (2, 1, 3, 4), (0, 2, 4, 3)) * 2.0 del x35 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x15 x37 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -175,59 +176,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x37, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x37 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t1, (0, 1), v.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x38, (4, 1, 5, 2), (4, 0, 3, 5)) del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x40 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x41 = np.zeros((nvir, nvir), dtype=np.float64) + x41 = np.zeros((nvir, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), x40, (0, 1, 4, 2), (4, 3)) del x40 - x42 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x42 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x42 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x43 = np.zeros((nvir, nvir), dtype=np.float64) + x43 = np.zeros((nvir, nvir), dtype=types[float]) x43 += einsum(t1, (0, 1), x42, (0, 1, 2, 3), (2, 3)) del x42 - x44 = np.zeros((nvir, nvir), dtype=np.float64) + x44 = np.zeros((nvir, nvir), dtype=types[float]) x44 += einsum(x41, (0, 1), (0, 1)) del x41 x44 += einsum(x43, (0, 1), (1, 0)) * -1.0 del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(x44, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x44 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x46 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -0.5 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(v.ovov, (0, 1, 2, 3), x46, (2, 4, 3, 5), (4, 0, 5, 1)) del x46 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x47, (4, 1, 5, 2), (4, 0, 5, 3)) * 2.0 del x47 - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), v.ooov, (4, 1, 5, 2), (0, 4, 5, 3)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), v.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x51 += einsum(x2, (0, 1, 2, 3), (0, 2, 1, 3)) del x2 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum(t2, (0, 1, 2, 3), x51, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x51 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x53 += einsum(x16, (0, 1, 2, 3), (1, 0, 2, 3)) del x16 - x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x54 += einsum(t1, (0, 1), x53, (2, 3, 1, 4), (2, 3, 0, 4)) del x53 - x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x55 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x49 x55 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -236,21 +237,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x52 x55 += einsum(x54, (0, 1, 2, 3), (2, 1, 0, 3)) del x54 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(t1, (0, 1), x55, (2, 3, 0, 4), (2, 3, 4, 1)) del x55 - x57 = np.zeros((nocc, nocc), dtype=np.float64) + x57 = np.zeros((nocc, nocc), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 3, 2), (4, 0)) del x4 - x58 = np.zeros((nocc, nocc), dtype=np.float64) + x58 = np.zeros((nocc, nocc), dtype=types[float]) x58 += einsum(x57, (0, 1), (0, 1)) del x57 x58 += einsum(x10, (0, 1), (1, 0)) del x10 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(x58, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x58 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) del x39 x60 += einsum(x45, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -264,24 +265,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x60, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x60 - x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x61 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x61 += einsum(v.ovov, (0, 1, 2, 3), x0, (4, 5, 3, 1), (0, 5, 4, 2)) del x0 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x62 += einsum(t1, (0, 1), x61, (0, 2, 3, 4), (3, 2, 4, 1)) del x61 t2new += einsum(t1, (0, 1), x62, (2, 3, 0, 4), (2, 3, 1, 4)) del x62 - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x63 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x63 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x12 t2new += einsum(t2, (0, 1, 2, 3), x63, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x63 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x64 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) del x13 diff --git a/ebcc/codegen/RDFCC2.py b/ebcc/codegen/RDFCC2.py index 3dda41ad..93e86925 100644 --- a/ebcc/codegen/RDFCC2.py +++ b/ebcc/codegen/RDFCC2.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) del x0 x2 += einsum(v.xov, (0, 1, 2), x1, (1, 3, 4, 2), (3, 4, 0)) @@ -18,9 +19,9 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.xov, (0, 1, 2), x2, (1, 2, 0), ()) * 2.0 del x2 - x3 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x3 = np.zeros((nocc, nocc, naux), dtype=types[float]) x3 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) * 2.0 x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -1.0 del x3 @@ -31,63 +32,63 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) t1new += einsum(x1, (0, 1), (0, 1)) * 2.0 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x4 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x4 = np.zeros((nocc, nvir, naux), dtype=types[float]) x4 += einsum(x2, (0, 1, 2), (0, 1, 2)) * 0.5 x4 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * -1.0 x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 4, 2), (3, 4, 0)) * 0.5 del x3 t1new += einsum(v.xvv, (0, 1, 2), x4, (3, 2, 0), (3, 1)) * -2.0 del x4 - x5 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x5 = np.zeros((nocc, nocc, naux), dtype=types[float]) x5 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x6 = np.zeros((nocc, nocc, naux), dtype=types[float]) x6 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x6 += einsum(x5, (0, 1, 2), (1, 0, 2)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(v.xov, (0, 1, 2), x6, (3, 4, 0), (3, 4, 1, 2)) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t1new += einsum(x7, (0, 1, 2, 3), x8, (2, 0, 4, 3), (1, 4)) * -1.0 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(v.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(f.ov, (0, 1), (0, 1)) x10 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 x10 += einsum(x9, (0, 1), (0, 1)) * -1.0 t1new += einsum(x10, (0, 1), x8, (0, 2, 3, 1), (2, 3)) del x8, x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x11 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x12 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x12 = np.zeros((nocc, nvir, naux), dtype=types[float]) x12 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 x12 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * 2.0 x12 += einsum(v.xov, (0, 1, 2), x11, (1, 3, 4, 2), (3, 4, 0)) * 2.0 del x11 - x13 = np.zeros((nocc, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nvir), dtype=types[float]) x13 += einsum(f.ov, (0, 1), (0, 1)) x13 += einsum(x9, (0, 1), (0, 1)) * -1.0 del x9 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(f.oo, (0, 1), (0, 1)) x14 += einsum(x0, (0,), v.xoo, (0, 1, 2), (1, 2)) * 2.0 del x0 @@ -97,43 +98,43 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x13 t1new += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) * -1.0 del x14 - x15 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x15 = np.zeros((nocc, nvir, naux), dtype=types[float]) x15 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) t2new += einsum(x15, (0, 1, 2), x15, (3, 4, 2), (0, 3, 1, 4)) - x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x16 += einsum(v.xoo, (0, 1, 2), x5, (3, 4, 0), (3, 1, 2, 4)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t1, (0, 1), x16, (2, 3, 4, 0), (2, 3, 4, 1)) del x16 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t1, (0, 1), x17, (2, 0, 3, 4), (2, 3, 1, 4)) del x17 - x19 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x19 = np.zeros((nocc, nvir, naux), dtype=types[float]) x19 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) * -1.0 x19 += einsum(x2, (0, 1, 2), (0, 1, 2)) del x2 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(x15, (0, 1, 2), x19, (3, 4, 2), (3, 0, 4, 1)) del x19 - x21 = np.zeros((nvir, nvir), dtype=np.float64) + x21 = np.zeros((nvir, nvir), dtype=types[float]) x21 += einsum(f.ov, (0, 1), t1, (0, 2), (1, 2)) - x22 = np.zeros((nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir), dtype=types[float]) x22 += einsum(f.vv, (0, 1), (0, 1)) x22 += einsum(x21, (0, 1), (0, 1)) * -1.0 del x21 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x22, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x22 - x24 = np.zeros((nocc, nocc), dtype=np.float64) + x24 = np.zeros((nocc, nocc), dtype=types[float]) x24 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x25 = np.zeros((nocc, nocc), dtype=np.float64) + x25 = np.zeros((nocc, nocc), dtype=types[float]) x25 += einsum(f.oo, (0, 1), (0, 1)) x25 += einsum(x24, (0, 1), (0, 1)) del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(x25, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x25 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x18 x27 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -145,25 +146,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x27, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x27, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x27 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(x15, (0, 1, 2), x5, (3, 4, 2), (3, 0, 4, 1)) del x15 - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) del x28 x29 += einsum(x7, (0, 1, 2, 3), (1, 2, 0, 3)) del x7 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), x29, (2, 3, 0, 4), (2, 3, 4, 1)) del x29 t2new += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x30, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x30 - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) x31 += einsum(x5, (0, 1, 2), x5, (3, 4, 2), (4, 0, 1, 3)) del x5 - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x31, (0, 2, 3, 4), (2, 4, 3, 1)) del x31 t2new += einsum(t1, (0, 1), x32, (2, 3, 0, 4), (2, 3, 1, 4)) @@ -173,43 +174,43 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x1, (0, 1), x2, (2, 0), (1, 2)) * -2.0 - x3 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x3 = np.zeros((nocc, nvir, naux), dtype=types[float]) x3 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x5 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x5 = np.zeros((nocc, nvir, naux), dtype=types[float]) x5 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x5 += einsum(x3, (0, 1, 2), (0, 1, 2)) x5 += einsum(v.xov, (0, 1, 2), x4, (1, 3, 4, 2), (3, 4, 0)) * 2.0 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 2.0 x6 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x7 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x7 = np.zeros((nocc, nocc, naux), dtype=types[float]) x7 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x9 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x11 = np.zeros((nvir, nvir), dtype=np.float64) + x11 = np.zeros((nvir, nvir), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), x10, (2, 3, 4, 1), (0, 4)) - x12 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x12 = np.zeros((nocc, nocc, naux), dtype=types[float]) x12 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x12 += einsum(x7, (0, 1, 2), (0, 1, 2)) - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(x5, (0, 1, 2), x6, (0, 3, 4, 1), (3, 4, 2)) * -0.5 del x5, x6 x13 += einsum(x7, (0, 1, 2), x9, (0, 3, 1, 4), (3, 4, 2)) @@ -221,63 +222,63 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x12 l1new += einsum(v.xvv, (0, 1, 2), x13, (3, 2, 0), (1, 3)) * -2.0 del x13 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(v.xoo, (0, 1, 2), x3, (3, 4, 0), (3, 1, 2, 4)) - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x16 += einsum(v.xov, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (4, 2, 3, 5), (0, 1, 4, 5)) - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(x18, (0, 1, 2, 3), (3, 2, 1, 0)) - x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 2, 3), (0, 1, 4, 5)) - x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x19, (2, 3, 4, 0), (2, 3, 4, 1)) del x19 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x17 x21 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x20 - x22 = np.zeros((nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nvir), dtype=types[float]) x22 += einsum(v.xov, (0, 1, 2), x7, (1, 3, 0), (3, 2)) - x23 = np.zeros((nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nvir), dtype=types[float]) x23 += einsum(x1, (0, 1), (0, 1)) x23 += einsum(x22, (0, 1), (0, 1)) * -0.5 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x23, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) * 2.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(v.xoo, (0, 1, 2), v.xov, (0, 3, 4), (1, 2, 3, 4)) - x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x26 += einsum(v.xov, (0, 1, 2), x7, (3, 4, 0), (3, 1, 4, 2)) - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(x25, (0, 1, 2, 3), (1, 0, 2, 3)) x27 += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -0.5 x27 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x27 += einsum(x26, (0, 1, 2, 3), (0, 2, 1, 3)) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(x25, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x28 += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 x28 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x28 += einsum(x26, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x29 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x29 = np.zeros((nocc, nocc, naux), dtype=types[float]) x29 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x29 += einsum(x7, (0, 1, 2), (1, 0, 2)) - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(v.xov, (0, 1, 2), x29, (3, 4, 0), (1, 3, 4, 2)) * 0.5 - x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x31 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) - x32 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x32 += einsum(v.xoo, (0, 1, 2), x7, (3, 4, 0), (3, 1, 2, 4)) - x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x33 += einsum(x31, (0, 1, 2, 3), (3, 2, 1, 0)) x33 += einsum(x32, (0, 1, 2, 3), (1, 0, 3, 2)) x33 += einsum(x32, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(x14, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x34 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x34 += einsum(x15, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 @@ -296,22 +297,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x33 l1new += einsum(l2, (0, 1, 2, 3), x34, (3, 4, 2, 1), (0, 4)) * 2.0 del x34 - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(x3, (0, 1, 2), x7, (3, 4, 2), (3, 0, 4, 1)) - x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x36 += einsum(x7, (0, 1, 2), x7, (3, 4, 2), (0, 3, 1, 4)) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t1, (0, 1), x36, (2, 3, 4, 0), (2, 3, 4, 1)) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x35 x38 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x37 - x39 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x39 += einsum(x31, (0, 1, 2, 3), (3, 2, 1, 0)) x39 += einsum(x32, (0, 1, 2, 3), (1, 0, 3, 2)) x39 += einsum(x32, (0, 1, 2, 3), (3, 0, 2, 1)) * -0.5 - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(x14, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.25 del x14 x40 += einsum(x38, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -325,37 +326,37 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x39 l1new += einsum(l2, (0, 1, 2, 3), x40, (2, 4, 3, 1), (0, 4)) * 4.0 del x40 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x41 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(l2, (0, 1, 2, 3), x4, (3, 4, 5, 1), (2, 4, 0, 5)) x42 += einsum(l2, (0, 1, 2, 3), x41, (2, 4, 5, 1), (3, 4, 0, 5)) * 0.5 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 2), (4, 5, 0, 3)) - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x43 x45 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x44 - x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x46 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(t1, (0, 1), x46, (2, 0, 3, 4), (2, 3, 4, 1)) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 3), (4, 5, 0, 2)) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(x41, (0, 1, 2, 3), x8, (0, 4, 5, 2), (4, 5, 1, 3)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) del x47 x50 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) del x48 x50 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x49 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x51 += einsum(x45, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x45 @@ -364,49 +365,49 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x51 += einsum(x50, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x50 - x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x52 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x52 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x53 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum(l2, (0, 1, 2, 3), x10, (2, 4, 0, 1), (3, 4)) * 2.0 - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum(x2, (0, 1), (0, 1)) x55 += einsum(x54, (0, 1), (0, 1)) - x56 = np.zeros((nocc, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nvir), dtype=types[float]) x56 += einsum(t1, (0, 1), (0, 1)) * -1.0 x56 += einsum(x10, (0, 1, 2, 3), x8, (1, 0, 4, 3), (4, 2)) * 2.0 x56 += einsum(l1, (0, 1), x53, (1, 2, 3, 0), (2, 3)) * -1.0 x56 += einsum(t1, (0, 1), x55, (0, 2), (2, 1)) - x57 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x57 += einsum(t1, (0, 1), x8, (2, 3, 4, 1), (3, 2, 4, 0)) l2new += einsum(x18, (0, 1, 2, 3), x57, (4, 5, 0, 1), (3, 2, 5, 4)) del x18 - x58 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x58 += einsum(x46, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x58 += einsum(x46, (0, 1, 2, 3), (1, 0, 3, 2)) del x46 x58 += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) x58 += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - x59 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x59 += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x59 += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x57 - x60 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x60 = np.zeros((nocc, nvir, naux), dtype=types[float]) x60 += einsum(l1, (0, 1), v.xvv, (2, 3, 0), (1, 3, 2)) - x61 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x61 = np.zeros((nocc, nvir, naux), dtype=types[float]) x61 += einsum(x60, (0, 1, 2), (0, 1, 2)) * -1.0 x61 += einsum(x55, (0, 1), v.xov, (2, 1, 3), (0, 3, 2)) - x62 = np.zeros((nocc, nocc), dtype=np.float64) + x62 = np.zeros((nocc, nocc), dtype=types[float]) x62 += einsum(l2, (0, 1, 2, 3), x10, (2, 4, 0, 1), (3, 4)) - x63 = np.zeros((nocc, nocc), dtype=np.float64) + x63 = np.zeros((nocc, nocc), dtype=types[float]) x63 += einsum(x2, (0, 1), (0, 1)) * 0.5 x63 += einsum(x62, (0, 1), (0, 1)) del x62 l1new += einsum(f.ov, (0, 1), x63, (2, 0), (1, 2)) * -2.0 - x64 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x64 = np.zeros((nocc, nocc, naux), dtype=types[float]) x64 += einsum(v.xvv, (0, 1, 2), x42, (3, 4, 1, 2), (4, 3, 0)) * -1.0 del x42 x64 += einsum(v.xov, (0, 1, 2), x51, (3, 1, 4, 2), (4, 3, 0)) * 0.5 @@ -425,11 +426,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x54 l1new += einsum(v.xov, (0, 1, 2), x64, (1, 3, 0), (2, 3)) * 2.0 del x64 - x65 = np.zeros((nvir, nvir), dtype=np.float64) + x65 = np.zeros((nvir, nvir), dtype=types[float]) x65 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x65 += einsum(l2, (0, 1, 2, 3), x10, (2, 3, 4, 1), (4, 0)) * 2.0 del x10 - x66 = np.zeros((nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nvir), dtype=types[float]) x66 += einsum(l1, (0, 1), (1, 0)) x66 += einsum(t1, (0, 1), (0, 1)) x66 += einsum(x41, (0, 1, 2, 3), x8, (1, 0, 4, 3), (4, 2)) * -1.0 @@ -438,7 +439,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x4 x66 += einsum(t1, (0, 1), x63, (0, 2), (2, 1)) * -2.0 del x63 - x67 = np.zeros((naux,), dtype=np.float64) + x67 = np.zeros((naux,), dtype=types[float]) x67 += einsum(x65, (0, 1), v.xvv, (2, 1, 0), (2,)) del x65 x67 += einsum(x66, (0, 1), v.xov, (2, 0, 1), (2,)) @@ -447,17 +448,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x55 l1new += einsum(x67, (0,), v.xov, (0, 1, 2), (2, 1)) * 2.0 del x67 - x68 = np.zeros((nocc, nocc), dtype=np.float64) + x68 = np.zeros((nocc, nocc), dtype=types[float]) x68 += einsum(x0, (0,), v.xoo, (0, 1, 2), (1, 2)) - x69 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x69 = np.zeros((nocc, nvir, naux), dtype=types[float]) x69 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) x69 += einsum(v.xov, (0, 1, 2), x53, (1, 3, 4, 2), (3, 4, 0)) * -1.0 del x53 - x70 = np.zeros((nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir), dtype=types[float]) x70 += einsum(f.ov, (0, 1), (0, 1)) x70 += einsum(x1, (0, 1), (0, 1)) * 2.0 x70 += einsum(x22, (0, 1), (0, 1)) * -1.0 - x71 = np.zeros((nocc, nocc), dtype=np.float64) + x71 = np.zeros((nocc, nocc), dtype=types[float]) x71 += einsum(f.oo, (0, 1), (0, 1)) x71 += einsum(x68, (0, 1), (1, 0)) * 2.0 x71 += einsum(v.xov, (0, 1, 2), x69, (3, 2, 0), (3, 1)) * -1.0 @@ -466,57 +467,57 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x70 l1new += einsum(l1, (0, 1), x71, (1, 2), (0, 2)) * -1.0 del x71 - x72 = np.zeros((nvir, nvir), dtype=np.float64) + x72 = np.zeros((nvir, nvir), dtype=types[float]) x72 += einsum(x0, (0,), v.xvv, (0, 1, 2), (1, 2)) del x0 - x73 = np.zeros((nvir, nvir), dtype=np.float64) + x73 = np.zeros((nvir, nvir), dtype=types[float]) x73 += einsum(f.vv, (0, 1), (0, 1)) * 0.5 x73 += einsum(x72, (0, 1), (1, 0)) l1new += einsum(l1, (0, 1), x73, (0, 2), (2, 1)) * 2.0 del x73 - x74 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x74 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new += einsum(l2, (0, 1, 2, 3), x74, (4, 5, 1, 0), (4, 5, 2, 3)) del x74 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(f.ov, (0, 1), x8, (2, 3, 0, 4), (2, 3, 1, 4)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(l1, (0, 1), x26, (1, 2, 3, 4), (2, 3, 0, 4)) - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(x25, (0, 1, 2, 3), x8, (1, 4, 2, 5), (4, 0, 5, 3)) - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(l2, (0, 1, 2, 3), x32, (2, 4, 3, 5), (4, 5, 0, 1)) del x32 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(x26, (0, 1, 2, 3), x8, (0, 4, 1, 5), (4, 2, 5, 3)) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(v.xvv, (0, 1, 2), x29, (3, 4, 0), (3, 4, 1, 2)) del x29 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(l2, (0, 1, 2, 3), x81, (4, 2, 5, 1), (3, 4, 0, 5)) - x83 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x83 = np.zeros((nocc, nvir, naux), dtype=types[float]) x83 += einsum(x2, (0, 1), v.xov, (2, 1, 3), (0, 3, 2)) del x2 - x84 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x84 = np.zeros((nocc, nvir, naux), dtype=types[float]) x84 += einsum(x60, (0, 1, 2), (0, 1, 2)) del x60 x84 += einsum(x83, (0, 1, 2), (0, 1, 2)) * -1.0 del x83 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(v.xov, (0, 1, 2), x84, (3, 4, 0), (1, 3, 2, 4)) del x84 - x86 = np.zeros((nocc, nocc), dtype=np.float64) + x86 = np.zeros((nocc, nocc), dtype=types[float]) x86 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x87 = np.zeros((nocc, nocc), dtype=np.float64) + x87 = np.zeros((nocc, nocc), dtype=types[float]) x87 += einsum(f.oo, (0, 1), (0, 1)) x87 += einsum(x86, (0, 1), (1, 0)) del x86 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(x87, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) del x87 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x75 x89 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -538,74 +539,74 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new += einsum(x89, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x89, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x89 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(l1, (0, 1), x25, (2, 1, 3, 4), (2, 3, 0, 4)) - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(x25, (0, 1, 2, 3), x8, (4, 1, 2, 5), (4, 0, 5, 3)) - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(x16, (0, 1, 2, 3), x8, (4, 5, 0, 2), (5, 4, 1, 3)) del x16 - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(x26, (0, 1, 2, 3), x8, (4, 0, 1, 5), (4, 2, 5, 3)) - x94 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x94 = np.zeros((nocc, nvir, naux), dtype=types[float]) x94 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x94 += einsum(x3, (0, 1, 2), (0, 1, 2)) - x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x95 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x95 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 - x96 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x96 = np.zeros((nocc, nvir, naux), dtype=types[float]) x96 += einsum(x94, (0, 1, 2), x95, (0, 3, 4, 1), (3, 4, 2)) * 2.0 del x94, x95 - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(v.xov, (0, 1, 2), x96, (3, 4, 0), (1, 3, 2, 4)) del x96 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(l2, (0, 1, 2, 3), x81, (4, 3, 5, 1), (2, 4, 0, 5)) del x81 - x99 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x99 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x99 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(x25, (0, 1, 2, 3), x99, (4, 0, 1, 5), (2, 4, 3, 5)) del x25, x99 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x26, (0, 1, 2, 3), x52, (0, 4, 2, 5), (1, 4, 3, 5)) del x26, x52 - x102 = np.zeros((nvir, nvir), dtype=np.float64) + x102 = np.zeros((nvir, nvir), dtype=types[float]) x102 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 0), (2, 3)) del x3 - x103 = np.zeros((nvir, nvir), dtype=np.float64) + x103 = np.zeros((nvir, nvir), dtype=types[float]) x103 += einsum(x72, (0, 1), (1, 0)) * 2.0 del x72 x103 += einsum(x102, (0, 1), (0, 1)) * -1.0 del x102 - x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x104 += einsum(x103, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) del x103 - x105 = np.zeros((nocc, nocc), dtype=np.float64) + x105 = np.zeros((nocc, nocc), dtype=types[float]) x105 += einsum(v.xoo, (0, 1, 2), x7, (2, 3, 0), (1, 3)) del x7 - x106 = np.zeros((nocc, nocc), dtype=np.float64) + x106 = np.zeros((nocc, nocc), dtype=types[float]) x106 += einsum(t1, (0, 1), x23, (2, 1), (0, 2)) - x107 = np.zeros((nocc, nocc), dtype=np.float64) + x107 = np.zeros((nocc, nocc), dtype=types[float]) x107 += einsum(x68, (0, 1), (1, 0)) del x68 x107 += einsum(x105, (0, 1), (0, 1)) * -0.5 del x105 x107 += einsum(x106, (0, 1), (0, 1)) del x106 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum(x107, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) * 2.0 del x107 - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 += einsum(x23, (0, 1), x8, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x8, x23 - x110 = np.zeros((nocc, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nvir), dtype=types[float]) x110 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 x110 += einsum(x22, (0, 1), (0, 1)) * -1.0 del x22 - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) * -1.0 x111 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) del x90 @@ -634,7 +635,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new += einsum(x111, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x111, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x111 - x112 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x112 += einsum(x31, (0, 1, 2, 3), (3, 2, 1, 0)) del x31 x112 += einsum(x36, (0, 1, 2, 3), (0, 3, 1, 2)) @@ -648,46 +649,46 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x1, (3, 4, 0, 1), (4, 2)) * -2.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x3 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x2 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 4, 2), (4, 3)) * -2.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 rdm1_f_ov += einsum(l1, (0, 1), x4, (1, 2, 3, 0), (2, 3)) * 4.0 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(x0, (0, 1), (0, 1)) * 0.5 del x0 x6 += einsum(l2, (0, 1, 2, 3), x5, (2, 4, 0, 1), (3, 4)) del x5 rdm1_f_ov += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) * -4.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x7 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) rdm1_f_vv += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 3), (4, 2)) * 4.0 @@ -701,54 +702,54 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x0, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x0, (2, 3), (3, 0, 1, 2)) @@ -762,10 +763,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oooo += einsum(delta.oo, (0, 1), x0, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x0, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x0, (2, 3), (3, 0, 2, 1)) * -1.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), x1, (2, 4, 0, 1), (3, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x2, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x2, (2, 3), (0, 3, 2, 1)) * 2.0 @@ -779,11 +780,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oooo += einsum(delta.oo, (0, 1), x2, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x2, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x2, (2, 3), (3, 0, 2, 1)) * -2.0 - x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x3 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x3, (0, 1, 2, 3), (3, 2, 1, 0)) - x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x4 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x4, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_ovoo += einsum(x4, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 @@ -797,11 +798,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vooo += einsum(x4, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x4, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(t1, (0, 1), x4, (2, 3, 4, 1), (3, 2, 4, 0)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 1, 0)) - x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x6 += einsum(x3, (0, 1, 2, 3), (1, 0, 3, 2)) del x3 x6 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -810,40 +811,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oooo += einsum(x6, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x6, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x6, (0, 1, 2, 3), (2, 3, 0, 1)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x7, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x7, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x8 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (1, 4, 5, 2), (4, 5, 0, 3)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) x10 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x10, (1, 4, 5, 3), (4, 5, 0, 2)) * 2.0 del x10 - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(t1, (0, 1), x6, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ooov += einsum(x12, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x12, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (1, 2, 3, 0)) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), x1, (2, 4, 0, 1), (3, 4)) * 2.0 del x1 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(x0, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) rdm2_f_ooov += einsum(t1, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_ooov += einsum(t1, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * -1.0 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x15 += einsum(x7, (0, 1, 2, 3), (1, 0, 2, 3)) x15 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -861,19 +862,19 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (2, 0, 3, 1)) del x15 - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x16 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * 2.0 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x19 = np.zeros((nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir), dtype=types[float]) x19 += einsum(l1, (0, 1), x18, (1, 2, 3, 0), (2, 3)) - x20 = np.zeros((nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) - x21 = np.zeros((nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nvir), dtype=types[float]) x21 += einsum(x17, (0, 1), (0, 1)) x21 += einsum(x19, (0, 1), (0, 1)) * -1.0 x21 += einsum(x20, (0, 1), (0, 1)) @@ -886,29 +887,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovo += einsum(delta.oo, (0, 1), x21, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x21, (2, 3), (2, 0, 3, 1)) * -1.0 del x21 - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x4, (1, 4, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x4, (4, 1, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x24 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 3), (4, 5, 0, 2)) del x24 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x25 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), (0, 1)) * -1.0 x26 += einsum(x17, (0, 1), (0, 1)) del x17 @@ -919,37 +920,37 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_ooov += einsum(delta.oo, (0, 1), x26, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_ooov += einsum(delta.oo, (0, 1), x26, (2, 3), (0, 2, 1, 3)) * -1.0 del x26 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x27 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), x27, (1, 4, 5, 3), (4, 5, 0, 2)) del x27 rdm2_f_oovo += einsum(x28, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x28, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x28 - x29 = np.zeros((nocc, nocc), dtype=np.float64) + x29 = np.zeros((nocc, nocc), dtype=types[float]) x29 += einsum(delta.oo, (0, 1), (0, 1)) * -1.0 x29 += einsum(x0, (0, 1), (0, 1)) x29 += einsum(x13, (0, 1), (0, 1)) rdm2_f_oovo += einsum(t1, (0, 1), x29, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x29, (2, 3), (0, 3, 1, 2)) * -1.0 del x29 - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) - x31 = np.zeros((nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir), dtype=types[float]) x31 += einsum(l1, (0, 1), x18, (1, 2, 3, 0), (2, 3)) * 0.5 - x32 = np.zeros((nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nvir), dtype=types[float]) x32 += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) * 0.5 del x14 - x33 = np.zeros((nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nvir), dtype=types[float]) x33 += einsum(x30, (0, 1), (0, 1)) x33 += einsum(x31, (0, 1), (0, 1)) * -1.0 x33 += einsum(x32, (0, 1), (0, 1)) del x32 rdm2_f_oovo += einsum(delta.oo, (0, 1), x33, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_oovo += einsum(delta.oo, (0, 1), x33, (2, 3), (2, 0, 3, 1)) * -2.0 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x34 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_oovv += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -957,44 +958,44 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) del x34 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(x0, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x36 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x36, (1, 4, 2, 5), (4, 0, 5, 3)) * 2.0 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), x37, (1, 4, 3, 5), (4, 0, 5, 2)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x39 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 - x40 = np.zeros((nvir, nvir), dtype=np.float64) + x40 = np.zeros((nvir, nvir), dtype=types[float]) x40 += einsum(t2, (0, 1, 2, 3), x39, (0, 1, 4, 2), (4, 3)) * 2.0 - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(x40, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) x42 += einsum(x4, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(t2, (0, 1, 2, 3), x42, (4, 1, 5, 2), (4, 5, 0, 3)) - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 del x16 - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x45 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x43 x45 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x44 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(t1, (0, 1), x45, (0, 2, 3, 4), (2, 3, 4, 1)) del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(x13, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x13 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) x48 += einsum(x38, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x48 += einsum(x41, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1012,30 +1013,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) del x48 - x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x36, (1, 4, 3, 5), (4, 0, 5, 2)) - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), x49, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x49 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x51 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t2, (0, 1, 2, 3), x51, (1, 4, 2, 5), (4, 0, 5, 3)) - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(t2, (0, 1, 2, 3), x52, (1, 4, 2, 5), (4, 0, 5, 3)) * -1.0 del x52 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(t2, (0, 1, 2, 3), x6, (0, 1, 4, 5), (4, 5, 2, 3)) del x6 rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 3, 2)) - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t1, (0, 1), x12, (0, 2, 3, 4), (3, 2, 4, 1)) del x12 rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) del x50 x56 += einsum(x53, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -1049,56 +1050,56 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x56, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x56 - x57 = np.zeros((nocc, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nvir), dtype=types[float]) x57 += einsum(t1, (0, 1), x0, (0, 2), (2, 1)) del x0 rdm2_f_oovv += einsum(t1, (0, 1), x57, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x57, (2, 3), (2, 0, 3, 1)) * -1.0 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x58, (1, 4, 2, 5), (4, 0, 5, 3)) del x58 rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) del x59 - x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x60 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x60, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x60, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x60, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x60, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), x60, (1, 4, 2, 5), (4, 0, 5, 3)) rdm2_f_oovv += einsum(x61, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x61, (0, 1, 2, 3), (0, 1, 3, 2)) del x61 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(t2, (0, 1, 2, 3), x4, (4, 1, 5, 3), (4, 5, 0, 2)) - x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x63 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x63 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(x4, (0, 1, 2, 3), x63, (0, 4, 3, 5), (4, 1, 2, 5)) - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(x62, (0, 1, 2, 3), (0, 1, 2, 3)) del x62 x65 += einsum(x64, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x64 - x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x66 += einsum(t1, (0, 1), x65, (0, 2, 3, 4), (2, 3, 4, 1)) del x65 - x67 = np.zeros((nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nvir), dtype=types[float]) x67 += einsum(t1, (0, 1), x2, (0, 2), (2, 1)) del x2 - x68 = np.zeros((nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nvir), dtype=types[float]) x68 += einsum(x30, (0, 1), (0, 1)) del x30 x68 += einsum(x31, (0, 1), (0, 1)) * -1.0 del x31 x68 += einsum(x67, (0, 1), (0, 1)) del x67 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(x38, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x38 x69 += einsum(x41, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1114,15 +1115,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x69, (0, 1, 2, 3), (1, 0, 3, 2)) del x69 - x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x70 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x70 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t1, (0, 1), x70, (0, 2, 3, 4), (2, 3, 4, 1)) del x70 - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) del x35 x72 += einsum(x71, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1132,34 +1133,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x72, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x72, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x72 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(t2, (0, 1, 2, 3), x36, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x36 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum(t2, (0, 1, 2, 3), x73, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x73 rdm2_f_oovv += einsum(x74, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x74, (0, 1, 2, 3), (0, 1, 2, 3)) del x74 - x75 = np.zeros((nocc, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nvir), dtype=types[float]) x75 += einsum(t1, (0, 1), (0, 1)) * -1.0 x75 += einsum(x57, (0, 1), (0, 1)) del x57 rdm2_f_oovv += einsum(t1, (0, 1), x75, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x75, (2, 3), (0, 2, 1, 3)) * -1.0 del x75 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x76 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(l2, (0, 1, 2, 3), x76, (2, 4, 5, 1), (4, 3, 5, 0)) rdm2_f_ovov += einsum(x77, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovov += einsum(x77, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x77 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x78 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(l2, (0, 1, 2, 3), x78, (3, 4, 5, 1), (4, 2, 5, 0)) * 2.0 del x78 rdm2_f_ovov += einsum(x79, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 @@ -1167,7 +1168,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_voov += einsum(x79, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x79, (0, 1, 2, 3), (3, 0, 1, 2)) del x79 - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(t1, (0, 1), x8, (2, 0, 3, 4), (2, 3, 4, 1)) del x8 rdm2_f_ovov += einsum(x80, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1175,12 +1176,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(x80, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x80, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x80 - x81 = np.zeros((nvir, nvir), dtype=np.float64) + x81 = np.zeros((nvir, nvir), dtype=types[float]) x81 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x82 = np.zeros((nvir, nvir), dtype=np.float64) + x82 = np.zeros((nvir, nvir), dtype=types[float]) x82 += einsum(t2, (0, 1, 2, 3), x39, (0, 1, 4, 2), (4, 3)) del x39 - x83 = np.zeros((nvir, nvir), dtype=np.float64) + x83 = np.zeros((nvir, nvir), dtype=types[float]) x83 += einsum(x81, (0, 1), (0, 1)) * 0.5 x83 += einsum(x82, (0, 1), (0, 1)) del x82 @@ -1188,18 +1189,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_ovov += einsum(delta.oo, (0, 1), x83, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x83, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovov += einsum(delta.oo, (0, 1), x83, (2, 3), (0, 2, 1, 3)) * 2.0 - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(t1, (0, 1), x83, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_ovvv += einsum(t1, (0, 1), x83, (2, 3), (0, 2, 1, 3)) * 2.0 del x83 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(t1, (0, 1), x4, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x84, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x84, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x84, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x84, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x84 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(t2, (0, 1, 2, 3), x51, (1, 4, 5, 2), (4, 0, 5, 3)) del x51 rdm2_f_ovvo += einsum(x85, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1207,10 +1208,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(x85, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x85, (0, 1, 2, 3), (2, 1, 3, 0)) del x85 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * 2.0 x86 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(t2, (0, 1, 2, 3), x86, (1, 4, 5, 3), (4, 0, 5, 2)) del x86 rdm2_f_ovvo += einsum(x87, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -1218,7 +1219,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(x87, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x87, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x87 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(t1, (0, 1), x42, (2, 0, 3, 4), (2, 3, 4, 1)) del x42 rdm2_f_ovvo += einsum(x88, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1226,7 +1227,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x88, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x88 - x89 = np.zeros((nvir, nvir), dtype=np.float64) + x89 = np.zeros((nvir, nvir), dtype=types[float]) x89 += einsum(x81, (0, 1), (0, 1)) del x81 x89 += einsum(x40, (0, 1), (0, 1)) @@ -1239,22 +1240,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(delta.oo, (0, 1), x89, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x89, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x89, (2, 3), (2, 0, 3, 1)) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(t1, (0, 1), x89, (2, 3), (2, 0, 3, 1)) rdm2_f_vovv += einsum(t1, (0, 1), x89, (2, 3), (2, 0, 3, 1)) - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x90, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x90, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(t1, (0, 1), x4, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovvo += einsum(x91, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x91, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x91, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x91, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(l2, (0, 1, 2, 3), x63, (3, 4, 1, 5), (4, 2, 5, 0)) del x63 rdm2_f_ovvo += einsum(x92, (0, 1, 2, 3), (0, 3, 2, 1)) @@ -1262,42 +1263,42 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_voov += einsum(x92, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x92, (0, 1, 2, 3), (3, 0, 1, 2)) del x92 - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(l2, (0, 1, 2, 3), x76, (2, 4, 1, 5), (4, 3, 5, 0)) del x76 rdm2_f_voov += einsum(x93, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(x93, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 del x93 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) - x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum(t2, (0, 1, 2, 3), x4, (0, 1, 4, 5), (4, 5, 2, 3)) del x4 rdm2_f_ovvv += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(l2, (0, 1, 2, 3), x18, (3, 4, 5, 1), (4, 2, 5, 0)) - x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x97 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x97 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(l2, (0, 1, 2, 3), x97, (2, 4, 5, 1), (4, 3, 5, 0)) del x97 - x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x99 += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) x99 += einsum(x96, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x99 += einsum(x98, (0, 1, 2, 3), (1, 0, 3, 2)) del x98 - x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x100 += einsum(t1, (0, 1), x99, (0, 2, 3, 4), (2, 3, 4, 1)) del x99 - x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x101 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) del x94 x101 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1315,7 +1316,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovv += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) del x101 - x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x102 += einsum(t1, (0, 1), x60, (0, 2, 3, 4), (2, 3, 1, 4)) del x60 rdm2_f_ovvv += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1323,60 +1324,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovv += einsum(x102, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x102, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x102 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) x103 += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) x103 += einsum(x96, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x96 - x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(t1, (0, 1), x103, (0, 2, 3, 4), (2, 3, 4, 1)) del x103 rdm2_f_ovvv += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovvv += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x104 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(l2, (0, 1, 2, 3), x18, (3, 4, 5, 1), (4, 2, 5, 0)) * 0.5 del x18 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x90 x106 += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x91 x106 += einsum(x105, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x105 - x107 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(t1, (0, 1), x106, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x106 rdm2_f_vovv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x107 - x108 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x108, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x108, (0, 1, 2, 3), (2, 1, 3, 0)) - x109 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x109 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x109, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x109, (0, 1, 2, 3), (1, 0, 3, 2)) - x110 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x110 += einsum(t1, (0, 1), x108, (0, 2, 3, 4), (3, 2, 4, 1)) del x108 rdm2_f_vvvv += einsum(x110, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x110, (0, 1, 2, 3), (1, 0, 3, 2)) - x111 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x111 += einsum(x109, (0, 1, 2, 3), (1, 0, 3, 2)) del x109 x111 += einsum(x110, (0, 1, 2, 3), (1, 0, 3, 2)) diff --git a/ebcc/codegen/RDFCCD.py b/ebcc/codegen/RDFCCD.py index a6d278d6..40c8db73 100644 --- a/ebcc/codegen/RDFCCD.py +++ b/ebcc/codegen/RDFCCD.py @@ -2,13 +2,14 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x1 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x1 = np.zeros((nocc, nvir, naux), dtype=types[float]) x1 += einsum(v.xov, (0, 1, 2), x0, (1, 3, 4, 2), (3, 4, 0)) del x0 e_cc = 0 @@ -19,37 +20,37 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # T amplitudes - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) - x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x1 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x1, (4, 1, 5, 0), (5, 4, 3, 2)) del x1 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(t2, (0, 1, 2, 3), x0, (4, 5, 3, 2), (0, 1, 5, 4)) t2new += einsum(t2, (0, 1, 2, 3), x2, (4, 5, 1, 0), (5, 4, 2, 3)) del x2 - x3 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x3 = np.zeros((nocc, nvir, naux), dtype=types[float]) x3 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 2, 4), (3, 4, 0)) t2new += einsum(x3, (0, 1, 2), x3, (3, 4, 2), (0, 3, 1, 4)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 2, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x4, (4, 1, 5, 2), (0, 4, 5, 3)) - x5 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x5 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x5, (4, 2, 5, 3), (0, 1, 5, 4)) del x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 2), (0, 4, 3, 5)) - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 x10 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -59,43 +60,43 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x10, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x10 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(v.xov, (0, 1, 2), x3, (3, 4, 0), (3, 1, 4, 2)) - x12 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x12 = np.zeros((nocc, nvir, naux), dtype=types[float]) x12 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x12 += einsum(x3, (0, 1, 2), (0, 1, 2)) * -1.0 del x3 - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(v.xov, (0, 1, 2), x12, (3, 4, 0), (1, 3, 2, 4)) * 2.0 del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(x8, (0, 1, 2, 3), (1, 0, 3, 2)) del x8 x14 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x4 x14 += einsum(x13, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x13 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), x14, (4, 1, 5, 3), (0, 4, 2, 5)) del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x16 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x17 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x17 = np.zeros((nocc, nvir, naux), dtype=types[float]) x17 += einsum(v.xov, (0, 1, 2), x16, (1, 3, 4, 2), (3, 4, 0)) del x16 - x18 = np.zeros((nvir, nvir), dtype=np.float64) + x18 = np.zeros((nvir, nvir), dtype=types[float]) x18 += einsum(v.xov, (0, 1, 2), x17, (1, 3, 0), (2, 3)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x18, (0, 1), t2, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x18 - x20 = np.zeros((nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc), dtype=types[float]) x20 += einsum(v.xov, (0, 1, 2), x17, (3, 2, 0), (1, 3)) del x17 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(x20, (0, 1), t2, (2, 0, 3, 4), (2, 1, 4, 3)) * 2.0 del x20 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) del x11 x22 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -107,11 +108,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x22 - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x0, (0, 1, 2, 3), (1, 0, 2, 3)) x23 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 del x0 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(t2, (0, 1, 2, 3), x23, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 del x23 t2new += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 @@ -121,65 +122,65 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=None, **kwargs): # L amplitudes - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) - x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x1 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) l2new += einsum(l2, (0, 1, 2, 3), x1, (4, 3, 5, 2), (0, 1, 4, 5)) del x1 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) l2new += einsum(x0, (0, 1, 2, 3), x2, (4, 5, 1, 0), (2, 3, 5, 4)) del x2 - x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x3 += einsum(t2, (0, 1, 2, 3), x0, (4, 5, 2, 3), (0, 1, 4, 5)) l2new += einsum(l2, (0, 1, 2, 3), x3, (2, 3, 4, 5), (0, 1, 4, 5)) del x3 - x4 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x4 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new += einsum(l2, (0, 1, 2, 3), x4, (4, 0, 5, 1), (4, 5, 3, 2)) del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(f.oo, (0, 1), l2, (2, 3, 4, 1), (0, 4, 2, 3)) - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), x0, (4, 1, 2, 5), (0, 4, 3, 5)) - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x9 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(l2, (0, 1, 2, 3), x9, (2, 4, 1, 5), (3, 4, 0, 5)) del x9 - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x11 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(l2, (0, 1, 2, 3), x11, (2, 4, 1, 0), (3, 4)) - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(x12, (0, 1), v.xov, (2, 1, 3), (0, 3, 2)) del x12 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(v.xov, (0, 1, 2), x13, (3, 4, 0), (1, 3, 2, 4)) * 2.0 del x13 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x15 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x16 = np.zeros((nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir), dtype=types[float]) x16 += einsum(l2, (0, 1, 2, 3), x15, (2, 3, 4, 1), (0, 4)) del x15 - x17 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x17 = np.zeros((nocc, nvir, naux), dtype=types[float]) x17 += einsum(x16, (0, 1), v.xov, (2, 3, 1), (3, 0, 2)) * 2.0 del x16 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(v.xov, (0, 1, 2), x17, (3, 4, 0), (1, 3, 2, 4)) del x17 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) del x5 x19 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -193,60 +194,60 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new += einsum(x19, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x19, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x19 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(x0, (0, 1, 2, 3), x20, (4, 1, 5, 2), (4, 0, 5, 3)) del x20 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(x0, (0, 1, 2, 3), x11, (0, 4, 5, 3), (1, 4, 2, 5)) * 2.0 del x0 - x23 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x23 = np.zeros((nocc, nvir, naux), dtype=types[float]) x23 += einsum(v.xov, (0, 1, 2), x11, (1, 3, 4, 2), (3, 4, 0)) * 2.0 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(v.xov, (0, 1, 2), x23, (3, 4, 0), (1, 3, 2, 4)) * 2.0 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) del x7 x25 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) del x22 x25 += einsum(x24, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(l2, (0, 1, 2, 3), x25, (3, 4, 1, 5), (2, 4, 0, 5)) del x25 - x27 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x27 = np.zeros((nocc, nvir, naux), dtype=types[float]) x27 += einsum(v.xov, (0, 1, 2), l2, (3, 2, 4, 1), (4, 3, 0)) - x28 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x28 = np.zeros((nocc, nvir, naux), dtype=types[float]) x28 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x28 += einsum(x23, (0, 1, 2), (0, 1, 2)) del x23 - x29 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x29 = np.zeros((nocc, nvir, naux), dtype=types[float]) x29 += einsum(x28, (0, 1, 2), l2, (3, 1, 0, 4), (4, 3, 2)) del x28 - x30 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x30 = np.zeros((nocc, nvir, naux), dtype=types[float]) x30 += einsum(x27, (0, 1, 2), (0, 1, 2)) * 2.0 del x27 x30 += einsum(x29, (0, 1, 2), (0, 1, 2)) * -1.0 del x29 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(v.xov, (0, 1, 2), x30, (3, 4, 0), (1, 3, 2, 4)) del x30 - x32 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x32 = np.zeros((nocc, nvir, naux), dtype=types[float]) x32 += einsum(v.xov, (0, 1, 2), x11, (1, 3, 4, 2), (3, 4, 0)) del x11 - x33 = np.zeros((nvir, nvir), dtype=np.float64) + x33 = np.zeros((nvir, nvir), dtype=types[float]) x33 += einsum(v.xov, (0, 1, 2), x32, (1, 3, 0), (2, 3)) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x33, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) * 2.0 del x33 - x35 = np.zeros((nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc), dtype=types[float]) x35 += einsum(v.xov, (0, 1, 2), x32, (3, 2, 0), (1, 3)) del x32 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(x35, (0, 1), l2, (2, 3, 1, 4), (4, 0, 2, 3)) * 2.0 del x35 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x21 x37 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) diff --git a/ebcc/codegen/RDFCCSD.py b/ebcc/codegen/RDFCCSD.py index 13cf73b3..f3d5979d 100644 --- a/ebcc/codegen/RDFCCSD.py +++ b/ebcc/codegen/RDFCCSD.py @@ -1,16 +1,17 @@ # Code generated by qwick. -import numpy as np +from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) del x0 x2 += einsum(v.xov, (0, 1, 2), x1, (1, 3, 2, 4), (3, 4, 0)) @@ -18,9 +19,9 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.xov, (0, 1, 2), x2, (1, 2, 0), ()) * 2.0 del x2 - x3 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x3 = np.zeros((nocc, nocc, naux), dtype=types[float]) x3 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -0.5 del x3 @@ -31,63 +32,63 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) t1new += einsum(f.ov, (0, 1), (0, 1)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) t1new += einsum(x1, (0, 1), (0, 1)) * 2.0 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x4 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x4 = np.zeros((nocc, nvir, naux), dtype=types[float]) x4 += einsum(x2, (0, 1, 2), (0, 1, 2)) * 0.5 x4 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * -1.0 x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 4, 2), (3, 4, 0)) * 0.5 del x3 t1new += einsum(v.xvv, (0, 1, 2), x4, (3, 2, 0), (3, 1)) * -2.0 del x4 - x5 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x5 = np.zeros((nocc, nocc, naux), dtype=types[float]) x5 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x6 = np.zeros((nocc, nocc, naux), dtype=types[float]) x6 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x6 += einsum(x5, (0, 1, 2), (1, 0, 2)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(v.xov, (0, 1, 2), x6, (3, 4, 0), (4, 1, 3, 2)) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t1new += einsum(x7, (0, 1, 2, 3), x8, (1, 2, 3, 4), (0, 4)) * -1.0 del x7 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(v.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x10 += einsum(x1, (0, 1), (0, 1)) x10 += einsum(x9, (0, 1), (0, 1)) * -0.5 t1new += einsum(x10, (0, 1), x8, (0, 2, 1, 3), (2, 3)) * 2.0 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(x0, (0,), v.xoo, (0, 1, 2), (1, 2)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(v.xov, (0, 1, 2), x12, (1, 3, 2, 4), (3, 4, 0)) * 2.0 del x12 - x14 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x14 = np.zeros((nocc, nvir, naux), dtype=types[float]) x14 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 x14 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * 2.0 x14 += einsum(x13, (0, 1, 2), (0, 1, 2)) - x15 = np.zeros((nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), (0, 1)) x15 += einsum(x9, (0, 1), (0, 1)) * -1.0 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum(f.oo, (0, 1), (0, 1)) x16 += einsum(x11, (0, 1), (1, 0)) * 2.0 x16 += einsum(v.xov, (0, 1, 2), x14, (3, 2, 0), (1, 3)) @@ -96,73 +97,73 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x15 t1new += einsum(t1, (0, 1), x16, (0, 2), (2, 1)) * -1.0 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) - x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), x17, (4, 5, 3, 2), (0, 1, 5, 4)) t2new += einsum(t2, (0, 1, 2, 3), x18, (4, 5, 0, 1), (5, 4, 3, 2)) - x19 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x19 = np.zeros((nocc, nvir, naux), dtype=types[float]) x19 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 2, 4), (3, 4, 0)) t2new += einsum(x19, (0, 1, 2), x19, (3, 4, 2), (0, 3, 1, 4)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x17, (1, 4, 5, 2), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x20, (4, 1, 5, 2), (4, 0, 3, 5)) - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), x18, (2, 3, 4, 0), (2, 3, 4, 1)) del x18 t2new += einsum(t1, (0, 1), x21, (2, 3, 0, 4), (2, 3, 1, 4)) del x21 - x22 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x22 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x22, (4, 2, 5, 3), (0, 1, 5, 4)) del x22 - x23 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x23 = np.zeros((nocc, nvir, naux), dtype=types[float]) x23 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) t2new += einsum(x23, (0, 1, 2), x23, (3, 4, 2), (0, 3, 1, 4)) - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(t2, (0, 1, 2, 3), x25, (4, 1, 5, 2), (0, 4, 3, 5)) - x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x27 += einsum(v.xoo, (0, 1, 2), x5, (3, 4, 0), (3, 1, 2, 4)) - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), x27, (4, 1, 5, 0), (4, 5, 3, 2)) - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(v.xvv, (0, 1, 2), x5, (3, 4, 0), (3, 4, 1, 2)) - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x29, (4, 1, 5, 3), (4, 0, 2, 5)) - x31 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x31 = np.zeros((nocc, nvir, naux), dtype=types[float]) x31 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x31 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 x31 += einsum(x13, (0, 1, 2), (0, 1, 2)) - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(x23, (0, 1, 2), x31, (3, 4, 2), (3, 0, 4, 1)) del x31 - x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x33 += einsum(v.xoo, (0, 1, 2), v.xov, (0, 3, 4), (1, 2, 3, 4)) - x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x34 += einsum(t2, (0, 1, 2, 3), x33, (4, 5, 1, 2), (0, 5, 4, 3)) - x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x35 += einsum(t1, (0, 1), x27, (2, 3, 4, 0), (2, 3, 4, 1)) del x27 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(v.xov, (0, 1, 2), x5, (3, 4, 0), (3, 1, 4, 2)) - x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), x36, (4, 5, 1, 2), (4, 0, 5, 3)) - x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x38 += einsum(x33, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x38 += einsum(x33, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x38, (1, 4, 5, 3), (4, 5, 0, 2)) del x38 - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(x10, (0, 1), t2, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x10 - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(x34, (0, 1, 2, 3), (1, 0, 2, 3)) del x34 x41 += einsum(x35, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -173,26 +174,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x39 x41 += einsum(x40, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x40 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(t1, (0, 1), x41, (0, 2, 3, 4), (2, 3, 4, 1)) del x41 - x43 = np.zeros((nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nvir), dtype=types[float]) x43 += einsum(f.ov, (0, 1), (0, 1)) x43 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 x43 += einsum(x9, (0, 1), (0, 1)) * -1.0 del x9 - x44 = np.zeros((nocc, nocc), dtype=np.float64) + x44 = np.zeros((nocc, nocc), dtype=types[float]) x44 += einsum(t1, (0, 1), x43, (2, 1), (2, 0)) * 0.5 del x43 - x45 = np.zeros((nocc, nocc), dtype=np.float64) + x45 = np.zeros((nocc, nocc), dtype=types[float]) x45 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x45 += einsum(x44, (0, 1), (1, 0)) del x44 - x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x46 += einsum(x45, (0, 1), t2, (2, 1, 3, 4), (0, 2, 4, 3)) * 2.0 del x45 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x24 x47 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -210,77 +211,77 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x47, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x47 - x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x48 += einsum(t2, (0, 1, 2, 3), x29, (4, 1, 5, 2), (4, 0, 3, 5)) del x29 - x49 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x49 = np.zeros((nocc, nvir, naux), dtype=types[float]) x49 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x49 += einsum(x19, (0, 1, 2), (0, 1, 2)) * -1.0 del x19 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(v.xov, (0, 1, 2), x49, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x49 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(x25, (0, 1, 2, 3), (1, 0, 3, 2)) del x25 x51 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x20 x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t2, (0, 1, 2, 3), x51, (4, 1, 5, 3), (4, 0, 5, 2)) del x51 - x53 = np.zeros((nvir, nvir), dtype=np.float64) + x53 = np.zeros((nvir, nvir), dtype=types[float]) x53 += einsum(x0, (0,), v.xvv, (0, 1, 2), (1, 2)) del x0 - x54 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x54 = np.zeros((nocc, nvir, naux), dtype=types[float]) x54 += einsum(x23, (0, 1, 2), (0, 1, 2)) x54 += einsum(x13, (0, 1, 2), (0, 1, 2)) del x13 - x55 = np.zeros((nvir, nvir), dtype=np.float64) + x55 = np.zeros((nvir, nvir), dtype=types[float]) x55 += einsum(v.xov, (0, 1, 2), x54, (1, 3, 0), (3, 2)) del x54 - x56 = np.zeros((nvir, nvir), dtype=np.float64) + x56 = np.zeros((nvir, nvir), dtype=types[float]) x56 += einsum(x53, (0, 1), (1, 0)) * -2.0 del x53 x56 += einsum(x55, (0, 1), (1, 0)) del x55 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(x56, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x56 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x58 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - x59 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x59 = np.zeros((nocc, nvir, naux), dtype=types[float]) x59 += einsum(v.xov, (0, 1, 2), x58, (1, 3, 4, 2), (3, 4, 0)) - x60 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x60 = np.zeros((nocc, nvir, naux), dtype=types[float]) x60 += einsum(x2, (0, 1, 2), (0, 1, 2)) x60 += einsum(x59, (0, 1, 2), (0, 1, 2)) del x59 - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(v.xov, (0, 1, 2), x60, (3, 4, 0), (3, 1, 4, 2)) del x60 - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(t2, (0, 1, 2, 3), x33, (4, 1, 5, 2), (0, 4, 5, 3)) del x33 - x63 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x63 += einsum(v.xov, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(t2, (0, 1, 2, 3), x63, (4, 2, 5, 3), (0, 1, 4, 5)) del x63 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(x23, (0, 1, 2), x5, (3, 4, 2), (3, 0, 4, 1)) del x23 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(t2, (0, 1, 2, 3), x36, (4, 1, 5, 2), (4, 0, 5, 3)) - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x67 += einsum(x36, (0, 1, 2, 3), (0, 2, 1, 3)) del x36 - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum(t2, (0, 1, 2, 3), x67, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x67 - x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x69 += einsum(x62, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x62 x69 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -291,29 +292,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x66 x69 += einsum(x68, (0, 1, 2, 3), (0, 2, 1, 3)) del x68 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(t1, (0, 1), x69, (2, 3, 0, 4), (2, 3, 4, 1)) del x69 - x71 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x71 = np.zeros((nocc, nvir, naux), dtype=types[float]) x71 += einsum(v.xov, (0, 1, 2), x8, (1, 3, 2, 4), (3, 4, 0)) del x8 - x72 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x72 = np.zeros((nocc, nvir, naux), dtype=types[float]) x72 += einsum(x2, (0, 1, 2), (0, 1, 2)) del x2 x72 += einsum(x71, (0, 1, 2), (0, 1, 2)) * -1.0 del x71 - x73 = np.zeros((nocc, nocc), dtype=np.float64) + x73 = np.zeros((nocc, nocc), dtype=types[float]) x73 += einsum(v.xov, (0, 1, 2), x72, (3, 2, 0), (3, 1)) * 0.5 del x72 - x74 = np.zeros((nocc, nocc), dtype=np.float64) + x74 = np.zeros((nocc, nocc), dtype=types[float]) x74 += einsum(x11, (0, 1), (1, 0)) del x11 x74 += einsum(x73, (0, 1), (1, 0)) * -1.0 del x73 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(x74, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) * 2.0 del x74 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) del x48 x76 += einsum(x52, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -329,16 +330,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x76 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x77 += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) del x17 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(t2, (0, 1, 2, 3), x77, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x77 t2new += einsum(t2, (0, 1, 2, 3), x78, (4, 1, 5, 3), (4, 0, 5, 2)) * 2.0 del x78 - x79 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x79 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) x79 += einsum(x5, (0, 1, 2), x5, (3, 4, 2), (4, 0, 1, 3)) del x5 @@ -349,42 +350,42 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, l1=None, l2=None, **kwargs): # L amplitudes - l1new = np.zeros((nvir, nocc), dtype=np.float64) + l1new = np.zeros((nvir, nocc), dtype=types[float]) l1new += einsum(f.ov, (0, 1), (1, 0)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) - x2 = np.zeros((nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc), dtype=types[float]) x2 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) l1new += einsum(x1, (0, 1), x2, (2, 0), (1, 2)) * -2.0 - x3 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x3 = np.zeros((nocc, nvir, naux), dtype=types[float]) x3 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x5 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x5 = np.zeros((nocc, nvir, naux), dtype=types[float]) x5 += einsum(v.xov, (0, 1, 2), x4, (1, 3, 2, 4), (3, 4, 0)) * 2.0 - x6 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x6 = np.zeros((nocc, nvir, naux), dtype=types[float]) x6 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x6 += einsum(x3, (0, 1, 2), (0, 1, 2)) x6 += einsum(x5, (0, 1, 2), (0, 1, 2)) - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x7 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 2.0 - x8 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x8 = np.zeros((nocc, nocc, naux), dtype=types[float]) x8 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) x10 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x11 = np.zeros((nvir, nvir), dtype=np.float64) + x11 = np.zeros((nvir, nvir), dtype=types[float]) x11 += einsum(l2, (0, 1, 2, 3), x4, (3, 2, 1, 4), (0, 4)) - x12 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x12 = np.zeros((nocc, nocc, naux), dtype=types[float]) x12 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x12 += einsum(x8, (0, 1, 2), (0, 1, 2)) - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(x6, (0, 1, 2), x7, (0, 3, 1, 4), (3, 4, 2)) * -0.5 del x7 x13 += einsum(x8, (0, 1, 2), x10, (3, 0, 1, 4), (3, 4, 2)) @@ -395,67 +396,67 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x12 l1new += einsum(v.xvv, (0, 1, 2), x13, (3, 2, 0), (1, 3)) * -2.0 del x13 - x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x14 += einsum(v.xoo, (0, 1, 2), x3, (3, 4, 0), (3, 1, 2, 4)) - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), t2, (2, 3, 4, 1), (0, 2, 3, 4)) - x16 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x16 += einsum(v.xov, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (4, 2, 5, 3), (0, 1, 4, 5)) - x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x18 += einsum(x3, (0, 1, 2), x8, (3, 4, 2), (3, 0, 4, 1)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + l2new = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) l2new += einsum(x19, (0, 1, 2, 3), (3, 2, 1, 0)) - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x19, (4, 5, 3, 2), (0, 1, 5, 4)) - x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x21 += einsum(x8, (0, 1, 2), x8, (3, 4, 2), (0, 3, 1, 4)) - x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x22 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t1, (0, 1), x22, (2, 3, 4, 0), (2, 3, 4, 1)) del x22 - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) del x17 x24 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) del x18 x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x25 = np.zeros((nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nvir), dtype=types[float]) x25 += einsum(v.xov, (0, 1, 2), x8, (1, 3, 0), (3, 2)) - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(x1, (0, 1), (0, 1)) x26 += einsum(x25, (0, 1), (0, 1)) * -0.5 - x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x27 += einsum(x26, (0, 1), t2, (2, 3, 1, 4), (2, 3, 0, 4)) - x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x28 += einsum(v.xoo, (0, 1, 2), v.xov, (0, 3, 4), (1, 2, 3, 4)) - x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x29 += einsum(v.xov, (0, 1, 2), x8, (3, 4, 0), (3, 1, 4, 2)) - x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x30 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x30 += einsum(x28, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 x30 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x30 += einsum(x29, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x31 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x31 = np.zeros((nocc, nocc, naux), dtype=types[float]) x31 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x31 += einsum(x8, (0, 1, 2), (1, 0, 2)) - x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x32 += einsum(v.xov, (0, 1, 2), x31, (3, 4, 0), (1, 3, 4, 2)) - x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x33 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) - x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x34 += einsum(v.xoo, (0, 1, 2), x8, (3, 4, 0), (3, 1, 2, 4)) - x35 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x35 += einsum(x33, (0, 1, 2, 3), (3, 2, 1, 0)) x35 += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) x35 += einsum(x34, (0, 1, 2, 3), (3, 0, 2, 1)) * -0.5 - x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x36 += einsum(x14, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x36 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 x36 += einsum(x15, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 @@ -473,41 +474,41 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x35 l1new += einsum(l2, (0, 1, 2, 3), x36, (2, 4, 3, 1), (0, 4)) * 2.0 del x36 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x37 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(l2, (0, 1, 2, 3), x4, (3, 4, 1, 5), (2, 4, 0, 5)) x38 += einsum(l2, (0, 1, 2, 3), x37, (2, 4, 1, 5), (3, 4, 0, 5)) * 0.5 del x37 - x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x39 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x40 += einsum(t2, (0, 1, 2, 3), x9, (4, 1, 5, 2), (4, 5, 0, 3)) - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x39 x41 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x40 - x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x42 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) - x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x43 += einsum(t1, (0, 1), x42, (2, 0, 3, 4), (2, 3, 4, 1)) - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x9, (4, 1, 5, 3), (4, 5, 0, 2)) - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x45 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(x45, (0, 1, 2, 3), x9, (0, 4, 5, 2), (4, 5, 1, 3)) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) del x43 x47 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) del x44 x47 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x46 - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x48 += einsum(x41, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x41 @@ -516,51 +517,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x48 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x48 += einsum(x47, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x47 - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x49 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x50 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x51 = np.zeros((nocc, nocc), dtype=np.float64) + x51 = np.zeros((nocc, nocc), dtype=types[float]) x51 += einsum(l2, (0, 1, 2, 3), x50, (3, 4, 0, 1), (2, 4)) * 2.0 - x52 = np.zeros((nocc, nocc), dtype=np.float64) + x52 = np.zeros((nocc, nocc), dtype=types[float]) x52 += einsum(x2, (0, 1), (0, 1)) x52 += einsum(x51, (0, 1), (0, 1)) l1new += einsum(f.ov, (0, 1), x52, (2, 0), (1, 2)) * -1.0 - x53 = np.zeros((nocc, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nvir), dtype=types[float]) x53 += einsum(t1, (0, 1), (0, 1)) * -1.0 x53 += einsum(x4, (0, 1, 2, 3), x9, (0, 1, 4, 2), (4, 3)) * 2.0 x53 += einsum(l1, (0, 1), x45, (1, 2, 0, 3), (2, 3)) * -1.0 x53 += einsum(t1, (0, 1), x52, (0, 2), (2, 1)) - x54 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x54 += einsum(t1, (0, 1), x9, (2, 3, 4, 1), (3, 2, 4, 0)) - x55 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x55 += einsum(x42, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x55 += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) x55 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) x55 += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 - x56 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x56 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x56 += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 - x57 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x57 = np.zeros((nocc, nvir, naux), dtype=types[float]) x57 += einsum(l1, (0, 1), v.xvv, (2, 3, 0), (1, 3, 2)) - x58 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x58 = np.zeros((nocc, nvir, naux), dtype=types[float]) x58 += einsum(x52, (0, 1), v.xov, (2, 1, 3), (0, 3, 2)) - x59 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x59 = np.zeros((nocc, nvir, naux), dtype=types[float]) x59 += einsum(x57, (0, 1, 2), (0, 1, 2)) * -1.0 del x57 x59 += einsum(x58, (0, 1, 2), (0, 1, 2)) del x58 - x60 = np.zeros((nocc, nocc), dtype=np.float64) + x60 = np.zeros((nocc, nocc), dtype=types[float]) x60 += einsum(l2, (0, 1, 2, 3), x50, (3, 4, 0, 1), (2, 4)) del x50 - x61 = np.zeros((nocc, nocc), dtype=np.float64) + x61 = np.zeros((nocc, nocc), dtype=types[float]) x61 += einsum(x2, (0, 1), (0, 1)) * 0.5 del x2 x61 += einsum(x60, (0, 1), (0, 1)) del x60 - x62 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x62 = np.zeros((nocc, nocc, naux), dtype=types[float]) x62 += einsum(v.xvv, (0, 1, 2), x38, (3, 4, 1, 2), (4, 3, 0)) * -2.0 del x38 x62 += einsum(v.xov, (0, 1, 2), x48, (3, 1, 4, 2), (4, 3, 0)) @@ -578,21 +579,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x51 l1new += einsum(v.xov, (0, 1, 2), x62, (1, 3, 0), (2, 3)) del x62 - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 x63 += einsum(x28, (0, 1, 2, 3), (1, 2, 0, 3)) x63 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) x63 += einsum(x29, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x64 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 x64 += einsum(x28, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 x64 += einsum(x29, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x64 += einsum(x29, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x65 += einsum(x33, (0, 1, 2, 3), (3, 2, 1, 0)) x65 += einsum(x34, (0, 1, 2, 3), (1, 0, 3, 2)) x65 += einsum(x34, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(x14, (0, 1, 2, 3), (0, 2, 1, 3)) * -2.0 del x14 x66 += einsum(t2, (0, 1, 2, 3), x63, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 @@ -605,17 +606,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x65 l1new += einsum(l2, (0, 1, 2, 3), x66, (3, 4, 2, 1), (0, 4)) del x66 - x67 = np.zeros((nvir, nvir), dtype=np.float64) + x67 = np.zeros((nvir, nvir), dtype=types[float]) x67 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) x67 += einsum(l2, (0, 1, 2, 3), x4, (3, 2, 1, 4), (4, 0)) * 2.0 - x68 = np.zeros((nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nvir), dtype=types[float]) x68 += einsum(l1, (0, 1), (1, 0)) x68 += einsum(t1, (0, 1), (0, 1)) x68 += einsum(x45, (0, 1, 2, 3), x9, (0, 1, 4, 2), (4, 3)) * -1.0 x68 += einsum(l1, (0, 1), x4, (1, 2, 0, 3), (2, 3)) * 2.0 x68 += einsum(t1, (0, 1), x61, (0, 2), (2, 1)) * -2.0 del x61 - x69 = np.zeros((naux,), dtype=np.float64) + x69 = np.zeros((naux,), dtype=types[float]) x69 += einsum(x67, (0, 1), v.xvv, (2, 0, 1), (2,)) del x67 x69 += einsum(x68, (0, 1), v.xov, (2, 0, 1), (2,)) @@ -624,23 +625,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x52 l1new += einsum(x69, (0,), v.xov, (0, 1, 2), (2, 1)) * 2.0 del x69 - x70 = np.zeros((nocc, nocc), dtype=np.float64) + x70 = np.zeros((nocc, nocc), dtype=types[float]) x70 += einsum(x0, (0,), v.xoo, (0, 1, 2), (1, 2)) - x71 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x71 = np.zeros((nocc, nvir, naux), dtype=types[float]) x71 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) - x72 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x72 = np.zeros((nocc, nvir, naux), dtype=types[float]) x72 += einsum(v.xov, (0, 1, 2), x45, (1, 3, 2, 4), (3, 4, 0)) del x45 - x73 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x73 = np.zeros((nocc, nvir, naux), dtype=types[float]) x73 += einsum(x71, (0, 1, 2), (0, 1, 2)) del x71 x73 += einsum(x72, (0, 1, 2), (0, 1, 2)) * -1.0 del x72 - x74 = np.zeros((nocc, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nvir), dtype=types[float]) x74 += einsum(f.ov, (0, 1), (0, 1)) x74 += einsum(x1, (0, 1), (0, 1)) * 2.0 x74 += einsum(x25, (0, 1), (0, 1)) * -1.0 - x75 = np.zeros((nocc, nocc), dtype=np.float64) + x75 = np.zeros((nocc, nocc), dtype=types[float]) x75 += einsum(f.oo, (0, 1), (0, 1)) x75 += einsum(x70, (0, 1), (1, 0)) * 2.0 x75 += einsum(v.xov, (0, 1, 2), x73, (3, 2, 0), (3, 1)) * -1.0 @@ -648,115 +649,115 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x74 l1new += einsum(l1, (0, 1), x75, (1, 2), (0, 2)) * -1.0 del x75 - x76 = np.zeros((nvir, nvir), dtype=np.float64) + x76 = np.zeros((nvir, nvir), dtype=types[float]) x76 += einsum(x0, (0,), v.xvv, (0, 1, 2), (1, 2)) del x0 - x77 = np.zeros((nvir, nvir), dtype=np.float64) + x77 = np.zeros((nvir, nvir), dtype=types[float]) x77 += einsum(f.vv, (0, 1), (0, 1)) x77 += einsum(x76, (0, 1), (1, 0)) * 2.0 l1new += einsum(l1, (0, 1), x77, (0, 2), (2, 1)) del x77 - x78 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x78 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new += einsum(l2, (0, 1, 2, 3), x78, (4, 5, 0, 1), (4, 5, 3, 2)) del x78 - x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x79 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x79 += einsum(l1, (0, 1), x28, (2, 1, 3, 4), (2, 3, 0, 4)) - x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x80 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x80 += einsum(x28, (0, 1, 2, 3), x9, (4, 1, 2, 5), (4, 0, 5, 3)) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(x16, (0, 1, 2, 3), x9, (4, 5, 0, 2), (5, 4, 1, 3)) del x16 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(x19, (0, 1, 2, 3), x82, (4, 1, 5, 2), (4, 0, 5, 3)) del x82 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(x29, (0, 1, 2, 3), x9, (4, 0, 1, 5), (4, 2, 5, 3)) - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(x19, (0, 1, 2, 3), x4, (0, 4, 3, 5), (1, 4, 2, 5)) * 2.0 del x4 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(v.xvv, (0, 1, 2), x31, (3, 4, 0), (3, 4, 1, 2)) del x31 - x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x87 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x87 += einsum(v.xov, (0, 1, 2), x5, (3, 4, 0), (1, 3, 2, 4)) * 2.0 - x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x88 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x88 += einsum(x85, (0, 1, 2, 3), (1, 0, 3, 2)) del x85 x88 += einsum(x86, (0, 1, 2, 3), (1, 0, 3, 2)) x88 += einsum(x87, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x87 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(l2, (0, 1, 2, 3), x88, (3, 4, 1, 5), (2, 4, 0, 5)) del x88 - x90 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x90 = np.zeros((nocc, nvir, naux), dtype=types[float]) x90 += einsum(x6, (0, 1, 2), l2, (3, 1, 0, 4), (4, 3, 2)) del x6 - x91 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x91 = np.zeros((nocc, nvir, naux), dtype=types[float]) x91 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x91 += einsum(x3, (0, 1, 2), (0, 1, 2)) - x92 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x92 = np.zeros((nocc, nvir, naux), dtype=types[float]) x92 += einsum(x91, (0, 1, 2), l2, (3, 1, 4, 0), (4, 3, 2)) * 2.0 del x91 - x93 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x93 = np.zeros((nocc, nvir, naux), dtype=types[float]) x93 += einsum(x90, (0, 1, 2), (0, 1, 2)) * -1.0 del x90 x93 += einsum(x92, (0, 1, 2), (0, 1, 2)) del x92 - x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x94 += einsum(v.xov, (0, 1, 2), x93, (3, 4, 0), (1, 3, 2, 4)) del x93 - x95 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x95 = np.zeros((nocc, nvir, naux), dtype=types[float]) x95 += einsum(x3, (0, 1, 2), (0, 1, 2)) del x3 x95 += einsum(x5, (0, 1, 2), (0, 1, 2)) del x5 - x96 = np.zeros((nvir, nvir), dtype=np.float64) + x96 = np.zeros((nvir, nvir), dtype=types[float]) x96 += einsum(v.xov, (0, 1, 2), x95, (1, 3, 0), (2, 3)) del x95 - x97 = np.zeros((nvir, nvir), dtype=np.float64) + x97 = np.zeros((nvir, nvir), dtype=types[float]) x97 += einsum(x76, (0, 1), (1, 0)) * -2.0 del x76 x97 += einsum(x96, (0, 1), (0, 1)) del x96 - x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x98 += einsum(x97, (0, 1), l2, (2, 1, 3, 4), (4, 3, 2, 0)) del x97 - x99 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x99 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x99 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(x28, (0, 1, 2, 3), x99, (0, 4, 1, 5), (2, 4, 3, 5)) del x99 - x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x101 += einsum(x29, (0, 1, 2, 3), x49, (4, 0, 2, 5), (1, 4, 3, 5)) del x49 - x102 = np.zeros((nocc, nocc), dtype=np.float64) + x102 = np.zeros((nocc, nocc), dtype=types[float]) x102 += einsum(v.xov, (0, 1, 2), x73, (3, 2, 0), (1, 3)) * 0.5 del x73 - x103 = np.zeros((nocc, nocc), dtype=np.float64) + x103 = np.zeros((nocc, nocc), dtype=types[float]) x103 += einsum(t1, (0, 1), x26, (2, 1), (0, 2)) - x104 = np.zeros((nocc, nocc), dtype=np.float64) + x104 = np.zeros((nocc, nocc), dtype=types[float]) x104 += einsum(x70, (0, 1), (1, 0)) del x70 x104 += einsum(x102, (0, 1), (1, 0)) * -1.0 del x102 x104 += einsum(x103, (0, 1), (0, 1)) del x103 - x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x105 += einsum(x104, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) * 2.0 del x104 - x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x106 += einsum(x26, (0, 1), x9, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x26 - x107 = np.zeros((nocc, nvir), dtype=np.float64) + x107 = np.zeros((nocc, nvir), dtype=types[float]) x107 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 x107 += einsum(x25, (0, 1), (0, 1)) * -1.0 del x25 - x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x108 += einsum(f.ov, (0, 1), l1, (2, 3), (0, 3, 1, 2)) * -1.0 x108 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) del x79 @@ -787,50 +788,50 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new += einsum(x108, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new += einsum(x108, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x108 - x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x109 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x109 += einsum(f.vv, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x110 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x110 += einsum(f.ov, (0, 1), x9, (2, 3, 0, 4), (2, 3, 1, 4)) - x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x111 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x111 += einsum(l1, (0, 1), x29, (1, 2, 3, 4), (2, 3, 0, 4)) - x112 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x112 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x112 += einsum(x28, (0, 1, 2, 3), x9, (1, 4, 2, 5), (4, 0, 5, 3)) del x28 - x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x113 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x113 += einsum(l2, (0, 1, 2, 3), x34, (2, 4, 3, 5), (4, 5, 0, 1)) del x34 - x114 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x114 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x114 += einsum(x29, (0, 1, 2, 3), x9, (0, 4, 1, 5), (4, 2, 5, 3)) del x9, x29 - x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x115 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x115 += einsum(t2, (0, 1, 2, 3), x19, (4, 1, 2, 5), (0, 4, 3, 5)) - x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x116 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x116 += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x115 x116 += einsum(x86, (0, 1, 2, 3), (1, 0, 3, 2)) del x86 - x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x117 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x117 += einsum(l2, (0, 1, 2, 3), x116, (2, 4, 1, 5), (3, 4, 0, 5)) del x116 - x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x118 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x118 += einsum(v.xov, (0, 1, 2), x59, (3, 4, 0), (1, 3, 2, 4)) del x59 - x119 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x119 = np.zeros((nocc, nvir, naux), dtype=types[float]) x119 += einsum(x11, (0, 1), v.xov, (2, 3, 1), (3, 0, 2)) * 2.0 del x11 - x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x120 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x120 += einsum(v.xov, (0, 1, 2), x119, (3, 4, 0), (1, 3, 2, 4)) del x119 - x121 = np.zeros((nocc, nocc), dtype=np.float64) + x121 = np.zeros((nocc, nocc), dtype=types[float]) x121 += einsum(f.ov, (0, 1), t1, (2, 1), (0, 2)) - x122 = np.zeros((nocc, nocc), dtype=np.float64) + x122 = np.zeros((nocc, nocc), dtype=types[float]) x122 += einsum(f.oo, (0, 1), (0, 1)) x122 += einsum(x121, (0, 1), (1, 0)) del x121 - x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x123 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x123 += einsum(x122, (0, 1), l2, (2, 3, 0, 4), (4, 1, 2, 3)) del x122 - x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x124 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x124 += einsum(x109, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x109 x124 += einsum(x110, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -854,7 +855,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new += einsum(x124, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new += einsum(x124, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x124 - x125 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x125 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x125 += einsum(x33, (0, 1, 2, 3), (3, 2, 1, 0)) del x33 x125 += einsum(x20, (0, 1, 2, 3), (0, 3, 1, 2)) @@ -863,7 +864,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x21 l2new += einsum(l2, (0, 1, 2, 3), x125, (3, 4, 2, 5), (0, 1, 4, 5)) del x125 - x126 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x126 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x126 += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) del x42 x126 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -877,46 +878,46 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM1 - rdm1_f_oo = np.zeros((nocc, nocc), dtype=np.float64) + rdm1_f_oo = np.zeros((nocc, nocc), dtype=types[float]) rdm1_f_oo += einsum(delta.oo, (0, 1), (0, 1)) * 2.0 - rdm1_f_ov = np.zeros((nocc, nvir), dtype=np.float64) + rdm1_f_ov = np.zeros((nocc, nvir), dtype=types[float]) rdm1_f_ov += einsum(t1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vo = np.zeros((nvir, nocc), dtype=np.float64) + rdm1_f_vo = np.zeros((nvir, nocc), dtype=types[float]) rdm1_f_vo += einsum(l1, (0, 1), (0, 1)) * 2.0 - rdm1_f_vv = np.zeros((nvir, nvir), dtype=np.float64) + rdm1_f_vv = np.zeros((nvir, nvir), dtype=types[float]) rdm1_f_vv += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) * 2.0 - x0 = np.zeros((nocc, nocc), dtype=np.float64) + x0 = np.zeros((nocc, nocc), dtype=types[float]) x0 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm1_f_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm1_f_oo += einsum(l2, (0, 1, 2, 3), x1, (2, 4, 1, 0), (4, 3)) * -2.0 del x1 - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x3 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x2 rdm1_f_ov += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 4, 2), (4, 3)) * -2.0 del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x4 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm1_f_ov += einsum(l1, (0, 1), x4, (1, 2, 0, 3), (2, 3)) * 4.0 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(x0, (0, 1), (0, 1)) * 0.5 del x0 x6 += einsum(l2, (0, 1, 2, 3), x5, (3, 4, 0, 1), (2, 4)) del x5 rdm1_f_ov += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) * -4.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x7 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) rdm1_f_vv += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 2, 4), (4, 3)) * 4.0 @@ -930,57 +931,57 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta = Namespace(oo=np.eye(nocc), vv=np.eye(nvir)) # RDM2 - rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_oooo = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_oooo += einsum(delta.oo, (0, 1), delta.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_ovoo = np.zeros((nocc, nvir, nocc, nocc), dtype=types[float]) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 1, 3)) rdm2_f_ovoo += einsum(delta.oo, (0, 1), l1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=np.float64) + rdm2_f_vooo = np.zeros((nvir, nocc, nocc, nocc), dtype=types[float]) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_vooo += einsum(delta.oo, (0, 1), l1, (2, 3), (2, 0, 3, 1)) - rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_oovv = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_ovov = np.zeros((nocc, nvir, nocc, nvir), dtype=types[float]) rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_ovov += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_ovvo = np.zeros((nocc, nvir, nvir, nocc), dtype=types[float]) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) rdm2_f_ovvo += einsum(l1, (0, 1), t1, (2, 3), (2, 0, 3, 1)) - rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_voov = np.zeros((nvir, nocc, nocc, nvir), dtype=types[float]) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_voov += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_vovo = np.zeros((nvir, nocc, nvir, nocc), dtype=types[float]) rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_vovo += einsum(l1, (0, 1), t1, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=np.float64) + rdm2_f_vvoo = np.zeros((nvir, nvir, nocc, nocc), dtype=types[float]) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vvoo += einsum(l2, (0, 1, 2, 3), (0, 1, 2, 3)) - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x1 = np.zeros((nocc, nocc), dtype=np.float64) + x1 = np.zeros((nocc, nocc), dtype=types[float]) x1 += einsum(l2, (0, 1, 2, 3), x0, (2, 4, 1, 0), (3, 4)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 @@ -994,11 +995,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x1, (2, 3), (3, 0, 2, 1)) * -2.0 - x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x2 += einsum(l2, (0, 1, 2, 3), t2, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x2, (0, 1, 2, 3), (3, 2, 1, 0)) - x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), l2, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_ovoo += einsum(x3, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_ovoo += einsum(x3, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 @@ -1012,18 +1013,18 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_vooo += einsum(x3, (0, 1, 2, 3), (3, 2, 1, 0)) - x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x4 += einsum(t1, (0, 1), x3, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_oooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) rdm2_f_oooo += einsum(x4, (0, 1, 2, 3), (3, 2, 1, 0)) - x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x5 += einsum(x2, (0, 1, 2, 3), (1, 0, 3, 2)) x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (2, 3, 0, 1)) rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 rdm2_f_oooo += einsum(x5, (0, 1, 2, 3), (2, 3, 0, 1)) - x6 = np.zeros((nocc, nocc), dtype=np.float64) + x6 = np.zeros((nocc, nocc), dtype=types[float]) x6 += einsum(l1, (0, 1), t1, (2, 0), (1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) @@ -1037,42 +1038,42 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_oooo += einsum(delta.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(l1, (0, 1), t2, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + rdm2_f_ooov = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) rdm2_f_ooov += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_ooov += einsum(x7, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=np.float64) + rdm2_f_oovo = np.zeros((nocc, nocc, nvir, nocc), dtype=types[float]) rdm2_f_oovo += einsum(x7, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x7, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 - x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x8 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x8 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) - x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (1, 4, 5, 2), (4, 5, 0, 3)) del x8 - x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x10 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x10 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.5 - x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x11 += einsum(t2, (0, 1, 2, 3), x10, (1, 4, 5, 3), (4, 5, 0, 2)) * 2.0 del x10 - x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x12 += einsum(t1, (0, 1), x5, (0, 2, 3, 4), (2, 3, 4, 1)) del x5 rdm2_f_ooov += einsum(x12, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x12, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x12, (0, 1, 2, 3), (1, 2, 3, 0)) - x13 = np.zeros((nocc, nocc), dtype=np.float64) + x13 = np.zeros((nocc, nocc), dtype=types[float]) x13 += einsum(l2, (0, 1, 2, 3), x0, (2, 4, 1, 0), (3, 4)) * 2.0 del x0 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(x6, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) rdm2_f_ooov += einsum(t1, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_ooov += einsum(t1, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * -1.0 - x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x15 += einsum(delta.oo, (0, 1), t1, (2, 3), (0, 1, 2, 3)) x15 += einsum(x7, (0, 1, 2, 3), (1, 0, 2, 3)) x15 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1090,19 +1091,19 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_oovo += einsum(x15, (0, 1, 2, 3), (2, 0, 3, 1)) del x15 - x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x16 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x16 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) - x17 = np.zeros((nocc, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * 2.0 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x18 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x19 = np.zeros((nocc, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nvir), dtype=types[float]) x19 += einsum(l1, (0, 1), x18, (1, 2, 0, 3), (2, 3)) - x20 = np.zeros((nocc, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nvir), dtype=types[float]) x20 += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) - x21 = np.zeros((nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nvir), dtype=types[float]) x21 += einsum(x17, (0, 1), (0, 1)) x21 += einsum(x19, (0, 1), (0, 1)) * -1.0 x21 += einsum(x20, (0, 1), (0, 1)) @@ -1115,23 +1116,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovo += einsum(delta.oo, (0, 1), x21, (2, 3), (0, 2, 3, 1)) rdm2_f_oovo += einsum(delta.oo, (0, 1), x21, (2, 3), (2, 0, 3, 1)) * -1.0 del x21 - x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_ooov += einsum(x22, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_oovo += einsum(x22, (0, 1, 2, 3), (2, 1, 3, 0)) del x22 - x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x23 += einsum(t2, (0, 1, 2, 3), x3, (4, 1, 5, 2), (4, 5, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_ooov += einsum(x23, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_oovo += einsum(x23, (0, 1, 2, 3), (1, 2, 3, 0)) - x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x24 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x24 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (1, 4, 5, 3), (4, 5, 0, 2)) del x24 rdm2_f_ooov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -1139,7 +1140,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovo += einsum(x25, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_oovo += einsum(x25, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x25 - x26 = np.zeros((nocc, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nvir), dtype=types[float]) x26 += einsum(t1, (0, 1), (0, 1)) * -1.0 x26 += einsum(x17, (0, 1), (0, 1)) del x17 @@ -1150,60 +1151,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_ooov += einsum(delta.oo, (0, 1), x26, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_ooov += einsum(delta.oo, (0, 1), x26, (2, 3), (0, 2, 1, 3)) * -1.0 del x26 - x27 = np.zeros((nocc, nocc), dtype=np.float64) + x27 = np.zeros((nocc, nocc), dtype=types[float]) x27 += einsum(delta.oo, (0, 1), (0, 1)) * -1.0 x27 += einsum(x6, (0, 1), (0, 1)) x27 += einsum(x13, (0, 1), (0, 1)) rdm2_f_oovo += einsum(t1, (0, 1), x27, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_oovo += einsum(t1, (0, 1), x27, (2, 3), (0, 3, 1, 2)) * -1.0 del x27 - x28 = np.zeros((nocc, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nvir), dtype=types[float]) x28 += einsum(t2, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) - x29 = np.zeros((nocc, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nvir), dtype=types[float]) x29 += einsum(l1, (0, 1), x18, (1, 2, 0, 3), (2, 3)) * 0.5 - x30 = np.zeros((nocc, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nvir), dtype=types[float]) x30 += einsum(t1, (0, 1), x14, (0, 2), (2, 1)) * 0.5 del x14 - x31 = np.zeros((nocc, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nvir), dtype=types[float]) x31 += einsum(x28, (0, 1), (0, 1)) x31 += einsum(x29, (0, 1), (0, 1)) * -1.0 x31 += einsum(x30, (0, 1), (0, 1)) del x30 rdm2_f_oovo += einsum(delta.oo, (0, 1), x31, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_oovo += einsum(delta.oo, (0, 1), x31, (2, 3), (2, 0, 3, 1)) * -2.0 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(t2, (0, 1, 2, 3), x2, (0, 1, 4, 5), (4, 5, 2, 3)) del x2 rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(t2, (0, 1, 2, 3), x4, (1, 0, 4, 5), (4, 5, 3, 2)) del x4 rdm2_f_oovv += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -0.5 x34 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), x34, (1, 4, 3, 5), (4, 0, 5, 2)) - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(t2, (0, 1, 2, 3), x35, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x35 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x37 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 - x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x38 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x38 += einsum(t2, (0, 1, 2, 3), x37, (1, 4, 2, 5), (4, 0, 5, 3)) del x37 - x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x39 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x39 += einsum(t2, (0, 1, 2, 3), x38, (1, 4, 2, 5), (4, 0, 5, 3)) * -1.0 del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(t1, (0, 1), x12, (0, 2, 3, 4), (3, 2, 4, 1)) del x12 rdm2_f_oovv += einsum(x40, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x40, (0, 1, 2, 3), (0, 1, 3, 2)) - x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x41 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) del x32 x41 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1219,41 +1220,41 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x41, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x41 - x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x42 += einsum(x6, (0, 1), t2, (2, 0, 3, 4), (1, 2, 3, 4)) - x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x43 += einsum(t2, (0, 1, 2, 3), x34, (1, 4, 2, 5), (4, 0, 5, 3)) * 2.0 - x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x43, (1, 4, 3, 5), (4, 0, 5, 2)) del x43 - x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x45 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) x45 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.5 - x46 = np.zeros((nvir, nvir), dtype=np.float64) + x46 = np.zeros((nvir, nvir), dtype=types[float]) x46 += einsum(t2, (0, 1, 2, 3), x45, (0, 1, 3, 4), (4, 2)) * 2.0 - x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x47 += einsum(x46, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x48 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x48, (4, 1, 5, 2), (4, 5, 0, 3)) - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(t2, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 del x16 - x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x51 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x51 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x49 x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x50 - x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x52 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x52 += einsum(t1, (0, 1), x51, (0, 2, 3, 4), (2, 3, 4, 1)) del x51 - x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x53 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x53 += einsum(x13, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x13 - x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x54 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x54 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) x54 += einsum(x44, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x54 += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1271,7 +1272,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_oovv += einsum(x54, (0, 1, 2, 3), (1, 0, 3, 2)) del x54 - x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x55 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x55 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x55 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -1279,54 +1280,54 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) del x55 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(l2, (0, 1, 2, 3), t2, (4, 3, 1, 5), (2, 4, 0, 5)) - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(t2, (0, 1, 2, 3), x56, (1, 4, 2, 5), (0, 4, 3, 5)) del x56 rdm2_f_oovv += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) del x57 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 1, 5), (3, 4, 0, 5)) rdm2_f_ovov += einsum(x58, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x58, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x58, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x58, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x58, (1, 4, 2, 5), (0, 4, 3, 5)) rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_oovv += einsum(x59, (0, 1, 2, 3), (0, 1, 3, 2)) del x59 - x60 = np.zeros((nocc, nvir), dtype=np.float64) + x60 = np.zeros((nocc, nvir), dtype=types[float]) x60 += einsum(t1, (0, 1), x6, (0, 2), (2, 1)) del x6 rdm2_f_oovv += einsum(t1, (0, 1), x60, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x60, (2, 3), (2, 0, 3, 1)) * -1.0 - x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), x3, (4, 1, 5, 3), (4, 5, 0, 2)) - x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x62 += einsum(x18, (0, 1, 2, 3), x3, (0, 4, 5, 2), (1, 4, 5, 3)) del x18 - x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x63 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x63 += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) del x61 x63 += einsum(x62, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x62 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(t1, (0, 1), x63, (0, 2, 3, 4), (2, 3, 4, 1)) del x63 - x65 = np.zeros((nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nvir), dtype=types[float]) x65 += einsum(t1, (0, 1), x1, (0, 2), (2, 1)) del x1 - x66 = np.zeros((nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nvir), dtype=types[float]) x66 += einsum(x28, (0, 1), (0, 1)) del x28 x66 += einsum(x29, (0, 1), (0, 1)) * -1.0 del x29 x66 += einsum(x65, (0, 1), (0, 1)) del x65 - x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x67 += einsum(x44, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x44 x67 += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -1342,15 +1343,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x67, (0, 1, 2, 3), (1, 0, 3, 2)) del x67 - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x68 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x69 += einsum(t1, (0, 1), x68, (0, 2, 3, 4), (2, 3, 4, 1)) del x68 - x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x70 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) del x42 x70 += einsum(x69, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1360,34 +1361,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_oovv += einsum(x70, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_oovv += einsum(x70, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x70 - x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x71 += einsum(t2, (0, 1, 2, 3), x34, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x34 - x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x72 += einsum(t2, (0, 1, 2, 3), x71, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x71 rdm2_f_oovv += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_oovv += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) del x72 - x73 = np.zeros((nocc, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nvir), dtype=types[float]) x73 += einsum(t1, (0, 1), (0, 1)) * -1.0 x73 += einsum(x60, (0, 1), (0, 1)) del x60 rdm2_f_oovv += einsum(t1, (0, 1), x73, (2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_oovv += einsum(t1, (0, 1), x73, (2, 3), (0, 2, 1, 3)) * -1.0 del x73 - x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x74 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x74 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x74 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x75 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x75 += einsum(l2, (0, 1, 2, 3), x74, (2, 4, 1, 5), (4, 3, 5, 0)) rdm2_f_ovov += einsum(x75, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_ovov += einsum(x75, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x75 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x76 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(l2, (0, 1, 2, 3), x76, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x76 rdm2_f_ovov += einsum(x77, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 @@ -1395,16 +1396,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_voov += einsum(x77, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x77, (0, 1, 2, 3), (3, 0, 1, 2)) del x77 - x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x78 += einsum(t1, (0, 1), x48, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x78, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x78, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x78, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x78, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x78 - x79 = np.zeros((nvir, nvir), dtype=np.float64) + x79 = np.zeros((nvir, nvir), dtype=types[float]) x79 += einsum(l1, (0, 1), t1, (1, 2), (0, 2)) - x80 = np.zeros((nvir, nvir), dtype=np.float64) + x80 = np.zeros((nvir, nvir), dtype=types[float]) x80 += einsum(x79, (0, 1), (0, 1)) x80 += einsum(x46, (0, 1), (0, 1)) del x46 @@ -1418,23 +1419,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(delta.oo, (0, 1), x80, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x80, (2, 3), (2, 0, 3, 1)) rdm2_f_vovo += einsum(delta.oo, (0, 1), x80, (2, 3), (2, 0, 3, 1)) - rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_ovvv = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) rdm2_f_ovvv += einsum(t1, (0, 1), x80, (2, 3), (0, 2, 1, 3)) rdm2_f_ovvv += einsum(t1, (0, 1), x80, (2, 3), (0, 2, 1, 3)) - rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=np.float64) + rdm2_f_vovv = np.zeros((nvir, nocc, nvir, nvir), dtype=types[float]) rdm2_f_vovv += einsum(t1, (0, 1), x80, (2, 3), (2, 0, 3, 1)) rdm2_f_vovv += einsum(t1, (0, 1), x80, (2, 3), (2, 0, 3, 1)) - x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x81 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x81 += einsum(t1, (0, 1), x3, (0, 2, 3, 4), (2, 3, 4, 1)) rdm2_f_ovov += einsum(x81, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_ovov += einsum(x81, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x81 - x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x82 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x82 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x82 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) - x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x83 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x83 += einsum(t2, (0, 1, 2, 3), x82, (1, 4, 2, 5), (4, 0, 5, 3)) del x82 rdm2_f_ovvo += einsum(x83, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1442,10 +1443,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(x83, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vovo += einsum(x83, (0, 1, 2, 3), (2, 1, 3, 0)) del x83 - x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x84 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x84 += einsum(l2, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 x84 += einsum(l2, (0, 1, 2, 3), (2, 3, 0, 1)) * 2.0 - x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x85 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x85 += einsum(t2, (0, 1, 2, 3), x84, (1, 4, 3, 5), (4, 0, 5, 2)) del x84 rdm2_f_ovvo += einsum(x85, (0, 1, 2, 3), (1, 2, 3, 0)) @@ -1453,7 +1454,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovo += einsum(x85, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_vovo += einsum(x85, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x85 - x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x86 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x86 += einsum(t1, (0, 1), x48, (2, 0, 3, 4), (2, 3, 4, 1)) del x48 rdm2_f_ovvo += einsum(x86, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 @@ -1461,10 +1462,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x86, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x86 - x87 = np.zeros((nvir, nvir), dtype=np.float64) + x87 = np.zeros((nvir, nvir), dtype=types[float]) x87 += einsum(t2, (0, 1, 2, 3), x45, (0, 1, 3, 4), (4, 2)) del x45 - x88 = np.zeros((nvir, nvir), dtype=np.float64) + x88 = np.zeros((nvir, nvir), dtype=types[float]) x88 += einsum(x79, (0, 1), (0, 1)) * 0.5 del x79 x88 += einsum(x87, (0, 1), (0, 1)) @@ -1472,54 +1473,54 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_ovvo += einsum(delta.oo, (0, 1), x88, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_ovvo += einsum(delta.oo, (0, 1), x88, (2, 3), (0, 2, 3, 1)) * -2.0 del x88 - x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x89 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x89 += einsum(l2, (0, 1, 2, 3), t2, (4, 2, 5, 1), (3, 4, 0, 5)) rdm2_f_ovvo += einsum(x89, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x89, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x89, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x89, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x90 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x90 += einsum(t1, (0, 1), x3, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_ovvo += einsum(x90, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_ovvo += einsum(x90, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_voov += einsum(x90, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x91 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x91 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x91 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x92 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x92 += einsum(l2, (0, 1, 2, 3), x91, (3, 4, 5, 1), (4, 2, 5, 0)) rdm2_f_ovvo += einsum(x92, (0, 1, 2, 3), (0, 3, 2, 1)) rdm2_f_ovvo += einsum(x92, (0, 1, 2, 3), (0, 3, 2, 1)) rdm2_f_voov += einsum(x92, (0, 1, 2, 3), (3, 0, 1, 2)) rdm2_f_voov += einsum(x92, (0, 1, 2, 3), (3, 0, 1, 2)) - x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x93 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x93 += einsum(l2, (0, 1, 2, 3), x74, (2, 4, 5, 1), (4, 3, 5, 0)) del x74 rdm2_f_voov += einsum(x93, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 rdm2_f_voov += einsum(x93, (0, 1, 2, 3), (3, 0, 1, 2)) * -1.0 - x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x94 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x94 += einsum(l1, (0, 1), t2, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_ovvv += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_ovvv += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_vovv += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vovv += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) - x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x95 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x95 += einsum(t2, (0, 1, 2, 3), x3, (0, 1, 4, 5), (4, 5, 2, 3)) del x3 rdm2_f_ovvv += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_ovvv += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x96 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x96 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) x96 += einsum(x92, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x96 += einsum(x93, (0, 1, 2, 3), (1, 0, 3, 2)) del x93 - x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x97 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x97 += einsum(t1, (0, 1), x96, (0, 2, 3, 4), (2, 3, 4, 1)) del x96 - x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x98 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x98 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) del x94 x98 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1537,7 +1538,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_vovv += einsum(x98, (0, 1, 2, 3), (1, 0, 3, 2)) del x98 - x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x99 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x99 += einsum(t1, (0, 1), x58, (0, 2, 3, 4), (2, 3, 1, 4)) del x58 rdm2_f_ovvv += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1545,60 +1546,60 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_vovv += einsum(x99, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x99, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x99 - x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x100 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x100 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(x92, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x92 - x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x101 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x101 += einsum(t1, (0, 1), x100, (0, 2, 3, 4), (2, 3, 4, 1)) del x100 rdm2_f_ovvv += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_ovvv += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x101 - x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x102 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x102 += einsum(l2, (0, 1, 2, 3), x91, (3, 4, 5, 1), (4, 2, 5, 0)) * 0.5 del x91 - x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x103 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x103 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x89 x103 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x90 x103 += einsum(x102, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x102 - x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x104 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x104 += einsum(t1, (0, 1), x103, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x103 rdm2_f_vovv += einsum(x104, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 rdm2_f_vovv += einsum(x104, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x104 - x105 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x105 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x105 += einsum(t1, (0, 1), l2, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=np.float64) + rdm2_f_vvov = np.zeros((nvir, nvir, nocc, nvir), dtype=types[float]) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_vvov += einsum(x105, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=np.float64) + rdm2_f_vvvo = np.zeros((nvir, nvir, nvir, nocc), dtype=types[float]) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (1, 2, 3, 0)) * -1.0 rdm2_f_vvvo += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) - x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x106 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x106 += einsum(l2, (0, 1, 2, 3), t2, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + rdm2_f_vvvv = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) - x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x107 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x107 += einsum(t1, (0, 1), x105, (0, 2, 3, 4), (3, 2, 4, 1)) del x105 rdm2_f_vvvv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) rdm2_f_vvvv += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) - x108 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x108 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x108 += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) del x106 x108 += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) diff --git a/ebcc/codegen/RDFDCD.py b/ebcc/codegen/RDFDCD.py index ffdc04b5..38756c86 100644 --- a/ebcc/codegen/RDFDCD.py +++ b/ebcc/codegen/RDFDCD.py @@ -2,13 +2,14 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x1 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x1 = np.zeros((nocc, nvir, naux), dtype=types[float]) x1 += einsum(v.xov, (0, 1, 2), x0, (1, 3, 2, 4), (3, 4, 0)) del x0 e_cc = 0 @@ -19,59 +20,59 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # T amplitudes - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) - x0 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x0, (4, 2, 5, 3), (0, 1, 5, 4)) del x0 - x1 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x1 = np.zeros((nocc, nvir, naux), dtype=types[float]) x1 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 2, 4), (3, 4, 0)) t2new += einsum(x1, (0, 1, 2), x1, (3, 4, 2), (0, 3, 1, 4)) - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 4, 2), (3, 4, 0)) t2new += einsum(x2, (0, 1, 2), x2, (3, 4, 2), (0, 3, 1, 4)) * 4.0 del x2 - x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x3 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x3, (4, 0, 5, 1), (5, 4, 2, 3)) del x3 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(v.xov, (0, 1, 2), x1, (3, 4, 0), (3, 1, 4, 2)) - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x6 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x6 = np.zeros((nocc, nvir, naux), dtype=types[float]) x6 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x6 += einsum(x1, (0, 1, 2), (0, 1, 2)) * -1.0 del x1 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.xov, (0, 1, 2), x6, (3, 4, 0), (1, 3, 2, 4)) * 2.0 del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(x5, (0, 1, 2, 3), (1, 0, 3, 2)) x8 += einsum(x7, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x7 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), x8, (4, 1, 5, 3), (0, 4, 2, 5)) del x8 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.5 x10 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x11 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x11 = np.zeros((nocc, nvir, naux), dtype=types[float]) x11 += einsum(v.xov, (0, 1, 2), x10, (1, 3, 2, 4), (3, 4, 0)) del x10 - x12 = np.zeros((nvir, nvir), dtype=np.float64) + x12 = np.zeros((nvir, nvir), dtype=types[float]) x12 += einsum(v.xov, (0, 1, 2), x11, (1, 3, 0), (2, 3)) - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(x12, (0, 1), t2, (2, 3, 0, 4), (2, 3, 4, 1)) del x12 - x14 = np.zeros((nocc, nocc), dtype=np.float64) + x14 = np.zeros((nocc, nocc), dtype=types[float]) x14 += einsum(v.xov, (0, 1, 2), x11, (3, 2, 0), (1, 3)) del x11 - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(x14, (0, 1), t2, (2, 0, 3, 4), (2, 1, 4, 3)) del x14 - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) del x4 x16 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -83,14 +84,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x16, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x5, (4, 1, 5, 2), (0, 4, 3, 5)) del x5 - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) del x17 x20 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 diff --git a/ebcc/codegen/RDFDCSD.py b/ebcc/codegen/RDFDCSD.py index 3bc03d8c..fa8493c8 100644 --- a/ebcc/codegen/RDFDCSD.py +++ b/ebcc/codegen/RDFDCSD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x1 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) del x0 x2 += einsum(v.xov, (0, 1, 2), x1, (1, 3, 4, 2), (3, 4, 0)) @@ -18,9 +19,9 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.xov, (0, 1, 2), x2, (1, 2, 0), ()) * 2.0 del x2 - x3 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x3 = np.zeros((nocc, nocc, naux), dtype=types[float]) x3 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -0.5 del x3 @@ -31,62 +32,62 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.ov, (0, 1), (0, 1)) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) t1new += einsum(x1, (0, 1), (0, 1)) * 2.0 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) - x4 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x4 = np.zeros((nocc, nvir, naux), dtype=types[float]) x4 += einsum(x2, (0, 1, 2), (0, 1, 2)) x4 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * -2.0 x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 4, 2), (3, 4, 0)) del x3 t1new += einsum(v.xvv, (0, 1, 2), x4, (3, 2, 0), (3, 1)) * -1.0 del x4 - x5 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x5 = np.zeros((nocc, nocc, naux), dtype=types[float]) x5 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x6 = np.zeros((nocc, nocc, naux), dtype=types[float]) x6 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x6 += einsum(x5, (0, 1, 2), (1, 0, 2)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(v.xov, (0, 1, 2), x6, (3, 4, 0), (4, 1, 3, 2)) del x6 - x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x8 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t1new += einsum(x7, (0, 1, 2, 3), x8, (1, 2, 3, 4), (0, 4)) * -1.0 del x7 - x9 = np.zeros((nocc, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nvir), dtype=types[float]) x9 += einsum(v.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) - x10 = np.zeros((nocc, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nvir), dtype=types[float]) x10 += einsum(f.ov, (0, 1), (0, 1)) x10 += einsum(x1, (0, 1), (0, 1)) * 2.0 x10 += einsum(x9, (0, 1), (0, 1)) * -1.0 t1new += einsum(x10, (0, 1), x8, (0, 2, 1, 3), (2, 3)) - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(x0, (0,), v.xoo, (0, 1, 2), (1, 2)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x12 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(v.xov, (0, 1, 2), x12, (1, 3, 4, 2), (3, 4, 0)) * 2.0 - x14 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x14 = np.zeros((nocc, nvir, naux), dtype=types[float]) x14 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 x14 += einsum(x0, (0,), t1, (1, 2), (1, 2, 0)) * 2.0 x14 += einsum(x13, (0, 1, 2), (0, 1, 2)) - x15 = np.zeros((nocc, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nvir), dtype=types[float]) x15 += einsum(f.ov, (0, 1), (0, 1)) x15 += einsum(x9, (0, 1), (0, 1)) * -1.0 - x16 = np.zeros((nocc, nocc), dtype=np.float64) + x16 = np.zeros((nocc, nocc), dtype=types[float]) x16 += einsum(f.oo, (0, 1), (0, 1)) x16 += einsum(x11, (0, 1), (1, 0)) * 2.0 x16 += einsum(v.xov, (0, 1, 2), x14, (3, 2, 0), (1, 3)) @@ -95,107 +96,107 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x15 t1new += einsum(t1, (0, 1), x16, (0, 2), (2, 1)) * -1.0 del x16 - x17 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x17 = np.zeros((nocc, nvir, naux), dtype=types[float]) x17 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 2, 4), (3, 4, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(x17, (0, 1, 2), x17, (3, 4, 2), (0, 3, 1, 4)) - x18 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x18 = np.zeros((nocc, nvir, naux), dtype=types[float]) x18 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 4, 2), (3, 4, 0)) t2new += einsum(x18, (0, 1, 2), x18, (3, 4, 2), (0, 3, 1, 4)) * 4.0 del x18 - x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x19 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x19 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) t2new += einsum(x19, (0, 1, 2, 3), (1, 0, 3, 2)) - x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x20 += einsum(t2, (0, 1, 2, 3), x19, (4, 5, 3, 2), (0, 1, 5, 4)) del x19 - x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x21 += einsum(t1, (0, 1), x20, (2, 3, 4, 0), (2, 3, 4, 1)) del x20 t2new += einsum(t1, (0, 1), x21, (2, 3, 0, 4), (2, 3, 1, 4)) del x21 - x22 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x22 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x22, (4, 2, 5, 3), (0, 1, 5, 4)) del x22 - x23 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x23 = np.zeros((nocc, nvir, naux), dtype=types[float]) x23 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) t2new += einsum(x23, (0, 1, 2), x23, (3, 4, 2), (0, 3, 1, 4)) - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(v.xvv, (0, 1, 2), x5, (3, 4, 0), (3, 4, 1, 2)) - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 2), (4, 0, 3, 5)) - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x27 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x27 = np.zeros((nocc, nvir, naux), dtype=types[float]) x27 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x27 += einsum(x17, (0, 1, 2), (0, 1, 2)) * -1.0 del x17 - x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x28 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x28 += einsum(v.xov, (0, 1, 2), x27, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x27 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x26, (0, 1, 2, 3), (1, 0, 3, 2)) x29 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x28 - x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x30 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x30 += einsum(t2, (0, 1, 2, 3), x29, (4, 1, 5, 3), (4, 0, 5, 2)) del x29 - x31 = np.zeros((nvir, nvir), dtype=np.float64) + x31 = np.zeros((nvir, nvir), dtype=types[float]) x31 += einsum(x0, (0,), v.xvv, (0, 1, 2), (1, 2)) del x0 - x32 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x32 = np.zeros((nocc, nvir, naux), dtype=types[float]) x32 += einsum(v.xov, (0, 1, 2), x12, (1, 3, 4, 2), (3, 4, 0)) del x12 - x33 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x33 = np.zeros((nocc, nvir, naux), dtype=types[float]) x33 += einsum(x23, (0, 1, 2), (0, 1, 2)) x33 += einsum(x32, (0, 1, 2), (0, 1, 2)) del x32 - x34 = np.zeros((nvir, nvir), dtype=np.float64) + x34 = np.zeros((nvir, nvir), dtype=types[float]) x34 += einsum(v.xov, (0, 1, 2), x33, (1, 3, 0), (3, 2)) del x33 - x35 = np.zeros((nvir, nvir), dtype=np.float64) + x35 = np.zeros((nvir, nvir), dtype=types[float]) x35 += einsum(x31, (0, 1), (1, 0)) * -2.0 del x31 x35 += einsum(x34, (0, 1), (1, 0)) del x34 - x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x36 += einsum(x35, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) del x35 - x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x37 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x37 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) x37 += einsum(t1, (0, 1), t1, (2, 3), (0, 2, 1, 3)) - x38 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x38 = np.zeros((nocc, nvir, naux), dtype=types[float]) x38 += einsum(v.xov, (0, 1, 2), x37, (1, 3, 4, 2), (3, 4, 0)) - x39 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x39 = np.zeros((nocc, nvir, naux), dtype=types[float]) x39 += einsum(x2, (0, 1, 2), (0, 1, 2)) x39 += einsum(x38, (0, 1, 2), (0, 1, 2)) del x38 - x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x40 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x40 += einsum(v.xov, (0, 1, 2), x39, (3, 4, 0), (3, 1, 4, 2)) del x39 - x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x41 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x41 += einsum(v.xoo, (0, 1, 2), v.xov, (0, 3, 4), (1, 2, 3, 4)) - x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x42 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x42 += einsum(t2, (0, 1, 2, 3), x41, (4, 1, 5, 2), (0, 4, 5, 3)) - x43 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x43 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x43 += einsum(v.xov, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x44 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x44 += einsum(t2, (0, 1, 2, 3), x43, (4, 2, 5, 3), (0, 1, 4, 5)) del x43 - x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x45 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x45 += einsum(x23, (0, 1, 2), x5, (3, 4, 2), (3, 0, 4, 1)) - x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x46 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x46 += einsum(v.xov, (0, 1, 2), x5, (3, 4, 0), (3, 1, 4, 2)) - x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x47 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x47 += einsum(t2, (0, 1, 2, 3), x46, (4, 1, 5, 2), (4, 0, 5, 3)) - x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x48 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x48 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x48 += einsum(x46, (0, 1, 2, 3), (0, 2, 1, 3)) - x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x49 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x49 += einsum(t2, (0, 1, 2, 3), x48, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x48 - x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x50 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x50 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x42 x50 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -206,28 +207,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x47 x50 += einsum(x49, (0, 1, 2, 3), (0, 2, 1, 3)) del x49 - x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x51 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x51 += einsum(t1, (0, 1), x50, (2, 3, 0, 4), (2, 3, 4, 1)) del x50 - x52 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x52 = np.zeros((nocc, nvir, naux), dtype=types[float]) x52 += einsum(v.xov, (0, 1, 2), x8, (1, 3, 2, 4), (3, 4, 0)) * 0.5 del x8 - x53 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x53 = np.zeros((nocc, nvir, naux), dtype=types[float]) x53 += einsum(x2, (0, 1, 2), (0, 1, 2)) x53 += einsum(x52, (0, 1, 2), (0, 1, 2)) * -1.0 del x52 - x54 = np.zeros((nocc, nocc), dtype=np.float64) + x54 = np.zeros((nocc, nocc), dtype=types[float]) x54 += einsum(v.xov, (0, 1, 2), x53, (3, 2, 0), (3, 1)) del x53 - x55 = np.zeros((nocc, nocc), dtype=np.float64) + x55 = np.zeros((nocc, nocc), dtype=types[float]) x55 += einsum(x11, (0, 1), (1, 0)) * 2.0 del x11 x55 += einsum(x54, (0, 1), (1, 0)) * -1.0 del x54 - x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x56 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x56 += einsum(x55, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) del x55 - x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x57 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x57 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) del x25 x57 += einsum(x30, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -243,52 +244,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x57, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x57 - x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x58 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x58 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x59 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x59 += einsum(t2, (0, 1, 2, 3), x26, (4, 1, 5, 2), (0, 4, 3, 5)) del x26 - x60 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x60 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x60 += einsum(v.xoo, (0, 1, 2), x5, (3, 4, 0), (3, 1, 2, 4)) - x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x61 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x61 += einsum(t2, (0, 1, 2, 3), x60, (4, 1, 5, 0), (4, 5, 3, 2)) - x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x62 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x62 += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 3), (4, 0, 2, 5)) del x24 - x63 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x63 = np.zeros((nocc, nvir, naux), dtype=types[float]) x63 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x63 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 del x2 x63 += einsum(x13, (0, 1, 2), (0, 1, 2)) del x13 - x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x64 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x64 += einsum(x23, (0, 1, 2), x63, (3, 4, 2), (0, 3, 1, 4)) del x23, x63 - x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x65 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x65 += einsum(t2, (0, 1, 2, 3), x41, (4, 5, 1, 2), (0, 5, 4, 3)) - x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x66 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x66 += einsum(t1, (0, 1), x60, (2, 3, 4, 0), (2, 3, 4, 1)) del x60 - x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x67 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x67 += einsum(t2, (0, 1, 2, 3), x46, (4, 5, 1, 2), (4, 0, 5, 3)) del x46 - x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x68 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x68 += einsum(x41, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x68 += einsum(x41, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 del x41 - x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x69 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x69 += einsum(t2, (0, 1, 2, 3), x68, (1, 4, 5, 3), (4, 5, 0, 2)) del x68 - x70 = np.zeros((nocc, nvir), dtype=np.float64) + x70 = np.zeros((nocc, nvir), dtype=types[float]) x70 += einsum(f.ov, (0, 1), (0, 1)) * 0.5 x70 += einsum(x1, (0, 1), (0, 1)) del x1 x70 += einsum(x9, (0, 1), (0, 1)) * -0.5 del x9 - x71 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x71 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x71 += einsum(x70, (0, 1), t2, (2, 3, 1, 4), (0, 2, 3, 4)) * 2.0 del x70 - x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x72 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x72 += einsum(x65, (0, 1, 2, 3), (1, 0, 2, 3)) del x65 x72 += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -299,20 +300,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x69 x72 += einsum(x71, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x71 - x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x73 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x73 += einsum(t1, (0, 1), x72, (0, 2, 3, 4), (2, 3, 4, 1)) del x72 - x74 = np.zeros((nocc, nocc), dtype=np.float64) + x74 = np.zeros((nocc, nocc), dtype=types[float]) x74 += einsum(t1, (0, 1), x10, (2, 1), (2, 0)) * 0.5 del x10 - x75 = np.zeros((nocc, nocc), dtype=np.float64) + x75 = np.zeros((nocc, nocc), dtype=types[float]) x75 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x75 += einsum(x74, (0, 1), (1, 0)) del x74 - x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x76 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x76 += einsum(x75, (0, 1), t2, (2, 1, 3, 4), (0, 2, 4, 3)) * 2.0 del x75 - x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x77 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x77 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x58 x77 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -330,7 +331,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x77, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x77, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x77 - x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x78 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x78 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) x78 += einsum(x5, (0, 1, 2), x5, (3, 4, 2), (4, 0, 1, 3)) del x5 diff --git a/ebcc/codegen/RDFQCISD.py b/ebcc/codegen/RDFQCISD.py index 0589c17a..f745a89a 100644 --- a/ebcc/codegen/RDFQCISD.py +++ b/ebcc/codegen/RDFQCISD.py @@ -2,13 +2,14 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x0 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x1 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x1 = np.zeros((nocc, nvir, naux), dtype=types[float]) x1 += einsum(v.xov, (0, 1, 2), x0, (1, 3, 4, 2), (3, 4, 0)) del x0 e_cc = 0 @@ -19,35 +20,35 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1, (0, 1), v.xov, (2, 0, 1), (2,)) - x1 = np.zeros((nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nvir), dtype=types[float]) x1 += einsum(x0, (0,), v.xov, (0, 1, 2), (1, 2)) del x0 t1new += einsum(x1, (0, 1), (0, 1)) * 2.0 - x2 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x2 = np.zeros((nocc, nvir, naux), dtype=types[float]) x2 += einsum(t1, (0, 1), v.xoo, (2, 3, 0), (3, 1, 2)) - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x3 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x4 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x4 = np.zeros((nocc, nvir, naux), dtype=types[float]) x4 += einsum(x2, (0, 1, 2), (0, 1, 2)) x4 += einsum(v.xov, (0, 1, 2), x3, (1, 3, 4, 2), (3, 4, 0)) * -1.0 t1new += einsum(v.xvv, (0, 1, 2), x4, (3, 2, 0), (3, 1)) * -1.0 del x4 - x5 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x5 = np.zeros((nocc, nocc, naux), dtype=types[float]) x5 += einsum(t1, (0, 1), v.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc, nocc, naux), dtype=np.float64) + x6 = np.zeros((nocc, nocc, naux), dtype=types[float]) x6 += einsum(v.xoo, (0, 1, 2), (1, 2, 0)) x6 += einsum(x5, (0, 1, 2), (1, 0, 2)) - x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x7 += einsum(v.xov, (0, 1, 2), x6, (3, 4, 0), (4, 1, 3, 2)) del x6 t1new += einsum(x3, (0, 1, 2, 3), x7, (4, 0, 1, 3), (4, 2)) * -1.0 del x7 - x8 = np.zeros((nocc, nvir), dtype=np.float64) + x8 = np.zeros((nocc, nvir), dtype=types[float]) x8 += einsum(f.ov, (0, 1), (0, 1)) x8 += einsum(x1, (0, 1), (0, 1)) * 2.0 del x1 @@ -55,47 +56,47 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x5 t1new += einsum(x8, (0, 1), x3, (0, 2, 3, 1), (2, 3)) del x3, x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) x9 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x10 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x10 = np.zeros((nocc, nvir, naux), dtype=types[float]) x10 += einsum(v.xov, (0, 1, 2), x9, (1, 3, 4, 2), (3, 4, 0)) del x9 - x11 = np.zeros((nocc, nocc), dtype=np.float64) + x11 = np.zeros((nocc, nocc), dtype=types[float]) x11 += einsum(v.xov, (0, 1, 2), x10, (3, 2, 0), (1, 3)) - x12 = np.zeros((nocc, nocc), dtype=np.float64) + x12 = np.zeros((nocc, nocc), dtype=types[float]) x12 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x12 += einsum(x11, (0, 1), (0, 1)) t1new += einsum(t1, (0, 1), x12, (0, 2), (2, 1)) * -2.0 del x12 - x13 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x13 = np.zeros((nocc, nvir, naux), dtype=types[float]) x13 += einsum(v.xov, (0, 1, 2), t2, (3, 1, 2, 4), (3, 4, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(x13, (0, 1, 2), x13, (3, 4, 2), (0, 3, 1, 4)) - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(v.xov, (0, 1, 2), v.xov, (0, 3, 4), (1, 3, 2, 4)) t2new += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), x14, (1, 4, 5, 2), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x15, (4, 1, 5, 2), (0, 4, 5, 3)) - x16 = np.zeros((nvir, nvir, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nvir, nvir, nvir, nvir), dtype=types[float]) x16 += einsum(v.xvv, (0, 1, 2), v.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new += einsum(t2, (0, 1, 2, 3), x16, (4, 3, 5, 2), (0, 1, 4, 5)) del x16 - x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x17 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x17 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x19 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x19 = np.zeros((nocc, nvir, naux), dtype=types[float]) x19 += einsum(t1, (0, 1), v.xvv, (2, 3, 1), (0, 3, 2)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(v.xov, (0, 1, 2), x19, (3, 4, 0), (3, 1, 2, 4)) del x19 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(v.xoo, (0, 1, 2), v.xvv, (0, 3, 4), (1, 2, 3, 4)) - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(t2, (0, 1, 2, 3), x21, (4, 1, 5, 2), (0, 4, 3, 5)) - x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x23 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) del x17 x23 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -107,40 +108,40 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new += einsum(x23, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x23 - x24 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x24 = np.zeros((nocc, nvir, naux), dtype=types[float]) x24 += einsum(v.xov, (0, 1, 2), (1, 2, 0)) x24 += einsum(x13, (0, 1, 2), (0, 1, 2)) * -1.0 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(v.xov, (0, 1, 2), x24, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x24 - x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x26 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x26 += einsum(x21, (0, 1, 2, 3), (1, 0, 3, 2)) del x21 x26 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x15 x26 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x25 - x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x27 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x27 += einsum(t2, (0, 1, 2, 3), x26, (4, 1, 5, 3), (4, 0, 5, 2)) del x26 - x28 = np.zeros((nvir, nvir), dtype=np.float64) + x28 = np.zeros((nvir, nvir), dtype=types[float]) x28 += einsum(v.xov, (0, 1, 2), x10, (1, 3, 0), (2, 3)) del x10 - x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x29 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x29 += einsum(x28, (0, 1), t2, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x28 - x30 = np.zeros((nocc, nvir, naux), dtype=np.float64) + x30 = np.zeros((nocc, nvir, naux), dtype=types[float]) x30 += einsum(x2, (0, 1, 2), (0, 1, 2)) del x2 x30 += einsum(x13, (0, 1, 2), (0, 1, 2)) del x13 - x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x31 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x31 += einsum(v.xov, (0, 1, 2), x30, (3, 4, 0), (3, 1, 4, 2)) del x30 - x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x32 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x32 += einsum(x11, (0, 1), t2, (2, 0, 3, 4), (1, 2, 4, 3)) * 2.0 del x11 - x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x33 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x33 += einsum(x27, (0, 1, 2, 3), (1, 0, 3, 2)) del x27 x33 += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -152,15 +153,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x33, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x33 - x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x34 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x34 += einsum(x14, (0, 1, 2, 3), (1, 0, 2, 3)) x34 += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 - x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x35 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x35 += einsum(t2, (0, 1, 2, 3), x34, (1, 4, 5, 3), (0, 4, 2, 5)) del x34 t2new += einsum(t2, (0, 1, 2, 3), x35, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x35 - x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x36 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x36 += einsum(v.xoo, (0, 1, 2), v.xoo, (0, 3, 4), (1, 3, 4, 2)) x36 += einsum(t2, (0, 1, 2, 3), x14, (4, 5, 3, 2), (4, 0, 5, 1)) del x14 diff --git a/ebcc/codegen/RMP2.py b/ebcc/codegen/RMP2.py index f5644c09..849d49c2 100644 --- a/ebcc/codegen/RMP2.py +++ b/ebcc/codegen/RMP2.py @@ -2,10 +2,11 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) e_mp = 0 diff --git a/ebcc/codegen/RMP3.py b/ebcc/codegen/RMP3.py index be9311d2..74d8a302 100644 --- a/ebcc/codegen/RMP3.py +++ b/ebcc/codegen/RMP3.py @@ -2,22 +2,23 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x1 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x1 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 - x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x2 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x2 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x4 += einsum(x1, (0, 1, 2, 3), (0, 1, 3, 2)) x4 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x1 @@ -28,17 +29,17 @@ def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): e_mp = 0 e_mp += einsum(t2, (0, 1, 2, 3), x4, (0, 1, 3, 2), ()) * 2.0 del x4 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x5 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(t2, (0, 1, 2, 3), x5, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x5 e_mp += einsum(t2, (0, 1, 2, 3), x6, (0, 1, 2, 3), ()) * 4.0 del x6 - x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x7 += einsum(t2, (0, 1, 2, 3), t2, (4, 5, 2, 3), (0, 4, 5, 1)) - x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x8 += einsum(x7, (0, 1, 2, 3), (3, 1, 2, 0)) * -0.5 x8 += einsum(x7, (0, 1, 2, 3), (3, 2, 1, 0)) del x7 diff --git a/ebcc/codegen/RQCISD.py b/ebcc/codegen/RQCISD.py index d2c762d8..6ca8d693 100644 --- a/ebcc/codegen/RQCISD.py +++ b/ebcc/codegen/RQCISD.py @@ -2,10 +2,11 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x0 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) e_cc = 0 @@ -16,22 +17,22 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # T amplitudes - t1new = np.zeros((nocc, nvir), dtype=np.float64) + t1new = np.zeros((nocc, nvir), dtype=types[float]) t1new += einsum(f.vv, (0, 1), t1, (2, 1), (2, 0)) - t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + t2new = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) t2new += einsum(t2, (0, 1, 2, 3), v.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) * 2.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 t2new += einsum(t2, (0, 1, 2, 3), v.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 - x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=np.float64) + x0 = np.zeros((nocc, nvir, nvir, nvir), dtype=types[float]) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x0 += einsum(v.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 t1new += einsum(t2, (0, 1, 2, 3), x0, (1, 3, 2, 4), (0, 4)) * 2.0 del x0 - x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x1 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x1 += einsum(t1, (0, 1), v.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=np.float64) + x2 = np.zeros((nocc, nocc, nocc, nvir), dtype=types[float]) x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x2 += einsum(v.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -39,40 +40,40 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x1 t1new += einsum(t2, (0, 1, 2, 3), x2, (4, 1, 0, 2), (4, 3)) * -1.0 del x2 - x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x3 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -0.5 x3 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x4 = np.zeros((nocc, nvir), dtype=np.float64) + x4 = np.zeros((nocc, nvir), dtype=types[float]) x4 += einsum(f.ov, (0, 1), (0, 1)) x4 += einsum(t1, (0, 1), x3, (0, 2, 1, 3), (2, 3)) * 2.0 - x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x5 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 x5 += einsum(t2, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t1new += einsum(x4, (0, 1), x5, (0, 2, 3, 1), (2, 3)) del x4, x5 - x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x6 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x6 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x6 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 t1new += einsum(t1, (0, 1), x6, (0, 2, 1, 3), (2, 3)) * 2.0 del x6 - x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x7 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x7 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 - x8 = np.zeros((nocc, nocc), dtype=np.float64) + x8 = np.zeros((nocc, nocc), dtype=types[float]) x8 += einsum(f.oo, (0, 1), (0, 1)) * 0.5 x8 += einsum(t2, (0, 1, 2, 3), x7, (1, 4, 2, 3), (4, 0)) t1new += einsum(t1, (0, 1), x8, (0, 2), (2, 1)) * -2.0 del x8 - x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x9 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x9 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 5, 1, 2), (0, 4, 3, 5)) t2new += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x10 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x10 += einsum(f.oo, (0, 1), t2, (2, 1, 3, 4), (0, 2, 3, 4)) - x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x11 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x11 += einsum(f.vv, (0, 1), t2, (2, 3, 4, 1), (2, 3, 0, 4)) - x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x12 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x12 += einsum(t1, (0, 1), v.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x13 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x13 += einsum(x10, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x10 x13 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -82,25 +83,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) t2new += einsum(x13, (0, 1, 2, 3), (1, 0, 2, 3)) del x13 - x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x14 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x14 += einsum(t1, (0, 1), v.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x15 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x15 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 2, 5), (0, 4, 3, 5)) - x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x16 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x16 += einsum(t2, (0, 1, 2, 3), x15, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 del x15 - x17 = np.zeros((nvir, nvir), dtype=np.float64) + x17 = np.zeros((nvir, nvir), dtype=types[float]) x17 += einsum(t2, (0, 1, 2, 3), x7, (0, 1, 4, 2), (3, 4)) del x7 - x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x18 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x18 += einsum(x17, (0, 1), t2, (2, 3, 1, 4), (2, 3, 4, 0)) * 2.0 del x17 - x19 = np.zeros((nocc, nocc), dtype=np.float64) + x19 = np.zeros((nocc, nocc), dtype=types[float]) x19 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 3, 2), (0, 4)) - x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x20 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x20 += einsum(x19, (0, 1), t2, (2, 1, 3, 4), (2, 0, 4, 3)) * 2.0 del x19 - x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x21 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x21 += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) del x14 x21 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -112,25 +113,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new += einsum(x21, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x21 - x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x22 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x22 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 x22 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x22 += einsum(t2, (0, 1, 2, 3), x3, (1, 4, 3, 5), (0, 4, 2, 5)) * 4.0 del x3 t2new += einsum(t2, (0, 1, 2, 3), x22, (4, 1, 5, 3), (4, 0, 5, 2)) del x22 - x23 = np.zeros((nocc, nocc, nocc, nocc), dtype=np.float64) + x23 = np.zeros((nocc, nocc, nocc, nocc), dtype=types[float]) x23 += einsum(v.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x23 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 5, 3), (4, 0, 1, 5)) t2new += einsum(t2, (0, 1, 2, 3), x23, (0, 4, 5, 1), (5, 4, 3, 2)) del x23 - x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x24 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x24 += einsum(v.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x24 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) del x9 t2new += einsum(t2, (0, 1, 2, 3), x24, (4, 1, 5, 2), (4, 0, 5, 3)) del x24 - x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=np.float64) + x25 = np.zeros((nocc, nocc, nvir, nvir), dtype=types[float]) x25 += einsum(v.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x25 += einsum(t2, (0, 1, 2, 3), v.ovov, (4, 2, 1, 5), (0, 4, 3, 5)) t2new += einsum(t2, (0, 1, 2, 3), x25, (4, 1, 5, 2), (4, 0, 3, 5)) diff --git a/ebcc/codegen/UCC2.py b/ebcc/codegen/UCC2.py index a598c0c8..f99f4e4e 100644 --- a/ebcc/codegen/UCC2.py +++ b/ebcc/codegen/UCC2.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 2), ()) * -1.0 e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 2, 1, 3), ()) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x1 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(f.aa.ov, (0, 1), (0, 1)) x1 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) x1 += einsum(t1.aa, (0, 1), x0, (0, 2, 1, 3), (2, 3)) * -0.5 del x0 e_cc += einsum(t1.aa, (0, 1), x1, (0, 1), ()) del x1 - x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(f.bb.ov, (0, 1), (0, 1)) x3 += einsum(t1.bb, (0, 1), x2, (0, 2, 1, 3), (2, 3)) * -0.5 del x2 @@ -36,52 +37,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(f.aa.vv, (0, 1), t2.abab, (2, 3, 1, 4), (2, 3, 0, 4)) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new_abab += einsum(f.bb.vv, (0, 1), t2.abab, (2, 3, 4, 1), (2, 3, 4, 0)) - x0 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x2, (4, 0, 1, 3), (4, 2)) * 2.0 del x2 - x3 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x4 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x4 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 3, 0, 4), (4, 2)) * -1.0 del x4 - x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x5 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x5 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x5, (2, 3, 4, 1), (4, 0)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x5, (4, 3, 0, 1), (4, 2)) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x6 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x6, (0, 4, 3, 1), (4, 2)) * -2.0 del x6 - x7 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x7, (0, 1), (0, 1)) - x8 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x8 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x8 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x9 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), x8, (0, 2, 1, 3), (2, 3)) del x8 - x10 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x10 += einsum(f.bb.ov, (0, 1), (0, 1)) x10 += einsum(x7, (0, 1), (0, 1)) del x7 @@ -89,13 +90,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x9 t1new_aa += einsum(x10, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x10, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(t1.aa, (0, 1), x11, (0, 2, 1, 3), (2, 3)) del x11 - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(f.aa.ov, (0, 1), (0, 1)) x13 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -103,15 +104,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x12 t1new_aa += einsum(x13, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x13, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 del x14 - x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x15 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x16 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(f.aa.oo, (0, 1), (0, 1)) x16 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) x16 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (4, 0)) @@ -122,37 +123,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x13 t1new_aa += einsum(t1.aa, (0, 1), x16, (0, 2), (2, 1)) * -1.0 del x16 - x17 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(f.aa.vv, (0, 1), (0, 1)) x17 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 1, 2, 3), (2, 3)) t1new_aa += einsum(t1.aa, (0, 1), x17, (1, 2), (0, 2)) del x17 - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x19 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x19 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x19 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x19, (4, 0, 1, 3), (4, 2)) * 2.0 del x19 - x20 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x20 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (4, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x20, (1, 4, 0, 2), (4, 3)) * -1.0 del x20 - x21 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x21 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x21 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x21, (0, 4, 3, 1), (4, 2)) * -2.0 del x21 - x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x22 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x22, (0, 2, 1, 3), (2, 3)) * -1.0 del x22 - x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x23 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x24 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x24 += einsum(f.bb.oo, (0, 1), (0, 1)) * 0.5 x24 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) * 0.5 x24 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (4, 0)) * -1.0 @@ -163,69 +164,69 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x10 t1new_bb += einsum(t1.bb, (0, 1), x24, (0, 2), (2, 1)) * -2.0 del x24 - x25 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x25 += einsum(f.bb.vv, (0, 1), (0, 1)) x25 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(t1.bb, (0, 1), x25, (1, 2), (0, 2)) del x25 - x26 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(t1.aa, (0, 1), x26, (2, 3, 1, 4), (0, 2, 3, 4)) del x26 - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(f.aa.ov, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) - x29 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) del x1 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x30 += einsum(x29, (0, 1, 2, 3), (3, 1, 2, 0)) del x29 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 3, 4, 1)) del x30 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum(x28, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x28 x32 += einsum(x31, (0, 1, 2, 3), (1, 0, 2, 3)) del x31 - x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x33 += einsum(t1.aa, (0, 1), x32, (0, 2, 3, 4), (2, 3, 1, 4)) del x32 - x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) del x27 x34 += einsum(x33, (0, 1, 2, 3), (1, 0, 2, 3)) del x33 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x34 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x36 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), x36, (2, 3, 4, 0), (2, 4, 3, 1)) del x36 - x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x38 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x38 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) - x39 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x39 += einsum(t1.aa, (0, 1), x38, (2, 3, 1, 4), (0, 2, 3, 4)) del x38 - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x40 += einsum(x37, (0, 1, 2, 3), (0, 2, 1, 3)) del x37 x40 += einsum(x39, (0, 1, 2, 3), (0, 2, 1, 3)) del x39 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(t1.aa, (0, 1), x40, (2, 0, 3, 4), (2, 3, 1, 4)) del x40 - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) del x35 x42 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -235,44 +236,44 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x42, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x42 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x44 += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x43 t2new_aaaa += einsum(x44, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) del x44 - x45 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x45 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x46 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x46 += einsum(f.aa.oo, (0, 1), (0, 1)) x46 += einsum(x45, (0, 1), (0, 1)) del x45 t2new_abab += einsum(x46, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(x46, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x46 t2new_aaaa += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_aaaa += einsum(x47, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x47 - x48 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) t2new_abab += einsum(x48, (0, 1, 2, 3), (2, 0, 3, 1)) - x49 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x49 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) del x48 - x50 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x50 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x50 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x50 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x51 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x51 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x51 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 2, 0)) x51 += einsum(t1.bb, (0, 1), x50, (2, 1, 3, 4), (0, 2, 4, 3)) del x50 - x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x52 += einsum(f.bb.ov, (0, 1), t2.abab, (2, 3, 4, 1), (0, 3, 2, 4)) x52 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) @@ -282,15 +283,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x51 t2new_abab += einsum(t1.bb, (0, 1), x52, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x52 - x53 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x53 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) t2new_abab += einsum(t1.bb, (0, 1), x53, (1, 2, 3, 4), (3, 0, 4, 2)) del x53 - x54 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x54 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x54 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x54 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x55 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x55 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x55 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x55 += einsum(f.aa.ov, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 0, 2)) x55 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -299,71 +300,71 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x54 t2new_abab += einsum(t1.aa, (0, 1), x55, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x55 - x56 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x56 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x57 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x57 += einsum(f.bb.oo, (0, 1), (0, 1)) x57 += einsum(x56, (0, 1), (0, 1)) del x56 t2new_abab += einsum(x57, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - x58 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x58 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x59 += einsum(t1.bb, (0, 1), x58, (2, 3, 1, 4), (0, 2, 3, 4)) del x58 - x60 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x60 += einsum(f.bb.ov, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) - x61 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x61 += einsum(t1.bb, (0, 1), x18, (2, 3, 4, 1), (2, 0, 4, 3)) del x18 - x62 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x62 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x62 += einsum(x61, (0, 1, 2, 3), (3, 1, 2, 0)) del x61 - x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x63 += einsum(t1.bb, (0, 1), x62, (0, 2, 3, 4), (2, 3, 4, 1)) del x62 - x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x64 += einsum(x60, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x60 x64 += einsum(x63, (0, 1, 2, 3), (1, 0, 2, 3)) del x63 - x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(t1.bb, (0, 1), x64, (0, 2, 3, 4), (2, 3, 1, 4)) del x64 - x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) del x59 x66 += einsum(x65, (0, 1, 2, 3), (1, 0, 2, 3)) del x65 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x66, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x66 - x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x67 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x68 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x68 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x69 += einsum(t1.bb, (0, 1), x68, (2, 3, 4, 0), (2, 4, 3, 1)) del x68 - x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x70 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x70 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x70 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) - x71 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x71 += einsum(t1.bb, (0, 1), x70, (2, 3, 1, 4), (0, 2, 3, 4)) del x70 - x72 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x72 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x72 += einsum(x69, (0, 1, 2, 3), (0, 2, 1, 3)) del x69 x72 += einsum(x71, (0, 1, 2, 3), (0, 2, 1, 3)) del x71 - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(t1.bb, (0, 1), x72, (2, 0, 3, 4), (2, 3, 1, 4)) del x72 - x74 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x74 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) del x67 x74 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -373,15 +374,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x74, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x74, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x74 - x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x75 += einsum(x57, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x57 t2new_bbbb += einsum(x75, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_bbbb += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x75 - x76 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x76 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x77 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x77 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x77 += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x76 @@ -402,99 +403,99 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new = Namespace() # L amplitudes - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum(f.aa.ov, (0, 1), (1, 0)) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum(f.bb.ov, (0, 1), (1, 0)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) * 2.0 - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new_abab += einsum(l1.aa, (0, 1), v.aabb.vvov, (2, 0, 3, 4), (2, 4, 1, 3)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) l2new_abab += einsum(l1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 0), (3, 4, 2, 1)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x0, (4, 1, 2, 0), (3, 4)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_aa += einsum(v.aaaa.oovv, (0, 1, 2, 3), x1, (4, 0, 1, 3), (2, 4)) * -2.0 l2new_abab += einsum(v.aabb.ooov, (0, 1, 2, 3), x1, (4, 0, 1, 5), (5, 3, 4, 2)) * -2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x2, (4, 1, 0, 2), (3, 4)) * -2.0 l2new_aaaa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x2, (4, 5, 0, 2), (3, 1, 5, 4)) * 2.0 - x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) l1new_aa += einsum(v.aabb.vvoo, (0, 1, 2, 3), x3, (2, 3, 4, 1), (0, 4)) * -1.0 l2new_abab += einsum(v.aabb.vvov, (0, 1, 2, 3), x3, (4, 2, 5, 1), (0, 3, 5, 4)) * -1.0 - x4 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x4, (3, 1, 4, 0), (4, 2)) del x4 - x5 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x5, (3, 4, 0, 1), (4, 2)) * 2.0 del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_aa += einsum(x1, (0, 1, 2, 3), x6, (1, 2, 4, 3), (4, 0)) * 2.0 - x7 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) l2new_abab += einsum(x1, (0, 1, 2, 3), x7, (4, 5, 1, 2), (3, 5, 0, 4)) * -2.0 - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x9 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x9 += einsum(x8, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x9 += einsum(x8, (0, 1, 2, 3), (2, 0, 1, 3)) - x10 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x10 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x10 += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) - x11 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x12 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x12 += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x14 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x15 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), x14, (0, 2, 1, 3), (2, 3)) - x16 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x16 += einsum(f.aa.ov, (0, 1), (0, 1)) x16 += einsum(x13, (0, 1), (0, 1)) x16 += einsum(x15, (0, 1), (0, 1)) * -1.0 l2new_abab += einsum(l1.bb, (0, 1), x16, (2, 3), (3, 0, 2, 1)) - x17 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x18 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x18 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x18 += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) - x19 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x20 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 0, 4)) - x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x21 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x21, (0, 1, 2, 3), x3, (4, 0, 2, 5), (5, 1, 3, 4)) l2new_abab += einsum(l1.aa, (0, 1), x21, (2, 3, 1, 4), (0, 3, 4, 2)) * -1.0 - x22 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(t1.bb, (0, 1), x21, (2, 1, 3, 4), (0, 2, 3, 4)) - x23 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x23 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x23 += einsum(x19, (0, 1, 2, 3), (1, 0, 3, 2)) x23 += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) del x20 x23 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) del x22 - x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x24 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x24 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x24 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (4, 2, 5, 3), (1, 5, 0, 4)) @@ -508,27 +509,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x24 += einsum(t1.bb, (0, 1), x23, (0, 2, 3, 4), (2, 1, 4, 3)) * -1.0 l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x24, (3, 1, 2, 4), (0, 4)) * -1.0 del x24 - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x25 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x25 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) x25 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x26 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x26 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) del x6 - x27 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(t1.aa, (0, 1), x8, (2, 3, 4, 1), (0, 2, 3, 4)) - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x28 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x29 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x29 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 5, 2), (4, 0, 5, 1)) * -1.0 x29 += einsum(x27, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 x29 += einsum(x28, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 x29 += einsum(x28, (0, 1, 2, 3), (3, 0, 2, 1)) - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x30 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x30 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (4, 0, 1, 5)) * -0.5 x30 += einsum(t2.aaaa, (0, 1, 2, 3), x25, (4, 5, 1, 3), (5, 0, 4, 2)) * -1.0 @@ -542,42 +543,42 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x29 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x30, (4, 3, 2, 1), (0, 4)) * -4.0 del x30 - x31 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x31 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) * 2.0 x31 += einsum(t1.bb, (0, 1), x3, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 x31 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) * 2.0 l1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x31, (2, 3, 4, 1), (0, 4)) del x31 - x32 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x32 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x33 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) x33 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) * 4.0 l1new_aa += einsum(x32, (0, 1, 2, 3), x33, (4, 0, 3, 2), (1, 4)) del x33 - x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) l1new_bb += einsum(v.aabb.oovv, (0, 1, 2, 3), x34, (4, 3, 0, 1), (2, 4)) * -1.0 l2new_abab += einsum(v.aabb.ovvv, (0, 1, 2, 3), x34, (4, 3, 5, 0), (1, 2, 5, 4)) * -1.0 l2new_abab += einsum(x16, (0, 1), x34, (2, 3, 4, 0), (1, 3, 4, 2)) * -1.0 - x35 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(t1.bb, (0, 1), x34, (2, 1, 3, 4), (2, 0, 3, 4)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x36, (4, 2, 5, 0), (1, 3, 5, 4)) - x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) x37 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) - x38 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x39 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x39 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x40 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(x38, (0, 1), (0, 1)) x40 += einsum(x39, (0, 1), (0, 1)) * 2.0 - x41 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) x41 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) x41 += einsum(t2.bbbb, (0, 1, 2, 3), x34, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 @@ -587,26 +588,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x41 += einsum(t1.bb, (0, 1), x40, (2, 3), (0, 1, 2, 3)) l1new_aa += einsum(v.aabb.ovov, (0, 1, 2, 3), x41, (2, 3, 4, 0), (1, 4)) * -1.0 del x41 - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(l2.aaaa, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x42 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) l1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x42, (4, 0, 3, 1), (2, 4)) * -2.0 del x42 - x43 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x43 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x43 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) x43 += einsum(t1.bb, (0, 1), x34, (0, 2, 3, 4), (1, 2, 3, 4)) l1new_aa += einsum(v.aabb.ovvv, (0, 1, 2, 3), x43, (3, 2, 4, 0), (1, 4)) * -1.0 del x43 - x44 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x44 += einsum(t2.abab, (0, 1, 2, 3), x34, (1, 3, 4, 5), (4, 5, 0, 2)) - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x46 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x46 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x47 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x47 += einsum(x44, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 x47 += einsum(x45, (0, 1, 2, 3), (2, 0, 1, 3)) * 2.0 @@ -615,22 +616,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x47 += einsum(t1.aa, (0, 1), x40, (2, 3), (0, 2, 3, 1)) * 0.5 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x47, (2, 4, 0, 3), (1, 4)) * -2.0 del x47 - x48 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x49 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x50 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x51 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(x48, (0, 1), (0, 1)) x51 += einsum(x49, (0, 1), (0, 1)) x51 += einsum(x50, (0, 1), (0, 1)) * 2.0 - x52 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x52 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 l1new_aa += einsum(x51, (0, 1), x52, (2, 1, 0, 3), (3, 2)) * -1.0 del x51, x52 - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) x53 += einsum(x44, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x44 @@ -640,26 +641,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x40 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x53, (4, 2, 0, 1), (3, 4)) * 2.0 del x53 - x54 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x55 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.abab, (0, 1, 2, 3), x34, (1, 3, 0, 4), (4, 2)) - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x58 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x58 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) l2new_abab += einsum(x58, (0, 1), v.aabb.ovov, (1, 2, 3, 4), (2, 4, 0, 3)) * -1.0 - x59 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x59 += einsum(x58, (0, 1), (0, 1)) * 0.5 x59 += einsum(x38, (0, 1), (0, 1)) * 0.5 x59 += einsum(x39, (0, 1), (0, 1)) l1new_aa += einsum(f.aa.ov, (0, 1), x59, (2, 0), (1, 2)) * -2.0 - x60 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t1.aa, (0, 1), x59, (0, 2), (2, 1)) * 2.0 del x59 - x61 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x61 += einsum(x54, (0, 1), (0, 1)) * -1.0 x61 += einsum(x55, (0, 1), (0, 1)) * -2.0 @@ -668,45 +669,45 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x61 += einsum(x60, (0, 1), (0, 1)) l1new_aa += einsum(x61, (0, 1), x14, (0, 2, 1, 3), (3, 2)) del x14, x61 - x62 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x62 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x63 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x63 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x64 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x64 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x65 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x62, (0, 1), (0, 1)) * 0.5 x65 += einsum(x63, (0, 1), (0, 1)) x65 += einsum(x64, (0, 1), (0, 1)) * 0.5 l1new_aa += einsum(x65, (0, 1), v.aabb.ovvv, (2, 3, 1, 0), (3, 2)) * 2.0 del x65 - x66 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x66 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x67 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x67 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x68 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_bb += einsum(v.bbbb.oovv, (0, 1, 2, 3), x68, (4, 1, 0, 3), (2, 4)) * -2.0 l2new_abab += einsum(v.aabb.ovoo, (0, 1, 2, 3), x68, (4, 2, 3, 5), (1, 5, 0, 4)) * -2.0 l2new_abab += einsum(x11, (0, 1, 2, 3), x68, (4, 0, 1, 5), (3, 5, 2, 4)) * -2.0 - x69 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x69 += einsum(t2.bbbb, (0, 1, 2, 3), x68, (0, 1, 4, 3), (4, 2)) * -1.0 - x70 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x70 += einsum(t2.abab, (0, 1, 2, 3), x3, (1, 4, 0, 2), (4, 3)) - x71 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x71 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) l2new_abab += einsum(x71, (0, 1), v.aabb.ovov, (2, 3, 1, 4), (3, 4, 2, 0)) * -1.0 - x72 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x72 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x73 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x73 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x74 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x74 += einsum(x71, (0, 1), (0, 1)) x74 += einsum(x72, (0, 1), (0, 1)) * 2.0 x74 += einsum(x73, (0, 1), (0, 1)) l1new_aa += einsum(x74, (0, 1), v.aabb.ovoo, (2, 3, 0, 1), (3, 2)) * -1.0 l1new_bb += einsum(f.bb.ov, (0, 1), x74, (2, 0), (1, 2)) * -1.0 - x75 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x75 += einsum(l1.bb, (0, 1), (1, 0)) * -0.5 x75 += einsum(t1.bb, (0, 1), (0, 1)) * -0.5 x75 += einsum(x66, (0, 1), (0, 1)) * -1.0 @@ -716,52 +717,52 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x75 += einsum(t1.bb, (0, 1), x74, (0, 2), (2, 1)) * 0.5 l1new_aa += einsum(x75, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (3, 2)) * -2.0 del x75 - x76 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x76 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) x76 += einsum(x36, (0, 1, 2, 3), (1, 0, 2, 3)) l1new_aa += einsum(v.aabb.ovoo, (0, 1, 2, 3), x76, (2, 3, 4, 0), (1, 4)) del x76 - x77 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x77 += einsum(x58, (0, 1), (0, 1)) x77 += einsum(x38, (0, 1), (0, 1)) del x38 x77 += einsum(x39, (0, 1), (0, 1)) * 2.0 del x39 l1new_bb += einsum(x77, (0, 1), v.aabb.ooov, (0, 1, 2, 3), (3, 2)) * -1.0 - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x78 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 l1new_aa += einsum(x77, (0, 1), x78, (1, 0, 2, 3), (3, 2)) * -1.0 del x77 - x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_aa += einsum(l1.aa, (0, 1), x79, (1, 2, 0, 3), (3, 2)) * -1.0 del x79 - x80 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x81 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x81 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x82 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x82 += einsum(t1.aa, (0, 1), x81, (0, 2, 1, 3), (2, 3)) del x81 - x83 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x83 += einsum(f.aa.vv, (0, 1), (0, 1)) x83 += einsum(x80, (0, 1), (1, 0)) x83 += einsum(x82, (0, 1), (1, 0)) * -1.0 l1new_aa += einsum(l1.aa, (0, 1), x83, (0, 2), (2, 1)) l2new_abab += einsum(x83, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) del x83 - x84 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x84 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x85 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x85 += einsum(t1.aa, (0, 1), x78, (0, 2, 3, 1), (2, 3)) del x78 - x86 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x86 += einsum(t1.aa, (0, 1), x16, (2, 1), (0, 2)) del x16 - x87 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x87 += einsum(f.aa.oo, (0, 1), (0, 1)) x87 += einsum(x84, (0, 1), (1, 0)) x87 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) @@ -770,51 +771,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x87 += einsum(x86, (0, 1), (0, 1)) l1new_aa += einsum(l1.aa, (0, 1), x87, (1, 2), (0, 2)) * -1.0 del x87 - x88 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x88 += einsum(x13, (0, 1), (0, 1)) del x13 x88 += einsum(x15, (0, 1), (0, 1)) * -1.0 del x15 l1new_aa += einsum(x58, (0, 1), x88, (1, 2), (2, 0)) * -1.0 - x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x89 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_bb += einsum(x68, (0, 1, 2, 3), x89, (1, 2, 4, 3), (4, 0)) * 2.0 - x90 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x90, (4, 1, 2, 0), (4, 3)) del x90 - x91 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x91 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x91, (3, 4, 0, 1), (4, 2)) * 2.0 del x91 - x92 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x92 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x93 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x93 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x93 += einsum(x92, (0, 1, 2, 3), (1, 0, 2, 3)) x93 += einsum(x92, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x94 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x94 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x95 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x96 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x96 += einsum(t1.bb, (0, 1), x95, (0, 2, 1, 3), (2, 3)) - x97 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x97 += einsum(f.bb.ov, (0, 1), (0, 1)) x97 += einsum(x94, (0, 1), (0, 1)) x97 += einsum(x96, (0, 1), (0, 1)) * -1.0 l2new_abab += einsum(x97, (0, 1), x3, (2, 0, 3, 4), (4, 1, 3, 2)) * -1.0 l2new_abab += einsum(l1.aa, (0, 1), x97, (2, 3), (0, 3, 1, 2)) - x98 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x98 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) - x99 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x99 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x99 += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) del x98 l2new_abab += einsum(l2.aaaa, (0, 1, 2, 3), x99, (4, 5, 3, 1), (0, 5, 2, 4)) * 2.0 - x100 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x100 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x100 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) x100 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 5, 3), (1, 5, 0, 4)) @@ -829,32 +830,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x23 l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x100, (3, 4, 2, 0), (1, 4)) * -1.0 del x100 - x101 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x101 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x101 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x101 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x101 += einsum(x92, (0, 1, 2, 3), (0, 2, 1, 3)) - x102 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x102 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x102, (0, 1, 2, 3), x34, (0, 4, 5, 2), (3, 4, 5, 1)) l2new_abab += einsum(l1.bb, (0, 1), x102, (1, 2, 3, 4), (4, 0, 3, 2)) * -1.0 - x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x103 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x103 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x103 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 - x104 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x104 += einsum(t1.bb, (0, 1), x92, (2, 3, 4, 1), (0, 2, 3, 4)) - x105 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x106 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x106 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x106 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 5, 2), (4, 0, 5, 1)) * -1.0 x106 += einsum(x104, (0, 1, 2, 3), (3, 1, 2, 0)) x106 += einsum(x105, (0, 1, 2, 3), (2, 1, 3, 0)) x106 += einsum(x105, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x107 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x107 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x107 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (4, 0, 1, 5)) * -1.0 x107 += einsum(t2.bbbb, (0, 1, 2, 3), x101, (4, 1, 5, 3), (5, 0, 4, 2)) * -2.0 @@ -868,27 +869,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x106 l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x107, (4, 2, 3, 1), (0, 4)) * 2.0 del x107 - x108 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x108 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) * 0.5 x108 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) x108 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) x108 += einsum(t1.aa, (0, 1), x34, (2, 3, 0, 4), (2, 3, 4, 1)) * -0.5 l1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x108, (4, 3, 0, 1), (2, 4)) * 2.0 del x108 - x109 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x109 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x109 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) x110 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) * 0.25 l1new_bb += einsum(x109, (0, 1, 2, 3), x110, (4, 0, 2, 1), (3, 4)) * 4.0 del x110 - x111 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x111 += einsum(x72, (0, 1), (0, 1)) del x72 x111 += einsum(x73, (0, 1), (0, 1)) * 0.5 del x73 - x112 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x112 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) x112 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x112 += einsum(t2.abab, (0, 1, 2, 3), x68, (4, 1, 5, 3), (4, 5, 0, 2)) * -2.0 @@ -899,24 +900,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x112 += einsum(t1.aa, (0, 1), x111, (2, 3), (2, 3, 0, 1)) * 2.0 l1new_bb += einsum(v.aabb.ovov, (0, 1, 2, 3), x112, (4, 2, 0, 1), (3, 4)) * -1.0 del x112 - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(l2.bbbb, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x113 += einsum(t1.bb, (0, 1), x68, (2, 0, 3, 4), (2, 3, 4, 1)) l1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x113, (4, 0, 3, 1), (2, 4)) * -2.0 del x113 - x114 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x114 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) x114 += einsum(t1.aa, (0, 1), x3, (2, 3, 0, 4), (2, 3, 1, 4)) l1new_bb += einsum(v.aabb.vvov, (0, 1, 2, 3), x114, (4, 2, 1, 0), (3, 4)) * -1.0 del x114 - x115 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x115 += einsum(t2.bbbb, (0, 1, 2, 3), x68, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x116 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x116 += einsum(t1.bb, (0, 1), x68, (2, 3, 4, 1), (2, 3, 0, 4)) l2new_bbbb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x116, (4, 5, 0, 2), (3, 1, 5, 4)) * 2.0 - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x117 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 0, 2), (4, 5, 1, 3)) - x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x118 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) x118 += einsum(x68, (0, 1, 2, 3), (1, 0, 2, 3)) x118 += einsum(x115, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 @@ -925,7 +926,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x118 += einsum(t1.bb, (0, 1), x111, (2, 3), (2, 0, 3, 1)) l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x118, (4, 0, 2, 1), (3, 4)) * -2.0 del x118 - x119 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x119 += einsum(x62, (0, 1), (0, 1)) del x62 x119 += einsum(x63, (0, 1), (0, 1)) * 2.0 @@ -934,9 +935,9 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x64 l1new_bb += einsum(x119, (0, 1), x109, (2, 1, 0, 3), (3, 2)) * -1.0 del x119 - x120 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x120 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x121 += einsum(x115, (0, 1, 2, 3), (0, 2, 1, 3)) * 4.0 del x115 x121 += einsum(t1.bb, (0, 1), x120, (2, 0, 3, 4), (2, 4, 3, 1)) * -2.0 @@ -946,7 +947,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x111 l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x121, (4, 0, 2, 3), (1, 4)) del x121 - x122 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x122 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x122 += einsum(x66, (0, 1), (0, 1)) * -2.0 del x66 @@ -959,7 +960,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x122 += einsum(t1.bb, (0, 1), x74, (0, 2), (2, 1)) l1new_bb += einsum(x122, (0, 1), x95, (0, 2, 1, 3), (3, 2)) del x95, x122 - x123 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x123 += einsum(x48, (0, 1), (0, 1)) * 0.5 del x48 x123 += einsum(x49, (0, 1), (0, 1)) * 0.5 @@ -968,7 +969,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x50 l1new_bb += einsum(x123, (0, 1), v.aabb.vvov, (0, 1, 2, 3), (3, 2)) * 2.0 del x123 - x124 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x124 += einsum(l1.aa, (0, 1), (1, 0)) * -1.0 x124 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x124 += einsum(x54, (0, 1), (0, 1)) * -1.0 @@ -983,39 +984,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x60 l1new_bb += einsum(x124, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (3, 2)) * -1.0 del x124 - x125 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x125 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) del x35 x125 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) del x36 l1new_bb += einsum(v.aabb.ooov, (0, 1, 2, 3), x125, (4, 2, 1, 0), (3, 4)) del x125 - x126 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x126 += einsum(x120, (0, 1, 2, 3), (1, 0, 3, 2)) del x120 x126 += einsum(x116, (0, 1, 2, 3), (2, 1, 0, 3)) del x116 l1new_bb += einsum(v.bbbb.ooov, (0, 1, 2, 3), x126, (0, 4, 1, 2), (3, 4)) * 2.0 del x126 - x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x127 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x127 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) l1new_bb += einsum(x74, (0, 1), x127, (0, 2, 1, 3), (3, 2)) * -1.0 del x74 l2new_abab += einsum(x127, (0, 1, 2, 3), x3, (0, 2, 4, 5), (5, 3, 4, 1)) * -1.0 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x128 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_bb += einsum(l1.bb, (0, 1), x128, (1, 2, 0, 3), (3, 2)) * -1.0 del x128 - x129 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x130 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x131 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x131 += einsum(t1.bb, (0, 1), x130, (0, 2, 1, 3), (2, 3)) - x132 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x132 += einsum(f.bb.vv, (0, 1), (0, 1)) x132 += einsum(x129, (0, 1), (1, 0)) x132 += einsum(x131, (0, 1), (1, 0)) * -1.0 @@ -1023,18 +1024,18 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l1new_bb += einsum(l1.bb, (0, 1), x132, (0, 2), (2, 1)) l2new_abab += einsum(x132, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) del x132 - x133 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x134 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x134 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x135 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), x134, (2, 3, 0, 1), (2, 3)) del x134 - x136 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x136 += einsum(t1.bb, (0, 1), x97, (2, 1), (0, 2)) del x97 - x137 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x137 += einsum(f.bb.oo, (0, 1), (0, 1)) x137 += einsum(x133, (0, 1), (1, 0)) x137 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 1, 3), (0, 4)) * 2.0 @@ -1043,31 +1044,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x137 += einsum(x136, (0, 1), (0, 1)) l1new_bb += einsum(l1.bb, (0, 1), x137, (1, 2), (0, 2)) * -1.0 del x137 - x138 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x138 += einsum(x94, (0, 1), (0, 1)) del x94 x138 += einsum(x96, (0, 1), (0, 1)) * -1.0 del x96 l1new_bb += einsum(x138, (0, 1), x71, (2, 0), (1, 2)) * -1.0 - x139 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x139 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x140 += einsum(x139, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) del x139 - x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x141 += einsum(l2.aaaa, (0, 1, 2, 3), x28, (3, 4, 2, 5), (4, 5, 0, 1)) * -1.0 del x28 - x142 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x142 += einsum(t1.aa, (0, 1), x88, (2, 1), (0, 2)) - x143 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x143 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x143 += einsum(x84, (0, 1), (1, 0)) x143 += einsum(x85, (0, 1), (0, 1)) * -1.0 x143 += einsum(x142, (0, 1), (0, 1)) del x142 - x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x144 += einsum(x143, (0, 1), l2.aaaa, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x143 - x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum(x140, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x140 x145 += einsum(x141, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1077,23 +1078,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x145, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x145, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x145 - x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x146 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x147 += einsum(f.aa.ov, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x148 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x1, (4, 5, 0, 3), (5, 4, 1, 2)) - x149 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x149 += einsum(x80, (0, 1), (1, 0)) del x80 x149 += einsum(x82, (0, 1), (0, 1)) * -1.0 del x82 - x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x150 += einsum(x149, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x149 - x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x151 += einsum(x88, (0, 1), x1, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 - x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x152 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x152 += einsum(x146, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x146 @@ -1108,58 +1109,58 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x152, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new_aaaa += einsum(x152, (0, 1, 2, 3), (2, 3, 0, 1)) del x152 - x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x153 += einsum(l1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x154 += einsum(x58, (0, 1), v.aaaa.ovov, (2, 3, 1, 4), (0, 2, 3, 4)) del x58 - x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x155 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x3, (2, 3, 4, 5), (4, 0, 5, 1)) - x156 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x156 += einsum(x11, (0, 1, 2, 3), x3, (0, 1, 4, 5), (4, 2, 5, 3)) del x11 - x157 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x157 += einsum(t1.aa, (0, 1), x32, (2, 3, 1, 4), (0, 2, 3, 4)) - x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x158 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x158 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x158 += einsum(x157, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x157 - x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x159 += einsum(l2.aaaa, (0, 1, 2, 3), x158, (3, 4, 5, 1), (4, 2, 5, 0)) * 2.0 del x158 - x160 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x160 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x161 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x161 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x161 += einsum(x160, (0, 1, 2, 3), (0, 1, 2, 3)) del x160 l2new_abab += einsum(l2.bbbb, (0, 1, 2, 3), x161, (3, 1, 4, 5), (5, 0, 4, 2)) * 2.0 - x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x162 += einsum(l2.abab, (0, 1, 2, 3), x161, (3, 1, 4, 5), (4, 2, 5, 0)) del x161 - x163 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x163 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) x163 += einsum(x8, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x163, (0, 1, 2, 3), x34, (4, 5, 0, 2), (3, 5, 1, 4)) * -1.0 - x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x164 += einsum(x1, (0, 1, 2, 3), x163, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x163 - x165 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x165 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x165 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x165, (0, 1, 2, 3), x34, (4, 5, 0, 1), (3, 5, 2, 4)) * -1.0 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum(x1, (0, 1, 2, 3), x165, (0, 2, 4, 5), (4, 1, 5, 3)) * 2.0 del x1, x165 - x167 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x167 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x167 += einsum(x8, (0, 1, 2, 3), (0, 1, 2, 3)) del x8 - x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x168 += einsum(l1.aa, (0, 1), x167, (1, 2, 3, 4), (2, 3, 4, 0)) del x167 - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum(f.aa.ov, (0, 1), l1.aa, (2, 3), (0, 3, 1, 2)) x169 += einsum(x153, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x153 @@ -1186,43 +1187,43 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x169, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x169, (0, 1, 2, 3), (3, 2, 1, 0)) del x169 - x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x170 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x170, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x170, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x170 - x171 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x171 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x171 += einsum(x27, (0, 1, 2, 3), (0, 2, 3, 1)) del x27 l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x171, (3, 4, 5, 2), (0, 1, 5, 4)) * 2.0 del x171 - x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x172 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x172 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x172 += einsum(t1.bb, (0, 1), x130, (2, 3, 1, 4), (0, 2, 4, 3)) * -1.0 del x130 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x172, (3, 4, 1, 5), (0, 5, 2, 4)) * -1.0 del x172 - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x173 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x173 += einsum(t1.aa, (0, 1), x32, (2, 1, 3, 4), (0, 2, 4, 3)) * -1.0 del x32 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x173, (2, 4, 0, 5), (5, 1, 4, 3)) * -1.0 del x173 - x174 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x174 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x174, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x174 - x175 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x175 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x175 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x175 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) del x17 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x175, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x175 - x176 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x176 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x176 += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) del x19 @@ -1230,12 +1231,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x10 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x176, (3, 4, 2, 5), (0, 1, 5, 4)) del x176 - x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x177 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) x177 += einsum(x92, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x177, (0, 1, 2, 3), x3, (0, 2, 4, 5), (5, 3, 4, 1)) * -1.0 del x3, x177 - x178 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x178 += einsum(f.aa.oo, (0, 1), (0, 1)) x178 += einsum(x84, (0, 1), (1, 0)) del x84 @@ -1245,7 +1246,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x86 l2new_abab += einsum(x178, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x178 - x179 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x179 += einsum(f.bb.oo, (0, 1), (0, 1)) x179 += einsum(x133, (0, 1), (1, 0)) x179 += einsum(x135, (0, 1), (1, 0)) * -1.0 @@ -1253,27 +1254,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x136 l2new_abab += einsum(x179, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x179 - x180 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x180 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum(x180, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) del x180 - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum(l2.bbbb, (0, 1, 2, 3), x105, (2, 3, 4, 5), (4, 5, 0, 1)) del x105 - x183 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x183 += einsum(t1.bb, (0, 1), x138, (2, 1), (2, 0)) - x184 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x184 += einsum(x133, (0, 1), (1, 0)) del x133 x184 += einsum(x135, (0, 1), (1, 0)) * -1.0 del x135 x184 += einsum(x183, (0, 1), (1, 0)) del x183 - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum(x184, (0, 1), l2.bbbb, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x184 - x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x186 += einsum(x181, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x181 x186 += einsum(x182, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1283,29 +1284,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x186, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x186, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x186 - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum(f.bb.ov, (0, 1), x68, (2, 3, 0, 4), (2, 3, 1, 4)) - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x68, (4, 5, 0, 3), (5, 4, 1, 2)) - x190 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x190 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x190 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x191 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x191 += einsum(t1.bb, (0, 1), x190, (0, 1, 2, 3), (2, 3)) del x190 - x192 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x192 += einsum(x129, (0, 1), (1, 0)) del x129 x192 += einsum(x191, (0, 1), (1, 0)) * -1.0 del x191 - x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum(x192, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x192 - x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x194 += einsum(x138, (0, 1), x68, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x195 += einsum(x187, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x187 @@ -1320,47 +1321,47 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x195, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 l2new_bbbb += einsum(x195, (0, 1, 2, 3), (2, 3, 0, 1)) del x195 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum(l1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum(x71, (0, 1), v.bbbb.ovov, (2, 3, 1, 4), (0, 2, 3, 4)) del x71 - x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum(v.aabb.ooov, (0, 1, 2, 3), x34, (4, 5, 0, 1), (4, 2, 5, 3)) - x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x199 += einsum(x34, (0, 1, 2, 3), x7, (4, 5, 2, 3), (0, 4, 1, 5)) del x7, x34 - x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x200 += einsum(t1.bb, (0, 1), x109, (2, 1, 3, 4), (0, 2, 3, 4)) del x109 - x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x201 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x201 += einsum(x200, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x200 - x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x202 += einsum(l2.bbbb, (0, 1, 2, 3), x201, (3, 4, 5, 1), (4, 2, 5, 0)) * 2.0 del x201 - x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x203 += einsum(l2.abab, (0, 1, 2, 3), x99, (4, 5, 2, 0), (3, 4, 1, 5)) del x99 - x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x204 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x204 += einsum(x92, (0, 1, 2, 3), (0, 2, 1, 3)) - x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x205 += einsum(x204, (0, 1, 2, 3), x68, (0, 4, 1, 5), (2, 4, 3, 5)) * 2.0 del x204 - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum(x127, (0, 1, 2, 3), x68, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x68, x127 - x207 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x207 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x207 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) del x92 - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(l1.bb, (0, 1), x207, (1, 2, 3, 4), (2, 3, 4, 0)) del x207 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum(f.bb.ov, (0, 1), l1.bb, (2, 3), (0, 3, 1, 2)) x209 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x196 @@ -1387,12 +1388,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x209, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x209, (0, 1, 2, 3), (3, 2, 1, 0)) del x209 - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x210, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x210, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x210 - x211 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x211 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x211 += einsum(x104, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x104 @@ -1415,57 +1416,57 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_aa_ov += einsum(t1.aa, (0, 1), (0, 1)) rdm1_f_aa_ov += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) rdm1_f_aa_ov += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) * 2.0 - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_bb_ov += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_bb_ov += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) rdm1_f_bb_ov += einsum(t1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_aa_vo += einsum(l1.aa, (0, 1), (0, 1)) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_bb_vo += einsum(l1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x0, (0, 1), (1, 0)) * -2.0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm1_f_aa_oo += einsum(x2, (0, 1), (1, 0)) * -1.0 - x3 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x3 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) rdm1_f_bb_oo += einsum(x3, (0, 1), (1, 0)) * -2.0 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm1_f_bb_oo += einsum(x4, (0, 1), (1, 0)) * -1.0 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) rdm1_f_bb_oo += einsum(x5, (0, 1), (1, 0)) * -1.0 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) rdm1_f_aa_ov += einsum(t2.abab, (0, 1, 2, 3), x6, (1, 3, 0, 4), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_aa_ov += einsum(t2.aaaa, (0, 1, 2, 3), x7, (1, 0, 4, 3), (4, 2)) * -2.0 del x7 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(x2, (0, 1), (0, 1)) * 0.5 del x2 x8 += einsum(x1, (0, 1), (0, 1)) * 0.5 @@ -1474,15 +1475,15 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x0 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), x8, (0, 2), (2, 1)) * -2.0 del x8 - x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.bbbb, (0, 1, 2, 3), x9, (0, 1, 4, 3), (4, 2)) * 2.0 del x9 - x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) rdm1_f_bb_ov += einsum(t2.abab, (0, 1, 2, 3), x10, (1, 4, 0, 2), (4, 3)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(x4, (0, 1), (0, 1)) del x4 x11 += einsum(x3, (0, 1), (0, 1)) * 2.0 @@ -1508,174 +1509,174 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovoo += einsum(delta.aa.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vooo += einsum(delta.bb.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(l1.bb, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(l1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovvv += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vovv += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 3, 4), (0, 2, 3, 4)) - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvov += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_aaaa_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_aaaa_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(x3, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 2, 1)) * -1.0 - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x7, (0, 1, 2, 3), (3, 1, 2, 0)) - x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) rdm2_f_abab_ovoo += einsum(x8, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(t1.bb, (0, 1), x8, (0, 2, 3, 4), (4, 2, 3, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 4, 0, 5), (5, 4, 2, 3)) * -1.0 - x9 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), x8, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_abab_oooo += einsum(x9, (0, 1, 2, 3), (3, 1, 2, 0)) - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum(delta.aa.oo, (0, 1), (0, 1)) * -1.0 x10 += einsum(x6, (0, 1), (0, 1)) x10 += einsum(x3, (0, 1), (0, 1)) x10 += einsum(x4, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 2, 1)) * -1.0 - x12 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x12 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum(x11, (0, 1), (0, 1)) * 0.5 x14 += einsum(x12, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) * 0.5 rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * -2.0 del x14 - x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x15, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_bbbb_ovoo += einsum(x16, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x16, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t1.bb, (0, 1), x16, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_bbbb_oooo += einsum(x17, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(x12, (0, 1), (0, 1)) x18 += einsum(x13, (0, 1), (0, 1)) * 0.5 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 2, 1)) * -2.0 - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ooov += einsum(x19, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oovo += einsum(x19, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 3, 4, 5), (4, 5, 0, 2)) - x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(x6, (0, 1), (0, 1)) * 0.5 x22 += einsum(x3, (0, 1), (0, 1)) * 0.5 del x3 x22 += einsum(x4, (0, 1), (0, 1)) del x4 - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x22, (2, 3), (3, 0, 2, 1)) * -2.0 rdm2_f_abab_oovv += einsum(x22, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(delta.aa.oo, (0, 1), t1.aa, (2, 3), (0, 1, 2, 3)) x23 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 @@ -1685,17 +1686,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovo += einsum(x23, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovo += einsum(x23, (0, 1, 2, 3), (2, 0, 3, 1)) del x23 - x24 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x25 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x26 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 3, 0, 4), (4, 2)) - x27 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x28 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(t1.aa, (0, 1), x22, (0, 2), (2, 1)) * 2.0 - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(x24, (0, 1), (0, 1)) * -1.0 x29 += einsum(x25, (0, 1), (0, 1)) * -2.0 x29 += einsum(x26, (0, 1), (0, 1)) @@ -1706,38 +1707,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_ooov += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (2, 0, 1, 3)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (0, 2, 3, 1)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (2, 0, 3, 1)) * -1.0 - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oovo += einsum(delta.bb.oo, (0, 1), x29, (2, 3), (2, 0, 3, 1)) * -1.0 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x30 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x30, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_aaaa_ooov += einsum(x31, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_oovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x31 - x32 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) rdm2_f_abab_vooo += einsum(x32, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(t1.aa, (0, 1), x32, (2, 3, 0, 4), (4, 3, 1, 2)) * -1.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x32, (1, 4, 0, 5), (5, 4, 2, 3)) * -1.0 - x33 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(t2.abab, (0, 1, 2, 3), x32, (1, 4, 5, 2), (4, 3, 5, 0)) rdm2_f_abab_ooov += einsum(x33, (0, 1, 2, 3), (3, 0, 2, 1)) - x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t2.bbbb, (0, 1, 2, 3), x8, (1, 3, 4, 5), (0, 2, 4, 5)) rdm2_f_abab_ooov += einsum(x34, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x35 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 0, 5, 2), (1, 3, 4, 5)) * -1.0 rdm2_f_abab_ooov += einsum(x35, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x36 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) rdm2_f_abab_ooov += einsum(x36, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x37 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1745,20 +1746,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x37, (0, 2, 3, 4), (4, 2, 3, 1)) rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x37, (2, 3, 0, 4), (4, 3, 1, 2)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x37, (1, 4, 0, 5), (5, 4, 2, 3)) - x38 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x39 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x39 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x40 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x40 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * -1.0 - x41 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x41 += einsum(t2.abab, (0, 1, 2, 3), x32, (1, 4, 0, 2), (4, 3)) - x42 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x42 += einsum(x11, (0, 1), (0, 1)) x42 += einsum(x12, (0, 1), (0, 1)) * 2.0 x42 += einsum(x13, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x42, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - x43 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x43 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x43 += einsum(x38, (0, 1), (0, 1)) * -2.0 x43 += einsum(x39, (0, 1), (0, 1)) * -1.0 @@ -1767,15 +1768,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x43 += einsum(t1.bb, (0, 1), x42, (0, 2), (2, 1)) rdm2_f_abab_ooov += einsum(delta.aa.oo, (0, 1), x43, (2, 3), (0, 2, 1, 3)) * -1.0 del x43 - x44 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x44 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ooov += einsum(x44, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oovo += einsum(x44, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x45 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x45 += einsum(t1.bb, (0, 1), x42, (0, 2), (2, 1)) * 0.5 - x46 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x46 += einsum(x38, (0, 1), (0, 1)) * -1.0 x46 += einsum(x39, (0, 1), (0, 1)) * -0.5 x46 += einsum(x40, (0, 1), (0, 1)) @@ -1785,11 +1786,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_ooov += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (2, 0, 1, 3)) * 2.0 rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (0, 2, 3, 1)) * 2.0 rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (2, 0, 3, 1)) * -2.0 - x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x47 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x48 += einsum(t2.abab, (0, 1, 2, 3), x32, (4, 5, 0, 2), (4, 5, 1, 3)) - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum(delta.bb.oo, (0, 1), t1.bb, (2, 3), (0, 1, 2, 3)) x49 += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 x49 += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1800,30 +1801,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovo += einsum(x49, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovo += einsum(x49, (0, 1, 2, 3), (2, 0, 3, 1)) del x49 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x50 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) del x15 x50 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x50, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_bbbb_ooov += einsum(x51, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_oovo += einsum(x51, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x51 - x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.abab, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 rdm2_f_abab_oovo += einsum(x52, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x53 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 3, 0, 5), (4, 1, 5, 2)) rdm2_f_abab_oovo += einsum(x53, (0, 1, 2, 3), (2, 1, 3, 0)) - x54 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.aaaa, (0, 1, 2, 3), x32, (4, 5, 1, 3), (4, 5, 0, 2)) rdm2_f_abab_oovo += einsum(x54, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x55 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) rdm2_f_abab_oovo += einsum(x55, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x56 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x56 += einsum(delta.bb.oo, (0, 1), (0, 1)) * -0.5 x56 += einsum(x11, (0, 1), (0, 1)) * 0.5 x56 += einsum(x12, (0, 1), (0, 1)) @@ -1832,23 +1833,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x13 rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x56, (2, 3), (0, 3, 1, 2)) * -2.0 del x56 - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x57, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x57, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x57, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x57, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(t2.aaaa, (0, 1, 2, 3), x57, (1, 4, 3, 5), (4, 0, 5, 2)) - x59 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x59 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x59 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x21 - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum(t1.aa, (0, 1), x59, (0, 2, 3, 4), (2, 3, 1, 4)) del x59 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x58 x61 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1860,13 +1861,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x61, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_aaaa_oovv += einsum(x61, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x61 - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(x6, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) del x6 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(x5, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x5 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(x62, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x62 x64 += einsum(x63, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1874,29 +1875,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (1, 0, 2, 3)) del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), x19, (0, 2, 3, 4), (2, 3, 1, 4)) del x19 - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x66, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x66, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x66, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x66, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(t2.aaaa, (0, 1, 2, 3), x66, (1, 4, 3, 5), (0, 4, 2, 5)) - x68 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x69 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x70 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(x68, (0, 1), (0, 1)) x70 += einsum(x69, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oovv += einsum(x70, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 - x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(x70, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x70 - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x65 x72 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -1906,44 +1907,44 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x72, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x72 - x73 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) rdm2_f_abab_ovvo += einsum(x73, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(t2.abab, (0, 1, 2, 3), x73, (1, 3, 4, 5), (4, 0, 5, 2)) - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) x75 += einsum(x74, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x74 rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) del x75 - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 4, 3, 1)) del x30 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), x76, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x76 - x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x77, (1, 4, 2, 5), (0, 4, 5, 3)) rdm2_f_abab_vovo += einsum(x77, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x77, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x77 - x78 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) rdm2_f_abab_ovvo += einsum(x78, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x79 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x79, (1, 3, 4, 5), (4, 0, 5, 2)) * 4.0 del x79 - x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) del x57 x80 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x66 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x80, (0, 4, 2, 5), (4, 1, 5, 3)) - x81 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x55 x81 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1956,15 +1957,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x37 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x81, (0, 2, 3, 4), (3, 2, 4, 1)) * -2.0 del x81 - x82 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x83 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x84 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(x82, (0, 1), (0, 1)) x84 += einsum(x83, (0, 1), (0, 1)) * 0.5 rdm2_f_abab_oovv += einsum(x84, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 - x85 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x85 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x85 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) del x36 x85 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -1975,7 +1976,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x35 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x85, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x85 - x86 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x86 += einsum(t1.bb, (0, 1), (0, 1)) * -0.5 x86 += einsum(x38, (0, 1), (0, 1)) * -1.0 del x38 @@ -1989,7 +1990,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x45 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x86, (2, 3), (0, 2, 1, 3)) * -2.0 del x86 - x87 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(x24, (0, 1), (0, 1)) * -0.5 del x24 x87 += einsum(x25, (0, 1), (0, 1)) * -1.0 @@ -2002,26 +2003,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x22 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x87, (2, 3), (2, 0, 3, 1)) * -2.0 del x87 - x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x88 += einsum(t1.bb, (0, 1), x44, (0, 2, 3, 4), (2, 3, 1, 4)) del x44 - x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x89 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_bbbb_ovov += einsum(x89, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x89, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x89, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x89, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x90 += einsum(t2.bbbb, (0, 1, 2, 3), x89, (1, 4, 3, 5), (4, 0, 5, 2)) - x91 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x91 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x91, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(t2.abab, (0, 1, 2, 3), x91, (4, 5, 0, 2), (1, 4, 3, 5)) - x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum(x84, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -4.0 del x84 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x88 x94 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2033,13 +2034,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x94, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x94 - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(x11, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) del x11 - x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(x18, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 del x18 - x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x95 x97 += einsum(x96, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2047,20 +2048,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x97, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_bbbb_oovv += einsum(x97, (0, 1, 2, 3), (1, 0, 2, 3)) del x97 - x98 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x98 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x98, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x99 += einsum(t2.abab, (0, 1, 2, 3), x98, (4, 5, 0, 2), (4, 1, 5, 3)) - x100 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x100 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) del x47 x100 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x48 - x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x101 += einsum(t1.bb, (0, 1), x100, (0, 2, 3, 4), (2, 3, 1, 4)) * 4.0 del x100 - x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x102 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x99 x102 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2072,34 +2073,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x102, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_bbbb_oovv += einsum(x102, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x102 - x103 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x103 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 4, 3, 1)) del x50 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), x103, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x103 - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_aaaa_ovov += einsum(x104, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x104, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_aaaa_voov += einsum(x104, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vovo += einsum(x104, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x105 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x105 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x106 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(x105, (0, 1), (0, 1)) x106 += einsum(x68, (0, 1), (0, 1)) x106 += einsum(x69, (0, 1), (0, 1)) * 2.0 rdm2_f_aaaa_ovov += einsum(delta.aa.oo, (0, 1), x106, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_voov += einsum(delta.aa.oo, (0, 1), x106, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x106, (2, 3), (2, 0, 3, 1)) - x107 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x107 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) rdm2_f_abab_ovov += einsum(x107, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x107, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x107 - x108 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x108 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x109 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x109 += einsum(x108, (0, 1), (0, 1)) x109 += einsum(x82, (0, 1), (0, 1)) * 2.0 x109 += einsum(x83, (0, 1), (0, 1)) @@ -2107,19 +2108,19 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_ovvo += einsum(delta.bb.oo, (0, 1), x109, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x109, (2, 3), (2, 0, 3, 1)) rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x109, (2, 3), (0, 2, 1, 3)) - x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(t1.bb, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_bbbb_ovov += einsum(x110, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_ovvo += einsum(x110, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_bbbb_voov += einsum(x110, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vovo += einsum(x110, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x111 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x111, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x111, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x111, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x111, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x112 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(x108, (0, 1), (0, 1)) * 0.5 del x108 x112 += einsum(x82, (0, 1), (0, 1)) @@ -2129,7 +2130,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_ovov += einsum(delta.bb.oo, (0, 1), x112, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x112, (2, 3), (2, 0, 1, 3)) * -2.0 del x112 - x113 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x113 += einsum(x105, (0, 1), (0, 1)) * 0.5 del x105 x113 += einsum(x68, (0, 1), (0, 1)) * 0.5 @@ -2140,37 +2141,37 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x113, (2, 3), (2, 0, 3, 1)) * 2.0 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x113, (2, 3), (2, 0, 3, 1)) * 2.0 del x113 - x114 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x114 += einsum(t1.aa, (0, 1), x8, (2, 3, 0, 4), (2, 3, 4, 1)) del x8 rdm2_f_abab_ovvo += einsum(x114, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum(t1.bb, (0, 1), x32, (0, 2, 3, 4), (2, 1, 3, 4)) del x32 rdm2_f_abab_voov += einsum(x115, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x116 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x116 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovvv += einsum(x116, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vovv += einsum(x116, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x116 - x117 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 rdm2_f_aaaa_ovvv += einsum(x117, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x117, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x117 - x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum(t1.aa, (0, 1), x104, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x104 rdm2_f_aaaa_ovvv += einsum(x118, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x118, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x118 - x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(t1.aa, (0, 1), x80, (0, 2, 3, 4), (2, 1, 3, 4)) del x80 - x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(x119, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x119 x120 += einsum(t1.aa, (0, 1), x106, (2, 3), (0, 2, 1, 3)) @@ -2180,7 +2181,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_vovv += einsum(x120, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_vovv += einsum(x120, (0, 1, 2, 3), (1, 0, 3, 2)) del x120 - x121 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x121 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x73 x121 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -2189,34 +2190,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x114 rdm2_f_abab_ovvv += einsum(t1.bb, (0, 1), x121, (0, 2, 3, 4), (3, 2, 4, 1)) del x121 - x122 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x122 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovvv += einsum(x122, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vovv += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x122 - x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 5), (4, 5, 2, 3)) del x16 rdm2_f_bbbb_ovvv += einsum(x123, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x123, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x123 - x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(t1.bb, (0, 1), x110, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x110 rdm2_f_bbbb_ovvv += einsum(x124, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x124, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x124 - x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 x125 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x111 - x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t1.bb, (0, 1), x125, (0, 2, 3, 4), (2, 1, 3, 4)) * 4.0 del x125 - x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(x126, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x126 x127 += einsum(t1.bb, (0, 1), x109, (2, 3), (0, 2, 1, 3)) @@ -2226,7 +2227,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_vovv += einsum(x127, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_bbbb_vovv += einsum(x127, (0, 1, 2, 3), (1, 0, 3, 2)) del x127 - x128 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x128 += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) del x98 x128 += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -2235,25 +2236,25 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x91 rdm2_f_abab_vovv += einsum(t1.aa, (0, 1), x128, (2, 3, 0, 4), (4, 2, 1, 3)) * 2.0 del x128 - x129 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvov += einsum(x129, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvvo += einsum(x129, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_aaaa_vvvv += einsum(t1.aa, (0, 1), x129, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x129 - x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvov += einsum(x130, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvvo += einsum(x130, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_bbbb_vvvv += einsum(t1.bb, (0, 1), x130, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x130 - x131 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (4, 3, 2, 1)) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvvo += einsum(x131, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_abab_vvvv += einsum(t1.bb, (0, 1), x131, (0, 2, 3, 4), (3, 2, 4, 1)) del x131 diff --git a/ebcc/codegen/UCC3.py b/ebcc/codegen/UCC3.py index 8bedf9f5..2b6ddca4 100644 --- a/ebcc/codegen/UCC3.py +++ b/ebcc/codegen/UCC3.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 2, 1, 3), ()) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x1 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(f.aa.ov, (0, 1), (0, 1)) x1 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) x1 += einsum(t1.aa, (0, 1), x0, (0, 2, 1, 3), (2, 3)) * -0.5 del x0 e_cc += einsum(t1.aa, (0, 1), x1, (0, 1), ()) del x1 - x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(f.bb.ov, (0, 1), (0, 1)) * 2.0 x3 += einsum(t1.bb, (0, 1), x2, (0, 2, 1, 3), (2, 3)) * -1.0 del x2 @@ -37,59 +38,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new = Namespace() # T amplitudes - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 2, 5, 3, 1), (4, 5)) * -3.0 t1new_bb += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 1, 5, 3), (4, 5)) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) t1new_bb += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 1, 3), (4, 5)) * 2.0 - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 1, 5, 3), (4, 5)) t1new_aa += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 3, 1), (4, 5)) * 2.0 t1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 2, 5, 3, 1), (4, 5)) * -3.0 t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x2, (4, 1, 0, 3), (4, 2)) * -2.0 t2new_abab += einsum(x2, (0, 1, 2, 3), t3.babbab, (2, 4, 1, 5, 6, 3), (4, 0, 6, 5)) * -2.0 del x2 - x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x4 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 0, 2), (4, 3)) * -1.0 t2new_abab += einsum(x4, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 6, 3), (4, 1, 5, 6)) * -2.0 - x5 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x5 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x5 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x5, (0, 4, 3, 1), (4, 2)) * -2.0 del x5 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x6 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x6, (4, 3, 0, 1), (4, 2)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x6, (2, 3, 4, 1), (4, 0)) - x7 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x7, (0, 1), (0, 1)) - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x8 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(t1.aa, (0, 1), x8, (0, 2, 1, 3), (2, 3)) - x10 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(f.aa.ov, (0, 1), (0, 1)) x10 += einsum(x7, (0, 1), (0, 1)) del x7 @@ -100,12 +101,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x10, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 t2new_abab += einsum(x10, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 t2new_bbbb += einsum(x10, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 - x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), x11, (0, 2, 1, 3), (2, 3)) - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum(f.bb.ov, (0, 1), (0, 1)) x13 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -116,21 +117,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x13, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_abab += einsum(x13, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 1), (3, 2, 5, 4)) * 2.0 t2new_bbbb += einsum(x13, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 - x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x14 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 del x14 - x15 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x16 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x16 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x19 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x19 += einsum(f.bb.oo, (0, 1), (0, 1)) * 0.5 x19 += einsum(x15, (0, 1), (1, 0)) * 0.5 x19 += einsum(x16, (0, 1), (1, 0)) @@ -139,49 +140,49 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x19 += einsum(t1.bb, (0, 1), x13, (2, 1), (2, 0)) * 0.5 t1new_bb += einsum(t1.bb, (0, 1), x19, (0, 2), (2, 1)) * -2.0 del x19 - x20 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x20 += einsum(f.bb.vv, (0, 1), (0, 1)) x20 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(t1.bb, (0, 1), x20, (1, 2), (0, 2)) del x20 - x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x22 += einsum(x21, (0, 1, 2, 3), (0, 1, 3, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x22, (1, 3, 0, 4), (4, 2)) * -1.0 t2new_abab += einsum(x22, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 6, 1), (3, 4, 6, 5)) * -2.0 - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x24, (4, 1, 0, 3), (4, 2)) * -2.0 t2new_abab += einsum(x24, (0, 1, 2, 3), t3.abaaba, (2, 4, 1, 5, 6, 3), (0, 4, 5, 6)) * -2.0 del x24 - x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x25 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x25 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x25, (0, 4, 3, 1), (4, 2)) * -2.0 del x25 - x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x26 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x26, (0, 2, 1, 3), (2, 3)) * -1.0 - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x28 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x28 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x29 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x30 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x30 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x31 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(t1.aa, (0, 1), x30, (2, 3, 0, 1), (2, 3)) - x32 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x32 += einsum(t1.aa, (0, 1), x10, (2, 1), (0, 2)) - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(f.aa.oo, (0, 1), (0, 1)) x33 += einsum(x27, (0, 1), (1, 0)) x33 += einsum(x28, (0, 1), (1, 0)) @@ -191,31 +192,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t1new_aa += einsum(t1.aa, (0, 1), x33, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x33, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x33 - x34 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x34 += einsum(f.aa.vv, (0, 1), (0, 1)) x34 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 1, 2, 3), (2, 3)) t1new_aa += einsum(t1.aa, (0, 1), x34, (1, 2), (0, 2)) del x34 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(v.aabb.ooov, (0, 1, 2, 3), t3.abaaba, (4, 2, 1, 5, 3, 6), (4, 0, 5, 6)) - x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(v.aaaa.ooov, (0, 1, 2, 3), t3.aaaaaa, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x37 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(t2.aaaa, (0, 1, 2, 3), x37, (4, 5, 1, 0), (4, 5, 2, 3)) * -1.0 - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(x21, (0, 1, 2, 3), t3.abaaba, (4, 0, 3, 5, 1, 6), (2, 4, 5, 6)) - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(x23, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 1, 5, 6, 3), (0, 4, 5, 6)) - x41 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(f.aa.oo, (0, 1), (0, 1)) x41 += einsum(x32, (0, 1), (0, 1)) del x32 - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(x41, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x41 - x43 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x43 += einsum(x27, (0, 1), (1, 0)) del x27 x43 += einsum(x28, (0, 1), (1, 0)) @@ -224,10 +225,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x29 x43 += einsum(x31, (0, 1), (1, 0)) * -1.0 del x31 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(x43, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x43 - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(x35, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x35 x45 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 @@ -245,59 +246,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x45, (0, 1, 2, 3), (1, 0, 2, 3)) del x45 - x46 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t1.aa, (0, 1), x46, (2, 3, 1, 4), (0, 2, 3, 4)) - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(v.aabb.vvov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 6, 0)) - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 1, 3), (4, 5, 6, 2)) - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x50 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(t2.aaaa, (0, 1, 2, 3), x50, (1, 4, 5, 3), (0, 4, 2, 5)) del x50 - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.aaaa, (0, 1, 2, 3), x51, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x51 - x53 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x54 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x55 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x56 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x56 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x57 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa, (0, 1), x56, (0, 1, 2, 3), (2, 3)) - x58 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(x53, (0, 1), (1, 0)) * -1.0 x58 += einsum(x54, (0, 1), (1, 0)) x58 += einsum(x55, (0, 1), (1, 0)) * 2.0 x58 += einsum(x57, (0, 1), (1, 0)) * -1.0 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(x58, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x58 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 0, 6)) - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 3, 1), (4, 5, 0, 6)) * -1.0 - x63 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x63 += einsum(x10, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 - x64 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x64 += einsum(t1.aa, (0, 1), x23, (2, 3, 4, 1), (2, 0, 4, 3)) - x65 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x65 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x65 += einsum(x64, (0, 1, 2, 3), (3, 1, 2, 0)) - x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x66 += einsum(t1.aa, (0, 1), x65, (0, 2, 3, 4), (2, 3, 4, 1)) del x65 - x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x67 += einsum(x60, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x60 x67 += einsum(x61, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 @@ -308,10 +309,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x63 x67 += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) del x66 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t1.aa, (0, 1), x67, (0, 2, 3, 4), (2, 3, 1, 4)) del x67 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) del x47 x69 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -327,53 +328,53 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x69, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x69 - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x71 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x71 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t2.abab, (0, 1, 2, 3), x71, (1, 3, 4, 5), (4, 0, 2, 5)) - x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x73 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(x26, (0, 1, 2, 3), x73, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x26 - x75 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x76 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x76 += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x75 - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(t2.abab, (0, 1, 2, 3), x76, (1, 3, 4, 5), (0, 4, 2, 5)) del x76 - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum(t1.aa, (0, 1), x56, (2, 1, 3, 4), (0, 2, 3, 4)) del x56 - x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(t2.aaaa, (0, 1, 2, 3), x78, (4, 1, 5, 3), (0, 4, 2, 5)) * -2.0 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum(t1.aa, (0, 1), x37, (2, 3, 4, 0), (2, 4, 3, 1)) - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum(t1.aa, (0, 1), x70, (2, 3, 1, 4), (0, 2, 3, 4)) - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(t2.abab, (0, 1, 2, 3), x21, (1, 3, 4, 5), (4, 0, 5, 2)) - x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x84 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x84 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x85 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x85 += einsum(t2.aaaa, (0, 1, 2, 3), x84, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x84 - x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x86 += einsum(x23, (0, 1, 2, 3), (0, 2, 1, 3)) - x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(t2.aaaa, (0, 1, 2, 3), x86, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x86 - x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x88 += einsum(x80, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x80 x88 += einsum(x81, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -385,10 +386,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x85 x88 += einsum(x87, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x87 - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum(t1.aa, (0, 1), x88, (2, 0, 3, 4), (2, 3, 1, 4)) del x88 - x90 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x90 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) x90 += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) del x72 @@ -405,14 +406,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x90, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x90, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x90 - x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x92 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t2.abab, (0, 1, 2, 3), x11, (1, 4, 3, 5), (4, 5, 0, 2)) - x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x93 += einsum(t2.abab, (0, 1, 2, 3), x92, (1, 3, 4, 5), (0, 4, 2, 5)) * -1.0 del x92 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x94 += einsum(x91, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x91 @@ -421,54 +422,54 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x94, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) del x94 - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_aaaa += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) del x95 - x96 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x96 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x97 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x97 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x97 += einsum(x96, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 x97 += einsum(x64, (0, 1, 2, 3), (2, 1, 3, 0)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x97, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x97 - x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x98 += einsum(t1.aa, (0, 1), x96, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x96 x98 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x98 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_aaaa += einsum(t1.aa, (0, 1), x98, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x98 - x99 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x99 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab += einsum(x99, (0, 1, 2, 3), (2, 0, 3, 1)) - x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) x100 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 0, 4), (2, 1, 3, 4)) t2new_abab += einsum(x100, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 2, 6, 3), (4, 5, 1, 6)) * 2.0 del x100 - x101 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x101 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 4), (1, 4, 2, 3)) - x102 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x102 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_abab += einsum(x102, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 0, 3), (4, 5, 6, 1)) * 2.0 del x102 - x103 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x103 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 2, 3, 4), (3, 4, 1, 2)) - x104 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x104 += einsum(x103, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_abab += einsum(x104, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 2, 1), (5, 4, 3, 6)) * 2.0 del x104 - x105 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x105 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) x105 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 0, 4), (2, 1, 3, 4)) t2new_abab += einsum(x105, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 2, 6, 3), (5, 4, 6, 1)) * 2.0 del x105 - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x106 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x106 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) @@ -479,16 +480,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x30 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x106, (0, 4, 2, 5), (4, 1, 5, 3)) del x106 - x107 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x107 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x107 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x108 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x108 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x108 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x109 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x109 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x109 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x110 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x110 += einsum(x107, (0, 1, 2, 3), x11, (0, 4, 5, 2), (4, 1, 5, 3)) * -1.0 @@ -498,55 +499,55 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x110 += einsum(t1.bb, (0, 1), x109, (0, 2, 3, 4), (3, 2, 4, 1)) * -0.5 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x110, (1, 4, 3, 5), (0, 4, 2, 5)) * -2.0 del x110 - x111 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x111 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x111 += einsum(t1.bb, (0, 1), v.aabb.ovoo, (2, 3, 4, 0), (4, 1, 2, 3)) * -0.5 x111 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x111 += einsum(v.aabb.ovov, (0, 1, 2, 3), x107, (2, 4, 3, 5), (4, 5, 0, 1)) t2new_abab += einsum(t2.aaaa, (0, 1, 2, 3), x111, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 del x111 - x112 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x112 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 4), (1, 4, 2, 3)) - x113 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x113 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x113 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x114 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x114 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x114 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x114 += einsum(x112, (0, 1, 2, 3), (1, 0, 3, 2)) x114 += einsum(x113, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x114 += einsum(v.aabb.ovov, (0, 1, 2, 3), x6, (2, 4, 5, 1), (3, 4, 0, 5)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x114, (3, 4, 0, 5), (5, 1, 2, 4)) del x114 - x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum(t1.aa, (0, 1), x22, (2, 3, 0, 4), (2, 3, 4, 1)) - x116 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x116 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x116 += einsum(x71, (0, 1, 2, 3), (0, 1, 2, 3)) x116 += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x115 t2new_abab += einsum(x107, (0, 1, 2, 3), x116, (0, 2, 4, 5), (4, 1, 5, 3)) * 2.0 del x107 - x117 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) - x118 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x118 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x119 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x119 += einsum(x117, (0, 1, 2, 3), (1, 0, 3, 2)) x119 += einsum(t1.aa, (0, 1), x118, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x119, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x119 - x120 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x120 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 4), (4, 1, 2, 3)) x120 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 2, 3, 4), (3, 4, 2, 1)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x120, (3, 4, 2, 5), (0, 1, 5, 4)) * -1.0 del x120 - x121 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x121 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 4, 1), (0, 4, 2, 3)) - x122 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x123 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x123 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x123 += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) x123 += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -554,7 +555,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x6 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x123, (1, 4, 0, 5), (5, 4, 2, 3)) del x123 - x124 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x124 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x124 += einsum(x53, (0, 1), (1, 0)) * -1.0 del x53 @@ -568,19 +569,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x10 t2new_abab += einsum(x124, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x124 - x125 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x126 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x127 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x128 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x128 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x129 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(t1.bb, (0, 1), x128, (0, 2, 1, 3), (2, 3)) del x128 - x130 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x130 += einsum(x125, (0, 1), (1, 0)) * -1.0 x130 += einsum(x126, (0, 1), (1, 0)) * 2.0 @@ -589,12 +590,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x130 += einsum(t1.bb, (0, 1), x13, (0, 2), (2, 1)) t2new_abab += einsum(x130, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x130 - x131 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x131 += einsum(t1.bb, (0, 1), x18, (2, 3, 0, 1), (2, 3)) del x18 - x132 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x132 += einsum(t1.bb, (0, 1), x13, (2, 1), (0, 2)) - x133 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(f.bb.oo, (0, 1), (0, 1)) x133 += einsum(x15, (0, 1), (1, 0)) x133 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -603,17 +604,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x133 += einsum(x132, (0, 1), (1, 0)) t2new_abab += einsum(x133, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x133 - x134 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x134 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x134 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x134 += einsum(x113, (0, 1, 2, 3), (1, 0, 2, 3)) - x135 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x135 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), x134, (1, 2, 3, 4), (0, 2, 3, 4)) del x134 - x136 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x136 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x136 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) x136 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (5, 1, 0, 4)) - x137 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x137 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x137 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x137 += einsum(x21, (0, 1, 2, 3), (0, 1, 3, 2)) x137 += einsum(x135, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -621,44 +622,44 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x136 t2new_abab += einsum(t1.aa, (0, 1), x137, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x137 - x138 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x139 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x139 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x139 += einsum(x138, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_abab += einsum(t1.aa, (0, 1), x139, (2, 3, 1, 4), (0, 2, 4, 3)) del x139 - x140 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x140 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x141 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x141 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x141 += einsum(x140, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_abab += einsum(t1.bb, (0, 1), x141, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x141 - x142 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(t1.bb, (0, 1), x142, (2, 3, 1, 4), (0, 2, 3, 4)) - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 1, 3), (4, 5, 6, 2)) - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(v.aabb.ovvv, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 6, 2)) - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x146 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum(t2.bbbb, (0, 1, 2, 3), x146, (1, 4, 5, 3), (4, 0, 5, 2)) del x146 - x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x148 += einsum(t2.bbbb, (0, 1, 2, 3), x147, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x147 - x149 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x149 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 4, 2, 5), (1, 3, 4, 5)) del x8 - x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x150 += einsum(t2.abab, (0, 1, 2, 3), x149, (4, 5, 0, 2), (4, 1, 5, 3)) * -1.0 del x149 - x151 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x151 += einsum(x125, (0, 1), (1, 0)) * -1.0 del x125 x151 += einsum(x126, (0, 1), (1, 0)) * 2.0 @@ -667,27 +668,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x127 x151 += einsum(x129, (0, 1), (0, 1)) * -1.0 del x129 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum(x151, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x151 - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 3, 1), (4, 5, 0, 6)) * -1.0 - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 2, 6)) - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum(x13, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) * -2.0 del x13 - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x157 += einsum(t1.bb, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) - x158 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x158 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x158 += einsum(x157, (0, 1, 2, 3), (3, 1, 2, 0)) - x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x159 += einsum(t1.bb, (0, 1), x158, (0, 2, 3, 4), (2, 3, 4, 1)) del x158 - x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x160 += einsum(x153, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x153 x160 += einsum(x154, (0, 1, 2, 3), (2, 1, 0, 3)) * 6.0 @@ -698,10 +699,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x156 x160 += einsum(x159, (0, 1, 2, 3), (1, 0, 2, 3)) del x159 - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(t1.bb, (0, 1), x160, (0, 2, 3, 4), (2, 3, 4, 1)) del x160 - x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x162 += einsum(x143, (0, 1, 2, 3), (0, 1, 2, 3)) del x143 x162 += einsum(x144, (0, 1, 2, 3), (0, 1, 2, 3)) * -6.0 @@ -719,52 +720,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x162, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x162, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x162 - x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x163 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(t2.abab, (0, 1, 2, 3), x99, (4, 5, 0, 2), (4, 1, 3, 5)) - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x166 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x166 += einsum(x164, (0, 1, 2, 3), (1, 0, 3, 2)) - x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x167 += einsum(t2.bbbb, (0, 1, 2, 3), x166, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x166 - x168 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x168 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x168 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x169 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x169 += einsum(t1.bb, (0, 1), x168, (2, 1, 3, 4), (2, 0, 3, 4)) del x168 - x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x170 += einsum(t2.bbbb, (0, 1, 2, 3), x169, (1, 4, 5, 3), (4, 0, 5, 2)) * -2.0 - x171 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x171 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x172 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x172 += einsum(t1.bb, (0, 1), x171, (2, 3, 4, 0), (2, 4, 3, 1)) - x173 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x173 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x174 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 0, 2), (4, 1, 5, 3)) - x175 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x175 += einsum(t2.bbbb, (0, 1, 2, 3), x109, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x109 - x176 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x176 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x176 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) - x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x177 += einsum(t2.bbbb, (0, 1, 2, 3), x176, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 del x176 - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x178 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x178 += einsum(x163, (0, 1, 2, 3), (0, 1, 2, 3)) - x179 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x179 += einsum(t1.bb, (0, 1), x178, (2, 3, 1, 4), (2, 3, 0, 4)) del x178 - x180 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x180 += einsum(x172, (0, 1, 2, 3), (0, 2, 1, 3)) del x172 x180 += einsum(x173, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -776,10 +777,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x180 += einsum(x177, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x177 x180 += einsum(x179, (0, 1, 2, 3), (2, 1, 0, 3)) - x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum(t1.bb, (0, 1), x180, (2, 0, 3, 4), (2, 3, 4, 1)) del x180 - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum(x163, (0, 1, 2, 3), (0, 1, 2, 3)) x182 += einsum(x164, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x164 @@ -796,26 +797,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x182, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x182, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x182 - x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x184 += einsum(v.bbbb.ooov, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum(t2.bbbb, (0, 1, 2, 3), x171, (4, 5, 0, 1), (4, 5, 2, 3)) - x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x186 += einsum(v.aabb.ovoo, (0, 1, 2, 3), t3.babbab, (4, 0, 3, 5, 1, 6), (4, 2, 5, 6)) - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum(x1, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 2, 5, 6, 3), (0, 4, 5, 6)) * -1.0 - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum(x3, (0, 1, 2, 3), t3.babbab, (4, 2, 1, 5, 3, 6), (0, 4, 5, 6)) - x189 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x189 += einsum(f.bb.oo, (0, 1), (0, 1)) x189 += einsum(x132, (0, 1), (0, 1)) del x132 - x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x190 += einsum(x189, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) * -2.0 del x189 - x191 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x191 += einsum(x15, (0, 1), (1, 0)) del x15 x191 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -824,10 +825,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x17 x191 += einsum(x131, (0, 1), (1, 0)) * -1.0 del x131 - x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x192 += einsum(x191, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -2.0 del x191 - x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum(x183, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x183 x193 += einsum(x184, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 @@ -847,59 +848,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x193, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x193, (0, 1, 2, 3), (1, 0, 2, 3)) del x193 - x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x194 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x195 += einsum(x194, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x194 t2new_bbbb += einsum(x195, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x195, (0, 1, 2, 3), (0, 1, 2, 3)) del x195 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x196 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - x197 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x197 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x197 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x196, (4, 5, 1, 3), (0, 5, 2, 4)) del x196 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x197, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x197 - x198 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x198 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x199 += einsum(t1.bb, (0, 1), x198, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x198 x199 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x199 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_bbbb += einsum(t1.bb, (0, 1), x199, (2, 3, 0, 4), (2, 3, 1, 4)) del x199 - x200 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x200 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x201 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x201 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x202 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x202 += einsum(t1.aa, (0, 1), x201, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x201 - x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x203 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x203 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x204 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x204 += einsum(t2.aaaa, (0, 1, 2, 3), x203, (4, 5, 3, 6), (4, 5, 0, 1, 6, 2)) * -1.0 - x205 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x205 += einsum(x202, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x202 x205 += einsum(x204, (0, 1, 2, 3, 4, 5), (3, 2, 1, 0, 5, 4)) del x204 - x206 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x206 += einsum(t1.aa, (0, 1), x205, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x205 - x207 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x207 += einsum(x200, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x200 x207 += einsum(x206, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x206 - t3new_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + t3new_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) t3new_aaaaaa += einsum(x207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_aaaaaa += einsum(x207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new_aaaaaa += einsum(x207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -919,39 +920,39 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x207, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_aaaaaa += einsum(x207, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x207 - x208 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x208 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x208 += einsum(f.aa.ov, (0, 1), t1.aa, (0, 2), (1, 2)) - x209 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x209 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x209 += einsum(f.aa.vv, (0, 1), (0, 1)) x209 += einsum(x208, (0, 1), (0, 1)) * -1.0 del x208 - t3new_babbab = np.zeros((nocc[1], nocc[0], nocc[1], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + t3new_babbab = np.zeros((nocc[1], nocc[0], nocc[1], nvir[1], nvir[0], nvir[1]), dtype=types[float]) t3new_babbab += einsum(x209, (0, 1), t3.babbab, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * 2.0 - x210 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x210 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x210 += einsum(x209, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) * 6.0 del x209 t3new_aaaaaa += einsum(x210, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) t3new_aaaaaa += einsum(x210, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -1.0 t3new_aaaaaa += einsum(x210, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x210 - x211 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x211 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x211 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.oooo, (4, 5, 6, 1), (0, 4, 5, 6, 2, 3)) - x212 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x212 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x212 += einsum(t2.aaaa, (0, 1, 2, 3), x64, (4, 5, 1, 6), (5, 4, 0, 6, 2, 3)) - x213 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x213 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x213 += einsum(x37, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x213 += einsum(x37, (0, 1, 2, 3), (0, 2, 3, 1)) - x214 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x214 += einsum(t2.aaaa, (0, 1, 2, 3), x213, (4, 5, 6, 1), (4, 5, 6, 0, 2, 3)) * -1.0 del x213 - x215 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x215 += einsum(x211, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 del x211 x215 += einsum(x212, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -1.0 del x212 x215 += einsum(x214, (0, 1, 2, 3, 4, 5), (0, 3, 2, 1, 5, 4)) * -1.0 del x214 - x216 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x216 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x216 += einsum(t1.aa, (0, 1), x215, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x215 t3new_aaaaaa += einsum(x216, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -973,24 +974,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x216, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_aaaaaa += einsum(x216, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 del x216 - x217 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x217 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x217 += einsum(t2.aaaa, (0, 1, 2, 3), x46, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) - x218 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x218 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x218 += einsum(t2.aaaa, (0, 1, 2, 3), x23, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x219 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x219 += einsum(t1.aa, (0, 1), x218, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x218 - x220 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x220 += einsum(t2.aaaa, (0, 1, 2, 3), x78, (4, 5, 6, 3), (0, 1, 4, 5, 2, 6)) - x221 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x221 += einsum(x219, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 del x219 x221 += einsum(x220, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -1.0 del x220 - x222 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x222 += einsum(t1.aa, (0, 1), x221, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x221 - x223 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x223 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x223 += einsum(x217, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 del x217 x223 += einsum(x222, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 @@ -1014,18 +1015,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x223, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_aaaaaa += einsum(x223, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x223 - x224 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x224 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x224 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 1, 5, 6), (0, 4, 5, 2, 3, 6)) - x225 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x225 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x225 += einsum(t2.aaaa, (0, 1, 2, 3), x82, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x82 - x226 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x226 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x226 += einsum(t1.aa, (0, 1), x203, (2, 3, 1, 4), (2, 3, 0, 4)) del x203 - x227 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x227 += einsum(t2.aaaa, (0, 1, 2, 3), x226, (4, 1, 5, 6), (5, 4, 0, 6, 2, 3)) * -2.0 del x226 - x228 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x228 += einsum(x224, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x224 x228 += einsum(x225, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 @@ -1051,22 +1052,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x228, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new_aaaaaa += einsum(x228, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x228 - x229 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x229 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x230 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x230 += einsum(f.aa.oo, (0, 1), (0, 1)) x230 += einsum(x229, (0, 1), (0, 1)) del x229 t3new_babbab += einsum(x230, (0, 1), t3.babbab, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 - x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x231 += einsum(x230, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) * 6.0 t3new_aaaaaa += einsum(x231, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_aaaaaa += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * -1.0 t3new_aaaaaa += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) del x231 - x232 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x232 += einsum(f.aa.ov, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) - x233 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x233 += einsum(t2.aaaa, (0, 1, 2, 3), x232, (1, 4, 5, 6), (4, 5, 0, 6, 2, 3)) del x232 t3new_aaaaaa += einsum(x233, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -4.0 @@ -1079,71 +1080,71 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x233, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -4.0 t3new_aaaaaa += einsum(x233, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 4.0 del x233 - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x234 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ovvv, (4, 5, 6, 3), (1, 4, 5, 6, 0, 2)) - x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x235 += einsum(t2.abab, (0, 1, 2, 3), x142, (4, 5, 3, 6), (4, 1, 6, 5, 0, 2)) - x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x236 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x237 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x237 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x237 += einsum(x236, (0, 1, 2, 3), (1, 0, 2, 3)) del x236 - x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x238 += einsum(t2.abab, (0, 1, 2, 3), x237, (4, 5, 6, 3), (4, 5, 1, 6, 0, 2)) del x237 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum(t1.bb, (0, 1), x1, (2, 0, 3, 4), (2, 3, 1, 4)) - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum(x239, (0, 1, 2, 3), (0, 1, 3, 2)) del x239 x240 += einsum(x169, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x241 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x241 += einsum(t2.abab, (0, 1, 2, 3), x240, (4, 5, 3, 6), (4, 5, 1, 6, 0, 2)) del x240 - x242 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x242 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x242 += einsum(x157, (0, 1, 2, 3), (3, 1, 0, 2)) x242 += einsum(x171, (0, 1, 2, 3), (2, 1, 0, 3)) x242 += einsum(x171, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x243 += einsum(t2.abab, (0, 1, 2, 3), x242, (1, 4, 5, 6), (4, 5, 6, 3, 0, 2)) del x242 - x244 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x244 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 2, 3, 4), (3, 4, 1, 2)) - x245 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x245 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x245 += einsum(x244, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x244 - x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x246 += einsum(t2.abab, (0, 1, 2, 3), x245, (4, 5, 2, 6), (4, 5, 1, 3, 0, 6)) del x245 - x247 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x247 += einsum(t1.aa, (0, 1), x3, (2, 3, 0, 4), (2, 3, 1, 4)) del x3 - x248 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x248 += einsum(x117, (0, 1, 2, 3), (0, 1, 3, 2)) x248 += einsum(x247, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x247 - x249 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x249 += einsum(t2.abab, (0, 1, 2, 3), x248, (4, 5, 2, 6), (4, 5, 1, 3, 0, 6)) del x248 - x250 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x250 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x250 += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) del x122 - x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x251 += einsum(t2.abab, (0, 1, 2, 3), x250, (4, 5, 0, 6), (4, 5, 1, 3, 6, 2)) - x252 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x252 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x252 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x252 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) - x253 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x253 += einsum(t1.bb, (0, 1), x252, (2, 1, 3, 4), (2, 0, 3, 4)) del x252 - x254 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x254 += einsum(t2.abab, (0, 1, 2, 3), x253, (4, 5, 6, 0), (5, 4, 1, 3, 6, 2)) - x255 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x255 += einsum(x238, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -1.0 del x238 x255 += einsum(x241, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -1158,42 +1159,42 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x251 x255 += einsum(x254, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x254 - x256 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x256 += einsum(t1.bb, (0, 1), x255, (2, 0, 3, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x255 - x257 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x257 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x257 += einsum(x179, (0, 1, 2, 3), (2, 1, 0, 3)) del x179 - x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x258 += einsum(t2.abab, (0, 1, 2, 3), x257, (4, 1, 5, 6), (4, 5, 6, 3, 0, 2)) del x257 - x259 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x259 += einsum(f.aa.ov, (0, 1), t2.abab, (0, 2, 3, 4), (2, 4, 1, 3)) - x260 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x260 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x260 += einsum(x259, (0, 1, 2, 3), (0, 1, 2, 3)) x260 += einsum(x103, (0, 1, 2, 3), (0, 1, 3, 2)) del x103 - x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x261 += einsum(t2.abab, (0, 1, 2, 3), x260, (4, 5, 2, 6), (4, 1, 5, 3, 0, 6)) del x260 - x262 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x262 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x262 += einsum(t1.aa, (0, 1), x99, (2, 3, 0, 4), (2, 3, 1, 4)) - x263 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x263 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x263 += einsum(x138, (0, 1, 2, 3), (0, 1, 3, 2)) x263 += einsum(x262, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x262 - x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x264 += einsum(t2.abab, (0, 1, 2, 3), x263, (4, 5, 2, 6), (4, 1, 5, 3, 0, 6)) del x263 - x265 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x265 += einsum(t2.abab, (0, 1, 2, 3), x22, (4, 5, 0, 6), (1, 4, 3, 5, 6, 2)) del x22 - x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x266 += einsum(t2.abab, (0, 1, 2, 3), x135, (4, 5, 6, 0), (4, 1, 5, 3, 6, 2)) del x135 - x267 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x267 += einsum(x234, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x234 x267 += einsum(x235, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -1215,12 +1216,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x267, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 5, 3)) t3new_babbab += einsum(x267, (0, 1, 2, 3, 4, 5), (1, 4, 0, 3, 5, 2)) * -1.0 del x267 - x268 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x268 += einsum(f.bb.ov, (0, 1), t2.abab, (2, 3, 4, 1), (0, 3, 2, 4)) - x269 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x269 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x269 += einsum(t1.aa, (0, 1), x250, (2, 3, 0, 4), (2, 3, 4, 1)) del x250 - x270 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x270 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x270 += einsum(x268, (0, 1, 2, 3), (0, 1, 2, 3)) del x268 @@ -1228,37 +1229,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x140 x270 += einsum(x269, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x269 - x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x271 += einsum(t2.bbbb, (0, 1, 2, 3), x270, (1, 4, 5, 6), (4, 0, 2, 3, 5, 6)) * -2.0 del x270 - x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x272 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x272 += einsum(x71, (0, 1, 2, 3), (0, 1, 2, 3)) - x273 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x273 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x273 += einsum(t1.bb, (0, 1), x272, (2, 1, 3, 4), (2, 0, 3, 4)) del x272 - x274 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x274 += einsum(t1.aa, (0, 1), x253, (2, 3, 4, 0), (3, 2, 4, 1)) del x253 - x275 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x275 += einsum(x273, (0, 1, 2, 3), (1, 0, 2, 3)) del x273 x275 += einsum(x274, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x274 - x276 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x276 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x276 += einsum(t2.bbbb, (0, 1, 2, 3), x275, (4, 1, 5, 6), (4, 0, 2, 3, 5, 6)) * -2.0 del x275 - x277 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x277 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x278 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x278 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x278 += einsum(f.bb.oo, (0, 1), (0, 1)) x278 += einsum(x277, (0, 1), (0, 1)) del x277 - t3new_abaaba = np.zeros((nocc[0], nocc[1], nocc[0], nvir[0], nvir[1], nvir[0]), dtype=np.float64) + t3new_abaaba = np.zeros((nocc[0], nocc[1], nocc[0], nvir[0], nvir[1], nvir[0]), dtype=types[float]) t3new_abaaba += einsum(x278, (0, 1), t3.abaaba, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 - x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x279 += einsum(x278, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 6), (1, 2, 4, 6, 3, 5)) * -2.0 - x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x280 += einsum(x271, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) * -1.0 del x271 x280 += einsum(x276, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) @@ -1268,41 +1269,41 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x280, (0, 1, 2, 3, 4, 5), (0, 4, 1, 2, 5, 3)) t3new_babbab += einsum(x280, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 5, 3)) * -1.0 del x280 - x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x281 += einsum(f.bb.vv, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (2, 4, 0, 5, 3, 6)) - x282 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x282 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x282 += einsum(f.bb.ov, (0, 1), t2.abab, (2, 0, 3, 4), (1, 4, 2, 3)) - x283 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x283 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x283 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x284 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x284 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x284 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x284 += einsum(x113, (0, 1, 2, 3), (1, 0, 3, 2)) - x285 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x285 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x285 += einsum(t1.aa, (0, 1), x284, (2, 3, 0, 4), (2, 3, 4, 1)) del x284 - x286 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x286 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x286 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x286 += einsum(x282, (0, 1, 2, 3), (0, 1, 2, 3)) x286 += einsum(x283, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x286 += einsum(x285, (0, 1, 2, 3), (1, 0, 2, 3)) del x285 - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x287 += einsum(t2.bbbb, (0, 1, 2, 3), x286, (3, 4, 5, 6), (0, 1, 4, 2, 5, 6)) * -2.0 del x286 - x288 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x288 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x288 += einsum(f.bb.ov, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (0, 2, 4, 5, 3, 6)) - x289 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x289 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x289 += einsum(t2.bbbb, (0, 1, 2, 3), x116, (4, 3, 5, 6), (0, 1, 4, 2, 5, 6)) * -1.0 del x116 - x290 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x290 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x290 += einsum(x288, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 del x288 x290 += einsum(x289, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) del x289 - x291 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x291 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x291 += einsum(t1.bb, (0, 1), x290, (0, 2, 3, 4, 5, 6), (2, 3, 4, 1, 5, 6)) * 2.0 del x290 - x292 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x292 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x292 += einsum(x281, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x281 x292 += einsum(x287, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) @@ -1312,72 +1313,72 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x292, (0, 1, 2, 3, 4, 5), (0, 4, 1, 2, 5, 3)) * -1.0 t3new_babbab += einsum(x292, (0, 1, 2, 3, 4, 5), (0, 4, 1, 3, 5, 2)) del x292 - x293 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x293 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x293 += einsum(t2.abab, (0, 1, 2, 3), v.aaaa.ovvv, (4, 5, 6, 2), (1, 3, 0, 4, 5, 6)) - x294 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x294 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x294 += einsum(t2.abab, (0, 1, 2, 3), x46, (4, 5, 2, 6), (1, 3, 4, 0, 6, 5)) del x46 - x295 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x295 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x296 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x296 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x296 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x296 += einsum(x295, (0, 1, 2, 3), (1, 0, 2, 3)) del x295 - x297 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x297 += einsum(t2.abab, (0, 1, 2, 3), x296, (4, 5, 6, 2), (1, 3, 4, 5, 0, 6)) del x296 - x298 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x298 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x298 += einsum(t1.aa, (0, 1), x23, (2, 0, 3, 4), (2, 3, 1, 4)) del x23 - x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x299 += einsum(x298, (0, 1, 2, 3), (0, 1, 3, 2)) del x298 x299 += einsum(x78, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x78 - x300 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x300 += einsum(t2.abab, (0, 1, 2, 3), x299, (4, 5, 2, 6), (1, 3, 4, 5, 0, 6)) del x299 - x301 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x301 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x301 += einsum(x64, (0, 1, 2, 3), (3, 1, 0, 2)) del x64 x301 += einsum(x37, (0, 1, 2, 3), (2, 1, 0, 3)) x301 += einsum(x37, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x37 - x302 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x302 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x302 += einsum(t2.abab, (0, 1, 2, 3), x301, (0, 4, 5, 6), (1, 3, 4, 5, 6, 2)) del x301 - x303 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x303 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x303 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x303 += einsum(x112, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x112 - x304 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x304 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x304 += einsum(t2.abab, (0, 1, 2, 3), x303, (3, 4, 5, 6), (1, 4, 5, 6, 0, 2)) del x303 - x305 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x305 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x305 += einsum(t1.bb, (0, 1), x21, (0, 2, 3, 4), (1, 2, 3, 4)) del x21 - x306 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x306 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x306 += einsum(x113, (0, 1, 2, 3), (1, 0, 2, 3)) del x113 x306 += einsum(x305, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x305 - x307 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x307 += einsum(t2.abab, (0, 1, 2, 3), x306, (3, 4, 5, 6), (1, 4, 5, 6, 0, 2)) del x306 - x308 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x308 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x308 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x308 += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) del x121 - x309 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x309 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x309 += einsum(t2.abab, (0, 1, 2, 3), x308, (1, 4, 5, 6), (4, 3, 5, 6, 0, 2)) - x310 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x310 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x310 += einsum(t1.aa, (0, 1), x118, (2, 3, 4, 1), (2, 3, 0, 4)) del x118 - x311 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x311 += einsum(t2.abab, (0, 1, 2, 3), x310, (4, 1, 5, 6), (4, 3, 5, 6, 0, 2)) - x312 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x312 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x312 += einsum(x297, (0, 1, 2, 3, 4, 5), (0, 1, 4, 3, 2, 5)) * -1.0 del x297 x312 += einsum(x300, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -1392,56 +1393,56 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x309 x312 += einsum(x311, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x311 - x313 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x313 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x313 += einsum(t1.aa, (0, 1), x312, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) del x312 - x314 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x314 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x314 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x314 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x314 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) del x70 - x315 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x315 += einsum(t1.aa, (0, 1), x314, (2, 3, 1, 4), (2, 3, 0, 4)) del x314 - x316 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x316 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x316 += einsum(x315, (0, 1, 2, 3), (2, 1, 0, 3)) del x315 - x317 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x317 += einsum(t2.abab, (0, 1, 2, 3), x316, (4, 0, 5, 6), (1, 3, 4, 5, 6, 2)) del x316 - x318 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x318 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x318 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x318 += einsum(x282, (0, 1, 2, 3), (0, 1, 2, 3)) del x282 x318 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) del x101 - x319 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x319 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x319 += einsum(t2.abab, (0, 1, 2, 3), x318, (3, 4, 5, 6), (1, 4, 5, 0, 6, 2)) del x318 - x320 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x320 += einsum(t1.bb, (0, 1), x71, (0, 2, 3, 4), (1, 2, 3, 4)) del x71 - x321 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x321 += einsum(x283, (0, 1, 2, 3), (1, 0, 2, 3)) del x283 x321 += einsum(x320, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x320 - x322 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x322 += einsum(t2.abab, (0, 1, 2, 3), x321, (3, 4, 5, 6), (1, 4, 5, 0, 6, 2)) del x321 - x323 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x323 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x323 += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 5, 6), (4, 3, 0, 5, 2, 6)) - x324 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x324 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x324 += einsum(x117, (0, 1, 2, 3), (0, 1, 3, 2)) - x325 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x325 += einsum(t1.aa, (0, 1), x324, (2, 3, 1, 4), (2, 3, 0, 4)) del x324 - x326 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x326 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x326 += einsum(t2.abab, (0, 1, 2, 3), x325, (4, 1, 5, 6), (4, 3, 5, 0, 6, 2)) del x325 - x327 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x327 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x327 += einsum(x293, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x293 x327 += einsum(x294, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -1463,14 +1464,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x327, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) t3new_abaaba += einsum(x327, (0, 1, 2, 3, 4, 5), (3, 0, 2, 5, 1, 4)) * -1.0 del x327 - x328 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x328 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x328 += einsum(t1.bb, (0, 1), v.aabb.oovv, (2, 3, 4, 1), (0, 4, 2, 3)) - x329 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x329 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x329 += einsum(f.aa.ov, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 0, 2)) - x330 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x330 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x330 += einsum(t1.bb, (0, 1), x308, (0, 2, 3, 4), (2, 1, 3, 4)) del x308 - x331 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x331 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x331 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x331 += einsum(x328, (0, 1, 2, 3), (0, 1, 3, 2)) del x328 @@ -1478,30 +1479,30 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x329 x331 += einsum(x330, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x330 - x332 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x332 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x332 += einsum(t2.aaaa, (0, 1, 2, 3), x331, (4, 5, 1, 6), (4, 5, 6, 0, 2, 3)) * -2.0 del x331 - x333 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x333 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x333 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x333 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) - x334 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x334 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x334 += einsum(t1.aa, (0, 1), x333, (2, 3, 4, 1), (2, 3, 4, 0)) del x333 - x335 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x335 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x335 += einsum(t1.bb, (0, 1), x310, (2, 0, 3, 4), (2, 1, 3, 4)) del x310 - x336 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x336 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x336 += einsum(x334, (0, 1, 2, 3), (0, 1, 3, 2)) del x334 x336 += einsum(x335, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x335 - x337 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x337 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x337 += einsum(t2.aaaa, (0, 1, 2, 3), x336, (4, 5, 6, 1), (4, 5, 6, 0, 2, 3)) * -2.0 del x336 - x338 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x338 += einsum(x230, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 6), (3, 5, 1, 2, 4, 6)) * -2.0 del x230 - x339 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x339 += einsum(x332, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -1.0 del x332 x339 += einsum(x337, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) @@ -1511,16 +1512,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x339, (0, 1, 2, 3, 4, 5), (2, 0, 3, 4, 1, 5)) t3new_abaaba += einsum(x339, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) * -1.0 del x339 - x340 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x340 += einsum(f.aa.vv, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (3, 6, 2, 4, 0, 5)) - x341 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x341 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x341 += einsum(x117, (0, 1, 2, 3), (1, 0, 3, 2)) del x117 - x342 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x342 += einsum(t1.bb, (0, 1), x341, (0, 2, 3, 4), (2, 1, 3, 4)) del x341 - x343 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x343 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x343 += einsum(x259, (0, 1, 2, 3), (0, 1, 2, 3)) del x259 @@ -1528,32 +1529,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x138 x343 += einsum(x342, (0, 1, 2, 3), (0, 1, 3, 2)) del x342 - x344 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x344 += einsum(t2.aaaa, (0, 1, 2, 3), x343, (4, 5, 3, 6), (4, 5, 0, 1, 6, 2)) * -2.0 del x343 - x345 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x345 += einsum(f.aa.ov, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (3, 6, 0, 2, 4, 5)) - x346 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x346 += einsum(t1.bb, (0, 1), x4, (0, 2, 3, 4), (2, 1, 3, 4)) del x4 - x347 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x347 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x347 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) del x99 x347 += einsum(x346, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x346 - x348 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x348 += einsum(t2.aaaa, (0, 1, 2, 3), x347, (4, 5, 6, 3), (4, 5, 6, 0, 1, 2)) * -1.0 del x347 - x349 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x349 += einsum(x345, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x345 x349 += einsum(x348, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) del x348 - x350 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum(t1.aa, (0, 1), x349, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x349 - x351 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x351 += einsum(x340, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -2.0 del x340 x351 += einsum(x344, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) @@ -1563,39 +1564,39 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x351, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) t3new_abaaba += einsum(x351, (0, 1, 2, 3, 4, 5), (3, 0, 2, 5, 1, 4)) * -1.0 del x351 - x352 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x352 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x352 += einsum(f.bb.ov, (0, 1), t1.bb, (0, 2), (1, 2)) - x353 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x353 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x353 += einsum(f.bb.vv, (0, 1), (0, 1)) x353 += einsum(x352, (0, 1), (0, 1)) * -1.0 del x352 t3new_abaaba += einsum(x353, (0, 1), t3.abaaba, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * 2.0 - x354 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x354 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x354 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x355 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x355 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x355 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x356 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x356 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x356 += einsum(t1.bb, (0, 1), x355, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x355 - x357 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x357 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x357 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x357 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x358 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x358 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x358 += einsum(t2.bbbb, (0, 1, 2, 3), x357, (4, 5, 3, 6), (4, 5, 0, 1, 6, 2)) * -1.0 - x359 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x359 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x359 += einsum(x356, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x356 x359 += einsum(x358, (0, 1, 2, 3, 4, 5), (3, 2, 1, 0, 5, 4)) del x358 - x360 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x360 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x360 += einsum(t1.bb, (0, 1), x359, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x359 - x361 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x361 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x361 += einsum(x354, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x354 x361 += einsum(x360, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x360 - t3new_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + t3new_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) t3new_bbbbbb += einsum(x361, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_bbbbbb += einsum(x361, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new_bbbbbb += einsum(x361, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -1615,33 +1616,33 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x361, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_bbbbbb += einsum(x361, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x361 - x362 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x362 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x362 += einsum(x353, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) * 6.0 del x353 t3new_bbbbbb += einsum(x362, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) t3new_bbbbbb += einsum(x362, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -1.0 t3new_bbbbbb += einsum(x362, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x362 - x363 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x363 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x363 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.oooo, (4, 5, 6, 1), (0, 4, 5, 6, 2, 3)) - x364 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x364 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x364 += einsum(t2.bbbb, (0, 1, 2, 3), x157, (4, 5, 1, 6), (5, 4, 0, 6, 2, 3)) del x157 - x365 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x365 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x365 += einsum(x171, (0, 1, 2, 3), (0, 2, 1, 3)) x365 += einsum(x171, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x171 - x366 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x366 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x366 += einsum(t2.bbbb, (0, 1, 2, 3), x365, (4, 1, 5, 6), (4, 5, 6, 0, 2, 3)) * -1.0 del x365 - x367 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x367 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x367 += einsum(x363, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 del x363 x367 += einsum(x364, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -1.0 del x364 x367 += einsum(x366, (0, 1, 2, 3, 4, 5), (0, 3, 2, 1, 5, 4)) * -1.0 del x366 - x368 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x368 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x368 += einsum(t1.bb, (0, 1), x367, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x367 t3new_bbbbbb += einsum(x368, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -1663,21 +1664,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x368, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_bbbbbb += einsum(x368, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -1.0 del x368 - x369 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x369 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x369 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 1, 5, 6), (0, 4, 5, 2, 3, 6)) - x370 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x370 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x370 += einsum(t1.bb, (0, 1), x163, (2, 3, 1, 4), (0, 2, 3, 4)) del x163 - x371 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x371 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x371 += einsum(t2.bbbb, (0, 1, 2, 3), x370, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x370 - x372 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x372 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x372 += einsum(t1.bb, (0, 1), x357, (2, 3, 1, 4), (2, 3, 0, 4)) del x357 - x373 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x373 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x373 += einsum(t2.bbbb, (0, 1, 2, 3), x372, (4, 1, 5, 6), (5, 4, 0, 6, 2, 3)) * -2.0 del x372 - x374 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x374 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x374 += einsum(x369, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x369 x374 += einsum(x371, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 @@ -1703,34 +1704,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x374, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new_bbbbbb += einsum(x374, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x374 - x375 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x375 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x375 += einsum(x278, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) * 6.0 del x278 t3new_bbbbbb += einsum(x375, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_bbbbbb += einsum(x375, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 4, 5)) * -1.0 t3new_bbbbbb += einsum(x375, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) del x375 - x376 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x376 += einsum(t2.bbbb, (0, 1, 2, 3), x142, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) del x142 - x377 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x377 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x377 += einsum(t2.bbbb, (0, 1, 2, 3), x1, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) del x1 - x378 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x378 += einsum(t1.bb, (0, 1), x377, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x377 - x379 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x379 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x379 += einsum(t2.bbbb, (0, 1, 2, 3), x169, (4, 5, 6, 3), (5, 4, 0, 1, 6, 2)) del x169 - x380 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x380 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x380 += einsum(x378, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 del x378 x380 += einsum(x379, (0, 1, 2, 3, 4, 5), (0, 3, 2, 1, 5, 4)) * -1.0 del x379 - x381 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x381 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x381 += einsum(t1.bb, (0, 1), x380, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x380 - x382 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x382 += einsum(x376, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 del x376 x382 += einsum(x381, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 @@ -1754,9 +1755,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x382, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_bbbbbb += einsum(x382, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x382 - x383 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x383 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x383 += einsum(f.bb.ov, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) - x384 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x384 += einsum(t2.bbbb, (0, 1, 2, 3), x383, (1, 4, 5, 6), (5, 4, 0, 6, 2, 3)) * -1.0 del x383 t3new_bbbbbb += einsum(x384, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -4.0 diff --git a/ebcc/codegen/UCCD.py b/ebcc/codegen/UCCD.py index e6db11df..ebc8bf96 100644 --- a/ebcc/codegen/UCCD.py +++ b/ebcc/codegen/UCCD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy @@ -16,30 +17,30 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new = Namespace() # T amplitudes - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.oovv, (4, 0, 5, 3), (4, 1, 2, 5)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x1 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x1 += einsum(x0, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x0 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(t2.abab, (0, 1, 2, 3), x1, (1, 3, 4, 5), (0, 4, 2, 5)) del x1 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x3 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(t2.aaaa, (0, 1, 2, 3), x3, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x3 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(x2, (0, 1, 2, 3), (0, 1, 2, 3)) del x2 x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -49,19 +50,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x5, (0, 1, 2, 3), (1, 0, 3, 2)) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x7 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x9 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x9 += einsum(x7, (0, 1), (0, 1)) x9 += einsum(x8, (0, 1), (0, 1)) * 2.0 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(x9, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x9 - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(x6, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x6 x11 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -69,25 +70,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x11, (0, 1, 2, 3), (1, 0, 2, 3)) del x11 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x12 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(t2.aaaa, (0, 1, 2, 3), x12, (1, 4, 3, 5), (4, 0, 5, 2)) - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(t2.aaaa, (0, 1, 2, 3), x13, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x13 - x15 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x15 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x16 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x16 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x17 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(x15, (0, 1), (0, 1)) x17 += einsum(x16, (0, 1), (0, 1)) * 2.0 - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(x17, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -2.0 del x17 - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x14 x19 += einsum(x18, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -95,17 +96,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x19, (0, 1, 2, 3), (0, 1, 3, 2)) del x19 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x21 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x21 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x21 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x22 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.abab, (0, 1, 2, 3), x21, (1, 4, 3, 5), (4, 5, 0, 2)) - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(t2.abab, (0, 1, 2, 3), x22, (1, 3, 4, 5), (4, 0, 5, 2)) * -1.0 del x22 - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x24 += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x20 @@ -114,18 +115,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x24, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) del x24 - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x25 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x25 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (4, 0, 1, 5)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x25, (0, 4, 5, 1), (5, 4, 2, 3)) * -2.0 del x25 - x26 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) t2new_abab += einsum(x26, (0, 1, 2, 3), (2, 0, 3, 1)) * 2.0 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x27 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x28 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x28 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) @@ -133,25 +134,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): del x27 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x28, (0, 4, 2, 5), (4, 1, 5, 3)) del x28 - x29 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x29 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x29 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x29 += einsum(t2.bbbb, (0, 1, 2, 3), x21, (1, 4, 5, 3), (4, 0, 5, 2)) * -1.0 del x21 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x29, (1, 4, 3, 5), (0, 4, 2, 5)) * -2.0 del x29 - x30 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x30 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (5, 1, 4, 2)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x30, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x30 - x31 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x31 += einsum(x26, (0, 1, 2, 3), (0, 1, 2, 3)) del x26 t2new_abab += einsum(t2.aaaa, (0, 1, 2, 3), x31, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 del x31 - x32 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x32 += einsum(x15, (0, 1), (1, 0)) del x15 @@ -159,22 +160,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): del x16 t2new_abab += einsum(x32, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x32 - x33 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x33 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x34 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x34 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x35 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x35 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x35 += einsum(x33, (0, 1), (1, 0)) * 2.0 x35 += einsum(x34, (0, 1), (1, 0)) t2new_abab += einsum(x35, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x35 - x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x36 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (5, 1, 4, 0)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x36, (1, 4, 0, 5), (5, 4, 2, 3)) del x36 - x37 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(f.aa.oo, (0, 1), (0, 1)) x37 += einsum(x7, (0, 1), (1, 0)) del x7 @@ -182,26 +183,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): del x8 t2new_abab += einsum(x37, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x37 - x38 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x38 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x39 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x39 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x40 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x40 += einsum(f.bb.oo, (0, 1), (0, 1)) x40 += einsum(x38, (0, 1), (1, 0)) * 2.0 x40 += einsum(x39, (0, 1), (1, 0)) t2new_abab += einsum(x40, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x40 - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x42 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x42 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x42 += einsum(x41, (0, 1, 2, 3), (1, 0, 3, 2)) - x43 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x43 += einsum(t2.bbbb, (0, 1, 2, 3), x42, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x42 - x44 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x44 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) del x41 x44 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -211,39 +212,39 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x44, (0, 1, 2, 3), (1, 0, 3, 2)) del x44 - x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x45 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x46 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x46 += einsum(x45, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x45 t2new_bbbb += einsum(x46, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 - x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x47 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x47 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(t2.bbbb, (0, 1, 2, 3), x47, (1, 4, 5, 3), (0, 4, 2, 5)) del x47 - x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x49 += einsum(t2.bbbb, (0, 1, 2, 3), x48, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x48 - x50 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.abab, (0, 1, 2, 3), x12, (0, 4, 2, 5), (1, 3, 4, 5)) del x12 - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum(t2.abab, (0, 1, 2, 3), x50, (4, 5, 0, 2), (4, 1, 5, 3)) * -1.0 del x50 - x52 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x52 += einsum(x33, (0, 1), (0, 1)) del x33 x52 += einsum(x34, (0, 1), (0, 1)) * 0.5 del x34 - x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum(x52, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 4, 0)) * -4.0 del x52 - x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x54 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x49 x54 += einsum(x51, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -253,17 +254,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) del x54 - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x56 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x56 += einsum(x38, (0, 1), (0, 1)) del x38 x56 += einsum(x39, (0, 1), (0, 1)) * 0.5 del x39 - x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum(x56, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -4.0 del x56 - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x58 += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x55 x58 += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -271,7 +272,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x58, (0, 1, 2, 3), (1, 0, 2, 3)) del x58 - x59 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x59 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x59 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 5, 2), (4, 0, 5, 1)) * -1.0 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x59, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 @@ -287,25 +288,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new = Namespace() # L amplitudes - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) l2new_aaaa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x0, (4, 5, 0, 2), (3, 1, 4, 5)) * -2.0 del x0 - x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum(t2.aaaa, (0, 1, 2, 3), x2, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x4 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x4 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -313,45 +314,45 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs x4 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x3 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x4, (2, 4, 0, 5), (5, 1, 4, 3)) - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(l2.aaaa, (0, 1, 2, 3), x4, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x4 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x7 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t2.abab, (0, 1, 2, 3), x2, (0, 4, 2, 5), (1, 3, 4, 5)) del x2 - x8 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x8 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x6 x8 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x7 l2new_abab += einsum(l2.bbbb, (0, 1, 2, 3), x8, (3, 1, 4, 5), (5, 0, 4, 2)) * 2.0 - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum(l2.abab, (0, 1, 2, 3), x8, (3, 1, 4, 5), (4, 2, 5, 0)) del x8 - x10 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x11 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x12 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(x10, (0, 1), (0, 1)) x12 += einsum(x11, (0, 1), (0, 1)) * 2.0 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(x12, (0, 1), v.aaaa.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) del x12 - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x15 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x15 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x16 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(x14, (0, 1), (0, 1)) x16 += einsum(x15, (0, 1), (0, 1)) * 2.0 - x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(x16, (0, 1), v.aaaa.ovov, (2, 3, 1, 4), (0, 2, 4, 3)) del x16 - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(x5, (0, 1, 2, 3), (1, 0, 3, 2)) del x5 x18 += einsum(x9, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -365,32 +366,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new_aaaa += einsum(x18, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x18, (0, 1, 2, 3), (3, 2, 1, 0)) del x18 - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 1, 3), (0, 4)) - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(x19, (0, 1), (0, 1)) x21 += einsum(x20, (0, 1), (0, 1)) * 2.0 - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(x21, (0, 1), l2.aaaa, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x21 l2new_aaaa += einsum(x22, (0, 1, 2, 3), (2, 3, 1, 0)) l2new_aaaa += einsum(x22, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x22 - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x24 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x25 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x25 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x26 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(x24, (0, 1), (0, 1)) x26 += einsum(x25, (0, 1), (0, 1)) * 2.0 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(x26, (0, 1), l2.aaaa, (2, 0, 3, 4), (3, 4, 1, 2)) * -2.0 del x26 - x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x28 += einsum(x23, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x23 @@ -399,29 +400,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new_aaaa += einsum(x28, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x28, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x28 - x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x29 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x29, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x29, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x29 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x30 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 5, 2), (0, 4, 5, 1)) * -1.0 l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x30, (3, 4, 5, 2), (0, 1, 5, 4)) * 2.0 del x30 - x31 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x31, (4, 2, 5, 0), (1, 3, 5, 4)) del x31 - x32 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x32 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x33 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x33 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x33 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x34 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x34 += einsum(t2.bbbb, (0, 1, 2, 3), x33, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 del x33 - x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x35 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x35 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x35 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -429,32 +430,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs x35 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x34 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x35, (3, 4, 1, 5), (0, 5, 2, 4)) - x36 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x37 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x37 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x38 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x38 += einsum(t2.abab, (0, 1, 2, 3), x37, (1, 4, 3, 5), (4, 5, 0, 2)) del x37 - x39 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x39 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x39 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x36 x39 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x38 l2new_abab += einsum(l2.aaaa, (0, 1, 2, 3), x39, (4, 5, 3, 1), (0, 5, 2, 4)) * 2.0 - x40 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x40 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 5, 2, 4)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x40, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x40 - x41 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x41 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (3, 5, 0, 4)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x41, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x41 - x42 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x42 += einsum(x24, (0, 1), (0, 1)) del x24 @@ -462,38 +463,38 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs del x25 l2new_abab += einsum(x42, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x42 - x43 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x43 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x44 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x44 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x45 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x45 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x45 += einsum(x43, (0, 1), (0, 1)) * 2.0 x45 += einsum(x44, (0, 1), (0, 1)) l2new_abab += einsum(x45, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x45 - x46 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x46 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x46 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 0, 4)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x46, (3, 4, 2, 5), (0, 1, 5, 4)) del x46 - x47 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(x10, (0, 1), (0, 1)) * 0.5 del x10 x47 += einsum(x11, (0, 1), (0, 1)) del x11 l2new_abab += einsum(x47, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (0, 4, 2, 3)) * -2.0 del x47 - x48 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x49 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x49 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x50 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x50 += einsum(x48, (0, 1), (0, 1)) * 2.0 x50 += einsum(x49, (0, 1), (0, 1)) l2new_abab += einsum(x50, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (3, 0, 2, 4)) * -1.0 del x50 - x51 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x51 += einsum(f.aa.oo, (0, 1), (0, 1)) x51 += einsum(x19, (0, 1), (0, 1)) del x19 @@ -501,59 +502,59 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs del x20 l2new_abab += einsum(x51, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x51 - x52 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x52 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 1, 3), (0, 4)) - x53 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x53 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x54 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x54 += einsum(f.bb.oo, (0, 1), (0, 1)) x54 += einsum(x52, (0, 1), (0, 1)) * 2.0 x54 += einsum(x53, (0, 1), (0, 1)) l2new_abab += einsum(x54, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x54 - x55 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x55 += einsum(x14, (0, 1), (0, 1)) * 0.5 del x14 x55 += einsum(x15, (0, 1), (0, 1)) del x15 l2new_abab += einsum(x55, (0, 1), v.aabb.ovov, (1, 2, 3, 4), (2, 4, 0, 3)) * -2.0 del x55 - x56 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x56 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x57 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x57 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x58 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x58 += einsum(x56, (0, 1), (0, 1)) * 2.0 x58 += einsum(x57, (0, 1), (0, 1)) l2new_abab += einsum(x58, (0, 1), v.aabb.ovov, (2, 3, 1, 4), (3, 4, 2, 0)) * -1.0 del x58 - x59 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x59 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) l2new_bbbb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x59, (4, 5, 0, 2), (3, 1, 4, 5)) * -2.0 del x59 - x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x60 += einsum(l2.bbbb, (0, 1, 2, 3), x35, (3, 4, 1, 5), (2, 4, 0, 5)) * 2.0 del x35 - x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x61 += einsum(l2.abab, (0, 1, 2, 3), x39, (4, 5, 2, 0), (4, 3, 5, 1)) del x39 - x62 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x62 += einsum(x48, (0, 1), (0, 1)) del x48 x62 += einsum(x49, (0, 1), (0, 1)) * 0.5 del x49 - x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x63 += einsum(x62, (0, 1), v.bbbb.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) * 2.0 del x62 - x64 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x64 += einsum(x56, (0, 1), (0, 1)) del x56 x64 += einsum(x57, (0, 1), (0, 1)) * 0.5 del x57 - x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x64, (0, 1), v.bbbb.ovov, (2, 3, 1, 4), (0, 2, 4, 3)) * 2.0 del x64 - x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) del x60 x66 += einsum(x61, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -567,17 +568,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new_bbbb += einsum(x66, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x66, (0, 1, 2, 3), (3, 2, 1, 0)) del x66 - x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x67 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x68 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x68 += einsum(x43, (0, 1), (0, 1)) del x43 x68 += einsum(x44, (0, 1), (0, 1)) * 0.5 del x44 - x69 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x69 += einsum(x68, (0, 1), l2.bbbb, (2, 0, 3, 4), (3, 4, 2, 1)) * -4.0 del x68 - x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x70 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x70 += einsum(x67, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x67 @@ -586,23 +587,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs l2new_bbbb += einsum(x70, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x70, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x70 - x71 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x71 += einsum(x52, (0, 1), (0, 1)) del x52 x71 += einsum(x53, (0, 1), (0, 1)) * 0.5 del x53 - x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x72 += einsum(x71, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 1, 2, 3)) * -4.0 del x71 l2new_bbbb += einsum(x72, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_bbbb += einsum(x72, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x72 - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x73, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x73, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x73 - x74 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x74 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x74 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 5, 2), (0, 4, 1, 5)) * -1.0 l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x74, (3, 4, 2, 5), (0, 1, 4, 5)) * -2.0 @@ -622,24 +623,24 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) rdm1_f_aa_oo += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (4, 2)) * -1.0 rdm1_f_aa_oo += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (4, 2)) * -2.0 - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) rdm1_f_bb_oo += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (4, 2)) * -2.0 rdm1_f_bb_oo += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (4, 3)) * -1.0 - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_aa = np.block([[rdm1_f_aa_oo, rdm1_f_aa_ov], [rdm1_f_aa_vo, rdm1_f_aa_vv]]) rdm1_f_bb = np.block([[rdm1_f_bb_oo, rdm1_f_bb_ov], [rdm1_f_bb_vo, rdm1_f_bb_vv]]) @@ -657,75 +658,75 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (4, 1, 2, 5)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x0, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 del x0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(x1, (0, 1), (0, 1)) x3 += einsum(x2, (0, 1), (0, 1)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x3, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x3, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x3, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x3, (2, 3), (3, 0, 2, 1)) * -1.0 - x4 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x4, (0, 1, 2, 3), (3, 1, 2, 0)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 0, 5), (5, 4, 2, 3)) del x4 - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(delta.aa.oo, (0, 1), (0, 1)) * -1.0 x5 += einsum(x1, (0, 1), (0, 1)) x5 += einsum(x2, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x5, (2, 3), (3, 0, 2, 1)) * -1.0 del x5 - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x7 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x7 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x8 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x8 += einsum(x6, (0, 1), (0, 1)) * 2.0 x8 += einsum(x7, (0, 1), (0, 1)) rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x8, (2, 3), (0, 3, 1, 2)) * -1.0 del x8 - x9 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x9 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x9, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x9, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 del x9 - x10 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x10 += einsum(x6, (0, 1), (0, 1)) del x6 x10 += einsum(x7, (0, 1), (0, 1)) * 0.5 @@ -735,40 +736,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -2.0 rdm2_f_abab_oovv += einsum(x10, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 - x11 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(x11, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(t2.abab, (0, 1, 2, 3), x11, (1, 3, 4, 5), (4, 0, 5, 2)) del x11 rdm2_f_aaaa_oovv += einsum(x12, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 rdm2_f_aaaa_oovv += einsum(x12, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(x13, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(x13, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(x13, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(x13, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(t2.aaaa, (0, 1, 2, 3), x13, (1, 4, 3, 5), (0, 4, 2, 5)) del x13 - x15 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x15 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x16 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x16 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x17 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(x15, (0, 1), (0, 1)) x17 += einsum(x16, (0, 1), (0, 1)) * 2.0 - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(x17, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x17 - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) * -8.0 del x14 x19 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -776,16 +777,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_aaaa_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_aaaa_oovv += einsum(x19, (0, 1, 2, 3), (0, 1, 3, 2)) del x19 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(x3, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x3 rdm2_f_aaaa_oovv += einsum(x20, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_oovv += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) del x20 - x21 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) rdm2_f_abab_ovvo += einsum(x21, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.abab, (0, 1, 2, 3), x21, (1, 3, 4, 5), (0, 4, 2, 5)) del x21 rdm2_f_aaaa_oovv += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -793,56 +794,56 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_aaaa_oovv += einsum(x22, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 rdm2_f_aaaa_oovv += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x22 - x23 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 4, 2, 5), (0, 4, 5, 3)) - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(x23, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x23 - x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x24 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(x24, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(x24, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(x24, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(x24, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x25 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x25 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x25, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x25, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x25, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x25, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x26 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) x26 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x25 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x26, (1, 4, 3, 5), (0, 4, 2, 5)) * 4.0 del x26 - x27 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x27 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(x27, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x28 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x28, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x29 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) x29 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x29, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 del x29 - x30 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x30 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x30 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x31 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x31 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x31 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x32 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x32 += einsum(x30, (0, 1), (0, 1)) x32 += einsum(x31, (0, 1), (0, 1)) * 0.5 rdm2_f_abab_oovv += einsum(x32, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 rdm2_f_abab_ovov += einsum(delta.aa.oo, (0, 1), x32, (2, 3), (0, 2, 1, 3)) * 2.0 - x33 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x33 += einsum(x15, (0, 1), (0, 1)) * 0.5 del x15 x33 += einsum(x16, (0, 1), (0, 1)) @@ -854,23 +855,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x33, (2, 3), (2, 0, 3, 1)) * 2.0 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x33, (2, 3), (2, 0, 3, 1)) * 2.0 del x33 - x34 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(x1, (0, 1), (0, 1)) * 0.5 del x1 x34 += einsum(x2, (0, 1), (0, 1)) del x2 rdm2_f_abab_oovv += einsum(x34, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 del x34 - x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x35 += einsum(t2.bbbb, (0, 1, 2, 3), x24, (1, 4, 3, 5), (4, 0, 5, 2)) del x24 - x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x36 += einsum(t2.abab, (0, 1, 2, 3), x28, (4, 5, 0, 2), (4, 1, 5, 3)) del x28 - x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x37 += einsum(x32, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -4.0 del x32 - x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 del x35 x38 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -880,7 +881,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_bbbb_oovv += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x38, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x38 - x39 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x39 += einsum(t2.abab, (0, 1, 2, 3), x27, (4, 5, 0, 2), (4, 1, 5, 3)) del x27 rdm2_f_bbbb_oovv += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -888,20 +889,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_bbbb_oovv += einsum(x39, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 rdm2_f_bbbb_oovv += einsum(x39, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x39 - x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x40 += einsum(x10, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 del x10 rdm2_f_bbbb_oovv += einsum(x40, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_bbbb_oovv += einsum(x40, (0, 1, 2, 3), (1, 0, 3, 2)) del x40 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x41, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x41, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x41, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x41, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x41 - x42 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x42 += einsum(x30, (0, 1), (0, 1)) * 2.0 del x30 x42 += einsum(x31, (0, 1), (0, 1)) @@ -911,30 +912,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t2=None, l2=None, **kwargs rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x42, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x42, (2, 3), (2, 0, 3, 1)) del x42 - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_aaaa = pack_2e(rdm2_f_aaaa_oooo, rdm2_f_aaaa_ooov, rdm2_f_aaaa_oovo, rdm2_f_aaaa_ovoo, rdm2_f_aaaa_vooo, rdm2_f_aaaa_oovv, rdm2_f_aaaa_ovov, rdm2_f_aaaa_ovvo, rdm2_f_aaaa_voov, rdm2_f_aaaa_vovo, rdm2_f_aaaa_vvoo, rdm2_f_aaaa_ovvv, rdm2_f_aaaa_vovv, rdm2_f_aaaa_vvov, rdm2_f_aaaa_vvvo, rdm2_f_aaaa_vvvv) rdm2_f_abab = pack_2e(rdm2_f_abab_oooo, rdm2_f_abab_ooov, rdm2_f_abab_oovo, rdm2_f_abab_ovoo, rdm2_f_abab_vooo, rdm2_f_abab_oovv, rdm2_f_abab_ovov, rdm2_f_abab_ovvo, rdm2_f_abab_voov, rdm2_f_abab_vovo, rdm2_f_abab_vvoo, rdm2_f_abab_ovvv, rdm2_f_abab_vovv, rdm2_f_abab_vvov, rdm2_f_abab_vvvo, rdm2_f_abab_vvvv) diff --git a/ebcc/codegen/UCCSD.py b/ebcc/codegen/UCCSD.py index c2c387cc..559120b0 100644 --- a/ebcc/codegen/UCCSD.py +++ b/ebcc/codegen/UCCSD.py @@ -1,7 +1,8 @@ # Code generated by qwick. -import numpy as np +from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 2, 1, 3), ()) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(f.aa.ov, (0, 1), (0, 1)) * 2.0 x1 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) * 2.0 x1 += einsum(t1.aa, (0, 1), x0, (0, 2, 3, 1), (2, 3)) * -1.0 del x0 e_cc += einsum(t1.aa, (0, 1), x1, (0, 1), ()) * 0.5 del x1 - x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(f.bb.ov, (0, 1), (0, 1)) * 2.0 x3 += einsum(t1.bb, (0, 1), x2, (0, 2, 3, 1), (2, 3)) * -1.0 del x2 @@ -36,52 +37,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x2 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 3, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x2, (1, 3, 0, 4), (4, 2)) * -1.0 del x2 - x3 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x4 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x4 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x4, (4, 1, 0, 3), (4, 2)) * -2.0 del x4 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x5 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x5, (0, 4, 1, 3), (4, 2)) * 2.0 del x5 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x6 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x6, (2, 3, 4, 1), (4, 0)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x6, (4, 3, 0, 1), (4, 2)) - x7 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x7, (0, 1), (0, 1)) - x8 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x8 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x8 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x9 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), x8, (0, 2, 3, 1), (2, 3)) - x10 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x10 += einsum(f.bb.ov, (0, 1), (0, 1)) x10 += einsum(x7, (0, 1), (0, 1)) del x7 @@ -89,12 +90,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x9 t1new_aa += einsum(x10, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x10, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(t1.aa, (0, 1), x11, (0, 2, 3, 1), (2, 3)) - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(f.aa.ov, (0, 1), (0, 1)) x13 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -102,24 +103,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x12 t1new_aa += einsum(x13, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x13, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 - x15 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x15 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x16 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x17 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 1, 3), (0, 4)) - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x18 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(t1.aa, (0, 1), x18, (0, 2, 3, 1), (2, 3)) - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t1.aa, (0, 1), x13, (2, 1), (0, 2)) - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(f.aa.oo, (0, 1), (0, 1)) x21 += einsum(x15, (0, 1), (1, 0)) x21 += einsum(x16, (0, 1), (1, 0)) @@ -128,48 +129,48 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x21 += einsum(x20, (0, 1), (1, 0)) t1new_aa += einsum(t1.aa, (0, 1), x21, (0, 2), (2, 1)) * -1.0 del x21 - x22 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(f.aa.vv, (0, 1), (0, 1)) x22 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 2, 3, 1), (2, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x22, (1, 2), (0, 2)) del x22 - x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x24 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x24 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x24, (4, 0, 1, 3), (4, 2)) * 2.0 del x24 - x25 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x26 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x26 += einsum(x25, (0, 1, 2, 3), (1, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x26, (1, 4, 0, 2), (4, 3)) * -1.0 - x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x27 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x27, (0, 4, 3, 1), (4, 2)) * -2.0 del x27 - x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x28 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x28, (0, 2, 1, 3), (2, 3)) * -1.0 del x28 - x29 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x29 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x32 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x32 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x33 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x33 += einsum(t1.bb, (0, 1), x32, (0, 2, 3, 1), (2, 3)) - x34 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x34 += einsum(t1.bb, (0, 1), x10, (2, 1), (0, 2)) - x35 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x35 += einsum(f.bb.oo, (0, 1), (0, 1)) x35 += einsum(x29, (0, 1), (1, 0)) x35 += einsum(x30, (0, 1), (1, 0)) * 2.0 @@ -179,34 +180,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t1new_bb += einsum(t1.bb, (0, 1), x35, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x35, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x35 - x36 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x36 += einsum(f.bb.vv, (0, 1), (0, 1)) x36 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(t1.bb, (0, 1), x36, (1, 2), (0, 2)) del x36 - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(t2.aaaa, (0, 1, 2, 3), x38, (4, 5, 0, 1), (4, 5, 2, 3)) - x40 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(f.aa.oo, (0, 1), (0, 1)) x40 += einsum(x20, (0, 1), (0, 1)) del x20 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(x40, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x40 - x42 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x42 += einsum(x15, (0, 1), (1, 0)) x42 += einsum(x16, (0, 1), (1, 0)) x42 += einsum(x17, (0, 1), (1, 0)) * 2.0 x42 += einsum(x19, (0, 1), (1, 0)) * -1.0 del x19 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(x42, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x42 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(x37, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x37 x44 += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -218,59 +219,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) del x44 - x45 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), x45, (2, 3, 1, 4), (0, 2, 3, 4)) del x45 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t2.aaaa, (0, 1, 2, 3), x11, (1, 4, 5, 3), (0, 4, 2, 5)) - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(t2.aaaa, (0, 1, 2, 3), x47, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x47 - x49 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x50 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x51 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x52 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x52 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x53 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(t1.aa, (0, 1), x52, (0, 1, 2, 3), (2, 3)) - x54 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(x49, (0, 1), (1, 0)) * -1.0 x54 += einsum(x50, (0, 1), (1, 0)) x54 += einsum(x51, (0, 1), (1, 0)) * 2.0 x54 += einsum(x53, (0, 1), (1, 0)) * -1.0 del x53 - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(x54, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x54 - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(x13, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -2.0 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), x3, (2, 3, 4, 1), (2, 0, 4, 3)) - x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x59 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x59 += einsum(x58, (0, 1, 2, 3), (3, 1, 2, 0)) - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t1.aa, (0, 1), x59, (0, 2, 3, 4), (2, 3, 4, 1)) del x59 - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(x56, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x56 x61 += einsum(x57, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x57 x61 += einsum(x60, (0, 1, 2, 3), (1, 0, 2, 3)) del x60 - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(t1.aa, (0, 1), x61, (0, 2, 3, 4), (2, 3, 1, 4)) del x61 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 x63 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -282,59 +283,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x63, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x63 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x65 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(t2.abab, (0, 1, 2, 3), x65, (1, 3, 4, 5), (4, 0, 2, 5)) - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x67 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(x14, (0, 1, 2, 3), x67, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x14 - x69 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x70 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x70 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x70 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x69 - x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(t2.abab, (0, 1, 2, 3), x70, (1, 3, 4, 5), (0, 4, 2, 5)) del x70 - x72 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x72 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t1.aa, (0, 1), x72, (2, 3, 1, 4), (0, 2, 3, 4)) del x72 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(t2.aaaa, (0, 1, 2, 3), x73, (4, 1, 3, 5), (0, 4, 2, 5)) * -2.0 del x73 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(t1.aa, (0, 1), x38, (2, 3, 4, 0), (2, 4, 3, 1)) del x38 - x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x77 += einsum(t1.aa, (0, 1), x64, (2, 3, 1, 4), (0, 2, 3, 4)) - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(t2.abab, (0, 1, 2, 3), x1, (1, 3, 4, 5), (4, 0, 5, 2)) del x1 - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x79 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.aaaa, (0, 1, 2, 3), x79, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x81 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x3 - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum(t2.aaaa, (0, 1, 2, 3), x81, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x81 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(x75, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x75 x83 += einsum(x76, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -347,10 +348,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x80 x83 += einsum(x82, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x82 - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum(t1.aa, (0, 1), x83, (2, 0, 3, 4), (2, 3, 1, 4)) del x83 - x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) del x64 x85 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -368,15 +369,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x85, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x85, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x85 - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x87 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 4, 5, 3), (4, 5, 0, 2)) del x8 - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum(t2.abab, (0, 1, 2, 3), x87, (1, 3, 4, 5), (0, 4, 2, 5)) * -1.0 del x87 - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x89 += einsum(x86, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x86 @@ -385,37 +386,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x89, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x90 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x91 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x91 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x91 += einsum(x90, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 x91 += einsum(x58, (0, 1, 2, 3), (2, 1, 3, 0)) del x58 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x91, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x91 - x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t1.aa, (0, 1), x90, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x90 x92 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x92 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_aaaa += einsum(t1.aa, (0, 1), x92, (2, 3, 0, 4), (2, 3, 1, 4)) del x92 - x93 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x93 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab += einsum(x93, (0, 1, 2, 3), (2, 0, 3, 1)) - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x95 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x96 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x97 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x97 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x98 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x98 += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -426,13 +427,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x32 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x98, (1, 4, 3, 5), (0, 4, 2, 5)) del x98 - x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x99 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x99 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x100 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x101 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x101 += einsum(x67, (0, 1, 2, 3), x99, (0, 4, 5, 2), (4, 1, 5, 3)) * -1.0 @@ -443,7 +444,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x79 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x101, (0, 4, 2, 5), (4, 1, 5, 3)) * -2.0 del x101 - x102 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x102 += einsum(t1.aa, (0, 1), v.aabb.ooov, (2, 0, 3, 4), (3, 4, 2, 1)) * -0.5 x102 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -451,42 +452,42 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x67 t2new_abab += einsum(t2.bbbb, (0, 1, 2, 3), x102, (1, 3, 4, 5), (4, 0, 5, 2)) * 4.0 del x102 - x103 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x103 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x103 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 4), (4, 1, 2, 3)) x103 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 2, 0)) * -1.0 x103 += einsum(v.aabb.ovov, (0, 1, 2, 3), x6, (2, 4, 5, 1), (3, 4, 0, 5)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x103, (3, 4, 0, 5), (5, 1, 2, 4)) del x103 - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x104 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - x105 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x105 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x105 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) x105 += einsum(t1.bb, (0, 1), x26, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 del x26 t2new_abab += einsum(x104, (0, 1, 2, 3), x105, (4, 5, 0, 2), (1, 4, 3, 5)) del x104, x105 - x106 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x106 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x106 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) - x107 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x107 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (4, 0, 2, 3)) x107 += einsum(t1.aa, (0, 1), x106, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 del x106 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x107, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x107 - x108 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x108 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 4), (4, 1, 2, 3)) x108 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 2, 3, 4), (3, 4, 2, 1)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x108, (3, 4, 2, 5), (0, 1, 5, 4)) * -1.0 del x108 - x109 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x109 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x109 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 4, 1), (0, 4, 2, 3)) - x110 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x110 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x110 += einsum(x109, (0, 1, 2, 3), (1, 0, 3, 2)) x110 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 2, 0)) @@ -494,7 +495,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x6 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x110, (1, 4, 0, 5), (5, 4, 2, 3)) del x110 - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum(f.aa.vv, (0, 1), (0, 1)) * -0.5 x111 += einsum(x49, (0, 1), (1, 0)) * -0.5 del x49 @@ -507,16 +508,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x111 += einsum(t1.aa, (0, 1), x13, (0, 2), (2, 1)) * 0.5 t2new_abab += einsum(x111, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 del x111 - x112 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x113 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x114 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x115 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x115 += einsum(t1.bb, (0, 1), x97, (0, 1, 2, 3), (2, 3)) del x97 - x116 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x116 += einsum(x112, (0, 1), (1, 0)) * -1.0 x116 += einsum(x113, (0, 1), (1, 0)) * 2.0 @@ -525,7 +526,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x116 += einsum(t1.bb, (0, 1), x10, (0, 2), (2, 1)) t2new_abab += einsum(x116, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x116 - x117 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x117 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x117 += einsum(x15, (0, 1), (1, 0)) * 0.5 del x15 @@ -539,16 +540,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x13 t2new_abab += einsum(x117, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 del x117 - x118 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x118 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) del x65 - x119 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x119 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x119 += einsum(x109, (0, 1, 2, 3), (0, 1, 3, 2)) del x109 x119 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 4, 0)) - x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x120 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x120 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) x120 += einsum(t1.bb, (0, 1), x118, (2, 1, 3, 4), (2, 0, 3, 4)) @@ -557,34 +558,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x119 t2new_abab += einsum(t1.bb, (0, 1), x120, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x120 - x121 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x121 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab += einsum(t1.aa, (0, 1), x121, (2, 3, 1, 4), (0, 2, 4, 3)) del x121 - x122 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x122 += einsum(t1.bb, (0, 1), v.aabb.oovv, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab += einsum(t1.aa, (0, 1), x122, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x122 - x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(t1.bb, (0, 1), x123, (2, 3, 1, 4), (0, 2, 3, 4)) del x123 - x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(t2.bbbb, (0, 1, 2, 3), x95, (1, 4, 3, 5), (0, 4, 2, 5)) del x95 - x126 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), x125, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x125 - x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x127 += einsum(t2.abab, (0, 1, 2, 3), x11, (0, 4, 5, 2), (1, 3, 4, 5)) del x11 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(t2.abab, (0, 1, 2, 3), x127, (4, 5, 0, 2), (1, 4, 3, 5)) * -1.0 del x127 - x129 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(x112, (0, 1), (1, 0)) * -1.0 del x112 x129 += einsum(x113, (0, 1), (1, 0)) * 2.0 @@ -593,34 +594,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x114 x129 += einsum(x115, (0, 1), (1, 0)) * -1.0 del x115 - x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(x129, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x129 - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(x10, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 del x10 - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), x23, (2, 3, 4, 1), (2, 0, 4, 3)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x134 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x134 += einsum(x133, (0, 1, 2, 3), (3, 1, 2, 0)) del x133 - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), x134, (0, 2, 3, 4), (2, 3, 4, 1)) del x134 - x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x136 += einsum(x131, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x131 x136 += einsum(x132, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x132 x136 += einsum(x135, (0, 1, 2, 3), (1, 0, 2, 3)) del x135 - x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x137 += einsum(t1.bb, (0, 1), x136, (0, 2, 3, 4), (2, 3, 1, 4)) del x136 - x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x138 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) del x124 x138 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -634,57 +635,57 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x138, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x138, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x138 - x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x139 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum(t2.abab, (0, 1, 2, 3), x93, (4, 5, 0, 2), (4, 1, 3, 5)) del x93 - x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x141 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x141 += einsum(x94, (0, 1, 2, 3), (1, 0, 3, 2)) - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(t2.bbbb, (0, 1, 2, 3), x141, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x141 - x143 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x143 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum(t1.bb, (0, 1), x143, (2, 3, 1, 4), (0, 2, 3, 4)) del x143 - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(t2.bbbb, (0, 1, 2, 3), x144, (4, 1, 3, 5), (0, 4, 2, 5)) * -2.0 del x144 - x146 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x146 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x147 += einsum(t1.bb, (0, 1), x146, (2, 3, 4, 0), (2, 4, 3, 1)) - x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x149 += einsum(t2.abab, (0, 1, 2, 3), x25, (4, 5, 0, 2), (4, 1, 5, 3)) del x25 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x150 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 += einsum(t2.bbbb, (0, 1, 2, 3), x150, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x150 - x152 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x152 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x152 += einsum(x23, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x23 - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum(t2.bbbb, (0, 1, 2, 3), x152, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x152 - x154 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x154 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x154 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x154 += einsum(x139, (0, 1, 2, 3), (0, 1, 2, 3)) - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 += einsum(t1.bb, (0, 1), x154, (2, 3, 1, 4), (0, 2, 3, 4)) del x154 - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum(x147, (0, 1, 2, 3), (0, 2, 1, 3)) del x147 x156 += einsum(x148, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -697,10 +698,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x153 x156 += einsum(x155, (0, 1, 2, 3), (0, 2, 1, 3)) del x155 - x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(t1.bb, (0, 1), x156, (2, 0, 3, 4), (2, 3, 1, 4)) del x156 - x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum(x139, (0, 1, 2, 3), (0, 1, 2, 3)) del x139 x158 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -718,17 +719,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x158, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x158, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x158 - x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x159 += einsum(t2.bbbb, (0, 1, 2, 3), x146, (4, 5, 0, 1), (4, 5, 2, 3)) del x146 - x160 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x160 += einsum(f.bb.oo, (0, 1), (0, 1)) x160 += einsum(x34, (0, 1), (0, 1)) del x34 - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(x160, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x160 - x162 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x162 += einsum(x29, (0, 1), (1, 0)) del x29 x162 += einsum(x30, (0, 1), (1, 0)) * 2.0 @@ -737,10 +738,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x31 x162 += einsum(x33, (0, 1), (1, 0)) * -1.0 del x33 - x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x163 += einsum(x162, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x162 - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(x159, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x159 x164 += einsum(x161, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -750,32 +751,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x164, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x164, (0, 1, 2, 3), (1, 0, 2, 3)) del x164 - x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_bbbb += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) del x165 - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x167 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x167 += einsum(x166, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x166 t2new_bbbb += einsum(x167, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) del x167 - x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x168 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x168 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - x169 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x169 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x169 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x168, (4, 5, 3, 1), (0, 5, 2, 4)) del x168 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x169, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 del x169 - x170 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x170 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x171 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x171 += einsum(t1.bb, (0, 1), x170, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x170 x171 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 @@ -796,90 +797,90 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new = Namespace() # L amplitudes - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum(f.aa.ov, (0, 1), (1, 0)) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum(f.bb.ov, (0, 1), (1, 0)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(l1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 0), (3, 4, 2, 1)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) l2new_abab += einsum(l1.aa, (0, 1), v.aabb.vvov, (2, 0, 3, 4), (2, 4, 1, 3)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x0, (4, 0, 2, 1), (3, 4)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_aa += einsum(v.aaaa.oovv, (0, 1, 2, 3), x1, (4, 1, 0, 3), (2, 4)) * -2.0 l2new_abab += einsum(v.aabb.ooov, (0, 1, 2, 3), x1, (4, 1, 0, 5), (5, 3, 4, 2)) * -2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x2, (4, 1, 0, 2), (3, 4)) * -2.0 - x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) l1new_aa += einsum(v.aabb.vvoo, (0, 1, 2, 3), x3, (2, 3, 4, 1), (0, 4)) * -1.0 l2new_abab += einsum(v.aabb.vvov, (0, 1, 2, 3), x3, (4, 2, 5, 1), (0, 3, 5, 4)) * -1.0 - x4 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x4, (3, 1, 4, 0), (4, 2)) del x4 - x5 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) l2new_abab += einsum(x1, (0, 1, 2, 3), x5, (4, 5, 1, 2), (3, 5, 0, 4)) * -2.0 - x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x7 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x7 += einsum(x6, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x7 += einsum(x6, (0, 1, 2, 3), (2, 0, 1, 3)) - x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x8 += einsum(x5, (0, 1, 2, 3), (0, 1, 3, 2)) - x9 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x10 += einsum(x9, (0, 1, 2, 3), (1, 0, 2, 3)) - x11 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x12 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(t1.aa, (0, 1), x12, (0, 2, 3, 1), (2, 3)) - x14 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x14 += einsum(f.aa.ov, (0, 1), (0, 1)) x14 += einsum(x11, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) * -1.0 l2new_abab += einsum(l1.bb, (0, 1), x14, (2, 3), (3, 0, 2, 1)) - x15 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x16 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x16 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) - x17 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x18 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 0, 4)) - x19 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x19 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x19, (0, 1, 2, 3), x3, (4, 0, 2, 5), (5, 1, 3, 4)) l2new_abab += einsum(l1.aa, (0, 1), x19, (2, 3, 1, 4), (0, 3, 4, 2)) * -1.0 - x20 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t1.bb, (0, 1), x19, (2, 1, 3, 4), (0, 2, 3, 4)) - x21 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x21 += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) x21 += einsum(x18, (0, 1, 2, 3), (1, 0, 3, 2)) x21 += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) del x20 - x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x22 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (4, 2, 5, 3), (1, 5, 0, 4)) @@ -893,28 +894,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x22 += einsum(t1.bb, (0, 1), x21, (0, 2, 3, 4), (2, 1, 4, 3)) * -1.0 l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x22, (3, 1, 2, 4), (0, 4)) * -1.0 del x22 - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x23 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x23 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x23 += einsum(x6, (0, 1, 2, 3), (0, 2, 1, 3)) - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x24 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x24 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x25 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x26 += einsum(t1.aa, (0, 1), x6, (2, 3, 4, 1), (0, 2, 3, 4)) - x27 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x28 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(x25, (0, 1, 2, 3), (3, 1, 2, 0)) x28 += einsum(x26, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 x28 += einsum(x27, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 x28 += einsum(x27, (0, 1, 2, 3), (3, 0, 2, 1)) - x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x29 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 3, 5, 2), (4, 0, 1, 5)) x29 += einsum(t2.aaaa, (0, 1, 2, 3), x23, (4, 1, 5, 3), (5, 0, 4, 2)) * -2.0 @@ -928,42 +929,42 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x28 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x29, (4, 2, 3, 1), (0, 4)) * 2.0 del x29 - x30 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x30 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x30 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) * 2.0 x30 += einsum(t1.bb, (0, 1), x3, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 x30 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) * 2.0 l1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x30, (2, 3, 4, 1), (0, 4)) del x30 - x31 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x31 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x31 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x32 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) * 0.25 x32 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) l1new_aa += einsum(x31, (0, 1, 2, 3), x32, (4, 0, 3, 2), (1, 4)) * 4.0 del x32 - x33 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) l1new_bb += einsum(v.aabb.oovv, (0, 1, 2, 3), x33, (4, 3, 1, 0), (2, 4)) * -1.0 l2new_abab += einsum(v.aabb.ovvv, (0, 1, 2, 3), x33, (4, 3, 5, 0), (1, 2, 5, 4)) * -1.0 l2new_abab += einsum(x14, (0, 1), x33, (2, 3, 4, 0), (1, 3, 4, 2)) * -1.0 - x34 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - x35 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(t1.bb, (0, 1), x33, (2, 1, 3, 4), (2, 0, 3, 4)) - x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) x36 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x36, (4, 2, 5, 0), (1, 3, 5, 4)) - x37 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x38 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x39 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x39 += einsum(x37, (0, 1), (0, 1)) x39 += einsum(x38, (0, 1), (0, 1)) * 2.0 - x40 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) x40 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) x40 += einsum(t2.bbbb, (0, 1, 2, 3), x33, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 @@ -973,34 +974,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x40 += einsum(t1.bb, (0, 1), x39, (2, 3), (0, 1, 2, 3)) l1new_aa += einsum(v.aabb.ovov, (0, 1, 2, 3), x40, (2, 3, 4, 0), (1, 4)) * -1.0 del x40 - x41 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) x41 += einsum(t1.bb, (0, 1), x33, (0, 2, 3, 4), (1, 2, 3, 4)) l1new_aa += einsum(v.aabb.ovvv, (0, 1, 2, 3), x41, (3, 2, 4, 0), (1, 4)) * -1.0 del x41 - x42 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x42 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 4, 3)) * -1.0 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x42, (3, 0, 1, 4), (4, 2)) * -2.0 del x42 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) - x44 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x44 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 l1new_aa += einsum(x43, (0, 1, 2, 3), x44, (1, 4, 2, 3), (4, 0)) * 2.0 del x43 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum(t2.abab, (0, 1, 2, 3), x33, (1, 3, 4, 5), (4, 5, 0, 2)) - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x47 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x47 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 l2new_aaaa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x47, (4, 5, 0, 2), (3, 1, 5, 4)) * 2.0 - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x48 += einsum(x45, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 x48 += einsum(x46, (0, 1, 2, 3), (2, 0, 1, 3)) * 2.0 @@ -1009,13 +1010,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x48 += einsum(t1.aa, (0, 1), x39, (2, 3), (0, 2, 3, 1)) * 0.5 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x48, (0, 4, 2, 1), (3, 4)) * -2.0 del x48 - x49 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x50 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x51 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x52 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(x49, (0, 1), (0, 1)) del x49 x52 += einsum(x50, (0, 1), (0, 1)) @@ -1023,7 +1024,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l1new_aa += einsum(x52, (0, 1), x44, (2, 1, 0, 3), (3, 2)) * -1.0 l1new_bb += einsum(x52, (0, 1), v.aabb.vvov, (1, 0, 2, 3), (3, 2)) del x52 - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) x53 += einsum(x45, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x45 @@ -1033,25 +1034,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x39 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x53, (4, 0, 2, 3), (1, 4)) * 2.0 del x53 - x54 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x55 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.abab, (0, 1, 2, 3), x33, (1, 3, 0, 4), (4, 2)) - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x58 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x58 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) - x59 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x59 += einsum(x58, (0, 1), (0, 1)) * 0.5 x59 += einsum(x37, (0, 1), (0, 1)) * 0.5 x59 += einsum(x38, (0, 1), (0, 1)) l1new_aa += einsum(f.aa.ov, (0, 1), x59, (2, 0), (1, 2)) * -2.0 l1new_bb += einsum(x59, (0, 1), v.aabb.ooov, (1, 0, 2, 3), (3, 2)) * -2.0 - x60 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t1.aa, (0, 1), x59, (0, 2), (2, 1)) * 2.0 - x61 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x61 += einsum(x54, (0, 1), (0, 1)) * -1.0 x61 += einsum(x55, (0, 1), (0, 1)) * -2.0 @@ -1060,44 +1061,44 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x61 += einsum(x60, (0, 1), (0, 1)) l1new_aa += einsum(x61, (0, 1), x12, (0, 2, 3, 1), (3, 2)) del x61 - x62 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x62 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x63 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x63 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x64 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x64 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x65 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x62, (0, 1), (0, 1)) * 0.5 x65 += einsum(x63, (0, 1), (0, 1)) x65 += einsum(x64, (0, 1), (0, 1)) * 0.5 l1new_aa += einsum(x65, (0, 1), v.aabb.ovvv, (2, 3, 1, 0), (3, 2)) * 2.0 del x65 - x66 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x66 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x67 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x67 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x68 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_bb += einsum(v.bbbb.oovv, (0, 1, 2, 3), x68, (4, 0, 1, 3), (2, 4)) * -2.0 l2new_abab += einsum(v.aabb.ovoo, (0, 1, 2, 3), x68, (4, 2, 3, 5), (1, 5, 0, 4)) * -2.0 l2new_abab += einsum(x68, (0, 1, 2, 3), x9, (1, 2, 4, 5), (5, 3, 4, 0)) * -2.0 - x69 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x69 += einsum(t2.bbbb, (0, 1, 2, 3), x68, (0, 1, 4, 3), (4, 2)) * -1.0 - x70 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x70 += einsum(t2.abab, (0, 1, 2, 3), x3, (1, 4, 0, 2), (4, 3)) - x71 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x71 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) - x72 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x72 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x73 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x73 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x74 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x74 += einsum(x71, (0, 1), (0, 1)) x74 += einsum(x72, (0, 1), (0, 1)) * 2.0 x74 += einsum(x73, (0, 1), (0, 1)) - x75 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x75 += einsum(t1.bb, (0, 1), x74, (0, 2), (2, 1)) - x76 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x76 += einsum(l1.bb, (0, 1), (1, 0)) * -1.0 x76 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x76 += einsum(x66, (0, 1), (0, 1)) * -2.0 @@ -1107,29 +1108,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x76 += einsum(x75, (0, 1), (0, 1)) l1new_aa += einsum(x76, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (3, 2)) * -1.0 del x76 - x77 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x77 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) x77 += einsum(x35, (0, 1, 2, 3), (1, 0, 2, 3)) l1new_aa += einsum(v.aabb.ovoo, (0, 1, 2, 3), x77, (2, 3, 4, 0), (1, 4)) del x77 - x78 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x78 += einsum(x58, (0, 1), (0, 1)) x78 += einsum(x37, (0, 1), (0, 1)) del x37 x78 += einsum(x38, (0, 1), (0, 1)) * 2.0 del x38 l2new_abab += einsum(x78, (0, 1), v.aabb.ovov, (1, 2, 3, 4), (2, 4, 0, 3)) * -1.0 - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 l1new_aa += einsum(x78, (0, 1), x79, (1, 0, 2, 3), (3, 2)) * -1.0 del x78 - x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_aa += einsum(l1.aa, (0, 1), x80, (1, 2, 0, 3), (3, 2)) * -1.0 del x80 - x81 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x81 += einsum(x71, (0, 1), (0, 1)) * 0.5 x81 += einsum(x72, (0, 1), (0, 1)) x81 += einsum(x73, (0, 1), (0, 1)) * 0.5 @@ -1137,30 +1138,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l1new_bb += einsum(f.bb.ov, (0, 1), x81, (2, 0), (1, 2)) * -2.0 l2new_abab += einsum(x81, (0, 1), v.aabb.ovov, (2, 3, 1, 4), (3, 4, 2, 0)) * -2.0 del x81 - x82 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x82 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x83 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x83 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x83 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x84 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x84 += einsum(f.aa.vv, (0, 1), (0, 1)) x84 += einsum(x82, (0, 1), (1, 0)) x84 += einsum(t1.aa, (0, 1), x83, (0, 2, 1, 3), (3, 2)) * -1.0 del x83 l1new_aa += einsum(l1.aa, (0, 1), x84, (0, 2), (2, 1)) del x84 - x85 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x85 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x86 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x86 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x87 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x87 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 1, 3), (0, 4)) - x88 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x88 += einsum(t1.aa, (0, 1), x79, (0, 2, 3, 1), (2, 3)) * 0.5 - x89 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x89 += einsum(t1.aa, (0, 1), x14, (2, 1), (0, 2)) * 0.5 del x14 - x90 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x90 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x90 += einsum(x85, (0, 1), (1, 0)) * 0.5 x90 += einsum(x86, (0, 1), (0, 1)) * 0.5 @@ -1172,50 +1173,50 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l1new_aa += einsum(l1.aa, (0, 1), x90, (1, 2), (0, 2)) * -2.0 l2new_abab += einsum(x90, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 del x90 - x91 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x91 += einsum(x11, (0, 1), (0, 1)) del x11 x91 += einsum(x13, (0, 1), (0, 1)) * -1.0 del x13 l1new_aa += einsum(x58, (0, 1), x91, (1, 2), (2, 0)) * -1.0 del x58 - x92 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x92, (4, 1, 2, 0), (4, 3)) del x92 - x93 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x93, (3, 4, 0, 1), (4, 2)) * 2.0 del x93 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) l1new_bb += einsum(x68, (0, 1, 2, 3), x94, (1, 2, 4, 3), (4, 0)) * 2.0 - x95 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x95 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x96 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x96 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x96 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x96 += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) x96 += einsum(x95, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x97 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x97 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x98 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x99 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x99 += einsum(t1.bb, (0, 1), x98, (0, 2, 3, 1), (2, 3)) - x100 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x100 += einsum(f.bb.ov, (0, 1), (0, 1)) x100 += einsum(x97, (0, 1), (0, 1)) x100 += einsum(x99, (0, 1), (0, 1)) * -1.0 l2new_abab += einsum(x100, (0, 1), x3, (2, 0, 3, 4), (4, 1, 3, 2)) * -1.0 l2new_abab += einsum(l1.aa, (0, 1), x100, (2, 3), (0, 3, 1, 2)) - x101 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x101 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) - x102 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x102 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) - x103 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x103 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x103 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) x103 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 5, 3), (1, 5, 0, 4)) @@ -1231,34 +1232,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x21 l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x103, (3, 4, 2, 0), (1, 4)) * -1.0 del x103 - x104 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x104 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x104 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x104 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x104 += einsum(x95, (0, 1, 2, 3), (0, 2, 1, 3)) - x105 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x105 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x105 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x105, (0, 1, 2, 3), x33, (0, 4, 5, 2), (3, 4, 5, 1)) l2new_abab += einsum(l1.bb, (0, 1), x105, (1, 2, 3, 4), (4, 0, 3, 2)) * -1.0 - x106 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x106 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x106 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x106 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) del x94 - x107 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x107 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x108 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x108 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x108 += einsum(t1.bb, (0, 1), x95, (2, 3, 4, 1), (0, 2, 3, 4)) - x109 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x109 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x110 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x110 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x110 += einsum(x107, (0, 1, 2, 3), (3, 1, 2, 0)) x110 += einsum(x108, (0, 1, 2, 3), (3, 1, 2, 0)) x110 += einsum(x109, (0, 1, 2, 3), (2, 1, 3, 0)) x110 += einsum(x109, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x111 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x111 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x111 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (4, 0, 1, 5)) * -1.0 x111 += einsum(t2.bbbb, (0, 1, 2, 3), x104, (4, 1, 5, 3), (5, 0, 4, 2)) * -2.0 @@ -1272,27 +1273,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x110 l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x111, (4, 3, 2, 1), (0, 4)) * -2.0 del x111 - x112 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x112 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x112 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) * 2.0 x112 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) * 2.0 x112 += einsum(t1.aa, (0, 1), x33, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 l1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x112, (4, 3, 0, 1), (2, 4)) del x112 - x113 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x113 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) * 4.0 x114 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) l1new_bb += einsum(x113, (0, 1, 2, 3), x114, (4, 0, 2, 1), (3, 4)) * -1.0 del x113, x114 - x115 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x115 += einsum(x72, (0, 1), (0, 1)) del x72 x115 += einsum(x73, (0, 1), (0, 1)) * 0.5 del x73 - x116 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x116 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) x116 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x116 += einsum(t2.abab, (0, 1, 2, 3), x68, (4, 1, 5, 3), (4, 5, 0, 2)) * -2.0 @@ -1303,23 +1304,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x116 += einsum(t1.aa, (0, 1), x115, (2, 3), (2, 3, 0, 1)) * 2.0 l1new_bb += einsum(v.aabb.ovov, (0, 1, 2, 3), x116, (4, 2, 0, 1), (3, 4)) * -1.0 del x116 - x117 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x117 += einsum(l2.bbbb, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x117 += einsum(t1.bb, (0, 1), x68, (2, 0, 3, 4), (2, 3, 4, 1)) l1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x117, (4, 0, 3, 1), (2, 4)) * -2.0 del x117 - x118 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) x118 += einsum(t1.aa, (0, 1), x3, (2, 3, 0, 4), (2, 3, 1, 4)) l1new_bb += einsum(v.aabb.vvov, (0, 1, 2, 3), x118, (4, 2, 0, 1), (3, 4)) * -1.0 del x118 - x119 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x119 += einsum(t2.bbbb, (0, 1, 2, 3), x68, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x120 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x120 += einsum(t1.bb, (0, 1), x68, (2, 3, 4, 1), (3, 2, 4, 0)) - x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x121 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 0, 2), (4, 5, 1, 3)) - x122 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x122 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) x122 += einsum(x68, (0, 1, 2, 3), (1, 0, 2, 3)) x122 += einsum(x119, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 @@ -1328,19 +1329,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x122 += einsum(t1.bb, (0, 1), x115, (2, 3), (2, 0, 3, 1)) l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x122, (4, 2, 0, 3), (1, 4)) * -2.0 del x122 - x123 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(x62, (0, 1), (0, 1)) del x62 x123 += einsum(x63, (0, 1), (0, 1)) * 2.0 x123 += einsum(x64, (0, 1), (0, 1)) - x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x124 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 l1new_bb += einsum(x123, (0, 1), x124, (2, 1, 0, 3), (3, 2)) * -1.0 del x123 - x125 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x125 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x126 += einsum(x119, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x119 x126 += einsum(t1.bb, (0, 1), x125, (2, 0, 3, 4), (2, 4, 3, 1)) * -1.0 @@ -1350,7 +1351,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x115 l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x126, (4, 2, 0, 1), (3, 4)) * 2.0 del x126 - x127 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x127 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x127 += einsum(x66, (0, 1), (0, 1)) * -2.0 del x66 @@ -1364,7 +1365,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x75 l1new_bb += einsum(x127, (0, 1), x98, (0, 2, 3, 1), (3, 2)) del x127 - x128 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x128 += einsum(l1.aa, (0, 1), (1, 0)) * -1.0 x128 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x128 += einsum(x54, (0, 1), (0, 1)) * -1.0 @@ -1379,55 +1380,55 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x60 l1new_bb += einsum(x128, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (3, 2)) * -1.0 del x128 - x129 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x129 += einsum(x125, (0, 1, 2, 3), (1, 0, 3, 2)) x129 += einsum(x120, (0, 1, 2, 3), (2, 1, 0, 3)) l1new_bb += einsum(v.bbbb.ooov, (0, 1, 2, 3), x129, (1, 4, 0, 2), (3, 4)) * 2.0 del x129 - x130 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x130 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) del x34 x130 += einsum(x35, (0, 1, 2, 3), (0, 1, 3, 2)) del x35 l1new_bb += einsum(v.aabb.ooov, (0, 1, 2, 3), x130, (4, 2, 0, 1), (3, 4)) del x130 - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x131 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 l1new_bb += einsum(x74, (0, 1), x131, (1, 0, 2, 3), (3, 2)) * -1.0 del x131 - x132 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x132 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x132 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_bb += einsum(l1.bb, (0, 1), x132, (1, 2, 0, 3), (3, 2)) * -1.0 del x132 - x133 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x133 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x134 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x134 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x134 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x135 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x135 += einsum(f.bb.vv, (0, 1), (0, 1)) x135 += einsum(x133, (0, 1), (1, 0)) x135 += einsum(t1.bb, (0, 1), x134, (0, 2, 1, 3), (3, 2)) * -1.0 l1new_bb += einsum(l1.bb, (0, 1), x135, (0, 2), (2, 1)) del x135 - x136 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x136 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x137 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x137 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 1, 3), (0, 4)) - x138 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x138 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x139 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x139 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x140 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x140 += einsum(t1.bb, (0, 1), x139, (2, 3, 0, 1), (2, 3)) del x139 - x141 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x141 += einsum(t1.bb, (0, 1), x100, (2, 1), (0, 2)) del x100 - x142 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x142 += einsum(f.bb.oo, (0, 1), (0, 1)) x142 += einsum(x136, (0, 1), (1, 0)) x142 += einsum(x137, (0, 1), (0, 1)) * 2.0 @@ -1438,27 +1439,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l1new_bb += einsum(l1.bb, (0, 1), x142, (1, 2), (0, 2)) * -1.0 l2new_abab += einsum(x142, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x142 - x143 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x143 += einsum(x97, (0, 1), (0, 1)) del x97 x143 += einsum(x99, (0, 1), (0, 1)) * -1.0 del x99 l1new_bb += einsum(x143, (0, 1), x71, (2, 0), (1, 2)) * -1.0 del x71 - x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x144 += einsum(l1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x3, (2, 3, 4, 5), (4, 0, 5, 1)) - x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x146 += einsum(x3, (0, 1, 2, 3), x9, (0, 1, 4, 5), (2, 4, 3, 5)) del x9 - x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x147 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x148 += einsum(t2.aaaa, (0, 1, 2, 3), x12, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 - x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x149 += einsum(t1.aa, (0, 1), x31, (2, 3, 1, 4), (0, 2, 3, 4)) - x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x150 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x150 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x150 += einsum(x147, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1466,16 +1467,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x148 x150 += einsum(x149, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x149 - x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x151 += einsum(l2.aaaa, (0, 1, 2, 3), x150, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x150 - x152 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x152 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x153 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x153 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x154 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x154 += einsum(t2.abab, (0, 1, 2, 3), x12, (0, 4, 5, 2), (1, 3, 4, 5)) - x155 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x155 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x155 += einsum(x152, (0, 1, 2, 3), (0, 1, 2, 3)) del x152 @@ -1484,40 +1485,40 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x155 += einsum(x154, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x154 l2new_abab += einsum(l2.bbbb, (0, 1, 2, 3), x155, (3, 1, 4, 5), (5, 0, 4, 2)) * 2.0 - x156 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x156 += einsum(l2.abab, (0, 1, 2, 3), x155, (3, 1, 4, 5), (4, 2, 5, 0)) del x155 - x157 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x157 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x157 += einsum(x6, (0, 1, 2, 3), (0, 2, 1, 3)) - x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x158 += einsum(x1, (0, 1, 2, 3), x157, (0, 2, 4, 5), (4, 1, 5, 3)) * 2.0 del x157 - x159 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x159 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x159 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x160 += einsum(x1, (0, 1, 2, 3), x159, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x159 - x161 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x161 += einsum(x50, (0, 1), (0, 1)) del x50 x161 += einsum(x51, (0, 1), (0, 1)) * 2.0 del x51 l2new_abab += einsum(x161, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (0, 4, 2, 3)) * -1.0 - x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x162 += einsum(x161, (0, 1), v.aaaa.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) del x161 - x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x163 += einsum(x59, (0, 1), v.aaaa.ovov, (2, 3, 1, 4), (2, 0, 4, 3)) * 2.0 del x59 - x164 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x164 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x164 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) - x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x165 += einsum(l1.aa, (0, 1), x164, (1, 2, 3, 4), (2, 3, 4, 0)) del x164 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum(f.aa.ov, (0, 1), l1.aa, (2, 3), (0, 3, 1, 2)) x166 += einsum(x144, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x144 @@ -1545,25 +1546,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x166, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x166, (0, 1, 2, 3), (3, 2, 1, 0)) del x166 - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x167, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x167, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x167 - x168 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x168 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum(x168, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) del x168 - x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x170 += einsum(l2.aaaa, (0, 1, 2, 3), x27, (2, 4, 3, 5), (4, 5, 0, 1)) del x27 - x171 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x171 += einsum(t1.aa, (0, 1), x79, (0, 2, 3, 1), (2, 3)) del x79 - x172 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x172 += einsum(t1.aa, (0, 1), x91, (2, 1), (0, 2)) - x173 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x173 += einsum(x85, (0, 1), (1, 0)) del x85 x173 += einsum(x86, (0, 1), (0, 1)) @@ -1574,10 +1575,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x171 x173 += einsum(x172, (0, 1), (0, 1)) del x172 - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum(x173, (0, 1), l2.aaaa, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x173 - x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x175 += einsum(x169, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x169 x175 += einsum(x170, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1587,32 +1588,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x175, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x175, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x175 - x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x176 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum(f.aa.ov, (0, 1), x1, (2, 3, 0, 4), (2, 3, 1, 4)) - x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x178 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x1, (4, 5, 0, 3), (5, 4, 1, 2)) - x179 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x179 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x180 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x180 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x181 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x181 += einsum(t1.aa, (0, 1), x44, (0, 1, 2, 3), (2, 3)) del x44 - x182 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x182 += einsum(x82, (0, 1), (1, 0)) * -1.0 x182 += einsum(x179, (0, 1), (1, 0)) x182 += einsum(x180, (0, 1), (1, 0)) * 2.0 x182 += einsum(x181, (0, 1), (1, 0)) * -1.0 del x181 - x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x183 += einsum(x182, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x182 - x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x184 += einsum(x91, (0, 1), x1, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 del x1, x91 - x185 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x185 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x185 += einsum(x176, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x176 @@ -1627,7 +1628,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_aaaa += einsum(x185, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x185, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x185 - x186 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x186 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x186 += einsum(x25, (0, 1, 2, 3), (1, 3, 2, 0)) del x25 @@ -1635,7 +1636,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x26 l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x186, (2, 4, 5, 3), (0, 1, 5, 4)) * -2.0 del x186 - x187 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x187 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x187 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x187 += einsum(x147, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -1645,15 +1646,15 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x187 += einsum(t1.aa, (0, 1), x31, (2, 3, 1, 4), (0, 2, 4, 3)) * -0.5 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x187, (2, 4, 0, 5), (5, 1, 4, 3)) * 2.0 del x187 - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x189 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x190 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x190 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x190 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x191 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x191 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x191 += einsum(x188, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -1661,29 +1662,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x191 += einsum(t1.bb, (0, 1), x190, (2, 3, 1, 4), (0, 2, 4, 3)) * -0.5 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x191, (3, 4, 1, 5), (0, 5, 2, 4)) * 2.0 del x191 - x192 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x192 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x193 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x193 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x193 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x193 += einsum(x192, (0, 1, 2, 3), (0, 1, 2, 3)) x193 += einsum(t2.abab, (0, 1, 2, 3), x98, (1, 4, 5, 3), (4, 5, 0, 2)) * -0.5 l2new_abab += einsum(l2.aaaa, (0, 1, 2, 3), x193, (4, 5, 3, 1), (0, 5, 2, 4)) * 4.0 del x193 - x194 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x194 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x194 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x194 += einsum(x15, (0, 1, 2, 3), (1, 0, 2, 3)) del x15 x194 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (3, 5, 0, 4)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x194, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x194 - x195 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x195 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x195 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) x195 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 5, 2, 4)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x195, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x195 - x196 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x196 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x196 += einsum(x17, (0, 1, 2, 3), (1, 0, 2, 3)) del x17 @@ -1693,7 +1694,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x8 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x196, (3, 4, 2, 5), (0, 1, 5, 4)) del x196 - x197 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x197 += einsum(f.aa.vv, (0, 1), (0, 1)) * -0.5 x197 += einsum(x82, (0, 1), (1, 0)) * -0.5 del x82 @@ -1705,11 +1706,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x31 l2new_abab += einsum(x197, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 del x197 - x198 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x198 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x199 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x199 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x200 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x200 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x200 += einsum(x133, (0, 1), (1, 0)) * -1.0 x200 += einsum(x198, (0, 1), (0, 1)) * 2.0 @@ -1718,45 +1719,45 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x134 l2new_abab += einsum(x200, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x200 - x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x201 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x201 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x201, (0, 1, 2, 3), x3, (0, 1, 4, 5), (5, 3, 4, 2)) * -1.0 - x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x202 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x202 += einsum(x95, (0, 1, 2, 3), (0, 2, 1, 3)) l2new_abab += einsum(x202, (0, 1, 2, 3), x3, (0, 1, 4, 5), (5, 3, 4, 2)) * -1.0 del x3, x202 - x203 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x203 += einsum(x6, (0, 1, 2, 3), (0, 1, 2, 3)) x203 += einsum(x6, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x6 l2new_abab += einsum(x203, (0, 1, 2, 3), x33, (4, 5, 0, 2), (3, 5, 1, 4)) * -1.0 del x203 - x204 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x204 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x204 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x204, (0, 1, 2, 3), x33, (4, 5, 0, 1), (3, 5, 2, 4)) * -1.0 del x204 - x205 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x205 += einsum(x63, (0, 1), (0, 1)) * 2.0 x205 += einsum(x64, (0, 1), (0, 1)) l2new_abab += einsum(x205, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (3, 0, 2, 4)) * -1.0 del x205 - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum(l1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x207 += einsum(v.aabb.ooov, (0, 1, 2, 3), x33, (4, 5, 0, 1), (4, 2, 5, 3)) - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(x33, (0, 1, 2, 3), x5, (4, 5, 2, 3), (0, 4, 1, 5)) del x5, x33 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum(t2.bbbb, (0, 1, 2, 3), x189, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x189 - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum(t1.bb, (0, 1), x190, (2, 3, 1, 4), (2, 0, 3, 4)) del x190 - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x211 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x211 += einsum(x188, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1765,13 +1766,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x209 x211 += einsum(x210, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x210 - x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x212 += einsum(l2.bbbb, (0, 1, 2, 3), x211, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x211 - x213 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x213 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x213 += einsum(t2.abab, (0, 1, 2, 3), x98, (1, 4, 5, 3), (4, 5, 0, 2)) del x98 - x214 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x214 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x214 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) del x101 @@ -1779,37 +1780,37 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x192 x214 += einsum(x213, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x213 - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum(l2.abab, (0, 1, 2, 3), x214, (4, 5, 2, 0), (4, 3, 5, 1)) del x214 - x216 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x216 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) x216 += einsum(x95, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x217 += einsum(x216, (0, 1, 2, 3), x68, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x216 - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum(x201, (0, 1, 2, 3), x68, (0, 4, 1, 5), (2, 4, 3, 5)) * 2.0 del x201 - x219 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x219 += einsum(x63, (0, 1), (0, 1)) del x63 x219 += einsum(x64, (0, 1), (0, 1)) * 0.5 del x64 - x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x220 += einsum(x219, (0, 1), v.bbbb.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) * 2.0 del x219 - x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum(x74, (0, 1), v.bbbb.ovov, (2, 3, 1, 4), (2, 0, 4, 3)) del x74 - x222 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x222 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x222 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) del x95 - x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x223 += einsum(l1.bb, (0, 1), x222, (1, 2, 3, 4), (2, 3, 4, 0)) del x222 - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 += einsum(f.bb.ov, (0, 1), l1.bb, (2, 3), (0, 3, 1, 2)) x224 += einsum(x206, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x206 @@ -1837,17 +1838,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x224, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x224, (0, 1, 2, 3), (3, 2, 1, 0)) del x224 - x225 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x225 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x226 += einsum(x225, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) del x225 - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 += einsum(l2.bbbb, (0, 1, 2, 3), x109, (2, 3, 4, 5), (4, 5, 0, 1)) del x109 - x228 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x228 += einsum(t1.bb, (0, 1), x143, (2, 1), (2, 0)) - x229 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x229 += einsum(x136, (0, 1), (1, 0)) del x136 x229 += einsum(x137, (0, 1), (0, 1)) * 2.0 @@ -1858,10 +1859,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x140 x229 += einsum(x228, (0, 1), (1, 0)) del x228 - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum(x229, (0, 1), l2.bbbb, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x229 - x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x231 += einsum(x226, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x226 x231 += einsum(x227, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1871,16 +1872,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x231, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x231, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x231 - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x233 += einsum(f.bb.ov, (0, 1), x68, (2, 3, 0, 4), (2, 3, 1, 4)) - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x234 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x68, (4, 5, 0, 3), (5, 4, 1, 2)) - x235 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x235 += einsum(t1.bb, (0, 1), x124, (0, 1, 2, 3), (2, 3)) del x124 - x236 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x236 += einsum(x133, (0, 1), (1, 0)) * -1.0 del x133 x236 += einsum(x198, (0, 1), (1, 0)) * 2.0 @@ -1889,13 +1890,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x199 x236 += einsum(x235, (0, 1), (1, 0)) * -1.0 del x235 - x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x237 += einsum(x236, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x236 - x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x238 += einsum(x143, (0, 1), x68, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x68, x143 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x239 += einsum(x232, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x232 @@ -1910,12 +1911,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2new_bbbb += einsum(x239, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x239, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x239 - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x240, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x240, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x240 - x241 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x241 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x241 += einsum(x107, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 del x107 @@ -1923,7 +1924,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x108 l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x241, (2, 4, 3, 5), (0, 1, 4, 5)) * -2.0 del x241 - x242 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x242 += einsum(x125, (0, 1, 2, 3), (1, 0, 3, 2)) del x125 x242 += einsum(x120, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -1947,57 +1948,57 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_aa_ov += einsum(t1.aa, (0, 1), (0, 1)) rdm1_f_aa_ov += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_aa_ov += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_bb_ov += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_bb_ov += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) rdm1_f_bb_ov += einsum(t1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_aa_vo += einsum(l1.aa, (0, 1), (0, 1)) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_bb_vo += einsum(l1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_aa_vv += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_bb_vv += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm1_f_aa_oo += einsum(x0, (0, 1), (1, 0)) * -1.0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x2, (0, 1), (1, 0)) * -2.0 - x3 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x3 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) rdm1_f_bb_oo += einsum(x3, (0, 1), (1, 0)) * -1.0 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) rdm1_f_bb_oo += einsum(x4, (0, 1), (1, 0)) * -2.0 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm1_f_bb_oo += einsum(x5, (0, 1), (1, 0)) * -1.0 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) rdm1_f_aa_ov += einsum(t2.abab, (0, 1, 2, 3), x6, (1, 3, 0, 4), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_aa_ov += einsum(t2.aaaa, (0, 1, 2, 3), x7, (1, 0, 4, 3), (4, 2)) * -2.0 del x7 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(x0, (0, 1), (0, 1)) * 0.5 del x0 x8 += einsum(x1, (0, 1), (0, 1)) * 0.5 @@ -2006,15 +2007,15 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x2 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), x8, (0, 2), (2, 1)) * -2.0 del x8 - x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.bbbb, (0, 1, 2, 3), x9, (1, 0, 4, 3), (4, 2)) * -2.0 del x9 - x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) rdm1_f_bb_ov += einsum(t2.abab, (0, 1, 2, 3), x10, (1, 4, 0, 2), (4, 3)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(x5, (0, 1), (0, 1)) del x5 x11 += einsum(x4, (0, 1), (0, 1)) * 2.0 @@ -2040,172 +2041,172 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovoo += einsum(delta.aa.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vooo += einsum(delta.bb.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(l1.bb, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(l1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovvv += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vovv += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 3, 4), (0, 2, 3, 4)) - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvov += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_aaaa_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_aaaa_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(x3, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 2, 1)) * -1.0 - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x7, (0, 1, 2, 3), (3, 1, 2, 0)) - x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) rdm2_f_abab_ovoo += einsum(x8, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(t1.bb, (0, 1), x8, (0, 2, 3, 4), (4, 2, 3, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 4, 0, 5), (5, 4, 2, 3)) * -1.0 - x9 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), x8, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_abab_oooo += einsum(x9, (0, 1, 2, 3), (3, 1, 2, 0)) - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum(delta.aa.oo, (0, 1), (0, 1)) * -1.0 x10 += einsum(x6, (0, 1), (0, 1)) x10 += einsum(x3, (0, 1), (0, 1)) x10 += einsum(x4, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 2, 1)) * -1.0 - x12 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x12 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum(x11, (0, 1), (0, 1)) x14 += einsum(x12, (0, 1), (0, 1)) * 2.0 x14 += einsum(x13, (0, 1), (0, 1)) rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * -1.0 - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * -1.0 - x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x15, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_bbbb_ovoo += einsum(x16, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x16, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t1.bb, (0, 1), x16, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_bbbb_oooo += einsum(x17, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(x12, (0, 1), (0, 1)) x18 += einsum(x13, (0, 1), (0, 1)) * 0.5 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 2, 1)) * -2.0 - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ooov += einsum(x19, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oovo += einsum(x19, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 3, 4, 5), (4, 5, 0, 2)) - x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(x6, (0, 1), (0, 1)) * 0.5 x22 += einsum(x3, (0, 1), (0, 1)) * 0.5 x22 += einsum(x4, (0, 1), (0, 1)) - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x22, (2, 3), (3, 0, 2, 1)) * -2.0 - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(delta.aa.oo, (0, 1), t1.aa, (2, 3), (0, 1, 2, 3)) x23 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 @@ -2215,17 +2216,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovo += einsum(x23, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovo += einsum(x23, (0, 1, 2, 3), (2, 0, 3, 1)) del x23 - x24 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x25 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x26 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 3, 0, 4), (4, 2)) - x27 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x28 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(t1.aa, (0, 1), x22, (0, 2), (2, 1)) * 2.0 - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(x24, (0, 1), (0, 1)) * -1.0 x29 += einsum(x25, (0, 1), (0, 1)) * -2.0 x29 += einsum(x26, (0, 1), (0, 1)) @@ -2236,36 +2237,36 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_ooov += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (2, 0, 1, 3)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (0, 2, 3, 1)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x29, (2, 3), (2, 0, 3, 1)) * -1.0 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x30 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x30, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_aaaa_ooov += einsum(x31, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_oovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x31 - x32 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x32 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x32 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) rdm2_f_abab_ooov += einsum(x32, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x33 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x33 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) rdm2_f_abab_vooo += einsum(x33, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(t1.aa, (0, 1), x33, (2, 3, 0, 4), (4, 3, 1, 2)) * -1.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x33, (1, 4, 0, 5), (5, 4, 2, 3)) * -1.0 - x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t2.abab, (0, 1, 2, 3), x33, (1, 4, 5, 2), (4, 3, 5, 0)) rdm2_f_abab_ooov += einsum(x34, (0, 1, 2, 3), (3, 0, 2, 1)) - x35 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(t2.bbbb, (0, 1, 2, 3), x8, (1, 3, 4, 5), (0, 2, 4, 5)) rdm2_f_abab_ooov += einsum(x35, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x36 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 0, 5, 2), (1, 3, 4, 5)) * -1.0 rdm2_f_abab_ooov += einsum(x36, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x37 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2273,15 +2274,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x37, (0, 2, 3, 4), (4, 2, 3, 1)) rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x37, (2, 3, 0, 4), (4, 3, 1, 2)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x37, (1, 4, 0, 5), (5, 4, 2, 3)) - x38 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x39 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x39 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x40 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x40 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * -1.0 - x41 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x41 += einsum(t2.abab, (0, 1, 2, 3), x33, (1, 4, 0, 2), (4, 3)) - x42 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x42 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x42 += einsum(x38, (0, 1), (0, 1)) * -2.0 x42 += einsum(x39, (0, 1), (0, 1)) * -1.0 @@ -2290,15 +2291,15 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, x42 += einsum(t1.bb, (0, 1), x14, (0, 2), (2, 1)) rdm2_f_abab_ooov += einsum(delta.aa.oo, (0, 1), x42, (2, 3), (0, 2, 1, 3)) * -1.0 del x42 - x43 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x43 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ooov += einsum(x43, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oovo += einsum(x43, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x44 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x44 += einsum(t1.bb, (0, 1), x14, (0, 2), (2, 1)) * 0.5 - x45 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x45 += einsum(x38, (0, 1), (0, 1)) * -1.0 del x38 x45 += einsum(x39, (0, 1), (0, 1)) * -0.5 @@ -2314,11 +2315,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x45, (2, 3), (0, 2, 3, 1)) * 2.0 rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x45, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x45, (2, 3), (0, 2, 1, 3)) * -2.0 - x46 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x46 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x47 += einsum(t2.abab, (0, 1, 2, 3), x33, (4, 5, 0, 2), (4, 5, 1, 3)) - x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x48 += einsum(delta.bb.oo, (0, 1), t1.bb, (2, 3), (0, 1, 2, 3)) x48 += einsum(x46, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 x48 += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -2329,33 +2330,33 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovo += einsum(x48, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovo += einsum(x48, (0, 1, 2, 3), (2, 0, 3, 1)) del x48 - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x49 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) del x15 x49 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x49, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x50 += einsum(t1.bb, (0, 1), x49, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_bbbb_ooov += einsum(x50, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_oovo += einsum(x50, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x50 - x51 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 3, 0, 5), (4, 1, 5, 2)) rdm2_f_abab_oovo += einsum(x51, (0, 1, 2, 3), (2, 1, 3, 0)) - x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.aaaa, (0, 1, 2, 3), x33, (4, 5, 1, 3), (4, 5, 0, 2)) rdm2_f_abab_oovo += einsum(x52, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x53 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) rdm2_f_abab_oovo += einsum(x53, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x54 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.abab, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 rdm2_f_abab_oovo += einsum(x54, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x55 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(t1.aa, (0, 1), x22, (0, 2), (2, 1)) del x22 - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t1.aa, (0, 1), (0, 1)) * -0.5 x56 += einsum(x24, (0, 1), (0, 1)) * -0.5 del x24 @@ -2370,28 +2371,28 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_abab_oovo += einsum(delta.bb.oo, (0, 1), x56, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x56, (2, 3), (2, 0, 3, 1)) * -2.0 del x56 - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa, (0, 1), x19, (0, 2, 3, 4), (2, 3, 1, 4)) del x19 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x58, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x58, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x58, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x58, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.aaaa, (0, 1, 2, 3), x58, (1, 4, 3, 5), (0, 4, 2, 5)) - x60 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x60 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x61 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x62 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(x60, (0, 1), (0, 1)) x62 += einsum(x61, (0, 1), (0, 1)) * 2.0 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(x62, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x62 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x57 x64 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2401,12 +2402,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(x6, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(x5, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x5 - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(x65, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x65 x67 += einsum(x66, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2414,20 +2415,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_aaaa_oovv += einsum(x67, (0, 1, 2, 3), (1, 0, 2, 3)) del x67 - x68 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x68 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) rdm2_f_abab_ovvo += einsum(x68, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.abab, (0, 1, 2, 3), x68, (1, 3, 4, 5), (0, 4, 2, 5)) - x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x70 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x70 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x21 - x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(t1.aa, (0, 1), x70, (0, 2, 3, 4), (2, 3, 1, 4)) del x70 - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x69 x72 += einsum(x71, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2439,58 +2440,58 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_oovv += einsum(x72, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_aaaa_oovv += einsum(x72, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x72 - x73 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) rdm2_f_abab_ovvo += einsum(x73, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(t2.abab, (0, 1, 2, 3), x73, (1, 3, 4, 5), (4, 0, 5, 2)) - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) x75 += einsum(x74, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x74 rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) del x75 - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 4, 3, 1)) del x30 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), x76, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x76 - x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x77, (1, 4, 2, 5), (0, 4, 5, 3)) rdm2_f_abab_vovo += einsum(x77, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x77, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x77 - x78 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x78, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x79 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x79, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x80 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x80, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 del x80 - x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x81 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_bbbb_ovov += einsum(x81, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x81, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x81, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x82, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x82, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x82, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x82, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 x83 += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x83, (1, 4, 3, 5), (0, 4, 2, 5)) del x83 - x84 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x84 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x84 += einsum(x32, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x32 x84 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2503,21 +2504,21 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x37 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x84, (2, 3, 0, 4), (4, 2, 1, 3)) * -2.0 del x84 - x85 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(x60, (0, 1), (0, 1)) * 0.5 x85 += einsum(x61, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x85, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 del x85 - x86 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x86 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x87 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x87 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x88 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x88 += einsum(x86, (0, 1), (0, 1)) * 2.0 x88 += einsum(x87, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x88, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x88 - x89 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x89 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x53 x89 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2528,7 +2529,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x51 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x89, (0, 2, 3, 4), (3, 2, 4, 1)) * -2.0 del x89 - x90 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x90 += einsum(x6, (0, 1), (0, 1)) del x6 x90 += einsum(x3, (0, 1), (0, 1)) @@ -2537,7 +2538,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x4 rdm2_f_abab_oovv += einsum(x90, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x90 - x91 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x91 += einsum(x11, (0, 1), (0, 1)) * 0.5 x91 += einsum(x12, (0, 1), (0, 1)) del x12 @@ -2545,20 +2546,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x13 rdm2_f_abab_oovv += einsum(x91, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x91 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(t1.bb, (0, 1), x43, (0, 2, 3, 4), (2, 3, 1, 4)) del x43 - x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum(t2.bbbb, (0, 1, 2, 3), x81, (1, 4, 3, 5), (4, 0, 5, 2)) - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(t2.abab, (0, 1, 2, 3), x79, (4, 5, 0, 2), (4, 1, 5, 3)) - x95 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(x86, (0, 1), (0, 1)) x95 += einsum(x87, (0, 1), (0, 1)) * 0.5 - x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(x95, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -4.0 del x95 - x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x92 x97 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2570,17 +2571,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x97, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x97, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x97 - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(t2.abab, (0, 1, 2, 3), x78, (4, 5, 0, 2), (4, 1, 5, 3)) - x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x99 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 x99 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x47 - x100 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x100 += einsum(t1.bb, (0, 1), x99, (0, 2, 3, 4), (2, 3, 1, 4)) * 4.0 del x99 - x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x101 += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x98 x101 += einsum(x100, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2592,13 +2593,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_bbbb_oovv += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x101 - x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x102 += einsum(x11, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) del x11 - x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x103 += einsum(x18, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 del x18 - x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x104 += einsum(x102, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x102 x104 += einsum(x103, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2606,26 +2607,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_oovv += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_bbbb_oovv += einsum(x104, (0, 1, 2, 3), (1, 0, 2, 3)) del x104 - x105 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), x49, (0, 2, 3, 4), (2, 4, 3, 1)) del x49 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), x105, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x105 - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x106, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x106, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x106, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x106, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_aaaa_ovov += einsum(x107, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x107, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_aaaa_voov += einsum(x107, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vovo += einsum(x107, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x109 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(x108, (0, 1), (0, 1)) x109 += einsum(x60, (0, 1), (0, 1)) x109 += einsum(x61, (0, 1), (0, 1)) * 2.0 @@ -2633,14 +2634,14 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_voov += einsum(delta.aa.oo, (0, 1), x109, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x109, (2, 3), (2, 0, 3, 1)) rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x109, (2, 3), (2, 0, 3, 1)) - x110 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x110 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x110 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) rdm2_f_abab_ovov += einsum(x110, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x110, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x110 - x111 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x112 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(x111, (0, 1), (0, 1)) x112 += einsum(x86, (0, 1), (0, 1)) * 2.0 x112 += einsum(x87, (0, 1), (0, 1)) @@ -2648,13 +2649,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_ovov += einsum(delta.bb.oo, (0, 1), x112, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x112, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x112, (2, 3), (0, 2, 1, 3)) - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t1.bb, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_bbbb_ovov += einsum(x113, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_ovvo += einsum(x113, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_bbbb_voov += einsum(x113, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vovo += einsum(x113, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x114 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x114 += einsum(x108, (0, 1), (0, 1)) * 0.5 del x108 x114 += einsum(x60, (0, 1), (0, 1)) * 0.5 @@ -2664,11 +2665,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_ovvo += einsum(delta.aa.oo, (0, 1), x114, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x114, (2, 3), (2, 0, 3, 1)) * 2.0 del x114 - x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum(t1.aa, (0, 1), x8, (2, 3, 0, 4), (2, 3, 4, 1)) del x8 rdm2_f_abab_ovvo += einsum(x115, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x116 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(x111, (0, 1), (0, 1)) * 0.5 del x111 x116 += einsum(x86, (0, 1), (0, 1)) @@ -2678,38 +2679,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_ovvo += einsum(delta.bb.oo, (0, 1), x116, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x116, (2, 3), (2, 0, 3, 1)) * 2.0 del x116 - x117 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x117 += einsum(t1.bb, (0, 1), x33, (0, 2, 3, 4), (2, 1, 3, 4)) del x33 rdm2_f_abab_voov += einsum(x117, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovvv += einsum(x118, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vovv += einsum(x118, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x118 - x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(t1.aa, (0, 1), x107, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x107 rdm2_f_aaaa_ovvv += einsum(x119, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x119, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x119 - x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_aaaa_ovvv += einsum(x120, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x120, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x120 - x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(x106, (0, 1, 2, 3), (0, 1, 2, 3)) del x106 x121 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x58 - x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum(t1.aa, (0, 1), x121, (0, 2, 3, 4), (2, 1, 3, 4)) del x121 - x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x123 += einsum(x122, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x122 x123 += einsum(t1.aa, (0, 1), x109, (2, 3), (0, 2, 1, 3)) @@ -2719,7 +2720,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_aaaa_vovv += einsum(x123, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_vovv += einsum(x123, (0, 1, 2, 3), (1, 0, 3, 2)) del x123 - x124 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x124 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) del x73 x124 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2728,34 +2729,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x115 rdm2_f_abab_ovvv += einsum(t1.bb, (0, 1), x124, (0, 2, 3, 4), (3, 2, 4, 1)) * 2.0 del x124 - x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovvv += einsum(x125, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vovv += einsum(x125, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x125 - x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 5), (4, 5, 2, 3)) del x16 rdm2_f_bbbb_ovvv += einsum(x126, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x126, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x126 - x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(t1.bb, (0, 1), x113, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x113 rdm2_f_bbbb_ovvv += einsum(x127, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x127, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x127 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) del x81 x128 += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x82 - x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(t1.bb, (0, 1), x128, (0, 2, 3, 4), (2, 1, 3, 4)) * 4.0 del x128 - x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(x129, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x129 x130 += einsum(t1.bb, (0, 1), x112, (2, 3), (0, 2, 1, 3)) @@ -2765,7 +2766,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, rdm2_f_bbbb_vovv += einsum(x130, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_bbbb_vovv += einsum(x130, (0, 1, 2, 3), (1, 0, 3, 2)) del x130 - x131 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x131 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) del x78 x131 += einsum(x117, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -2774,25 +2775,25 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, del x79 rdm2_f_abab_vovv += einsum(t1.aa, (0, 1), x131, (2, 3, 0, 4), (4, 2, 1, 3)) * 2.0 del x131 - x132 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvov += einsum(x132, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvvo += einsum(x132, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_aaaa_vvvv += einsum(t1.aa, (0, 1), x132, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x132 - x133 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvov += einsum(x133, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvvo += einsum(x133, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_bbbb_vvvv += einsum(t1.bb, (0, 1), x133, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x133 - x134 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (4, 3, 2, 1)) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvvo += einsum(x134, (0, 1, 2, 3), (2, 1, 3, 0)) rdm2_f_abab_vvvv += einsum(t1.bb, (0, 1), x134, (0, 2, 3, 4), (3, 2, 4, 1)) del x134 @@ -2822,27 +2823,27 @@ def make_ip_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - ket2_o_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) - ket2_o_abab = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) - ket2_o_baba = np.zeros((nocc[1], nocc[0], nvir[1], nocc[0]), dtype=np.float64) - ket2_o_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) - ket1_o_aa = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + ket2_o_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) + ket2_o_abab = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) + ket2_o_baba = np.zeros((nocc[1], nocc[0], nvir[1], nocc[0]), dtype=types[float]) + ket2_o_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) + ket1_o_aa = np.zeros((nocc[0], nocc[0]), dtype=types[float]) ket1_o_aa += einsum("ij->ji", delta_oo.aa) - ket1_o_bb = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + ket1_o_bb = np.zeros((nocc[1], nocc[1]), dtype=types[float]) ket1_o_bb += einsum("ij->ji", delta_oo.bb) - ket1_v_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + ket1_v_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) ket1_v_aa += einsum("ia->ia", t1.aa) - ket1_v_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + ket1_v_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) ket1_v_bb += einsum("ia->ia", t1.bb) - ket2_v_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + ket2_v_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) ket2_v_aaaa += einsum("ijab->jiab", t2.aaaa) ket2_v_aaaa -= einsum("ijab->jiba", t2.aaaa) - ket2_v_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + ket2_v_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) ket2_v_bbbb += einsum("ijab->jiab", t2.bbbb) ket2_v_bbbb -= einsum("ijab->jiba", t2.bbbb) - ket2_v_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + ket2_v_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) ket2_v_baba -= einsum("ijab->jiba", t2.abab) - ket2_v_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + ket2_v_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) ket2_v_abab -= einsum("ijab->ijab", t2.abab) ket1_aa = np.concatenate([ket1_o_aa, ket1_v_aa], axis=1) @@ -2872,27 +2873,27 @@ def make_ea_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - ket2_v_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) - ket2_v_abab = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) - ket2_v_baba = np.zeros((nvir[1], nvir[0], nocc[1], nvir[0]), dtype=np.float64) - ket2_v_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) - ket1_o_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + ket2_v_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) + ket2_v_abab = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) + ket2_v_baba = np.zeros((nvir[1], nvir[0], nocc[1], nvir[0]), dtype=types[float]) + ket2_v_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) + ket1_o_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) ket1_o_aa -= einsum("ia->ai", t1.aa) - ket1_o_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + ket1_o_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) ket1_o_bb -= einsum("ia->ai", t1.bb) - ket1_v_aa = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + ket1_v_aa = np.zeros((nvir[0], nvir[0]), dtype=types[float]) ket1_v_aa += einsum("ab->ba", delta_vv.aa) - ket1_v_bb = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + ket1_v_bb = np.zeros((nvir[1], nvir[1]), dtype=types[float]) ket1_v_bb += einsum("ab->ba", delta_vv.bb) - ket2_o_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + ket2_o_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) ket2_o_aaaa -= einsum("ijab->abji", t2.aaaa) ket2_o_aaaa += einsum("ijab->baji", t2.aaaa) - ket2_o_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + ket2_o_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) ket2_o_bbbb -= einsum("ijab->abji", t2.bbbb) ket2_o_bbbb += einsum("ijab->baji", t2.bbbb) - ket2_o_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=np.float64) + ket2_o_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=types[float]) ket2_o_baba += einsum("ijab->baji", t2.abab) - ket2_o_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + ket2_o_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) ket2_o_abab += einsum("ijab->abij", t2.abab) ket1_aa = np.concatenate([ket1_o_aa, ket1_v_aa], axis=1) @@ -2927,27 +2928,27 @@ def make_ip_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum("ijab->jiab", t2.aaaa) x0 += einsum("ijab->jiba", t2.aaaa) * -1 - bra1_o_aa = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + bra1_o_aa = np.zeros((nocc[0], nocc[0]), dtype=types[float]) bra1_o_aa += einsum("abij,ikba->kj", l2.aaaa, x0) * -1 del x0 - x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x1 += einsum("ijab->jiab", t2.bbbb) * -1 x1 += einsum("ijab->jiba", t2.bbbb) - bra1_o_bb = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + bra1_o_bb = np.zeros((nocc[1], nocc[1]), dtype=types[float]) bra1_o_bb += einsum("abij,ikab->kj", l2.bbbb, x1) * -1 del x1 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x2 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - bra2_o_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + bra2_o_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) bra2_o_aaaa += einsum("ijka->kija", x2) bra2_o_aaaa -= einsum("ijka->kjia", x2) del x2 - x3 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum("ia,abjk->kjib", t1.bb, l2.bbbb) - bra2_o_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + bra2_o_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) bra2_o_bbbb += einsum("ijka->kija", x3) bra2_o_bbbb -= einsum("ijka->kjia", x3) del x3 @@ -2957,28 +2958,28 @@ def make_ip_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= bra1_o_bb += einsum("ij->ji", delta_oo.bb) bra1_o_bb -= einsum("ai,ja->ji", l1.bb, t1.bb) bra1_o_bb += einsum("abij,ikab->kj", l2.abab, t2.abab) * -1 - bra1_v_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + bra1_v_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) bra1_v_aa += einsum("ai->ai", l1.aa) - bra1_v_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + bra1_v_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) bra1_v_bb += einsum("ai->ai", l1.bb) bra2_o_aaaa += einsum("ij,ak->jika", delta_oo.aa, l1.aa) bra2_o_aaaa -= einsum("ij,ak->jkia", delta_oo.aa, l1.aa) - bra2_o_abab = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + bra2_o_abab = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) bra2_o_abab += einsum("ia,abjk->ikjb", t1.aa, l2.abab) bra2_o_abab -= einsum("ij,ak->jkia", delta_oo.aa, l1.bb) - bra2_o_baba = np.zeros((nocc[1], nocc[0], nocc[1], nvir[0]), dtype=np.float64) + bra2_o_baba = np.zeros((nocc[1], nocc[0], nocc[1], nvir[0]), dtype=types[float]) bra2_o_baba -= einsum("ij,ak->jkia", delta_oo.bb, l1.aa) bra2_o_baba += einsum("ia,bajk->ijkb", t1.bb, l2.abab) bra2_o_bbbb += einsum("ij,ak->jika", delta_oo.bb, l1.bb) bra2_o_bbbb -= einsum("ij,ak->jkia", delta_oo.bb, l1.bb) - bra2_v_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + bra2_v_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) bra2_v_aaaa -= einsum("abij->ajib", l2.aaaa) bra2_v_aaaa += einsum("abij->bjia", l2.aaaa) - bra2_v_baba = np.zeros((nvir[1], nocc[0], nocc[1], nvir[0]), dtype=np.float64) + bra2_v_baba = np.zeros((nvir[1], nocc[0], nocc[1], nvir[0]), dtype=types[float]) bra2_v_baba -= einsum("abij->bija", l2.abab) - bra2_v_abab = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + bra2_v_abab = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) bra2_v_abab -= einsum("abij->ajib", l2.abab) - bra2_v_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + bra2_v_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) bra2_v_bbbb -= einsum("abij->ajib", l2.bbbb) bra2_v_bbbb += einsum("abij->bjia", l2.bbbb) @@ -3009,33 +3010,33 @@ def make_ea_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum("ijab->jiab", t2.aaaa) * -1 x0 += einsum("ijab->jiba", t2.aaaa) - bra1_v_aa = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + bra1_v_aa = np.zeros((nvir[0], nvir[0]), dtype=types[float]) bra1_v_aa += einsum("abij,ijac->cb", l2.aaaa, x0) * -1 del x0 - x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x1 += einsum("ijab->jiab", t2.bbbb) x1 += einsum("ijab->jiba", t2.bbbb) * -1 - bra1_v_bb = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + bra1_v_bb = np.zeros((nvir[1], nvir[1]), dtype=types[float]) bra1_v_bb += einsum("abij,ijbc->ca", l2.bbbb, x1) * -1 del x1 - x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("ia,bcji->jbca", t1.aa, l2.aaaa) - bra2_v_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + bra2_v_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) bra2_v_aaaa += einsum("iabc->cabi", x2) bra2_v_aaaa -= einsum("iabc->cbai", x2) del x2 - x3 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum("ia,bcji->jbca", t1.bb, l2.bbbb) - bra2_v_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + bra2_v_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) bra2_v_bbbb += einsum("iabc->cabi", x3) bra2_v_bbbb -= einsum("iabc->cbai", x3) del x3 - bra1_o_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + bra1_o_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) bra1_o_aa -= einsum("ai->ia", l1.aa) - bra1_o_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + bra1_o_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) bra1_o_bb -= einsum("ai->ia", l1.bb) bra1_v_aa += einsum("ab->ba", delta_vv.aa) bra1_v_aa -= einsum("ai,ib->ba", l1.aa, t1.aa) @@ -3043,22 +3044,22 @@ def make_ea_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= bra1_v_bb += einsum("abij,ijac->cb", l2.abab, t2.abab) * -1 bra1_v_bb += einsum("ab->ba", delta_vv.bb) bra1_v_bb -= einsum("ai,ib->ba", l1.bb, t1.bb) - bra2_o_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + bra2_o_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) bra2_o_aaaa += einsum("abij->jabi", l2.aaaa) bra2_o_aaaa -= einsum("abij->jbai", l2.aaaa) - bra2_o_abab = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + bra2_o_abab = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) bra2_o_abab += einsum("abij->ibaj", l2.abab) - bra2_o_baba = np.zeros((nocc[1], nvir[0], nvir[1], nocc[0]), dtype=np.float64) + bra2_o_baba = np.zeros((nocc[1], nvir[0], nvir[1], nocc[0]), dtype=types[float]) bra2_o_baba += einsum("abij->jabi", l2.abab) - bra2_o_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + bra2_o_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) bra2_o_bbbb += einsum("abij->jabi", l2.bbbb) bra2_o_bbbb -= einsum("abij->jbai", l2.bbbb) bra2_v_aaaa += einsum("ab,ci->baci", delta_vv.aa, l1.aa) bra2_v_aaaa -= einsum("ab,ci->bcai", delta_vv.aa, l1.aa) - bra2_v_abab = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + bra2_v_abab = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) bra2_v_abab -= einsum("ab,ci->bcai", delta_vv.aa, l1.bb) bra2_v_abab += einsum("ia,bcij->acbj", t1.aa, l2.abab) - bra2_v_baba = np.zeros((nvir[1], nvir[0], nvir[1], nocc[0]), dtype=np.float64) + bra2_v_baba = np.zeros((nvir[1], nvir[0], nvir[1], nocc[0]), dtype=types[float]) bra2_v_baba -= einsum("ab,ci->bcai", delta_vv.bb, l1.aa) bra2_v_baba += einsum("ia,bcji->abcj", t1.bb, l2.abab) bra2_v_bbbb += einsum("ab,ci->baci", delta_vv.bb, l1.bb) @@ -3086,252 +3087,252 @@ def make_ea_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= return bra1, bra2 def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): - x0 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x0 += einsum("i,iajb->jab", r1.a, v.aabb.ovov) - r1new_a = np.zeros((nocc[0]), dtype=np.float64) + r1new_a = np.zeros((nocc[0]), dtype=types[float]) r1new_a += einsum("iab,jiab->j", x0, t2.abab) * -1 del x0 - x1 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum("i,jaib->jab", r1.a, v.aaaa.ovov) - x2 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iab->iab", x1) x2 += einsum("iab->iba", x1) * -1 r1new_a += einsum("iab,ijab->j", x2, t2.aaaa) * -1 del x2 - x92 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum("ia,jba->ijb", t1.aa, x1) del x1 - x93 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x93 += einsum("ija->ija", x92) del x92 - x3 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum("ija->ija", r2.aaa) x3 += einsum("i,ja->jia", r1.a, t1.aa) * -1 - x4 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x4 += einsum("ijka->kija", v.aaaa.ooov) - x76 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x76 += einsum("ia,jika->jk", t1.aa, x4) - x78 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x78 += einsum("ij->ij", x76) * -1 - x133 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x133 += einsum("ij->ij", x76) * -1 del x76 - x171 = np.zeros((nocc[0], nocc[0], nocc[1]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nocc[1]), dtype=types[float]) x171 += einsum("ija,kila->klj", r2.aba, x4) * -1 r1new_a += einsum("ija,jika->k", x3, x4) * -1 del x4 - x5 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x5 += einsum("ija->jia", r2.bab) x5 += einsum("i,ja->ija", r1.a, t1.bb) * -1 - x17 = np.zeros((nvir[0]), dtype=np.float64) + x17 = np.zeros((nvir[0]), dtype=types[float]) x17 += einsum("ija,ibja->b", x5, v.aabb.ovov) - x18 = np.zeros((nvir[0]), dtype=np.float64) + x18 = np.zeros((nvir[0]), dtype=types[float]) x18 += einsum("a->a", x17) * -1 del x17 - x116 = np.zeros((nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nvir[0], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum("ija,ibjc->bac", x5, v.aabb.ovov) - x117 = np.zeros((nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nvir[0]), dtype=types[float]) x117 += einsum("ija,ibka->kjb", x5, v.aabb.ovov) * -1 - x142 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x142 += einsum("ija,ibca->jbc", x5, v.aabb.ovvv) * -1 r1new_a += einsum("ija,ikja->k", x5, v.aabb.ooov) - r2new_bab = np.zeros((nocc[1], nocc[0], nvir[1]), dtype=np.float64) + r2new_bab = np.zeros((nocc[1], nocc[0], nvir[1]), dtype=types[float]) r2new_bab += einsum("ija,ikba->jkb", x5, v.aabb.oovv) * -1 del x5 - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ia->ia", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x7 += einsum("iajb->jiba", v.aaaa.ovov) - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ia,ijba->jb", t1.aa, x7) x9 += einsum("ia->ia", x8) * -1 del x8 - x16 = np.zeros((nvir[0]), dtype=np.float64) + x16 = np.zeros((nvir[0]), dtype=types[float]) x16 += einsum("ija,ijab->b", x3, x7) del x3 x18 += einsum("a->a", x16) * -1 del x16 - x160 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x160 += einsum("ija,ikba->kjb", r2.aba, x7) - x161 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x161 += einsum("ija->ija", x160) * -1 - x180 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x180 += einsum("ija->ija", x160) * -1 del x160 x9 += einsum("ia->ia", f.aa.ov) - x152 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x152 += einsum("ia,ijab->jb", x9, t2.abab) - x156 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x156 += einsum("ia->ia", x152) - x214 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x214 += einsum("ia->ia", x152) del x152 - r1new_b = np.zeros((nocc[1]), dtype=np.float64) + r1new_b = np.zeros((nocc[1]), dtype=types[float]) r1new_b += einsum("ia,ija->j", x9, r2.aba) * -1 - x10 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum("ija->ija", r2.aaa) * -1 x10 += einsum("ija->jia", r2.aaa) r1new_a += einsum("ia,jia->j", x9, x10) * -1 - x11 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x12 += einsum("iajb->jiab", v.bbbb.ovov) x12 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum("ia,ijab->jb", t1.bb, x12) x14 += einsum("ia->ia", x13) * -1 del x13 - x44 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x44 += einsum("ija,ikab->jkb", r2.bab, x12) - x45 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x45 += einsum("ija->ija", x44) * -1 - x113 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x113 += einsum("ija->ija", x44) * -1 del x44 x14 += einsum("ia->ia", f.bb.ov) - x107 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x107 += einsum("ia,jiba->jb", x14, t2.abab) - x111 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x111 += einsum("ia->ia", x107) - x173 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x173 += einsum("ia->ia", x107) del x107 r1new_a += einsum("ia,ija->j", x14, r2.bab) * -1 - x15 = np.zeros((nvir[0]), dtype=np.float64) + x15 = np.zeros((nvir[0]), dtype=types[float]) x15 += einsum("i,ia->a", r1.a, f.aa.ov) x18 += einsum("a->a", x15) del x15 - x80 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("a,ijab->ijb", x18, t2.aaaa) - x112 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x112 += einsum("ija->jia", x80) del x80 r1new_a += einsum("a,ia->i", x18, t1.aa) * -1 r2new_bab += einsum("a,ijab->jib", x18, t2.abab) del x18 - x19 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x19 += einsum("i,jaib->jab", r1.b, v.aabb.ovov) r1new_b += einsum("iab,ijab->j", x19, t2.abab) * -1 del x19 - x20 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum("i,jaib->jab", r1.b, v.bbbb.ovov) - x21 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x21 += einsum("iab->iab", x20) x21 += einsum("iab->iba", x20) * -1 r1new_b += einsum("iab,ijab->j", x21, t2.bbbb) * -1 del x21 - x207 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x207 += einsum("ia,jba->ijb", t1.bb, x20) del x20 - x208 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x208 += einsum("ija->ija", x207) del x207 - x22 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x22 += einsum("ija->ija", r2.bbb) x22 += einsum("i,ja->jia", r1.b, t1.bb) * -1 - x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x23 += einsum("ijka->kija", v.bbbb.ooov) - x138 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x138 += einsum("ia,jika->jk", t1.bb, x23) - x140 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x140 += einsum("ij->ij", x138) * -1 - x194 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x194 += einsum("ij->ij", x138) * -1 del x138 - x141 = np.zeros((nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[1], nocc[1]), dtype=types[float]) x141 += einsum("ija,kila->jkl", r2.bab, x23) * -1 r1new_b += einsum("ija,jika->k", x22, x23) * -1 del x23 - x24 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x24 += einsum("ija->ija", r2.aba) x24 += einsum("i,ja->jia", r1.b, t1.aa) * -1 - x29 = np.zeros((nvir[1]), dtype=np.float64) + x29 = np.zeros((nvir[1]), dtype=types[float]) x29 += einsum("ija,iajb->b", x24, v.aabb.ovov) - x30 = np.zeros((nvir[1]), dtype=np.float64) + x30 = np.zeros((nvir[1]), dtype=types[float]) x30 += einsum("a->a", x29) * -1 del x29 - x167 = np.zeros((nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x167 = np.zeros((nvir[0], nvir[0], nvir[1]), dtype=types[float]) x167 += einsum("ija,ibjc->abc", x24, v.aabb.ovov) - x168 = np.zeros((nocc[0], nocc[0], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nvir[1]), dtype=types[float]) x168 += einsum("ija,kajb->kib", x24, v.aabb.ovov) * -1 r1new_b += einsum("ija,iajk->k", x24, v.aabb.ovoo) del x24 - x25 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x25 += einsum("ija->ija", r2.bbb) x25 += einsum("ija->jia", r2.bbb) * -1 r1new_b += einsum("ia,ija->j", x14, x25) * -1 - x26 = np.zeros((nvir[1]), dtype=np.float64) + x26 = np.zeros((nvir[1]), dtype=types[float]) x26 += einsum("i,ia->a", r1.b, f.bb.ov) x30 += einsum("a->a", x26) del x26 - x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x27 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x27 += einsum("iajb->jiba", v.bbbb.ovov) - x28 = np.zeros((nvir[1]), dtype=np.float64) + x28 = np.zeros((nvir[1]), dtype=types[float]) x28 += einsum("ija,ijab->b", x22, x27) del x22 x30 += einsum("a->a", x28) * -1 del x28 - x196 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x196 += einsum("a,ijab->ijb", x30, t2.bbbb) - x215 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x215 += einsum("ija->jia", x196) del x196 r1new_b += einsum("a,ia->i", x30, t1.bb) * -1 - r2new_aba = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + r2new_aba = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) r2new_aba += einsum("a,ijba->ijb", x30, t2.abab) del x30 - x31 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("i,ijak->jka", r1.a, v.aaaa.oovo) x112 += einsum("ija->ija", x31) * -1 del x31 - x32 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ij,ia->ja", f.aa.oo, t1.aa) x112 += einsum("i,ja->jia", r1.a, x32) del x32 - x33 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x33 += einsum("ija,iabk->jkb", r2.bab, v.bbaa.ovvo) x112 += einsum("ija->ija", x33) * -1 del x33 - x34 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x34 += einsum("i,ijka->jka", r1.a, v.aabb.ooov) - x35 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x35 += einsum("ija,kjba->kib", x34, t2.abab) x112 += einsum("ija->ija", x35) del x35 x113 += einsum("ija->ija", x34) del x34 - x36 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum("ija,kbia->jkb", r2.bab, v.aabb.ovov) - x40 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum("ija->ija", x36) x93 += einsum("ija->ija", x36) - x94 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x94 += einsum("ia,jka->jki", t1.aa, x93) del x93 - x95 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x95 += einsum("ijk->jki", x94) del x94 - x115 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum("ija->jia", x36) del x36 - x37 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x37 += einsum("i,ja->ija", r1.a, t1.aa) x37 += einsum("ija->ija", r2.aaa) x37 += einsum("ija->jia", r2.aaa) * -1 - x43 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x43 += einsum("ija,iakb->jkb", x37, v.aabb.ovov) x45 += einsum("ija->ija", x43) - x46 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum("ija,kjba->kib", x45, t2.abab) del x45 x112 += einsum("ija->jia", x46) * -1 @@ -3340,281 +3341,281 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x43 x115 += einsum("ija,ikab->kjb", x37, x7) x141 += einsum("ija,iakl->jkl", x37, v.aabb.ovoo) - x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum("iajb->jiab", v.aaaa.ovov) x38 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x39 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x39 += einsum("ija,ikba->jkb", x37, x38) del x38 x40 += einsum("ija->ija", x39) del x39 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum("ijab->jiab", t2.aaaa) * -1 x41 += einsum("ijab->jiba", t2.aaaa) - x42 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x42 += einsum("ija,jkba->ikb", x40, x41) del x40 x112 += einsum("ija->ija", x42) del x42 - x106 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x106 += einsum("ia,ijba->jb", x9, x41) del x9 del x41 x111 += einsum("ia->ia", x106) * -1 x173 += einsum("ia->ia", x106) * -1 del x106 - x47 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum("i,iabc->bac", r1.a, v.aaaa.ovvv) - x50 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum("abc->abc", x47) * -1 - x81 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum("ia,bac->ibc", t1.aa, x47) del x47 - x85 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum("iab->iab", x81) del x81 - x48 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum("ija->ija", r2.aaa) x48 += einsum("i,ja->ija", r1.a, t1.aa) - x49 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum("ija,jbic->bca", x48, v.aaaa.ovov) del x48 x50 += einsum("abc->cba", x49) del x49 - x51 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum("abc,ijcb->ija", x50, t2.aaaa) del x50 x112 += einsum("ija->jia", x51) del x51 - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum("iabj->ijba", v.aaaa.ovvo) x52 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x53 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum("ija,ikba->jkb", x37, x52) del x37 x112 += einsum("ija->ija", x53) * -1 del x53 - x109 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x109 += einsum("ia,ijba->jb", t1.aa, x52) del x52 x111 += einsum("ia->ia", x109) x173 += einsum("ia->ia", x109) del x109 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum("ijka->ikja", v.aaaa.ooov) x54 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x55 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum("i,jika->jka", r1.a, x54) del x54 x115 += einsum("ija->ija", x55) * -1 r2new_bab += einsum("ija,ikab->kjb", x115, t2.abab) del x115 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum("ia,jb->ijab", t1.aa, t1.aa) x56 += einsum("ijab->jiab", t2.aaaa) * -1 x56 += einsum("ijab->jiba", t2.aaaa) - x57 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum("ija,ikba->jkb", x55, x56) * -1 del x55 x112 += einsum("ija->jia", x57) * -1 del x57 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum("ia,jbka->ijkb", t1.aa, v.aaaa.ovov) - x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x59 += einsum("ia,jkla->jilk", t1.aa, x58) - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x61 += einsum("ijkl->lkji", x59) del x59 - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum("ijka->jkia", x58) x90 += einsum("ijka->kjia", x58) * -1 - x100 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x100 += einsum("ijka->ijka", x58) * -1 x100 += einsum("ijka->ikja", x58) del x58 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x60 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) x61 += einsum("ijkl->jkli", x60) x61 += einsum("ijkl->kjli", x60) * -1 del x60 x61 += einsum("ijkl->kilj", v.aaaa.oooo) - x62 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum("ija,jikl->kla", r2.aaa, x61) del x61 x112 += einsum("ija->jia", x62) del x62 - x63 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("ia,ib->ab", f.aa.ov, t1.aa) - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum("ab->ba", x63) del x63 - x64 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x71 += einsum("ab->ab", x64) * -1 del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("ijab->jiba", t2.aaaa) x65 += einsum("ia,jb->ijab", t1.aa, t1.aa) - x66 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("ijab,ijca->bc", x65, x7) x71 += einsum("ab->ab", x66) * -1 del x66 - x75 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x75 += einsum("ijab,ikba->jk", x65, x7) del x7 x78 += einsum("ij->ji", x75) * -1 x133 += einsum("ij->ji", x75) * -1 del x75 - x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum("iabc->ibac", v.aaaa.ovvv) x67 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x68 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x68 += einsum("ia,ibac->bc", t1.aa, x67) x71 += einsum("ab->ab", x68) * -1 del x68 - x102 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x102 += einsum("ijab,icba->jc", x65, x67) del x65 x111 += einsum("ia->ia", x102) * -1 x173 += einsum("ia->ia", x102) * -1 del x102 - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum("ia,jbac->jibc", t1.aa, x67) * -1 del x67 - x69 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x69 += einsum("ijab->ijab", t2.abab) x69 += einsum("ia,jb->ijab", t1.aa, t1.bb) - x70 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x70 += einsum("iajb,ijcb->ca", v.aabb.ovov, x69) x71 += einsum("ab->ab", x70) del x70 - x77 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x77 += einsum("iajb,kjab->ki", v.aabb.ovov, x69) x78 += einsum("ij->ji", x77) x133 += einsum("ij->ji", x77) del x77 - x108 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x108 += einsum("iabc,jica->jb", v.bbaa.ovvv, x69) x111 += einsum("ia->ia", x108) x173 += einsum("ia->ia", x108) del x108 - x131 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x131 += einsum("iajb,ijac->cb", v.aabb.ovov, x69) - x132 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x132 += einsum("ab->ab", x131) del x131 - x139 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x139 += einsum("iajb,ikab->kj", v.aabb.ovov, x69) x140 += einsum("ij->ji", x139) x194 += einsum("ij->ji", x139) del x139 - x153 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x153 += einsum("iabc,ijac->jb", v.aabb.ovvv, x69) del x69 x156 += einsum("ia->ia", x153) x214 += einsum("ia->ia", x153) del x153 x71 += einsum("ab->ab", f.aa.vv) * -1 - x72 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x72 += einsum("ab,ijb->ija", x71, r2.aaa) x112 += einsum("ija->ija", x72) * -1 del x72 r2new_aba += einsum("ab,ijb->ija", x71, r2.aba) * -1 del x71 - x73 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x73 += einsum("ia,ja->ij", f.aa.ov, t1.aa) x78 += einsum("ij->ij", x73) x133 += einsum("ij->ij", x73) del x73 - x74 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x74 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x78 += einsum("ij->ij", x74) - x79 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ij,ika->jka", x78, x10) x112 += einsum("ija->jia", x79) * -1 del x79 - x110 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x110 += einsum("ia,ij->ja", t1.aa, x78) del x78 x111 += einsum("ia->ia", x110) * -1 del x110 x133 += einsum("ij->ij", x74) del x74 - x82 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x82 += einsum("ija,iabc->jbc", r2.bab, v.bbaa.ovvv) x85 += einsum("iab->iab", x82) del x82 - x83 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x83 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x83 += einsum("iabc->ibca", v.aaaa.ovvv) - x84 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum("ija,jbca->ibc", x10, x83) del x83 x85 += einsum("iab->iab", x84) del x84 - x86 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum("ia,jba->jib", t1.aa, x85) del x85 x112 += einsum("ija->ija", x86) * -1 del x86 - x87 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x87 += einsum("i,jkil->jkl", r1.a, v.aaaa.oooo) x95 += einsum("ijk->ijk", x87) del x87 - x88 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x88 += einsum("ija,klia->jkl", r2.bab, v.aabb.ooov) x95 += einsum("ijk->jki", x88) del x88 - x89 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x89 += einsum("ija->ija", r2.aaa) x89 += einsum("ija->jia", r2.aaa) * -1 - x97 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x97 += einsum("ij,ika->kja", f.aa.oo, x89) x112 += einsum("ija->jia", x97) * -1 del x97 x90 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x90 += einsum("ijka->kija", v.aaaa.ooov) - x91 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x91 += einsum("ija,ikla->klj", x89, x90) del x89 del x90 x95 += einsum("ijk->ijk", x91) del x91 - x96 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("ia,ijk->jka", t1.aa, x95) del x95 x112 += einsum("ija->jia", x96) del x96 - x98 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x98 += einsum("ab,ib->ia", f.aa.vv, t1.aa) x111 += einsum("ia->ia", x98) x173 += einsum("ia->ia", x98) del x98 - x99 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x99 += einsum("ia,iabj->jb", t1.bb, v.bbaa.ovvo) x111 += einsum("ia->ia", x99) x173 += einsum("ia->ia", x99) del x99 x100 += einsum("ijka->jika", v.aaaa.ooov) x100 += einsum("ijka->jkia", v.aaaa.ooov) * -1 - x101 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x101 += einsum("ijab,kjia->kb", t2.aaaa, x100) del x100 x111 += einsum("ia->ia", x101) * -1 x173 += einsum("ia->ia", x101) * -1 del x101 - x103 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x103 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x104 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x104 += einsum("ijka->jika", x103) del x103 x104 += einsum("ijka->ijka", v.aabb.ooov) - x105 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x105 += einsum("ijab,ikjb->ka", t2.abab, x104) x111 += einsum("ia->ia", x105) * -1 x112 += einsum("i,ja->ija", r1.a, x111) del x111 - r2new_aaa = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + r2new_aaa = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) r2new_aaa += einsum("ija->ija", x112) r2new_aaa += einsum("ija->jia", x112) * -1 del x112 @@ -3622,7 +3623,7 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x105 x141 += einsum("ija,jkla->kli", r2.bab, x104) * -1 del x104 - x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum("ia,jb->ijab", t1.bb, t1.bb) x114 += einsum("ijab->jiab", t2.bbbb) * -1 x114 += einsum("ijab->jiba", t2.bbbb) @@ -3634,22 +3635,22 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x117 += einsum("i,iajk->jka", r1.a, v.aabb.ovoo) r2new_bab += einsum("ija,kiab->jkb", x117, t2.abab) * -1 del x117 - x118 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x118 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x122 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x122 += einsum("ijkl->ijlk", x118) del x118 - x119 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x119 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x120 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x120 += einsum("ijka->ikja", x119) del x119 x120 += einsum("iajk->ijka", v.aabb.ovoo) - x121 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x121 += einsum("ia,jkla->jikl", t1.aa, x120) x122 += einsum("ijkl->ijkl", x121) del x121 - x149 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x149 += einsum("ijab,ijka->kb", t2.abab, x120) x156 += einsum("ia->ia", x149) * -1 x214 += einsum("ia->ia", x149) * -1 @@ -3660,18 +3661,18 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new_bab += einsum("ija,jkil->lka", r2.bab, x122) r2new_aba += einsum("ija,ikjl->kla", r2.aba, x122) del x122 - x123 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x123 += einsum("iabj->ijab", v.aabb.ovvo) x123 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) r2new_bab += einsum("ija,jkab->kib", x10, x123) del x10 del x123 - x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum("iabc->ibac", v.bbbb.ovvv) x124 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum("ia,jbac->jibc", t1.bb, x124) * -1 - x130 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x130 += einsum("ia,ibac->bc", t1.bb, x124) x132 += einsum("ab->ab", x130) * -1 del x130 @@ -3679,29 +3680,29 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x125 += einsum("ijab->ijab", v.bbbb.oovv) * -1 r2new_bab += einsum("ija,ikba->kjb", r2.bab, x125) del x125 - x126 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x126 += einsum("ia,ib->ab", f.bb.ov, t1.bb) x132 += einsum("ab->ba", x126) del x126 - x127 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x127 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x132 += einsum("ab->ab", x127) * -1 del x127 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum("ijab->jiba", t2.bbbb) x128 += einsum("ia,jb->ijba", t1.bb, t1.bb) * -1 - x129 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x129 += einsum("ijab,ijbc->ac", x128, x27) x132 += einsum("ab->ab", x129) * -1 del x129 - x148 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x148 += einsum("iabc,ijcb->ja", x124, x128) del x128 x156 += einsum("ia->ia", x148) * -1 x214 += einsum("ia->ia", x148) * -1 del x148 x132 += einsum("ab->ab", f.bb.vv) * -1 - x193 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum("ab,ijb->ija", x132, r2.bbb) x215 += einsum("ija->ija", x193) * -1 del x193 @@ -3712,32 +3713,32 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new_bab += einsum("ij,kia->kja", x133, r2.bab) * -1 r2new_aba += einsum("ij,ika->jka", x133, r2.aba) * -1 del x133 - x134 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x134 += einsum("ia,ja->ij", f.bb.ov, t1.bb) x140 += einsum("ij->ij", x134) x194 += einsum("ij->ij", x134) del x134 - x135 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x135 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x140 += einsum("ij->ij", x135) x194 += einsum("ij->ij", x135) del x135 - x136 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x136 += einsum("ijab->jiba", t2.bbbb) x136 += einsum("ia,jb->ijab", t1.bb, t1.bb) - x137 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x137 += einsum("ijab,ikba->jk", x136, x27) del x136 del x27 x140 += einsum("ij->ji", x137) * -1 x194 += einsum("ij->ji", x137) * -1 del x137 - x195 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x195 += einsum("ij,kia->jka", x194, x25) del x25 x215 += einsum("ija->jia", x195) * -1 del x195 - x213 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x213 += einsum("ia,ij->ja", t1.bb, x194) del x194 x214 += einsum("ia->ia", x213) * -1 @@ -3753,51 +3754,51 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x142 += einsum("i,iabj->jab", r1.a, v.aabb.ovvo) r2new_bab += einsum("ia,jab->jib", t1.aa, x142) del x142 - x143 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x143 += einsum("ab,ib->ia", f.bb.vv, t1.bb) x156 += einsum("ia->ia", x143) x214 += einsum("ia->ia", x143) del x143 - x144 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x144 += einsum("ia,iabj->jb", t1.aa, v.aabb.ovvo) x156 += einsum("ia->ia", x144) x214 += einsum("ia->ia", x144) del x144 - x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x145 += einsum("ia,jbka->ijkb", t1.bb, v.bbbb.ovov) - x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x146 += einsum("ijka->ijka", x145) x146 += einsum("ijka->ikja", x145) * -1 - x189 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x189 += einsum("ia,jkla->jilk", t1.bb, x145) - x191 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x191 += einsum("ijkl->lkji", x189) del x189 - x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x205 += einsum("ijka->jkia", x145) x205 += einsum("ijka->kjia", x145) * -1 del x145 x146 += einsum("ijka->jika", v.bbbb.ooov) * -1 x146 += einsum("ijka->jkia", v.bbbb.ooov) - x147 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x147 += einsum("ijab,kjib->ka", t2.bbbb, x146) del x146 x156 += einsum("ia->ia", x147) * -1 x214 += einsum("ia->ia", x147) * -1 del x147 - x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x150 += einsum("ijab->jiab", t2.bbbb) x150 += einsum("ijab->jiba", t2.bbbb) * -1 - x151 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x151 += einsum("ia,ijab->jb", x14, x150) del x14 x156 += einsum("ia->ia", x151) * -1 x214 += einsum("ia->ia", x151) * -1 del x151 - x154 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x154 += einsum("iabj->ijba", v.bbbb.ovvo) x154 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x155 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x155 += einsum("ia,ijba->jb", t1.bb, x154) x156 += einsum("ia->ia", x155) x214 += einsum("ia->ia", x155) @@ -3807,19 +3808,19 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x156 += einsum("ai->ia", f.bb.vo) r2new_bab += einsum("i,ja->jia", r1.a, x156) * -1 del x156 - x157 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x157 += einsum("i,jaik->jka", r1.b, v.aabb.ovoo) x161 += einsum("ija->ija", x157) - x177 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x177 += einsum("ija,ikab->kjb", x157, t2.abab) del x157 x215 += einsum("ija->ija", x177) del x177 - x158 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x158 += einsum("i,ja->ija", r1.b, t1.bb) x158 += einsum("ija->ija", r2.bbb) x158 += einsum("ija->jia", r2.bbb) * -1 - x159 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x159 += einsum("ija,kbia->kjb", x158, v.aabb.ovov) x161 += einsum("ija->ija", x159) r2new_aba += einsum("ija,ikba->kjb", x161, x56) * -1 @@ -3827,34 +3828,34 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x161 x180 += einsum("ija->ija", x159) del x159 - x181 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x181 += einsum("ija,ikab->jkb", x180, t2.abab) del x180 x215 += einsum("ija->ija", x181) * -1 del x181 - x163 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x163 += einsum("ija,ikba->jkb", x158, x12) del x12 - x166 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x166 += einsum("ija->jia", x163) - x178 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x178 += einsum("ija->ija", x163) del x163 - x170 = np.zeros((nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[1], nvir[0], nvir[0]), dtype=types[float]) x170 += einsum("ija,iabc->jbc", x158, v.bbaa.ovvv) x171 += einsum("ija,klia->klj", x158, v.aabb.ooov) - x187 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum("ija,ikba->kjb", x158, x154) del x154 x215 += einsum("ija->jia", x187) * -1 del x187 r2new_aba += einsum("ija,iabk->kjb", x158, v.bbaa.ovvo) del x158 - x162 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x162 += einsum("ija,iakb->jkb", r2.aba, v.aabb.ovov) x166 += einsum("ija->jia", x162) x178 += einsum("ija->ija", x162) - x179 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x179 += einsum("ija,jkba->kib", x178, x150) del x178 del x150 @@ -3862,22 +3863,22 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x179 x208 += einsum("ija->ija", x162) del x162 - x209 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x209 += einsum("ia,jka->jki", t1.bb, x208) del x208 - x210 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x210 += einsum("ijk->jki", x209) del x209 - x164 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x164 += einsum("ijka->ikja", v.bbbb.ooov) x164 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x165 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x165 += einsum("i,jika->jka", r1.b, x164) del x164 x166 += einsum("ija->ija", x165) * -1 r2new_aba += einsum("ija,kiba->kjb", x166, t2.abab) del x166 - x188 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum("ija,ikba->kjb", x165, x114) * -1 del x114 del x165 @@ -3899,7 +3900,7 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x171 += einsum("i,jkil->jkl", r1.b, v.aabb.oooo) r2new_aba += einsum("ia,ijk->jka", t1.aa, x171) * -1 del x171 - x172 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x172 += einsum("ijab->ijab", v.bbaa.oovv) x172 += einsum("ia,jabc->jibc", t1.bb, v.bbaa.ovvv) r2new_aba += einsum("ija,jkba->ikb", r2.aba, x172) * -1 @@ -3907,95 +3908,95 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x173 += einsum("ai->ia", f.aa.vo) r2new_aba += einsum("i,ja->jia", r1.b, x173) * -1 del x173 - x174 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x174 += einsum("i,ijak->jka", r1.b, v.bbbb.oovo) x215 += einsum("ija->ija", x174) * -1 del x174 - x175 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x175 += einsum("ij,ia->ja", f.bb.oo, t1.bb) x215 += einsum("i,ja->jia", r1.b, x175) del x175 - x176 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x176 += einsum("ija,iabk->jkb", r2.aba, v.aabb.ovvo) x215 += einsum("ija->ija", x176) * -1 del x176 - x182 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum("i,iabc->bac", r1.b, v.bbbb.ovvv) - x185 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum("abc->abc", x182) * -1 - x198 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("ia,bac->ibc", t1.bb, x182) del x182 - x201 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 += einsum("iab->iab", x198) del x198 - x183 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x183 += einsum("ija->ija", r2.bbb) x183 += einsum("i,ja->ija", r1.b, t1.bb) - x184 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nvir[1], nvir[1], nvir[1]), dtype=types[float]) x184 += einsum("ija,jbic->abc", x183, v.bbbb.ovov) del x183 x185 += einsum("abc->acb", x184) del x184 - x186 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x186 += einsum("abc,ijcb->ija", x185, t2.bbbb) del x185 x215 += einsum("ija->jia", x186) del x186 - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x190 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) x191 += einsum("ijkl->jkli", x190) x191 += einsum("ijkl->kjli", x190) * -1 del x190 x191 += einsum("ijkl->kilj", v.bbbb.oooo) - x192 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x192 += einsum("ija,jikl->kla", r2.bbb, x191) del x191 x215 += einsum("ija->jia", x192) del x192 - x197 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum("ija,iabc->jbc", r2.aba, v.aabb.ovvv) x201 += einsum("iab->iab", x197) del x197 - x199 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x199 += einsum("ija->ija", r2.bbb) * -1 x199 += einsum("ija->jia", r2.bbb) - x200 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x200 += einsum("ija,jbac->ibc", x199, x124) del x124 x201 += einsum("iab->iab", x200) del x200 - x202 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x202 += einsum("ia,jba->jib", t1.bb, x201) del x201 x215 += einsum("ija->ija", x202) * -1 del x202 - x212 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x212 += einsum("ij,kia->kja", f.bb.oo, x199) x215 += einsum("ija->jia", x212) * -1 del x212 - x203 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x203 += einsum("i,jkil->jkl", r1.b, v.bbbb.oooo) x210 += einsum("ijk->ijk", x203) del x203 - x204 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x204 += einsum("ija,iakl->jkl", r2.aba, v.aabb.ovoo) x210 += einsum("ijk->jki", x204) del x204 x205 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x205 += einsum("ijka->kija", v.bbbb.ooov) - x206 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x206 += einsum("ija,jkla->ikl", x199, x205) del x205 del x199 x210 += einsum("ijk->jki", x206) del x206 - x211 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x211 += einsum("ia,ijk->jka", t1.bb, x210) del x210 x215 += einsum("ija->jia", x211) del x211 - r2new_bbb = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + r2new_bbb = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) r2new_bbb += einsum("ija->ija", x215) r2new_bbb += einsum("ija->jia", x215) * -1 del x215 @@ -4014,324 +4015,324 @@ def hbar_matvec_ip(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No return r1new, r2new def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): - x0 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x0 += einsum("a,iajb->ijb", r1.a, v.aabb.ovov) - r1new_a = np.zeros((nvir[0]), dtype=np.float64) + r1new_a = np.zeros((nvir[0]), dtype=types[float]) r1new_a += einsum("ija,ijba->b", x0, t2.abab) * -1 del x0 - x1 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum("abi->iab", r2.aaa) x1 += einsum("a,ib->iab", r1.a, t1.aa) * -1 - x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x2 += einsum("iabc->ibca", v.aaaa.ovvv) - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum("ia,jbca->ijbc", t1.aa, x2) - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum("ijab->ijab", x48) * -1 - x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x159 += einsum("ijab->jiab", x48) * -1 del x48 - x55 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum("a,ibca->ibc", r1.a, x2) - x107 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("iab->iab", x55) * -1 - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum("ia,ibca->bc", t1.aa, x2) - x76 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x76 += einsum("ab->ab", x73) * -1 - x120 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x120 += einsum("ab->ab", x73) * -1 del x73 - x87 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum("abi,jcba->ijc", r2.aaa, x2) - x90 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum("ija->jia", x87) * -1 del x87 r1new_a += einsum("iab,icab->c", x1, x2) * -1 - x3 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x3 += einsum("abi->iba", r2.bab) x3 += einsum("a,ib->iab", r1.a, t1.bb) - x18 = np.zeros((nocc[0]), dtype=np.float64) + x18 = np.zeros((nocc[0]), dtype=types[float]) x18 += einsum("iab,jaib->j", x3, v.aabb.ovov) - x19 = np.zeros((nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0]), dtype=types[float]) x19 += einsum("i->i", x18) del x18 - x117 = np.zeros((nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[0], nvir[1], nvir[1]), dtype=types[float]) x117 += einsum("iab,jaic->jbc", x3, v.aabb.ovov) - x119 = np.zeros((nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[1], nocc[1]), dtype=types[float]) x119 += einsum("iab,jakb->jki", x3, v.aabb.ovov) - x136 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[1], nvir[1]), dtype=types[float]) x136 += einsum("iab,jacb->jic", x3, v.aabb.ovvv) - x137 = np.zeros((nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nvir[0]), dtype=types[float]) x137 += einsum("iab,jbca->jic", x3, v.bbaa.ovvv) r1new_a += einsum("iab,ibca->c", x3, v.bbaa.ovvv) - r2new_bab = np.zeros((nvir[1], nvir[0], nocc[1]), dtype=np.float64) + r2new_bab = np.zeros((nvir[1], nvir[0], nocc[1]), dtype=types[float]) r2new_bab += einsum("iab,cadb->dci", x3, v.aabb.vvvv) * -1 del x3 - x4 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum("a,iajb->jib", r1.a, v.aaaa.ovov) - x5 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("ija->ija", x4) x5 += einsum("ija->jia", x4) * -1 r1new_a += einsum("ija,ijab->b", x5, t2.aaaa) * -1 del x5 - x66 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x66 += einsum("ia,jka->ikj", t1.aa, x4) del x4 - x67 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x67 += einsum("ijk->jki", x66) * -1 del x66 - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ia->ia", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("iajb->jiab", v.aaaa.ovov) x7 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ia,ijab->jb", t1.aa, x7) x9 += einsum("ia->ia", x8) * -1 del x8 - x153 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x153 += einsum("abi,ijac->jcb", r2.aba, x7) * -1 x9 += einsum("ia->ia", f.aa.ov) - x144 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x144 += einsum("ia,ijab->jb", x9, t2.abab) - x149 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x149 += einsum("ia->ia", x144) - x197 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x197 += einsum("ia->ia", x144) * -1 del x144 - r1new_b = np.zeros((nvir[1]), dtype=np.float64) + r1new_b = np.zeros((nvir[1]), dtype=types[float]) r1new_b += einsum("ia,abi->b", x9, r2.aba) - x10 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum("abi->iab", r2.aaa) x10 += einsum("abi->iba", r2.aaa) * -1 - x92 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x92 += einsum("ab,ibc->iac", f.aa.vv, x10) - x104 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum("iab->iab", x92) * -1 del x92 r1new_a += einsum("ia,iba->b", x9, x10) * -1 - x11 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x12 += einsum("iajb->jiab", v.bbbb.ovov) x12 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum("ia,ijab->jb", t1.bb, x12) x14 += einsum("ia->ia", x13) * -1 del x13 - x105 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x105 += einsum("abi,ijac->jbc", r2.bab, x12) * -1 x14 += einsum("ia->ia", f.bb.ov) - x99 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x99 += einsum("ia,jiba->jb", x14, t2.abab) - x103 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x103 += einsum("ia->ia", x99) * -1 - x165 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("ia->ia", x99) del x99 r1new_a += einsum("ia,abi->b", x14, r2.bab) - x15 = np.zeros((nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0]), dtype=types[float]) x15 += einsum("a,ia->i", r1.a, f.aa.ov) x19 += einsum("i->i", x15) del x15 - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x16 += einsum("iajb->jiba", v.aaaa.ovov) - x17 = np.zeros((nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0]), dtype=types[float]) x17 += einsum("iab,ijba->j", x1, x16) del x1 x19 += einsum("i->i", x17) * -1 del x17 - x86 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum("i,ijab->jab", x19, t2.aaaa) x104 += einsum("iab->iba", x86) del x86 r1new_a += einsum("i,ia->a", x19, t1.aa) * -1 r2new_bab += einsum("i,ijab->baj", x19, t2.abab) del x19 - x174 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x174 += einsum("abi,ijac->jcb", r2.aba, x16) - x175 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x175 += einsum("iab->iab", x174) * -1 del x174 - x20 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x20 += einsum("a,ibja->ijb", r1.b, v.aabb.ovov) r1new_b += einsum("ija,ijab->b", x20, t2.abab) * -1 del x20 - x21 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x21 += einsum("abi->iab", r2.bbb) x21 += einsum("a,ib->iab", r1.b, t1.bb) * -1 - x181 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x181 += einsum("iab,jbka->jki", x21, v.bbbb.ovov) - x182 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x182 += einsum("ijk->jik", x181) del x181 - x187 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum("iab,cbda->icd", x21, v.bbbb.vvvv) - x198 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("iab->iba", x187) * -1 del x187 - x22 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x22 += einsum("iabc->ibac", v.bbbb.ovvv) x22 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum("ia,jbac->jibc", t1.bb, x22) * -1 - x125 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x125 += einsum("ia,ibac->bc", t1.bb, x22) - x127 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x127 += einsum("ab->ab", x125) * -1 - x184 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x184 += einsum("ab->ab", x125) * -1 del x125 - x156 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x156 += einsum("a,ibac->ibc", r1.b, x22) - x157 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum("iab->iab", x156) * -1 r1new_b += einsum("iab,icba->c", x21, x22) * -1 - x23 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x23 += einsum("abi->iab", r2.aba) x23 += einsum("a,ib->iba", r1.b, t1.aa) - x30 = np.zeros((nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1]), dtype=types[float]) x30 += einsum("iab,iajb->j", x23, v.aabb.ovov) - x31 = np.zeros((nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1]), dtype=types[float]) x31 += einsum("i->i", x30) del x30 - x160 = np.zeros((nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[1], nvir[0], nvir[0]), dtype=types[float]) x160 += einsum("iab,icjb->jac", x23, v.aabb.ovov) - x162 = np.zeros((nocc[0], nocc[0], nocc[1]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nocc[1]), dtype=types[float]) x162 += einsum("iab,jakb->jik", x23, v.aabb.ovov) - x163 = np.zeros((nocc[0], nocc[0], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nvir[1]), dtype=types[float]) x163 += einsum("iab,jacb->jic", x23, v.aabb.ovvv) - x164 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[1], nvir[0]), dtype=types[float]) x164 += einsum("iab,jbca->ijc", x23, v.bbaa.ovvv) r1new_b += einsum("iab,iacb->c", x23, v.aabb.ovvv) - r2new_aba = np.zeros((nvir[0], nvir[1], nocc[0]), dtype=np.float64) + r2new_aba = np.zeros((nvir[0], nvir[1], nocc[0]), dtype=types[float]) r2new_aba += einsum("iab,cadb->cdi", x23, v.aabb.vvvv) * -1 del x23 - x24 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x24 += einsum("a,iajb->jib", r1.b, v.bbbb.ovov) - x25 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x25 += einsum("ija->ija", x24) * -1 x25 += einsum("ija->jia", x24) del x24 r1new_b += einsum("ija,jiab->b", x25, t2.bbbb) * -1 del x25 - x26 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x26 += einsum("abi->iab", r2.bbb) x26 += einsum("abi->iba", r2.bbb) * -1 r1new_b += einsum("ia,iba->b", x14, x26) * -1 del x26 - x27 = np.zeros((nocc[1]), dtype=np.float64) + x27 = np.zeros((nocc[1]), dtype=types[float]) x27 += einsum("a,ia->i", r1.b, f.bb.ov) x31 += einsum("i->i", x27) del x27 - x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x28 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x28 += einsum("iajb->jiba", v.bbbb.ovov) - x29 = np.zeros((nocc[1]), dtype=np.float64) + x29 = np.zeros((nocc[1]), dtype=types[float]) x29 += einsum("iab,ijba->j", x21, x28) del x21 x31 += einsum("i->i", x29) * -1 del x29 - x188 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum("i,ijab->jab", x31, t2.bbbb) x198 += einsum("iab->iba", x188) del x188 r1new_b += einsum("i,ia->a", x31, t1.bb) * -1 r2new_aba += einsum("i,jiab->abj", x31, t2.abab) del x31 - x52 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x52 += einsum("abi,ijac->jbc", r2.bab, x28) - x53 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x53 += einsum("iab->iab", x52) * -1 del x52 - x32 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x32 += einsum("a,bica->ibc", r1.a, v.aaaa.vovv) x104 += einsum("iab->iab", x32) * -1 del x32 - x33 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x33 += einsum("ab,ib->ia", f.aa.vv, t1.aa) x104 += einsum("a,ib->iba", r1.a, x33) * -1 x165 += einsum("ia->ia", x33) del x33 - x34 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum("abi,cbda->idc", r2.aaa, v.aaaa.vvvv) x104 += einsum("iab->iab", x34) * -1 del x34 - x35 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nvir[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum("a,bcda->bdc", r1.a, v.aaaa.vvvv) - x36 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum("ia,bca->icb", t1.aa, x35) del x35 x104 += einsum("iab->iab", x36) del x36 - x37 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x37 += einsum("a,ibca->icb", r1.a, v.bbaa.ovvv) - x38 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum("iab,jicb->jca", x37, t2.abab) x104 += einsum("iab->iab", x38) * -1 del x38 x105 += einsum("iab->iab", x37) del x37 - x39 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum("abi,jcia->jbc", r2.bab, v.aabb.ovov) - x42 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum("iab->iab", x39) x107 += einsum("iab->iab", x39) del x39 - x40 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum("a,ib->iab", r1.a, t1.aa) x40 += einsum("abi->iab", r2.aaa) * -1 x40 += einsum("abi->iba", r2.aaa) - x41 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum("iab,ijca->jcb", x40, x7) x42 += einsum("iab->iba", x41) * -1 x107 += einsum("iab->iba", x41) * -1 del x41 r2new_bab += einsum("iab,ijbc->caj", x107, t2.abab) * -1 del x107 - x51 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nvir[0], nvir[1]), dtype=types[float]) x51 += einsum("iab,iajc->jbc", x40, v.aabb.ovov) del x40 x53 += einsum("iab->iab", x51) - x54 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x54 += einsum("iab,jicb->jca", x53, t2.abab) del x53 x104 += einsum("iab->iba", x54) * -1 del x54 x105 += einsum("iab->iab", x51) * -1 del x51 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum("ijab->jiab", t2.aaaa) x43 += einsum("ijab->jiba", t2.aaaa) * -1 - x44 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum("iab,ijbc->jac", x42, x43) del x42 x104 += einsum("iab->iab", x44) * -1 del x44 x165 += einsum("ia,ijab->jb", x9, x43) * -1 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia,jakb->ikjb", t1.aa, v.aaaa.ovov) - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum("ijka->ijka", x45) * -1 x46 += einsum("ijka->ikja", x45) del x45 x46 += einsum("ijka->jika", v.aaaa.ooov) x46 += einsum("ijka->jkia", v.aaaa.ooov) * -1 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum("ia,jikb->jkab", t1.aa, x46) x49 += einsum("ijab->ijab", x47) * -1 x159 += einsum("ijab->jiab", x47) * -1 del x47 - x94 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x94 += einsum("ijab,kija->kb", t2.aaaa, x46) x103 += einsum("ia->ia", x94) * -1 del x94 @@ -4339,101 +4340,101 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x46 x49 += einsum("iabj->jiba", v.aaaa.ovvo) x49 += einsum("ijab->jiab", v.aaaa.oovv) * -1 - x50 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum("iab,jica->jbc", x10, x49) del x49 x104 += einsum("iab->iab", x50) del x50 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum("ia,jb->ijab", t1.aa, t1.aa) x56 += einsum("ijab->jiab", t2.aaaa) * -1 x56 += einsum("ijab->jiba", t2.aaaa) - x57 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum("iab,ijcb->jca", x55, x56) * -1 del x56 del x55 x104 += einsum("iab->iab", x57) del x57 - x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x58 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x62 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x62 += einsum("ijab->ijab", x58) del x58 - x59 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x59 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x60 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x60 += einsum("ijka->jika", x59) del x59 x60 += einsum("ijka->ijka", v.aabb.ooov) - x61 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x61 += einsum("ia,ijkb->jkab", t1.aa, x60) x62 += einsum("ijab->ijab", x61) * -1 del x61 - x96 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("ijab,ikjb->ka", t2.abab, x60) x103 += einsum("ia->ia", x96) x165 += einsum("ia->ia", x96) * -1 del x96 - x161 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum("ia,jkib->jkab", t1.bb, x60) * -1 del x60 x62 += einsum("iabj->jiba", v.bbaa.ovvo) - x63 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("abi,jica->jbc", r2.bab, x62) x104 += einsum("iab->iab", x63) del x63 - x64 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x64 += einsum("a,ijka->ikj", r1.a, v.aaaa.ooov) x67 += einsum("ijk->ijk", x64) del x64 - x65 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nocc[0]), dtype=types[float]) x65 += einsum("abi,jbka->ikj", r2.aaa, v.aaaa.ovov) x67 += einsum("ijk->jki", x65) del x65 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum("ijab->jiba", t2.aaaa) x68 += einsum("ia,jb->ijab", t1.aa, t1.aa) - x69 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum("ijk,jiab->kab", x67, x68) del x67 x104 += einsum("iab->iba", x69) * -1 del x69 - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum("ijab,ijac->bc", x68, x7) del x7 x76 += einsum("ab->ab", x72) * -1 x120 += einsum("ab->ab", x72) * -1 del x72 - x80 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x80 += einsum("ijab,ikba->kj", x16, x68) del x16 - x84 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x84 += einsum("ij->ji", x80) * -1 del x80 - x95 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x95 += einsum("iabc,ijcb->ja", x2, x68) x103 += einsum("ia->ia", x95) * -1 del x95 x165 += einsum("iabc,ijbc->ja", x2, x68) * -1 del x2 del x68 - x70 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x70 += einsum("ia,ib->ab", f.aa.ov, t1.aa) x76 += einsum("ab->ba", x70) x120 += einsum("ab->ba", x70) del x70 - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x76 += einsum("ab->ab", x71) * -1 x120 += einsum("ab->ab", x71) * -1 del x71 - x74 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x74 += einsum("ijab->ijab", t2.abab) x74 += einsum("ia,jb->ijab", t1.aa, t1.bb) - x75 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x75 += einsum("iajb,ijcb->ca", v.aabb.ovov, x74) x76 += einsum("ab->ab", x75) - x77 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum("ab,ibc->iac", x76, x10) del x10 del x76 @@ -4441,85 +4442,85 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x77 x120 += einsum("ab->ab", x75) del x75 - x83 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x83 += einsum("iajb,kjab->ki", v.aabb.ovov, x74) x84 += einsum("ij->ji", x83) del x83 - x100 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x100 += einsum("iabc,jica->jb", v.bbaa.ovvv, x74) x103 += einsum("ia->ia", x100) * -1 x165 += einsum("ia->ia", x100) del x100 - x126 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x126 += einsum("iajb,ijac->cb", v.aabb.ovov, x74) x127 += einsum("ab->ab", x126) x184 += einsum("ab->ab", x126) del x126 - x134 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x134 += einsum("iajb,ikab->kj", v.aabb.ovov, x74) - x135 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x135 += einsum("ij->ji", x134) del x134 - x145 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x145 += einsum("iabc,ijac->jb", v.aabb.ovvv, x74) x149 += einsum("ia->ia", x145) x197 += einsum("ia->ia", x145) * -1 del x145 - x78 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x78 += einsum("ia,ja->ij", f.aa.ov, t1.aa) x84 += einsum("ij->ij", x78) del x78 - x79 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x79 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x84 += einsum("ij->ij", x79) del x79 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x81 += einsum("ijka->kija", v.aaaa.ooov) - x82 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x82 += einsum("ia,jika->jk", t1.aa, x81) del x81 x84 += einsum("ij->ij", x82) * -1 del x82 x84 += einsum("ij->ij", f.aa.oo) - x85 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum("ij,abi->jab", x84, r2.aaa) x104 += einsum("iab->iab", x85) del x85 - x102 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x102 += einsum("ia,ij->ja", t1.aa, x84) x103 += einsum("ia->ia", x102) x165 += einsum("ia->ia", x102) * -1 del x102 r2new_aba += einsum("ij,abi->abj", x84, r2.aba) del x84 - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum("iabj->ijba", v.aaaa.ovvo) x88 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x89 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0]), dtype=types[float]) x89 += einsum("a,ijba->ijb", r1.a, x88) x90 += einsum("ija->ija", x89) del x89 - x91 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum("ia,ijb->jba", t1.aa, x90) del x90 x104 += einsum("iab->iba", x91) * -1 del x91 - x101 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x101 += einsum("ia,ijba->jb", t1.aa, x88) del x88 x103 += einsum("ia->ia", x101) * -1 x165 += einsum("ia->ia", x101) del x101 - x93 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x93 += einsum("ia,iabj->jb", t1.bb, v.bbaa.ovvo) x103 += einsum("ia->ia", x93) * -1 x165 += einsum("ia->ia", x93) del x93 - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum("ijab->jiab", t2.aaaa) * -1 x97 += einsum("ijab->jiba", t2.aaaa) - x98 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x98 += einsum("ia,ijab->jb", x9, x97) del x9 del x97 @@ -4527,59 +4528,59 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x98 x104 += einsum("a,ib->iab", r1.a, x103) * -1 del x103 - r2new_aaa = np.zeros((nvir[0], nvir[0], nocc[0]), dtype=np.float64) + r2new_aaa = np.zeros((nvir[0], nvir[0], nocc[0]), dtype=types[float]) r2new_aaa += einsum("iab->abi", x104) r2new_aaa += einsum("iab->bai", x104) * -1 del x104 - x106 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x106 += einsum("ijab->jiab", t2.bbbb) * -1 x106 += einsum("ijab->jiba", t2.bbbb) - x196 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x196 += einsum("ia,ijab->jb", x14, x106) x197 += einsum("ia->ia", x196) * -1 del x196 r2new_bab += einsum("iab,ijbc->caj", x105, x106) * -1 del x105 - x108 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("abi->iab", r2.aaa) * -1 x108 += einsum("abi->iba", r2.aaa) - x109 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x109 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x113 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x113 += einsum("ijab->ijab", x109) del x109 - x110 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x110 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x111 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x111 += einsum("ijka->ikja", x110) del x110 x111 += einsum("iajk->ijka", v.aabb.ovoo) - x112 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x112 += einsum("ia,jikb->jkba", t1.bb, x111) x113 += einsum("ijab->ijab", x112) * -1 del x112 - x118 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum("ia,ijkb->jkab", t1.aa, x111) * -1 - x142 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x142 += einsum("ijab,ijka->kb", t2.abab, x111) del x111 x149 += einsum("ia->ia", x142) * -1 x197 += einsum("ia->ia", x142) del x142 x113 += einsum("iabj->ijab", v.aabb.ovvo) - x179 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x179 += einsum("abi,ijac->jcb", r2.aba, x113) x198 += einsum("iab->iba", x179) del x179 r2new_bab += einsum("iab,ijbc->caj", x108, x113) * -1 del x113 del x108 - x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x114 += einsum("ia,jbka->ijkb", t1.bb, v.bbbb.ovov) - x115 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x115 += einsum("ijka->ijka", x114) x115 += einsum("ijka->ikja", x114) * -1 - x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x140 += einsum("ijka->ijka", x114) * -1 x140 += einsum("ijka->ikja", x114) del x114 @@ -4605,20 +4606,20 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new_bab += einsum("ab,cbi->cai", x120, r2.bab) r2new_aba += einsum("ab,bci->aci", x120, r2.aba) del x120 - x121 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x121 += einsum("ia,ib->ab", f.bb.ov, t1.bb) x127 += einsum("ab->ba", x121) x184 += einsum("ab->ba", x121) del x121 - x122 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x122 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x127 += einsum("ab->ab", x122) * -1 x184 += einsum("ab->ab", x122) * -1 del x122 - x123 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum("ijab->jiba", t2.bbbb) x123 += einsum("ia,jb->ijab", t1.bb, t1.bb) - x124 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x124 += einsum("ijab,ijca->bc", x123, x28) x127 += einsum("ab->ab", x124) * -1 x184 += einsum("ab->ab", x124) * -1 @@ -4627,42 +4628,42 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No r2new_bab += einsum("ab,bci->aci", x127, r2.bab) r2new_aba += einsum("ab,cbi->cai", x127, r2.aba) del x127 - x128 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x128 += einsum("ia,ja->ij", f.bb.ov, t1.bb) x135 += einsum("ij->ij", x128) del x128 - x129 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x129 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x135 += einsum("ij->ij", x129) del x129 - x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum("ijab->jiba", t2.bbbb) x130 += einsum("ia,jb->ijba", t1.bb, t1.bb) * -1 - x131 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x131 += einsum("ijab,ikba->jk", x130, x28) del x28 x135 += einsum("ij->ji", x131) * -1 del x131 - x195 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x195 += einsum("ijab,icab->jc", x130, x22) del x22 x197 += einsum("ia->ia", x195) * -1 del x195 - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x132 += einsum("ijka->kija", v.bbbb.ooov) - x133 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x133 += einsum("ia,jika->jk", t1.bb, x132) del x132 x135 += einsum("ij->ij", x133) * -1 del x133 x135 += einsum("ij->ij", f.bb.oo) - x148 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x148 += einsum("ia,ij->ja", t1.bb, x135) x149 += einsum("ia->ia", x148) * -1 x197 += einsum("ia->ia", x148) del x148 - x186 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x186 += einsum("ij,abi->jab", x135, r2.bbb) x198 += einsum("iab->iab", x186) del x186 @@ -4674,12 +4675,12 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x137 += einsum("a,ijba->ijb", r1.a, v.bbaa.oovv) r2new_bab += einsum("ia,ijb->abj", t1.bb, x137) del x137 - x138 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x138 += einsum("ab,ib->ia", f.bb.vv, t1.bb) x149 += einsum("ia->ia", x138) x198 += einsum("a,ib->iba", r1.b, x138) * -1 del x138 - x139 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x139 += einsum("ia,iabj->jb", t1.aa, v.aabb.ovvo) x149 += einsum("ia->ia", x139) x197 += einsum("ia->ia", x139) * -1 @@ -4687,53 +4688,53 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x140 += einsum("ijka->jika", v.bbbb.ooov) x140 += einsum("ijka->jkia", v.bbbb.ooov) * -1 x149 += einsum("ijab,kjia->kb", t2.bbbb, x140) * -1 - x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x170 += einsum("ia,jikb->jkba", t1.bb, x140) - x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x172 += einsum("ijab->ijba", x170) * -1 del x170 - x194 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x194 += einsum("ijab,kija->kb", t2.bbbb, x140) del x140 x197 += einsum("ia->ia", x194) * -1 del x194 - x141 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x141 += einsum("iabc->ibca", v.bbbb.ovvv) x149 += einsum("ijab,icab->jc", x130, x141) * -1 del x130 - x171 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x171 += einsum("ia,jbca->jibc", t1.bb, x141) x172 += einsum("ijab->jiab", x171) * -1 del x171 - x189 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum("abi,jcba->jic", r2.bbb, x141) del x141 - x191 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x191 += einsum("ija->ija", x189) * -1 del x189 - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum("ijab->jiab", t2.bbbb) x143 += einsum("ijab->jiba", t2.bbbb) * -1 x149 += einsum("ia,ijab->jb", x14, x143) * -1 del x14 del x143 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum("iabj->ijba", v.bbbb.ovvo) x146 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x147 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x147 += einsum("ia,ijba->jb", t1.bb, x146) x149 += einsum("ia->ia", x147) x197 += einsum("ia->ia", x147) * -1 del x147 x198 += einsum("a,ib->iab", r1.b, x197) * -1 del x197 - x190 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nvir[1]), dtype=types[float]) x190 += einsum("a,ijba->ijb", r1.b, x146) del x146 x191 += einsum("ija->ija", x190) del x190 - x192 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x192 += einsum("ia,ijb->jba", t1.bb, x191) del x191 x198 += einsum("iab->iba", x192) * -1 @@ -4741,19 +4742,19 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x149 += einsum("ai->ia", f.bb.vo) r2new_bab += einsum("a,ib->bai", r1.a, x149) * -1 del x149 - x150 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x150 += einsum("a,ibca->ibc", r1.b, v.aabb.ovvv) x153 += einsum("iab->iab", x150) - x167 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x167 += einsum("iab,ijac->jcb", x150, t2.abab) del x150 x198 += einsum("iab->iab", x167) * -1 del x167 - x151 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x151 += einsum("a,ib->iab", r1.b, t1.bb) x151 += einsum("abi->iab", r2.bbb) * -1 x151 += einsum("abi->iba", r2.bbb) - x152 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[0], nvir[0], nvir[1]), dtype=types[float]) x152 += einsum("iab,jcia->jcb", x151, v.aabb.ovov) x153 += einsum("iab->iab", x152) * -1 r2new_aba += einsum("iab,ijac->cbj", x153, x43) @@ -4761,41 +4762,41 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x43 x175 += einsum("iab->iab", x152) del x152 - x176 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 += einsum("iab,ijac->jbc", x175, t2.abab) del x175 x198 += einsum("iab->iab", x176) * -1 del x176 - x155 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x155 += einsum("iab,ijca->jbc", x151, x12) del x12 del x151 x157 += einsum("iab->iab", x155) * -1 - x168 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x168 += einsum("iab->iab", x155) * -1 del x155 - x154 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x154 += einsum("abi,iajc->jbc", r2.aba, v.aabb.ovov) x157 += einsum("iab->iab", x154) r2new_aba += einsum("iab,jicb->caj", x157, t2.abab) * -1 del x157 x168 += einsum("iab->iab", x154) del x154 - x169 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x169 += einsum("iab,ijcb->jca", x168, x106) del x168 del x106 x198 += einsum("iab->iba", x169) * -1 del x169 - x158 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum("abi->iab", r2.bbb) * -1 x158 += einsum("abi->iba", r2.bbb) - x185 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum("ab,icb->ica", x184, x158) del x184 x198 += einsum("iab->iab", x185) * -1 del x185 - x193 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum("ab,icb->ica", f.bb.vv, x158) x198 += einsum("iab->iba", x193) * -1 del x193 @@ -4825,39 +4826,39 @@ def hbar_matvec_ea(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x165 += einsum("ai->ia", f.aa.vo) r2new_aba += einsum("a,ib->bai", r1.b, x165) * -1 del x165 - x166 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum("a,bica->ibc", r1.b, v.bbbb.vovv) x198 += einsum("iab->iab", x166) * -1 del x166 x172 += einsum("iabj->jiba", v.bbbb.ovvo) x172 += einsum("ijab->jiab", v.bbbb.oovv) * -1 - x173 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x173 += einsum("iab,jicb->jac", x158, x172) del x172 del x158 x198 += einsum("iab->iab", x173) del x173 - x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x177 += einsum("ia,jb->ijab", t1.bb, t1.bb) x177 += einsum("ijab->jiab", t2.bbbb) * -1 x177 += einsum("ijab->jiba", t2.bbbb) - x178 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum("iab,ijcb->jca", x156, x177) * -1 del x177 del x156 x198 += einsum("iab->iab", x178) del x178 - x180 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nocc[1]), dtype=types[float]) x180 += einsum("a,ijka->ikj", r1.b, v.bbbb.ooov) x182 += einsum("ijk->ijk", x180) del x180 - x183 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum("ijk,jiab->kab", x182, x123) del x123 del x182 x198 += einsum("iab->iba", x183) * -1 del x183 - r2new_bbb = np.zeros((nvir[1], nvir[1], nocc[1]), dtype=np.float64) + r2new_bbb = np.zeros((nvir[1], nvir[1], nocc[1]), dtype=types[float]) r2new_bbb += einsum("iab->abi", x198) r2new_bbb += einsum("iab->bai", x198) * -1 del x198 @@ -4888,51 +4889,51 @@ def make_ee_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - ketee1_oo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + ketee1_oo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) ketee1_oo_aaaa -= einsum("ij,ka->jaki", delta_oo.aa, t1.aa) - ketee1_oo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + ketee1_oo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) ketee1_oo_bbbb -= einsum("ij,ka->jaki", delta_oo.bb, t1.bb) - ketee1_ov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + ketee1_ov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) ketee1_ov_aaaa -= einsum("ia,jb->iajb", t1.aa, t1.aa) ketee1_ov_aaaa -= einsum("ijab->jaib", t2.aaaa) ketee1_ov_aaaa += einsum("ijab->jbia", t2.aaaa) - ketee1_ov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + ketee1_ov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) ketee1_ov_bbbb -= einsum("ia,jb->iajb", t1.bb, t1.bb) ketee1_ov_bbbb -= einsum("ijab->jaib", t2.bbbb) ketee1_ov_bbbb += einsum("ijab->jbia", t2.bbbb) - ketee1_ov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + ketee1_ov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) ketee1_ov_bbaa -= einsum("ia,jb->jbia", t1.aa, t1.bb) ketee1_ov_bbaa += einsum("ijab->jbia", t2.abab) - ketee1_ov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + ketee1_ov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) ketee1_ov_aabb -= einsum("ia,jb->iajb", t1.aa, t1.bb) ketee1_ov_aabb += einsum("ijab->iajb", t2.abab) - ketee1_vo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + ketee1_vo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) ketee1_vo_aaaa += einsum("ab,ij->jbai", delta_vv.aa, delta_oo.aa) - ketee1_vo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + ketee1_vo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) ketee1_vo_bbbb += einsum("ab,ij->jbai", delta_vv.bb, delta_oo.bb) - ketee1_vv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + ketee1_vv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) ketee1_vv_aaaa += einsum("ab,ic->ibac", delta_vv.aa, t1.aa) - ketee1_vv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + ketee1_vv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) ketee1_vv_bbbb += einsum("ab,ic->ibac", delta_vv.bb, t1.bb) - ketee2_oo_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + ketee2_oo_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) ketee2_oo_aaaaaa -= einsum("ij,klab->jlabki", delta_oo.aa, t2.aaaa) ketee2_oo_aaaaaa += einsum("ij,klab->jlbaki", delta_oo.aa, t2.aaaa) ketee2_oo_aaaaaa += einsum("ij,klab->ljabki", delta_oo.aa, t2.aaaa) ketee2_oo_aaaaaa -= einsum("ij,klab->ljbaki", delta_oo.aa, t2.aaaa) - ketee2_oo_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + ketee2_oo_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[0], nocc[0]), dtype=types[float]) ketee2_oo_babaaa -= einsum("ij,klab->ljbaki", delta_oo.aa, t2.abab) - ketee2_oo_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + ketee2_oo_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[1], nocc[1]), dtype=types[float]) ketee2_oo_ababbb -= einsum("ij,klab->kjabli", delta_oo.bb, t2.abab) - ketee2_oo_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + ketee2_oo_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) ketee2_oo_bbbbbb -= einsum("ij,klab->jlabki", delta_oo.bb, t2.bbbb) ketee2_oo_bbbbbb += einsum("ij,klab->jlbaki", delta_oo.bb, t2.bbbb) ketee2_oo_bbbbbb += einsum("ij,klab->ljabki", delta_oo.bb, t2.bbbb) ketee2_oo_bbbbbb -= einsum("ij,klab->ljbaki", delta_oo.bb, t2.bbbb) - ketee2_oo_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + ketee2_oo_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[0], nocc[0]), dtype=types[float]) ketee2_oo_ababaa -= einsum("ij,klab->jlabki", delta_oo.aa, t2.abab) - ketee2_oo_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + ketee2_oo_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[1], nocc[1]), dtype=types[float]) ketee2_oo_bababb -= einsum("ij,klab->jkbali", delta_oo.bb, t2.abab) - ketee2_ov_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + ketee2_ov_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) ketee2_ov_aaaaaa -= einsum("ia,jkbc->ikbcja", t1.aa, t2.aaaa) ketee2_ov_aaaaaa += einsum("ia,jkbc->ikcbja", t1.aa, t2.aaaa) ketee2_ov_aaaaaa += einsum("ia,jkbc->kibcja", t1.aa, t2.aaaa) @@ -4941,7 +4942,7 @@ def make_ee_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= ketee2_ov_aaaaaa += einsum("ia,jkbc->kjacib", t1.aa, t2.aaaa) ketee2_ov_aaaaaa += einsum("ia,jkbc->kjbaic", t1.aa, t2.aaaa) ketee2_ov_aaaaaa -= einsum("ia,jkbc->kjcaib", t1.aa, t2.aaaa) - ketee2_ov_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + ketee2_ov_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) ketee2_ov_bbbbbb -= einsum("ia,jkbc->ikbcja", t1.bb, t2.bbbb) ketee2_ov_bbbbbb += einsum("ia,jkbc->ikcbja", t1.bb, t2.bbbb) ketee2_ov_bbbbbb += einsum("ia,jkbc->kibcja", t1.bb, t2.bbbb) @@ -4950,59 +4951,59 @@ def make_ee_mom_kets(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= ketee2_ov_bbbbbb += einsum("ia,jkbc->kjacib", t1.bb, t2.bbbb) ketee2_ov_bbbbbb += einsum("ia,jkbc->kjbaic", t1.bb, t2.bbbb) ketee2_ov_bbbbbb -= einsum("ia,jkbc->kjcaib", t1.bb, t2.bbbb) - ketee2_ov_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + ketee2_ov_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[0], nvir[0]), dtype=types[float]) ketee2_ov_ababaa -= einsum("ia,jkbc->ikbcja", t1.aa, t2.abab) ketee2_ov_ababaa -= einsum("ia,jkbc->jkacib", t1.aa, t2.abab) - ketee2_ov_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + ketee2_ov_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[1], nvir[1]), dtype=types[float]) ketee2_ov_bababb -= einsum("ia,jkbc->ijcbka", t1.bb, t2.abab) ketee2_ov_bababb -= einsum("ia,jkbc->kjabic", t1.bb, t2.abab) - ketee2_ov_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + ketee2_ov_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nocc[0], nvir[0]), dtype=types[float]) ketee2_ov_babaaa -= einsum("ia,jkbc->kicbja", t1.aa, t2.abab) ketee2_ov_babaaa -= einsum("ia,jkbc->kjcaib", t1.aa, t2.abab) - ketee2_ov_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + ketee2_ov_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nocc[1], nvir[1]), dtype=types[float]) ketee2_ov_ababbb -= einsum("ia,jkbc->jibcka", t1.bb, t2.abab) ketee2_ov_ababbb -= einsum("ia,jkbc->jkbaic", t1.bb, t2.abab) - ketee2_vv_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + ketee2_vv_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) ketee2_vv_aaaaaa += einsum("ab,ijcd->jibcad", delta_vv.aa, t2.aaaa) ketee2_vv_aaaaaa -= einsum("ab,ijcd->jibdac", delta_vv.aa, t2.aaaa) ketee2_vv_aaaaaa -= einsum("ab,ijcd->jicbad", delta_vv.aa, t2.aaaa) ketee2_vv_aaaaaa += einsum("ab,ijcd->jidbac", delta_vv.aa, t2.aaaa) - ketee2_vv_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + ketee2_vv_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[0], nvir[0]), dtype=types[float]) ketee2_vv_babaaa += einsum("ab,ijcd->jidbac", delta_vv.aa, t2.abab) - ketee2_vv_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + ketee2_vv_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[1], nvir[1]), dtype=types[float]) ketee2_vv_ababbb += einsum("ab,ijcd->ijcbad", delta_vv.bb, t2.abab) - ketee2_vv_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + ketee2_vv_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) ketee2_vv_bbbbbb += einsum("ab,ijcd->jibcad", delta_vv.bb, t2.bbbb) ketee2_vv_bbbbbb -= einsum("ab,ijcd->jibdac", delta_vv.bb, t2.bbbb) ketee2_vv_bbbbbb -= einsum("ab,ijcd->jicbad", delta_vv.bb, t2.bbbb) ketee2_vv_bbbbbb += einsum("ab,ijcd->jidbac", delta_vv.bb, t2.bbbb) - ketee2_vv_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + ketee2_vv_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[0], nvir[0]), dtype=types[float]) ketee2_vv_ababaa += einsum("ab,ijcd->ijbdac", delta_vv.aa, t2.abab) - ketee2_vv_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + ketee2_vv_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[1], nvir[1]), dtype=types[float]) ketee2_vv_bababb += einsum("ab,ijcd->jibcad", delta_vv.bb, t2.abab) - ketee1_oo_abab = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) - ketee1_oo_baba = np.zeros((nocc[1], nvir[0], nocc[1], nocc[0]), dtype=np.float64) - ketee1_ov_abab = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) - ketee1_ov_baba = np.zeros((nocc[1], nvir[0], nocc[1], nvir[0]), dtype=np.float64) - ketee1_vo_abab = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) - ketee1_vo_baba = np.zeros((nocc[1], nvir[0], nvir[1], nocc[0]), dtype=np.float64) - ketee1_vv_abab = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) - ketee1_vv_baba = np.zeros((nocc[1], nvir[0], nvir[1], nvir[0]), dtype=np.float64) - ketee2_oo_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) - ketee2_oo_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) - ketee2_ov_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) - ketee2_ov_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) - ketee2_vo_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) - ketee2_vo_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[0], nocc[0]), dtype=np.float64) - ketee2_vo_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[0], nocc[0]), dtype=np.float64) - ketee2_vo_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) - ketee2_vo_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) - ketee2_vo_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[1], nocc[1]), dtype=np.float64) - ketee2_vo_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[1], nocc[1]), dtype=np.float64) - ketee2_vo_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) - ketee2_vv_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) - ketee2_vv_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + ketee1_oo_abab = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) + ketee1_oo_baba = np.zeros((nocc[1], nvir[0], nocc[1], nocc[0]), dtype=types[float]) + ketee1_ov_abab = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) + ketee1_ov_baba = np.zeros((nocc[1], nvir[0], nocc[1], nvir[0]), dtype=types[float]) + ketee1_vo_abab = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) + ketee1_vo_baba = np.zeros((nocc[1], nvir[0], nvir[1], nocc[0]), dtype=types[float]) + ketee1_vv_abab = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) + ketee1_vv_baba = np.zeros((nocc[1], nvir[0], nvir[1], nvir[0]), dtype=types[float]) + ketee2_oo_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) + ketee2_oo_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) + ketee2_ov_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) + ketee2_ov_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) + ketee2_vo_aaaaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) + ketee2_vo_ababaa = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[0], nocc[0]), dtype=types[float]) + ketee2_vo_babaaa = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[0], nocc[0]), dtype=types[float]) + ketee2_vo_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) + ketee2_vo_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) + ketee2_vo_ababbb = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1], nvir[1], nocc[1]), dtype=types[float]) + ketee2_vo_bababb = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0], nvir[1], nocc[1]), dtype=types[float]) + ketee2_vo_bbbbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) + ketee2_vv_bbbbaa = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) + ketee2_vv_aaaabb = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) ketee1_aaaa = np.concatenate([np.concatenate([ketee1_oo_aaaa, ketee1_ov_aaaa], axis=-1), np.concatenate([ketee1_vo_aaaa, ketee1_vv_aaaa], axis=-1)], axis=-2) ketee1_abab = np.concatenate([np.concatenate([ketee1_oo_abab, ketee1_ov_abab], axis=-1), np.concatenate([ketee1_vo_abab, ketee1_vv_abab], axis=-1)], axis=-2) @@ -5030,63 +5031,63 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= delta_vv.aa = np.eye(nvir[0]) delta_vv.bb = np.eye(nvir[1]) - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum("ijka->ikja", x0) x19 -= einsum("ijka->jkia", x0) - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 -= einsum("ijka->ijka", x0) x20 += einsum("ijka->jika", x0) - braee1_oo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + braee1_oo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) braee1_oo_aaaa += einsum("ijka->kija", x0) braee1_oo_aaaa -= einsum("ijka->kjia", x0) del x0 - x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum("ijka->ikja", x1) x23 -= einsum("ijka->jkia", x1) - x24 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x24 += einsum("ijka->ijka", x1) x24 -= einsum("ijka->jika", x1) - braee1_oo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + braee1_oo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) braee1_oo_bbbb += einsum("ijka->kija", x1) braee1_oo_bbbb -= einsum("ijka->kjia", x1) del x1 - x2 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x2 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x21 -= einsum("ijka->ijka", x2) - braee1_oo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + braee1_oo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) braee1_oo_aabb -= einsum("ijka->jika", x2) del x2 - x3 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x3 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x22 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x22 -= einsum("ijka->ijka", x3) - braee1_oo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + braee1_oo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) braee1_oo_bbaa -= einsum("ijka->kjia", x3) del x3 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum("ia,jb->ijab", t1.aa, t1.aa) x4 -= einsum("ijab->jiab", t2.aaaa) x4 += einsum("ijab->jiba", t2.aaaa) - braee1_ov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + braee1_ov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) braee1_ov_aabb -= einsum("abij,ikca->kcjb", l2.abab, x4) - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 -= einsum("abij->jiab", l2.aaaa) x5 += einsum("abij->jiba", l2.aaaa) - braee1_ov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + braee1_ov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) braee1_ov_aaaa += einsum("ijab,ikcb->jakc", x4, x5) del x4 - braee1_ov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + braee1_ov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) braee1_ov_bbaa -= einsum("ijab,ikca->jbkc", t2.abab, x5) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum("ijab->jiab", t2.aaaa) x6 += einsum("ijab->jiba", t2.aaaa) * -1 - x7 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x7 += einsum("abij,ikab->jk", l2.aaaa, x6) * -1 del x6 x7 += einsum("ij->ji", delta_oo.aa) * -1 @@ -5094,35 +5095,35 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= x7 += einsum("abij,kjab->ik", l2.abab, t2.abab) braee1_ov_aaaa += einsum("ab,ij->jbia", delta_vv.aa, x7) * -1 del x7 - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum("ijab->jiab", t2.aaaa) * -1 x8 += einsum("ijab->jiba", t2.aaaa) - x9 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x9 += einsum("abij,ijca->bc", l2.aaaa, x8) * -1 del x8 x9 += einsum("ai,ib->ab", l1.aa, t1.aa) x9 += einsum("abij,ijcb->ac", l2.abab, t2.abab) braee1_ov_aaaa += einsum("ij,ab->jbia", delta_oo.aa, x9) * -1 del x9 - x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x10 += einsum("ia,jb->ijab", t1.bb, t1.bb) x10 -= einsum("ijab->jiab", t2.bbbb) x10 += einsum("ijab->jiba", t2.bbbb) braee1_ov_bbaa -= einsum("abij,jkcb->kcia", l2.abab, x10) - x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x11 -= einsum("abij->jiab", l2.bbbb) x11 += einsum("abij->jiba", l2.bbbb) - braee1_ov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + braee1_ov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) braee1_ov_bbbb += einsum("ijab,ikcb->jakc", x10, x11) del x10 braee1_ov_aabb -= einsum("ijab,jkcb->iakc", t2.abab, x11) del x11 - x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x12 += einsum("ijab->jiab", t2.bbbb) * -1 x12 += einsum("ijab->jiba", t2.bbbb) - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum("abij,ikba->jk", l2.bbbb, x12) * -1 - x14 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x14 += einsum("abij,ijca->bc", l2.bbbb, x12) * -1 del x12 x13 += einsum("ij->ji", delta_oo.bb) * -1 @@ -5134,44 +5135,44 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= x14 += einsum("abij,ijac->bc", l2.abab, t2.abab) braee1_ov_bbbb += einsum("ij,ab->jbia", delta_oo.bb, x14) * -1 del x14 - x15 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x15 += einsum("ia,bcji->jbca", t1.aa, l2.aaaa) - braee1_vv_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + braee1_vv_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) braee1_vv_aaaa -= einsum("iabc->acib", x15) braee1_vv_aaaa += einsum("iabc->bcia", x15) - braee2_ov_aaaaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee2_ov_aaaaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee2_ov_aaaaaa += einsum("ij,kabc->icjkab", delta_oo.aa, x15) braee2_ov_aaaaaa -= einsum("ij,kabc->icjkba", delta_oo.aa, x15) braee2_ov_aaaaaa -= einsum("ij,kabc->ickjab", delta_oo.aa, x15) braee2_ov_aaaaaa += einsum("ij,kabc->ickjba", delta_oo.aa, x15) del x15 - x16 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x16 += einsum("ia,bcji->jbca", t1.bb, l2.bbbb) - braee1_vv_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + braee1_vv_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) braee1_vv_bbbb -= einsum("iabc->acib", x16) braee1_vv_bbbb += einsum("iabc->bcia", x16) - braee2_ov_bbbbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + braee2_ov_bbbbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) braee2_ov_bbbbbb += einsum("ij,kabc->icjkab", delta_oo.bb, x16) braee2_ov_bbbbbb -= einsum("ij,kabc->icjkba", delta_oo.bb, x16) braee2_ov_bbbbbb -= einsum("ij,kabc->ickjab", delta_oo.bb, x16) braee2_ov_bbbbbb += einsum("ij,kabc->ickjba", delta_oo.bb, x16) del x16 - x17 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x17 += einsum("ia,bcij->jbac", t1.aa, l2.abab) - braee1_vv_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + braee1_vv_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) braee1_vv_aabb += einsum("iabc->abic", x17) - braee2_ov_aababa = np.zeros((nocc[0], nvir[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_ov_aababa = np.zeros((nocc[0], nvir[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_ov_aababa -= einsum("ij,kabc->ibkjca", delta_oo.aa, x17) - braee2_ov_aaabab = np.zeros((nocc[0], nvir[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_ov_aaabab = np.zeros((nocc[0], nvir[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_ov_aaabab -= einsum("ij,kabc->ibjkac", delta_oo.aa, x17) del x17 - x18 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x18 += einsum("ia,bcji->jbca", t1.bb, l2.abab) - braee1_vv_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + braee1_vv_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) braee1_vv_bbaa += einsum("iabc->bcia", x18) - braee2_ov_bbbaba = np.zeros((nocc[1], nvir[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_ov_bbbaba = np.zeros((nocc[1], nvir[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_ov_bbbaba -= einsum("ij,kabc->icjkba", delta_oo.bb, x18) - braee2_ov_bbabab = np.zeros((nocc[1], nvir[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_ov_bbabab = np.zeros((nocc[1], nvir[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_ov_bbabab -= einsum("ij,kabc->ickjab", delta_oo.bb, x18) del x18 x19 += einsum("ij,ak->jika", delta_oo.aa, l1.aa) @@ -5210,101 +5211,101 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= braee1_ov_bbbb += einsum("abij,ikac->kcjb", l2.abab, t2.abab) braee1_ov_bbaa += einsum("ai,jb->jbia", l1.aa, t1.bb) braee1_ov_aabb += einsum("ai,jb->jbia", l1.bb, t1.aa) - braee1_vo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + braee1_vo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) braee1_vo_aaaa -= einsum("abij->ajib", l2.aaaa) braee1_vo_aaaa += einsum("abij->bjia", l2.aaaa) - braee1_vo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + braee1_vo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) braee1_vo_bbbb -= einsum("abij->ajib", l2.bbbb) braee1_vo_bbbb += einsum("abij->bjia", l2.bbbb) - braee1_vo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + braee1_vo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) braee1_vo_bbaa += einsum("abij->bjia", l2.abab) - braee1_vo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + braee1_vo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) braee1_vo_aabb += einsum("abij->aijb", l2.abab) braee1_vv_aaaa += einsum("ab,ci->cbia", delta_vv.aa, l1.aa) braee1_vv_bbbb += einsum("ab,ci->cbia", delta_vv.bb, l1.bb) - braee2_oo_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee2_oo_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee2_oo_aaaaaa -= einsum("ij,abkl->jilkab", delta_oo.aa, l2.aaaa) braee2_oo_aaaaaa += einsum("ij,abkl->jilkba", delta_oo.aa, l2.aaaa) braee2_oo_aaaaaa += einsum("ij,abkl->jlikab", delta_oo.aa, l2.aaaa) braee2_oo_aaaaaa -= einsum("ij,abkl->jlikba", delta_oo.aa, l2.aaaa) braee2_oo_aaaaaa -= einsum("ij,abkl->jlkiab", delta_oo.aa, l2.aaaa) braee2_oo_aaaaaa += einsum("ij,abkl->jlkiba", delta_oo.aa, l2.aaaa) - braee2_oo_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + braee2_oo_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) braee2_oo_bbbbbb -= einsum("ij,abkl->jilkab", delta_oo.bb, l2.bbbb) braee2_oo_bbbbbb += einsum("ij,abkl->jilkba", delta_oo.bb, l2.bbbb) braee2_oo_bbbbbb += einsum("ij,abkl->jlikab", delta_oo.bb, l2.bbbb) braee2_oo_bbbbbb -= einsum("ij,abkl->jlikba", delta_oo.bb, l2.bbbb) braee2_oo_bbbbbb -= einsum("ij,abkl->jlkiab", delta_oo.bb, l2.bbbb) braee2_oo_bbbbbb += einsum("ij,abkl->jlkiba", delta_oo.bb, l2.bbbb) - braee2_oo_aababa = np.zeros((nocc[0], nocc[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_oo_aababa = np.zeros((nocc[0], nocc[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_oo_aababa += einsum("ij,abkl->jilkba", delta_oo.aa, l2.abab) braee2_oo_aababa -= einsum("ij,abkl->jkliba", delta_oo.aa, l2.abab) - braee2_oo_bbabab = np.zeros((nocc[1], nocc[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_oo_bbabab = np.zeros((nocc[1], nocc[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_oo_bbabab += einsum("ij,abkl->jiklab", delta_oo.bb, l2.abab) braee2_oo_bbabab -= einsum("ij,abkl->jlkiab", delta_oo.bb, l2.abab) - braee2_oo_aaabab = np.zeros((nocc[0], nocc[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_oo_aaabab = np.zeros((nocc[0], nocc[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_oo_aaabab += einsum("ij,abkl->jiklab", delta_oo.aa, l2.abab) braee2_oo_aaabab -= einsum("ij,abkl->jkilab", delta_oo.aa, l2.abab) - braee2_oo_bbbaba = np.zeros((nocc[1], nocc[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_oo_bbbaba = np.zeros((nocc[1], nocc[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_oo_bbbaba += einsum("ij,abkl->jilkba", delta_oo.bb, l2.abab) braee2_oo_bbbaba -= einsum("ij,abkl->jlikba", delta_oo.bb, l2.abab) - braee2_oo_aabbbb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + braee2_oo_aabbbb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) braee2_oo_aabbbb -= einsum("ij,abkl->jilkab", delta_oo.aa, l2.bbbb) braee2_oo_aabbbb += einsum("ij,abkl->jilkba", delta_oo.aa, l2.bbbb) - braee2_oo_bbaaaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee2_oo_bbaaaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee2_oo_bbaaaa -= einsum("ij,abkl->jilkab", delta_oo.bb, l2.aaaa) braee2_oo_bbaaaa += einsum("ij,abkl->jilkba", delta_oo.bb, l2.aaaa) braee2_ov_aaaaaa -= einsum("ia,bcjk->iakjbc", t1.aa, l2.aaaa) braee2_ov_aaaaaa += einsum("ia,bcjk->iakjcb", t1.aa, l2.aaaa) braee2_ov_aababa += einsum("ia,bcjk->iakjcb", t1.aa, l2.abab) braee2_ov_aaabab += einsum("ia,bcjk->iajkbc", t1.aa, l2.abab) - braee2_ov_aabbbb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + braee2_ov_aabbbb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) braee2_ov_aabbbb -= einsum("ia,bcjk->iakjbc", t1.aa, l2.bbbb) braee2_ov_aabbbb += einsum("ia,bcjk->iakjcb", t1.aa, l2.bbbb) - braee2_ov_bbaaaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee2_ov_bbaaaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee2_ov_bbaaaa -= einsum("ia,bcjk->iakjbc", t1.bb, l2.aaaa) braee2_ov_bbaaaa += einsum("ia,bcjk->iakjcb", t1.bb, l2.aaaa) braee2_ov_bbbaba += einsum("ia,bcjk->iakjcb", t1.bb, l2.abab) braee2_ov_bbabab += einsum("ia,bcjk->iajkbc", t1.bb, l2.abab) braee2_ov_bbbbbb -= einsum("ia,bcjk->iakjbc", t1.bb, l2.bbbb) braee2_ov_bbbbbb += einsum("ia,bcjk->iakjcb", t1.bb, l2.bbbb) - braee2_vv_aaaaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee2_vv_aaaaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee2_vv_aaaaaa -= einsum("ab,cdij->cbjiad", delta_vv.aa, l2.aaaa) braee2_vv_aaaaaa += einsum("ab,cdij->dbjiac", delta_vv.aa, l2.aaaa) braee2_vv_aaaaaa += einsum("ab,cdij->cbjida", delta_vv.aa, l2.aaaa) braee2_vv_aaaaaa -= einsum("ab,cdij->dbjica", delta_vv.aa, l2.aaaa) - braee2_vv_bbbbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + braee2_vv_bbbbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) braee2_vv_bbbbbb -= einsum("ab,cdij->cbjiad", delta_vv.bb, l2.bbbb) braee2_vv_bbbbbb += einsum("ab,cdij->dbjiac", delta_vv.bb, l2.bbbb) braee2_vv_bbbbbb += einsum("ab,cdij->cbjida", delta_vv.bb, l2.bbbb) braee2_vv_bbbbbb -= einsum("ab,cdij->dbjica", delta_vv.bb, l2.bbbb) - braee2_vv_aababa = np.zeros((nvir[0], nvir[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_vv_aababa = np.zeros((nvir[0], nvir[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_vv_aababa += einsum("ab,cdij->cbjida", delta_vv.aa, l2.abab) - braee2_vv_bbabab = np.zeros((nvir[1], nvir[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_vv_bbabab = np.zeros((nvir[1], nvir[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_vv_bbabab += einsum("ab,cdij->dbijca", delta_vv.bb, l2.abab) - braee2_vv_aaabab = np.zeros((nvir[0], nvir[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + braee2_vv_aaabab = np.zeros((nvir[0], nvir[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) braee2_vv_aaabab += einsum("ab,cdij->cbijad", delta_vv.aa, l2.abab) - braee2_vv_bbbaba = np.zeros((nvir[1], nvir[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + braee2_vv_bbbaba = np.zeros((nvir[1], nvir[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) braee2_vv_bbbaba += einsum("ab,cdij->dbjiac", delta_vv.bb, l2.abab) - braee1_oo_abab = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) - braee1_oo_baba = np.zeros((nocc[1], nocc[0], nocc[1], nvir[0]), dtype=np.float64) - braee1_ov_abab = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) - braee1_ov_baba = np.zeros((nocc[1], nvir[0], nocc[1], nvir[0]), dtype=np.float64) - braee1_vo_abab = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) - braee1_vo_baba = np.zeros((nvir[1], nocc[0], nocc[1], nvir[0]), dtype=np.float64) - braee1_vv_abab = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) - braee1_vv_baba = np.zeros((nvir[1], nvir[0], nocc[1], nvir[0]), dtype=np.float64) - braee2_vo_aaaaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) - braee2_vo_aaabab = np.zeros((nvir[0], nocc[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) - braee2_vo_aababa = np.zeros((nvir[0], nocc[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) - braee2_vo_aabbbb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) - braee2_vo_bbaaaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) - braee2_vo_bbabab = np.zeros((nvir[1], nocc[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) - braee2_vo_bbbaba = np.zeros((nvir[1], nocc[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) - braee2_vo_bbbbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) - braee2_vv_aabbbb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) - braee2_vv_bbaaaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + braee1_oo_abab = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) + braee1_oo_baba = np.zeros((nocc[1], nocc[0], nocc[1], nvir[0]), dtype=types[float]) + braee1_ov_abab = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) + braee1_ov_baba = np.zeros((nocc[1], nvir[0], nocc[1], nvir[0]), dtype=types[float]) + braee1_vo_abab = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) + braee1_vo_baba = np.zeros((nvir[1], nocc[0], nocc[1], nvir[0]), dtype=types[float]) + braee1_vv_abab = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) + braee1_vv_baba = np.zeros((nvir[1], nvir[0], nocc[1], nvir[0]), dtype=types[float]) + braee2_vo_aaaaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) + braee2_vo_aaabab = np.zeros((nvir[0], nocc[0], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) + braee2_vo_aababa = np.zeros((nvir[0], nocc[0], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) + braee2_vo_aabbbb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) + braee2_vo_bbaaaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) + braee2_vo_bbabab = np.zeros((nvir[1], nocc[1], nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) + braee2_vo_bbbaba = np.zeros((nvir[1], nocc[1], nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) + braee2_vo_bbbbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) + braee2_vv_aabbbb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) + braee2_vv_bbaaaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) braee1_aaaa = np.concatenate([np.concatenate([braee1_oo_aaaa, braee1_ov_aaaa], axis=1), np.concatenate([braee1_vo_aaaa, braee1_vv_aaaa], axis=1)], axis=0) braee1_abab = np.concatenate([np.concatenate([braee1_oo_abab, braee1_ov_abab], axis=1), np.concatenate([braee1_vo_abab, braee1_vv_abab], axis=1)], axis=0) @@ -5328,273 +5329,273 @@ def make_ee_mom_bras(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1= return braee1, braee2 def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=None, l2=None, r1=None, r2=None, **kwargs): - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum("ijab->ijab", r2.aaaa) x0 += einsum("ijab->jiab", r2.aaaa) * -1 - x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x153 += einsum("ij,ikab->jkab", f.aa.oo, x0) * 0.5 - x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x164 += einsum("ijab->ijab", x153) * -1 del x153 - x1 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum("iabc->ibac", v.aaaa.ovvv) x1 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x146 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x146 += einsum("ijab,kcab->ijkc", r2.aaaa, x1) - x147 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x147 += einsum("ijka->ijka", x146) * -1 del x146 - x156 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x156 += einsum("ijab,icab->jc", t2.aaaa, x1) - x163 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x163 += einsum("ia->ia", x156) * -1 del x156 - x366 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x366 += einsum("ijab,icba->jc", t2.aaaa, x1) - x373 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x373 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x373 += einsum("ia->ia", x366) * -1 del x366 - ree1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + ree1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) ree1new_aa += einsum("ijab,icab->jc", x0, x1) * 0.5 del x1 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x2 += einsum("ijka->ikja", v.aaaa.ooov) x2 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x36 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x36 += einsum("ia,ijka->jk", r1.aa, x2) * -2 - x45 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x45 += einsum("ia,ijka->jk", t1.aa, x2) - x47 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x47 += einsum("ij->ij", x45) * -1 - x124 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x124 += einsum("ij->ij", x45) * -1 del x45 - x136 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x136 += einsum("ijab,ijkc->kabc", r2.aaaa, x2) - x137 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x137 += einsum("iabc->iabc", x136) * -1 del x136 - x157 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x157 += einsum("ijab,ijka->kb", t2.aaaa, x2) x163 += einsum("ia->ia", x157) * -1 del x157 - x305 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x305 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x305 += einsum("ijab,ikla->kljb", t2.abab, x2) - x314 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x314 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x314 += einsum("ijka->ijka", x305) * -1 del x305 - x361 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x361 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x361 += einsum("ia,ijka->jk", r1.aa, x2) - x364 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x364 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x364 += einsum("ij->ij", x361) * -1 del x361 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum("ijab->ijab", r2.aaaa) x3 += einsum("ijab->ijba", r2.aaaa) * -1 - x139 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x139 += einsum("ab,ijcb->ijac", f.aa.vv, x3) * 0.5 x164 += einsum("ijab->ijab", x139) * -1 del x139 ree1new_aa += einsum("ijka,ijab->kb", x2, x3) * 0.5 del x2 - x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x4 += einsum("ijab->ijab", r2.abab) x4 += einsum("ijab->jiba", r2.baba) - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum("iajb,kjcb->ikac", v.aabb.ovov, x4) - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum("ijab->jiba", x8) del x8 - x27 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x27 += einsum("iajb,ijcb->ca", v.aabb.ovov, x4) * 0.5 - x29 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x29 += einsum("iajb,kjab->ik", v.aabb.ovov, x4) x36 += einsum("ij->ij", x29) - x132 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x132 += einsum("ij->ji", x29) del x29 - x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x54 += einsum("iajb,ikac->jkbc", v.aabb.ovov, x4) - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("ijab->jiba", x54) del x54 - x69 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x69 += einsum("iajb,ijac->cb", v.aabb.ovov, x4) * 0.5 - x73 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x73 += einsum("iajb,ikab->jk", v.aabb.ovov, x4) - x80 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x80 += einsum("ij->ij", x73) - x469 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x469 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x469 += einsum("ij->ji", x73) del x73 - x115 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum("ijka,lkba->ijlb", v.aabb.ooov, x4) - x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum("ijka->ikja", x115) del x115 - x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum("iabc,jida->jbcd", v.bbaa.ovvv, x4) - x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum("iabc->icab", x121) del x121 - x128 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x128 += einsum("iajb,ijcb->ac", v.aabb.ovov, x4) - x129 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x129 += einsum("ab->ba", x128) - x334 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x334 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x334 += einsum("ab->ba", x128) del x128 - x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x248 += einsum("abcd,ijbd->ijac", v.aabb.vvvv, x4) * 0.5 - ree2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + ree2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) ree2new_abab += einsum("ijab->ijab", x248) - ree2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + ree2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) ree2new_baba += einsum("ijab->jiba", x248) del x248 - x252 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x252 += einsum("iajb,klab->ikjl", v.aabb.ovov, x4) - x253 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x253 += einsum("ijab,ikjl->klab", t2.abab, x252) * 0.5 del x252 ree2new_abab += einsum("ijab->ijab", x253) ree2new_baba += einsum("ijab->jiba", x253) del x253 - x256 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x256 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x256 += einsum("iabc,jkac->jikb", v.aabb.ovvv, x4) * 0.5 - x278 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x278 += einsum("ijka->jika", x256) del x256 - x257 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x257 += einsum("iajk,ljab->likb", v.aabb.ovoo, x4) * 0.5 x278 += einsum("ijka->jika", x257) * -1 del x257 - x263 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x263 += einsum("iajb,klab->ikjl", v.aabb.ovov, x4) * 0.5 - x270 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x270 += einsum("ijkl->jikl", x263) del x263 - x276 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x276 += einsum("iajb,kjac->ikbc", v.aabb.ovov, x4) - x277 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x277 += einsum("ia,jkab->kjib", t1.bb, x276) * 0.5 del x276 x278 += einsum("ijka->jika", x277) * -1 del x277 - x285 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x285 += einsum("iajb,ikcb->jkac", v.aabb.ovov, x4) - x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x286 += einsum("ia,jkab->ijkb", t1.aa, x285) * -1 - x385 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x385 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x385 += einsum("ia,jkab->ijkb", t1.aa, x285) * -0.5 del x285 x286 += einsum("iabc,jkca->jikb", v.bbaa.ovvv, x4) x286 += einsum("ijka,ilba->jklb", v.aabb.ooov, x4) * -1 - x291 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x291 += einsum("iabc,ijdc->jdab", v.aabb.ovvv, x4) - x295 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x295 += einsum("iabc->iabc", x291) * -1 del x291 - x292 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("iajk,ijbc->kbac", v.aabb.ovoo, x4) x295 += einsum("iabc->iabc", x292) del x292 - x293 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x293 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x293 += einsum("iajb,ijcd->acbd", v.aabb.ovov, x4) - x294 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("ia,bcad->icbd", t1.bb, x293) del x293 x295 += einsum("iabc->iabc", x294) del x294 - x299 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x299 += einsum("iabc,jicd->jbad", v.bbaa.ovvv, x4) - x301 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x301 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x301 += einsum("iabc->iacb", x299) * -1 del x299 - x300 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x300 += einsum("ijka,ikbc->jbac", v.aabb.ooov, x4) x301 += einsum("iabc->iacb", x300) del x300 - x329 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x329 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x329 += einsum("iajb,ijac->bc", v.aabb.ovov, x4) - x331 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x331 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x331 += einsum("ab->ba", x329) - x467 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x467 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x467 += einsum("ab->ba", x329) del x329 - x353 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x353 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x353 += einsum("iajb,ikab->jk", v.aabb.ovov, x4) * 0.5 - x357 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x357 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x357 += einsum("ij->ij", x353) del x353 - x360 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x360 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x360 += einsum("iajb,kjab->ik", v.aabb.ovov, x4) * 0.5 x364 += einsum("ij->ij", x360) del x360 x385 += einsum("iabc,jkca->jikb", v.bbaa.ovvv, x4) * 0.5 x385 += einsum("ijka,ilba->jklb", v.aabb.ooov, x4) * -0.5 - x456 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x456 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x456 += einsum("iajk,ilab->ljkb", v.aabb.ovoo, x4) - x459 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x459 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x459 += einsum("ijka->jika", x456) del x456 - x462 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x462 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x462 += einsum("iabc,ijad->jdbc", v.aabb.ovvv, x4) - x463 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x463 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x463 += einsum("iabc->iabc", x462) del x462 ree1new_aa += einsum("iabc,jica->jb", v.bbaa.ovvv, x4) * 0.5 ree1new_aa += einsum("ijka,ikba->jb", v.aabb.ooov, x4) * -0.5 ree1new_aa += einsum("ia,jiba->jb", f.bb.ov, x4) * 0.5 - ree1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + ree1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) ree1new_bb += einsum("iabc,ijac->jb", v.aabb.ovvv, x4) * 0.5 ree1new_bb += einsum("iajk,ijab->kb", v.aabb.ovoo, x4) * -0.5 ree1new_bb += einsum("ia,ijab->jb", f.aa.ov, x4) * 0.5 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum("ijab->ijab", r2.aaaa) * -1 x5 += einsum("ijab->ijba", r2.aaaa) x5 += einsum("ijab->jiab", r2.aaaa) x5 += einsum("ijab->jiba", r2.aaaa) * -1 - x12 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x12 += einsum("iajb,kica->kjcb", v.aabb.ovov, x5) - x13 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x13 += einsum("ijab->ijab", x12) * -1 del x12 - x297 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x297 += einsum("iabc,jida->jdbc", v.aabb.ovvv, x5) x301 += einsum("iabc->iabc", x297) * -1 del x297 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum("iajb->jiab", v.aaaa.ovov) x6 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("ijab,jkac->ikbc", x5, x6) x9 += einsum("ijab->ijab", x7) * -1 del x7 - x116 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x116 += einsum("ia,jkba->ijkb", t1.aa, x9) x118 += einsum("ijka->kjia", x116) del x116 ree1new_aa += einsum("ia,jiba->jb", t1.aa, x9) * 0.5 del x9 x36 += einsum("ijab,ikba->kj", x0, x6) - x44 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x44 += einsum("ijab,ikab->jk", t2.aaaa, x6) x47 += einsum("ij->ji", x44) * -1 x124 += einsum("ij->ji", x44) * -1 del x44 - x56 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x56 += einsum("ijab,ikca->kjcb", x4, x6) - x59 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x59 += einsum("ijab->ijab", x56) del x56 - x359 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x359 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x359 += einsum("ijab,ikba->jk", x0, x6) * 0.5 x364 += einsum("ij->ji", x359) del x359 - x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x10 += einsum("iajb->jiab", v.bbbb.ovov) x10 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x11 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x11 += einsum("ijab,kica->kjcb", x10, x4) x13 += einsum("ijab->ijab", x11) * -1 del x11 @@ -5602,126 +5603,126 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x385 += einsum("ia,jkba->jkib", t1.bb, x13) * 0.5 ree1new_aa += einsum("ia,jiba->jb", t1.bb, x13) * 0.5 del x13 - x75 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x75 += einsum("ia,ijab->jb", t1.bb, x10) - x76 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x76 += einsum("ia->ia", x75) * -1 del x75 - x78 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x78 += einsum("ia,ijab->jb", r1.bb, x10) - x79 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x79 += einsum("ia->ia", x78) * -1 del x78 - x90 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x90 += einsum("ijab,ikab->kj", t2.bbbb, x10) - x93 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x93 += einsum("ij->ij", x90) * -1 - x465 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x465 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x465 += einsum("ij->ij", x90) * -1 - x495 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x495 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x495 += einsum("ij->ji", x90) * -1 del x90 - x103 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x103 += einsum("ijab,jkbc->ikac", t2.abab, x10) - x104 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x104 += einsum("ijab->ijab", x103) * -1 - x282 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x282 += einsum("ijab->ijab", x103) * -1 del x103 - x451 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x451 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x451 += einsum("ijab,ijcb->ca", t2.bbbb, x10) - x453 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x453 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x453 += einsum("ab->ba", x451) * -1 - x493 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x493 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x493 += einsum("ab->ba", x451) * -1 del x451 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum("ijab->jiab", x14) - x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x99 += einsum("ijab->ijab", x14) - x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x172 += einsum("ijab->ijab", x14) - x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x192 += einsum("ijab->ijab", x14) - x237 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x237 += einsum("ijab->jiab", x14) del x14 - x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x15 -= einsum("ijab->jiab", t2.aaaa) x15 += einsum("ijab->jiba", t2.aaaa) - x19 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x19 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x15) - x22 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x22 -= einsum("ijab->ijab", x19) del x19 - x216 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x216 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x216 += einsum("ia,ijba->jb", f.aa.ov, x15) - x223 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x223 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x223 -= einsum("ia->ia", x216) del x216 - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 -= einsum("iajb->jiab", v.aaaa.ovov) x16 += einsum("iajb->jiba", v.aaaa.ovov) - x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x17 += einsum("ijab,ikcb->jkac", x15, x16) del x15 x18 += einsum("ijab->jiab", x17) del x17 - x64 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x64 += einsum("ijab,ikca->kjcb", t2.abab, x16) - x66 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x66 -= einsum("ijab->ijab", x64) del x64 - x174 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x174 += einsum("ia,ijba->jb", t1.aa, x16) - x175 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x175 -= einsum("ia->ia", x174) - x220 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x220 -= einsum("ia->ia", x174) del x174 - x194 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x194 += einsum("ia,ijba->jb", r1.aa, x16) del x16 - x195 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x195 -= einsum("ia->ia", x194) del x194 x18 += einsum("iabj->ijba", v.aaaa.ovvo) x18 -= einsum("ijab->ijab", v.aaaa.oovv) - x214 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x214 += einsum("ia,ijba->jb", t1.aa, x18) x223 += einsum("ia->ia", x214) del x214 ree1new_aa += einsum("ia,ijba->jb", r1.aa, x18) del x18 - x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum("iajb->jiab", v.bbbb.ovov) x20 -= einsum("iajb->jiba", v.bbbb.ovov) - x21 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x21 += einsum("ijab,jkbc->ikac", t2.abab, x20) x22 -= einsum("ijab->ijab", x21) del x21 - x392 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x392 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x392 += einsum("ia,ijab->jb", t1.bb, x20) - x393 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x393 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x393 -= einsum("ia->ia", x392) - x437 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x437 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x437 -= einsum("ia->ia", x392) del x392 - x412 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x412 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x412 += einsum("ia,ijab->jb", r1.bb, x20) - x413 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x413 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x413 -= einsum("ia->ia", x412) del x412 x22 += einsum("iabj->jiba", v.bbaa.ovvo) - x215 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x215 += einsum("ia,jiba->jb", t1.bb, x22) x223 += einsum("ia->ia", x215) del x215 ree1new_aa += einsum("ia,jiba->jb", r1.bb, x22) del x22 - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum("ijab->ijab", r2.aaaa) x23 += einsum("ijab->ijba", r2.aaaa) * -1 x23 += einsum("ijab->jiab", r2.aaaa) * -1 @@ -5729,175 +5730,175 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x286 += einsum("iajk,liba->ljkb", v.aabb.ovoo, x23) x385 += einsum("iajk,liba->ljkb", v.aabb.ovoo, x23) * 0.5 ree1new_aa += einsum("ia,jiba->jb", f.aa.ov, x23) * 0.5 - x24 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x24 += einsum("ia,iabc->bc", r1.bb, v.bbaa.ovvv) x27 += einsum("ab->ab", x24) * -1 - x207 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x207 += einsum("ab->ab", x24) x334 += einsum("ab->ab", x24) * -2 del x24 - x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x25 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x25 += einsum("iajb->jiba", v.aaaa.ovov) x27 += einsum("ijab,ijac->cb", x25, x3) * 0.5 - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("ia,ijba->jb", t1.aa, x25) - x32 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ia->ia", x31) * -1 del x31 - x34 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("ia,ijba->jb", r1.aa, x25) - x35 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x35 += einsum("ia->ia", x34) * -1 del x34 - x39 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x39 += einsum("ijab,ijcb->ac", t2.aaaa, x25) - x41 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x41 += einsum("ab->ab", x39) * -1 del x39 - x109 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("ijab,ijbc->ac", t2.aaaa, x25) - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("ab->ab", x109) * -1 - x158 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x158 += einsum("ab->ab", x109) * -1 del x109 - x127 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x127 += einsum("ijab,ijac->cb", x25, x3) x129 += einsum("ab->ab", x127) - x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x130 += einsum("ab,ijbc->ijca", x129, t2.aaaa) * 0.5 del x129 x164 += einsum("ijab->jiba", x130) del x130 x334 += einsum("ab->ab", x127) del x127 - x131 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x131 += einsum("ijab,ikab->jk", x0, x25) del x0 x132 += einsum("ij->ij", x131) del x131 - x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x133 += einsum("ij,jkab->kiab", x132, t2.aaaa) * 0.5 del x132 x164 += einsum("ijab->jiba", x133) del x133 - x160 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x160 += einsum("ijab,ikba->jk", t2.aaaa, x25) - x161 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x161 += einsum("ij->ij", x160) * -1 del x160 - x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x231 += einsum("ijab,ikca->kjcb", t2.abab, x25) - x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x234 += einsum("ijab->ijab", x231) * -1 - x261 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x261 += einsum("ijab->ijab", x231) * -1 del x231 - x26 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x26 += einsum("iabc->ibca", v.aaaa.ovvv) x27 += einsum("ia,ibca->bc", r1.aa, x26) * -1 ree1new_aa += einsum("ia,ba->ib", t1.aa, x27) * -1 del x27 - x40 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x40 += einsum("ia,ibac->bc", t1.aa, x26) x41 += einsum("ab->ab", x40) * -1 del x40 - x110 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("ia,ibca->bc", t1.aa, x26) x111 += einsum("ab->ab", x110) * -1 del x110 - x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum("iabc,jibd->jdac", x26, x5) x122 += einsum("iabc->iabc", x120) * -1 del x120 - x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x123 += einsum("ia,jbca->ijbc", t1.aa, x122) * 0.5 del x122 x164 += einsum("ijab->jiab", x123) del x123 - x290 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x290 += einsum("iabc,ijcd->jabd", x26, x4) x295 += einsum("iabc->iabc", x290) del x290 - x333 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x333 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x333 += einsum("ia,ibca->bc", r1.aa, x26) * 2 x334 += einsum("ab->ab", x333) * -1 del x333 - x335 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x335 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x335 += einsum("ab,ijbc->ijac", x334, t2.abab) * 0.5 del x334 ree2new_abab += einsum("ijab->ijab", x335) * -1 ree2new_baba += einsum("ijab->jiba", x335) * -1 del x335 - x339 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x339 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x339 += einsum("ijab,icad->jcdb", t2.abab, x26) del x26 - x343 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x343 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x343 += einsum("iabc->iabc", x339) * -1 del x339 - x28 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x28 += einsum("ia,jkia->jk", r1.bb, v.aabb.ooov) x36 += einsum("ij->ij", x28) * 2 - x211 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x211 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x211 += einsum("ij->ij", x28) x364 += einsum("ij->ij", x28) del x28 - x30 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x30 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) x32 += einsum("ia->ia", x30) x175 += einsum("ia->ia", x30) x220 += einsum("ia->ia", x30) del x30 - x221 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x221 += einsum("ia,ja->ij", t1.aa, x220) del x220 - x222 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x222 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x222 += einsum("ia,ji->ja", t1.aa, x221) del x221 x223 -= einsum("ia->ia", x222) del x222 x32 += einsum("ia->ia", f.aa.ov) x36 += einsum("ia,ja->ji", r1.aa, x32) * 2 - x46 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x46 += einsum("ia,ja->ij", t1.aa, x32) x47 += einsum("ij->ji", x46) x124 += einsum("ij->ji", x46) del x46 - x117 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x117 += einsum("ia,jkab->jkib", x32, x3) x118 += einsum("ijka->kija", x117) * -1 del x117 - x258 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x258 += einsum("ia,jkab->jikb", x32, x4) * 0.5 x278 += einsum("ijka->jika", x258) del x258 - x308 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x308 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x308 += einsum("ia,jkab->jikb", x32, t2.abab) x314 += einsum("ijka->jika", x308) del x308 - x362 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x362 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x362 += einsum("ia,ja->ij", r1.aa, x32) del x32 x364 += einsum("ij->ji", x362) del x362 - x33 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x33 += einsum("ia,jbia->jb", r1.bb, v.aabb.ovov) x35 += einsum("ia->ia", x33) x36 += einsum("ia,ja->ji", t1.aa, x35) * 2 ree1new_aa += einsum("ia,ij->ja", t1.aa, x36) * -0.5 del x36 - x272 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x272 += einsum("ia,jkab->jikb", x35, t2.abab) x278 += einsum("ijka->jika", x272) del x272 - x363 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x363 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x363 += einsum("ia,ja->ij", t1.aa, x35) del x35 x364 += einsum("ij->ji", x363) del x363 - x365 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x365 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x365 += einsum("ij,ikab->jkab", x364, t2.abab) del x364 ree2new_abab += einsum("ijab->ijab", x365) * -1 @@ -5905,29 +5906,29 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x365 x195 += einsum("ia->ia", x33) del x33 - x196 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x196 += einsum("ia,jkab->jkib", x195, t2.aaaa) - x200 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x200 -= einsum("ijka->jkia", x196) del x196 - x203 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x203 += einsum("ia,ja->ij", t1.aa, x195) del x195 - x204 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x204 += einsum("ij->ij", x203) del x203 - x37 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x37 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x41 += einsum("ab->ab", x37) x111 += einsum("ab->ab", x37) * -1 - x218 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x218 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x218 += einsum("ab->ab", x37) del x37 - x38 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x38 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x41 += einsum("ab->ab", x38) * -1 x111 += einsum("ab->ab", x38) - x112 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x112 += einsum("ab,ijbc->ijca", x111, x3) * 0.5 del x3 del x111 @@ -5935,222 +5936,222 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x112 x158 += einsum("ab->ab", x38) del x38 - x159 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x159 += einsum("ia,ba->ib", t1.aa, x158) del x158 x163 += einsum("ia->ia", x159) del x159 x41 += einsum("ab->ab", f.aa.vv) - x288 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x288 += einsum("ab,ijbc->ijac", x41, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x288) ree2new_baba += einsum("ijab->jiba", x288) del x288 - x371 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x371 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x371 += einsum("ia,ba->ib", t1.aa, x41) x373 += einsum("ia->ia", x371) del x371 ree1new_aa += einsum("ia,ba->ib", r1.aa, x41) del x41 - x42 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x42 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x47 += einsum("ij->ij", x42) x124 += einsum("ij->ij", x42) - x228 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x228 += einsum("ij->ij", x42) del x42 - x43 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x43 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x47 += einsum("ij->ji", x43) x124 += einsum("ij->ji", x43) x161 += einsum("ij->ij", x43) del x43 - x162 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x162 += einsum("ia,ji->ja", t1.aa, x161) del x161 x163 += einsum("ia->ia", x162) del x162 x47 += einsum("ij->ij", f.aa.oo) - x327 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x327 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x327 += einsum("ij,ikab->jkab", x47, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x327) * -1 ree2new_baba += einsum("ijab->jiba", x327) * -1 del x327 - x372 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x372 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x372 += einsum("ia,ij->ja", t1.aa, x47) x373 += einsum("ia->ia", x372) * -1 del x372 ree1new_aa += einsum("ia,ij->ja", r1.aa, x47) * -1 del x47 - x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum("ijab->ijab", r2.bbbb) x48 += einsum("ijab->jiab", r2.bbbb) * -1 - x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x490 += einsum("ij,ikab->jkab", f.bb.oo, x48) * 0.5 - x498 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x498 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x498 += einsum("ijab->ijab", x490) * -1 del x490 - x49 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x49 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x49 += einsum("iabc->ibca", v.bbbb.ovvv) x69 += einsum("ia,ibca->bc", r1.bb, x49) * -1 - x330 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x330 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x330 += einsum("ia,ibca->bc", r1.bb, x49) * 2 x331 += einsum("ab->ab", x330) * -1 del x330 - x377 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x377 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x377 += einsum("ijab,icab->jc", t2.bbbb, x49) - x384 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x384 += einsum("ia->ia", x377) * -1 del x377 - x452 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x452 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x452 += einsum("ia,ibca->bc", t1.bb, x49) x453 += einsum("ab->ab", x452) * -1 del x452 - x483 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x483 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x483 += einsum("ijab,kcba->ijkc", r2.bbbb, x49) - x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x484 += einsum("ijka->ijka", x483) * -1 del x483 ree1new_bb += einsum("ijab,icba->jc", x48, x49) * 0.5 del x48 del x49 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x50 += einsum("ijka->ikja", v.bbbb.ooov) x50 += einsum("ijka->kija", v.bbbb.ooov) * -1 x80 += einsum("ia,ijka->jk", r1.bb, x50) * -2 - x91 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x91 += einsum("ia,ijka->jk", t1.bb, x50) x93 += einsum("ij->ij", x91) * -1 x465 += einsum("ij->ij", x91) * -1 del x91 - x318 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x318 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x318 += einsum("ijab,jklb->ikla", t2.abab, x50) - x324 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x324 += einsum("ijka->ijka", x318) * -1 del x318 - x354 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x354 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x354 += einsum("ia,ijka->jk", r1.bb, x50) x357 += einsum("ij->ij", x354) * -1 del x354 - x378 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x378 += einsum("ijab,ijkb->ka", t2.bbbb, x50) x384 += einsum("ia->ia", x378) * -1 del x378 - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum("ijab->ijab", r2.bbbb) * -1 x51 += einsum("ijab->ijba", r2.bbbb) ree1new_bb += einsum("ijka,ijba->kb", x50, x51) * 0.5 del x50 - x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x52 += einsum("ijab->ijab", r2.bbbb) * -1 x52 += einsum("ijab->ijba", r2.bbbb) x52 += einsum("ijab->jiab", r2.bbbb) x52 += einsum("ijab->jiba", r2.bbbb) * -1 - x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum("ijab,ikca->jkbc", x10, x52) x55 += einsum("ijab->jiba", x53) * -1 del x53 - x457 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x457 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x457 += einsum("ia,jkba->ijkb", t1.bb, x55) x459 += einsum("ijka->kjia", x457) del x457 ree1new_bb += einsum("ia,jiba->jb", t1.bb, x55) * 0.5 del x55 - x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum("ijab->ijab", r2.bbbb) x57 += einsum("ijab->ijba", r2.bbbb) * -1 x57 += einsum("ijab->jiab", r2.bbbb) * -1 x57 += einsum("ijab->jiba", r2.bbbb) - x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x58 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x57) x59 += einsum("ijab->ijab", x58) del x58 - x259 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x259 += einsum("ia,jkab->ijkb", t1.aa, x59) * 0.5 x278 += einsum("ijka->jika", x259) del x259 ree1new_bb += einsum("ia,ijab->jb", t1.aa, x59) * 0.5 del x59 - x255 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x255 += einsum("ijka,klab->ijlb", v.aabb.ooov, x57) * 0.5 x278 += einsum("ijka->ijka", x255) del x255 - x289 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x289 += einsum("iabc,ijad->jbcd", v.bbaa.ovvv, x57) x295 += einsum("iabc->iabc", x289) del x289 - x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x296 += einsum("ia,jbac->ijbc", t1.aa, x295) * 0.5 del x295 ree2new_abab += einsum("ijab->ijab", x296) ree2new_baba += einsum("ijab->jiba", x296) del x296 ree1new_bb += einsum("ia,ijab->jb", f.bb.ov, x57) * 0.5 - x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x60 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) - x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x63 += einsum("ijab->jiab", x60) - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum("ijab->jiab", x60) - x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x390 += einsum("ijab->ijab", x60) - x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x410 += einsum("ijab->ijab", x60) - x445 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x445 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x445 += einsum("ijab->ijab", x60) del x60 - x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x61 += einsum("ijab->jiab", t2.bbbb) x61 -= einsum("ijab->jiba", t2.bbbb) - x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x62 += einsum("ijab,ikac->jkbc", x20, x61) del x20 x63 += einsum("ijab->ijba", x62) x390 += einsum("ijab->jiba", x62) x410 += einsum("ijab->jiba", x62) del x62 - x65 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x65 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x61) x66 -= einsum("ijab->ijab", x65) del x65 - x433 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x433 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x433 += einsum("ia,ijab->jb", f.bb.ov, x61) - x440 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x440 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x440 -= einsum("ia->ia", x433) del x433 x63 += einsum("iabj->ijba", v.bbbb.ovvo) x63 -= einsum("ijab->ijab", v.bbbb.oovv) - x431 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x431 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x431 += einsum("ia,ijba->jb", t1.bb, x63) x440 += einsum("ia->ia", x431) del x431 ree1new_bb += einsum("ia,ijba->jb", r1.bb, x63) del x63 x66 += einsum("iabj->ijab", v.aabb.ovvo) - x432 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x432 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x432 += einsum("ia,ijab->jb", t1.aa, x66) x440 += einsum("ia->ia", x432) del x432 ree1new_bb += einsum("ia,ijab->jb", r1.aa, x66) del x66 - x67 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x67 += einsum("ia,iabc->bc", r1.aa, v.aabb.ovvv) x69 += einsum("ab->ab", x67) * -1 x331 += einsum("ab->ab", x67) * -2 - x425 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x425 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x425 += einsum("ab->ab", x67) del x67 - x68 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x68 += einsum("ijab->ijab", r2.bbbb) x68 += einsum("ijab->ijba", r2.bbbb) * -1 x69 += einsum("ijab,ijbc->ca", x10, x68) * 0.5 ree1new_bb += einsum("ia,ba->ib", t1.bb, x69) * -1 del x69 - x328 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x328 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x328 += einsum("ijab,ijbc->ac", x10, x68) x331 += einsum("ab->ba", x328) - x332 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x332 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x332 += einsum("ab,ijcb->ijca", x331, t2.abab) * 0.5 del x331 ree2new_abab += einsum("ijab->ijab", x332) * -1 @@ -6158,88 +6159,88 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x332 x467 += einsum("ab->ba", x328) del x328 - x468 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x468 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x468 += einsum("ab,ijbc->ijca", x467, t2.bbbb) * 0.5 del x467 x498 += einsum("ijab->jiba", x468) del x468 - x476 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x476 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x476 += einsum("ab,ijcb->ijac", f.bb.vv, x68) * 0.5 x498 += einsum("ijab->ijab", x476) * -1 del x476 - x70 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x70 += einsum("ia,iajk->jk", r1.aa, v.aabb.ovoo) x80 += einsum("ij->ij", x70) * 2 x357 += einsum("ij->ij", x70) - x429 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x429 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x429 += einsum("ij->ij", x70) del x70 - x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x71 += einsum("ijab->ijab", r2.bbbb) * -1 x71 += einsum("ijab->jiab", r2.bbbb) - x72 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x72 += einsum("ijab,kiba->jk", x10, x71) x80 += einsum("ij->ij", x72) x469 += einsum("ij->ji", x72) del x72 - x470 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x470 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x470 += einsum("ij,jkab->kiab", x469, t2.bbbb) * 0.5 del x469 x498 += einsum("ijab->jiba", x470) del x470 - x352 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x352 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x352 += einsum("ijab,kiba->jk", x10, x71) * 0.5 x357 += einsum("ij->ij", x352) del x352 - x74 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x74 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x76 += einsum("ia->ia", x74) x393 += einsum("ia->ia", x74) x437 += einsum("ia->ia", x74) del x74 - x438 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x438 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x438 += einsum("ia,ja->ij", t1.bb, x437) del x437 - x439 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x439 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x439 += einsum("ia,ji->ja", t1.bb, x438) del x438 x440 -= einsum("ia->ia", x439) del x439 x76 += einsum("ia->ia", f.bb.ov) x80 += einsum("ia,ja->ji", r1.bb, x76) * 2 - x92 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x92 += einsum("ia,ja->ij", t1.bb, x76) x93 += einsum("ij->ji", x92) x465 += einsum("ij->ji", x92) del x92 x286 += einsum("ia,jkba->jikb", x76, x4) - x321 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x321 += einsum("ia,jkba->jkib", x76, t2.abab) x324 += einsum("ijka->ikja", x321) del x321 - x355 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x355 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x355 += einsum("ia,ja->ij", r1.bb, x76) x357 += einsum("ij->ji", x355) del x355 x385 += einsum("ia,jkba->jikb", x76, x4) * 0.5 - x458 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x458 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x458 += einsum("ia,jkab->jkib", x76, x68) del x68 del x76 x459 += einsum("ijka->kija", x458) * -1 del x458 - x77 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x77 += einsum("ia,iajb->jb", r1.aa, v.aabb.ovov) x79 += einsum("ia->ia", x77) x80 += einsum("ia,ja->ji", t1.bb, x79) * 2 ree1new_bb += einsum("ia,ij->ja", t1.bb, x80) * -0.5 del x80 x286 += einsum("ia,jkba->jikb", x79, t2.abab) * 2 - x356 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x356 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x356 += einsum("ia,ja->ij", t1.bb, x79) x357 += einsum("ij->ji", x356) del x356 - x358 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x358 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x358 += einsum("ij,kiab->kjab", x357, t2.abab) del x357 ree2new_abab += einsum("ijab->ijab", x358) * -1 @@ -6249,30 +6250,30 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x79 x413 += einsum("ia->ia", x77) del x77 - x414 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x414 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x414 += einsum("ia,jkab->jkib", x413, t2.bbbb) - x418 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x418 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x418 -= einsum("ijka->jkia", x414) del x414 - x421 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x421 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x421 += einsum("ia,ja->ij", t1.bb, x413) del x413 - x422 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x422 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x422 += einsum("ij->ij", x421) del x421 - x81 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x81 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) - x87 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x87 += einsum("ab->ab", x81) - x435 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x435 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x435 += einsum("ab->ab", x81) x453 += einsum("ab->ab", x81) * -1 del x81 - x82 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x82 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) x87 += einsum("ab->ab", x82) * -1 x453 += einsum("ab->ab", x82) - x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x454 += einsum("ab,ijcb->ijca", x453, x51) * 0.5 del x51 del x453 @@ -6280,80 +6281,80 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x454 x493 += einsum("ab->ab", x82) del x82 - x494 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x494 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x494 += einsum("ia,ba->ib", t1.bb, x493) del x493 - x497 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x497 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x497 += einsum("ia->ia", x494) del x494 - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x83 += einsum("iajb->jiba", v.bbbb.ovov) - x84 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x84 += einsum("ijab,ijcb->ac", t2.bbbb, x83) del x83 x87 += einsum("ab->ab", x84) * -1 del x84 - x85 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x85 += einsum("iabc->ibac", v.bbbb.ovvv) x85 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x86 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x86 += einsum("ia,ibca->bc", t1.bb, x85) x87 += einsum("ab->ab", x86) * -1 del x86 - x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x298 += einsum("ijab,jcdb->iacd", x4, x85) x301 += einsum("iabc->iabc", x298) * -1 del x298 - x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x302 += einsum("ia,jbca->jibc", t1.bb, x301) * 0.5 del x301 ree2new_abab += einsum("ijab->ijab", x302) ree2new_baba += einsum("ijab->jiba", x302) del x302 - x348 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x348 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x348 += einsum("ijab,jcdb->iacd", t2.abab, x85) - x350 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x350 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x350 += einsum("iabc->iabc", x348) * -1 del x348 - x461 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x461 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x461 += einsum("ijab,icdb->jacd", x52, x85) x463 += einsum("iabc->iabc", x461) * -1 del x461 - x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x464 += einsum("ia,jbca->ijbc", t1.bb, x463) * 0.5 del x463 x498 += einsum("ijab->jiab", x464) del x464 - x491 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x491 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x491 += einsum("ijab,icab->jc", t2.bbbb, x85) del x85 x497 += einsum("ia->ia", x491) * -1 del x491 x87 += einsum("ab->ab", f.bb.vv) - x287 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x287 += einsum("ab,ijcb->ijca", x87, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x287) ree2new_baba += einsum("ijab->jiba", x287) del x287 - x382 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x382 += einsum("ia,ba->ib", t1.bb, x87) x384 += einsum("ia->ia", x382) del x382 ree1new_bb += einsum("ia,ba->ib", r1.bb, x87) del x87 - x88 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x88 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x93 += einsum("ij->ij", x88) x465 += einsum("ij->ij", x88) - x502 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x502 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x502 += einsum("ij->ij", x88) del x88 - x89 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x89 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x93 += einsum("ij->ji", x89) x465 += einsum("ij->ji", x89) - x466 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x466 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x466 += einsum("ij,ikab->kjab", x465, x71) * 0.5 del x465 del x71 @@ -6361,47 +6362,47 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x466 x495 += einsum("ij->ij", x89) del x89 - x496 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x496 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x496 += einsum("ia,ji->ja", t1.bb, x495) del x495 x497 += einsum("ia->ia", x496) del x496 x93 += einsum("ij->ij", f.bb.oo) - x326 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x326 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x326 += einsum("ij,kiab->kjab", x93, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x326) * -1 ree2new_baba += einsum("ijab->jiba", x326) * -1 del x326 - x383 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x383 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x383 += einsum("ia,ij->ja", t1.bb, x93) x384 += einsum("ia->ia", x383) * -1 del x383 ree1new_bb += einsum("ia,ij->ja", r1.bb, x93) * -1 del x93 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 += einsum("ijab,cbda->ijdc", r2.aaaa, v.aaaa.vvvv) x164 += einsum("ijab->ijab", x94) * 0.5 del x94 - x95 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x95 += einsum("ijab,kbla->ijlk", r2.aaaa, v.aaaa.ovov) - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum("ijab,klji->klba", t2.aaaa, x95) x164 += einsum("ijab->ijab", x96) * 0.5 del x96 - x145 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x145 += einsum("ia,jkli->jkla", t1.aa, x95) del x95 x147 += einsum("ijka->ijka", x145) del x145 - x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x148 += einsum("ia,jkib->jkab", t1.aa, x147) * 0.5 del x147 x164 += einsum("ijab->ijab", x148) del x148 - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum("ijab->jiab", t2.aaaa) x97 += einsum("ijab->jiba", t2.aaaa) * -1 - x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x98 += einsum("ijab,ikac->jkbc", x6, x97) del x97 del x6 @@ -6409,48 +6410,48 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x98 x99 += einsum("iabj->jiba", v.aaaa.ovvo) x99 += einsum("ijab->jiab", v.aaaa.oovv) * -1 - x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum("ijab,kjca->ikbc", x5, x99) * 0.5 del x99 del x5 x164 += einsum("ijab->ijab", x100) del x100 - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum("ijab->jiab", t2.aaaa) * -1 x101 += einsum("ijab->jiba", t2.aaaa) - x102 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x102 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x101) x104 += einsum("ijab->ijab", x102) * -1 x282 += einsum("ijab->ijab", x102) * -1 del x102 - x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x236 += einsum("ijab,ikcb->kjca", x101, x25) del x25 x237 += einsum("ijab->ijba", x236) del x236 - x319 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x319 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x319 += einsum("iajk,ilba->ljkb", v.aabb.ovoo, x101) x324 += einsum("ijka->ijka", x319) * -1 del x319 - x347 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x347 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x347 += einsum("iabc,ijda->jdbc", v.aabb.ovvv, x101) x350 += einsum("iabc->iabc", x347) * -1 del x347 - x370 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x370 += einsum("ia,ijba->jb", f.aa.ov, x101) del x101 x373 += einsum("ia->ia", x370) * -1 del x370 x104 += einsum("iabj->jiba", v.bbaa.ovvo) - x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x105 += einsum("ijab,kjcb->kica", x104, x4) * 0.5 x164 += einsum("ijab->ijab", x105) del x105 - x320 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x320 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x320 += einsum("ia,jkba->jikb", t1.bb, x104) x324 += einsum("ijka->ikja", x320) del x320 - x369 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x369 += einsum("ia,jiba->jb", t1.bb, x104) x373 += einsum("ia->ia", x369) del x369 @@ -6458,101 +6459,101 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new_baba += einsum("ijab,jkbc->kica", x104, x52) * -0.5 del x104 del x52 - x106 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x106 += einsum("ijab,kalb->ijkl", t2.aaaa, v.aaaa.ovov) - x107 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x107 += einsum("ijkl->lkji", x106) - x150 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x150 += einsum("ia,jkil->kjla", t1.aa, x106) del x106 - x151 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x151 += einsum("ijka->ijka", x150) * -1 del x150 x107 += einsum("ijkl->kilj", v.aaaa.oooo) - x108 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("ijab,jikl->klab", r2.aaaa, x107) * 0.5 del x107 x164 += einsum("ijab->jiab", x108) del x108 - x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x113 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x113 += einsum("ijka->kija", v.aaaa.ooov) - x114 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x114 += einsum("ijka,jlab->likb", x113, x23) x118 += einsum("ijka->jika", x114) * -1 del x114 - x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum("ia,ijkb->jkab", t1.aa, x118) * 0.5 del x118 x164 += einsum("ijab->ijba", x119) * -1 del x119 - x254 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x254 += einsum("ijka,ilab->jklb", x113, x4) * 0.5 x278 += einsum("ijka->ijka", x254) del x254 - x367 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x367 += einsum("ijab,ijka->kb", t2.aaaa, x113) del x113 x373 += einsum("ia->ia", x367) * -1 del x367 - x125 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x125 += einsum("ijab->ijab", r2.aaaa) * -1 x125 += einsum("ijab->jiab", r2.aaaa) - x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum("ij,ikab->jkab", x124, x125) * 0.5 del x124 del x125 x164 += einsum("ijab->jiab", x126) * -1 del x126 - x134 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum("ijab,jcid->abdc", r2.aaaa, v.aaaa.ovov) - x135 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum("ia,bcda->ibcd", t1.aa, x134) del x134 x137 += einsum("iabc->iabc", x135) del x135 - x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum("ia,jbca->ijbc", t1.aa, x137) * 0.5 del x137 x164 += einsum("ijab->ijab", x138) del x138 - x140 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x140 += einsum("ijab,jkic->kbac", t2.aaaa, v.aaaa.ooov) - x143 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x143 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x143 += einsum("iabc->iabc", x140) del x140 - x141 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x141 += einsum("ijab,icjd->abcd", t2.aaaa, v.aaaa.ovov) - x142 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x142 += einsum("ia,bcad->icbd", t1.aa, x141) del x141 x143 += einsum("iabc->iabc", x142) * -1 del x142 - x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x144 += einsum("ia,jbca->ijbc", r1.aa, x143) del x143 x164 += einsum("ijab->ijab", x144) * -1 del x144 - x149 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x149 += einsum("ijab,kbca->jikc", t2.aaaa, v.aaaa.ovvv) x151 += einsum("ijka->ijka", x149) del x149 - x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x152 += einsum("ia,jkib->jkab", r1.aa, x151) del x151 x164 += einsum("ijab->ijab", x152) * -1 del x152 - x154 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x154 += einsum("ijab,ikjb->ka", t2.abab, v.aabb.ooov) x163 += einsum("ia->ia", x154) x373 += einsum("ia->ia", x154) * -1 del x154 - x155 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x155 += einsum("ijab,jbca->ic", t2.abab, v.bbaa.ovvv) x163 += einsum("ia->ia", x155) * -1 x164 += einsum("ia,jb->ijab", r1.aa, x163) * -1 del x163 - ree2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + ree2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) ree2new_aaaa += einsum("ijab->ijab", x164) ree2new_aaaa += einsum("ijab->ijba", x164) * -1 ree2new_aaaa += einsum("ijab->jiab", x164) * -1 @@ -6560,30 +6561,30 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x164 x373 += einsum("ia->ia", x155) del x155 - x165 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("ijab,kljb->ikla", t2.abab, v.aabb.ooov) - x182 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x182 += einsum("ijka->jika", x165) del x165 - x166 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x166 -= einsum("ijka->ikja", v.aaaa.ooov) x166 += einsum("ijka->kija", v.aaaa.ooov) - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 += einsum("ijab->jiab", t2.aaaa) x167 -= einsum("ijab->jiba", t2.aaaa) - x168 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x168 += einsum("ijka,jlab->iklb", x166, x167) del x166 x182 += einsum("ijka->ikja", x168) del x168 - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) x172 += einsum("ijab->ijab", x169) del x169 - x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x170 += einsum("iajb->jiab", v.aaaa.ovov) x170 -= einsum("iajb->jiba", v.aaaa.ovov) - x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x171 += einsum("ijab,ikac->jkbc", x167, x170) del x170 x172 += einsum("ijab->ijab", x171) @@ -6591,143 +6592,143 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x171 x172 += einsum("iabj->jiba", v.aaaa.ovvo) x172 -= einsum("ijab->jiab", v.aaaa.oovv) - x173 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x173 += einsum("ia,jkba->ijkb", t1.aa, x172) del x172 x182 -= einsum("ijka->kija", x173) del x173 x175 += einsum("ia->ia", f.aa.ov) - x176 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x176 += einsum("ia,jkab->jkib", x175, t2.aaaa) x182 += einsum("ijka->kjia", x176) del x176 - x202 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x202 += einsum("ia,ja->ij", r1.aa, x175) del x175 x204 += einsum("ij->ij", x202) del x202 - x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x205 += einsum("ij,jkab->kiab", x204, t2.aaaa) del x204 - x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x224 += einsum("ijab->jiba", x205) del x205 - x177 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x177 += einsum("ia,jakb->ikjb", t1.aa, v.aaaa.ovov) - x178 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x178 += einsum("ia,jkla->jilk", t1.aa, x177) - x180 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x180 += einsum("ijkl->lkji", x178) del x178 - x197 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x197 -= einsum("ijka->jkia", x177) del x177 - x179 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x179 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) x180 += einsum("ijkl->jkli", x179) x180 -= einsum("ijkl->kjli", x179) del x179 x180 += einsum("ijkl->kilj", v.aaaa.oooo) - x181 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x181 += einsum("ia,ijkl->jkla", t1.aa, x180) del x180 x182 += einsum("ijka->ikja", x181) del x181 x182 -= einsum("ijak->ijka", v.aaaa.oovo) - x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x183 += einsum("ia,ijkb->jkab", r1.aa, x182) del x182 x224 += einsum("ijab->ijab", x183) del x183 - x184 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x184 += einsum("ia,bacd->icbd", t1.aa, v.aaaa.vvvv) - x188 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x188 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x188 -= einsum("iabc->iabc", x184) del x184 - x185 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x185 += einsum("ijab,jbcd->iacd", t2.abab, v.bbaa.ovvv) x188 += einsum("iabc->iabc", x185) del x185 - x186 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x186 -= einsum("iabc->ibac", v.aaaa.ovvv) x186 += einsum("iabc->ibca", v.aaaa.ovvv) - x187 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x187 += einsum("ijab,icad->jbcd", x167, x186) del x167 x188 += einsum("iabc->iabc", x187) del x187 - x206 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x206 += einsum("ia,ibac->bc", r1.aa, x186) x207 -= einsum("ab->ab", x206) del x206 - x208 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x208 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x208 += einsum("ab,ijbc->ijca", x207, t2.aaaa) del x207 x224 += einsum("ijab->jiab", x208) del x208 - x217 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x217 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x217 += einsum("ia,ibac->bc", t1.aa, x186) del x186 x218 -= einsum("ab->ab", x217) del x217 - x219 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x219 += einsum("ia,ba->ib", t1.aa, x218) del x218 x223 += einsum("ia->ia", x219) del x219 x188 += einsum("aibc->iabc", v.aaaa.vovv) - x189 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x189 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x189 += einsum("ia,jbca->ijbc", r1.aa, x188) del x188 x224 -= einsum("ijab->ijab", x189) del x189 - x190 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x190 += einsum("iabc->ibac", v.aaaa.ovvv) x190 -= einsum("iabc->ibca", v.aaaa.ovvv) - x191 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x191 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x191 += einsum("ia,jbac->ijbc", t1.aa, x190) del x190 x192 -= einsum("ijab->ijab", x191) del x191 x192 += einsum("iabj->jiba", v.aaaa.ovvo) x192 -= einsum("ijab->jiab", v.aaaa.oovv) - x193 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x193 += einsum("ia,jkba->ijkb", r1.aa, x192) del x192 x200 += einsum("ijka->ikja", x193) del x193 x197 += einsum("ijka->ikja", v.aaaa.ooov) - x198 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x198 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x198 += einsum("ia,jkla->ijkl", r1.aa, x197) del x197 - x199 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x199 += einsum("ia,jkil->jkla", t1.aa, x198) del x198 x200 += einsum("ijka->ijka", x199) del x199 - x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x201 += einsum("ia,jikb->jkab", t1.aa, x200) del x200 x224 -= einsum("ijab->ijab", x201) del x201 - x209 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x209 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x209 += einsum("ijka->ikja", v.aaaa.ooov) x209 -= einsum("ijka->kija", v.aaaa.ooov) - x210 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x210 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x210 += einsum("ia,ijka->jk", r1.aa, x209) x211 -= einsum("ij->ij", x210) del x210 - x212 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x212 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x212 += einsum("ij,ikab->kjab", x211, t2.aaaa) del x211 x224 -= einsum("ijab->ijba", x212) del x212 - x227 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x227 += einsum("ia,ijka->jk", t1.aa, x209) del x209 x228 -= einsum("ij->ij", x227) del x227 - x213 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x213 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x213 += einsum("ia,jiba->jb", f.bb.ov, t2.abab) x223 += einsum("ia->ia", x213) x224 += einsum("ia,jb->ijab", r1.aa, x223) @@ -6739,17 +6740,17 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x224 x373 += einsum("ia->ia", x213) del x213 - x225 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x225 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x225 += einsum("ab,ib->ia", f.aa.vv, t1.aa) - x230 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x230 -= einsum("ia->ia", x225) del x225 - x226 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x226 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x226 += einsum("ia,ja->ij", f.aa.ov, t1.aa) x228 += einsum("ij->ij", x226) del x226 x228 += einsum("ij->ij", f.aa.oo) - x229 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x229 += einsum("ia,ij->ja", t1.aa, x228) del x228 x230 += einsum("ia->ia", x229) @@ -6760,206 +6761,206 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new_aaaa += einsum("ia,jb->ijba", r1.aa, x230) ree2new_aaaa += einsum("ia,jb->jiab", r1.aa, x230) del x230 - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum("ijab->jiab", t2.bbbb) x232 += einsum("ijab->jiba", t2.bbbb) * -1 - x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x233 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x232) x234 += einsum("ijab->ijab", x233) * -1 x261 += einsum("ijab->ijab", x233) * -1 del x233 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum("ijab,ikac->jkbc", x10, x232) del x10 x240 += einsum("ijab->ijba", x239) x445 += einsum("ijab->jiba", x239) del x239 - x306 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x306 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x306 += einsum("ijka,klab->ijlb", v.aabb.ooov, x232) x314 += einsum("ijka->ijka", x306) * -1 del x306 - x338 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x338 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x338 += einsum("iabc,ijad->jbcd", v.bbaa.ovvv, x232) x343 += einsum("iabc->iabc", x338) * -1 del x338 - x381 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x381 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x381 += einsum("ia,ijab->jb", f.bb.ov, x232) del x232 x384 += einsum("ia->ia", x381) * -1 del x381 x234 += einsum("iabj->ijab", v.aabb.ovvo) - x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x235 += einsum("ijab,jkbc->ikac", x23, x234) * 0.5 del x23 ree2new_abab += einsum("ijab->ijab", x235) ree2new_baba += einsum("ijab->jiba", x235) del x235 - x380 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x380 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x380 += einsum("ia,ijab->jb", t1.aa, x234) x384 += einsum("ia->ia", x380) del x380 - x447 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x447 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x447 += einsum("ijab,ikac->kjcb", x234, x4) * 0.5 del x234 x498 += einsum("ijab->ijab", x447) del x447 x237 += einsum("iabj->ijba", v.aaaa.ovvo) x237 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x238 += einsum("ijab,ikbc->jkac", x237, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x238) ree2new_baba += einsum("ijab->jiba", x238) del x238 - x368 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x368 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x368 += einsum("ia,ijba->jb", t1.aa, x237) del x237 x373 += einsum("ia->ia", x368) del x368 x240 += einsum("iabj->ijba", v.bbbb.ovvo) x240 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x241 += einsum("ijab,kicb->kjca", x240, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x241) ree2new_baba += einsum("ijab->jiba", x241) del x241 - x379 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x379 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x379 += einsum("ia,ijba->jb", t1.bb, x240) del x240 x384 += einsum("ia->ia", x379) del x379 - x242 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x242 += einsum("ijab,ickb->jkac", t2.abab, v.aabb.ovov) - x243 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x243 += einsum("ijab->jiab", x242) * -1 - x284 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x284 += einsum("ijab->jiab", x242) * -1 del x242 x243 += einsum("ijab->ijab", v.bbaa.oovv) - x244 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x244 += einsum("ijab,kibc->kjac", x243, x4) * 0.5 del x243 ree2new_abab += einsum("ijab->ijab", x244) * -1 ree2new_baba += einsum("ijab->jiba", x244) * -1 del x244 - x245 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) - x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum("ijab->jiab", x245) * -1 - x274 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x274 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x274 += einsum("ijab->jiab", x245) * -1 del x245 x246 += einsum("ijab->ijab", v.aabb.oovv) - x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x247 += einsum("ijab,ikcb->jkca", x246, x4) * 0.5 ree2new_abab += einsum("ijab->ijab", x247) * -1 ree2new_baba += einsum("ijab->jiba", x247) * -1 del x247 - x313 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x313 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x313 += einsum("ia,jkba->jkib", t1.bb, x246) del x246 x314 += einsum("ijka->ijka", x313) del x313 - x249 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x249 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) - x250 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x250 += einsum("ijkl->jilk", x249) - x311 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x311 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x311 += einsum("ijkl->jilk", x249) del x249 x250 += einsum("ijkl->ijkl", v.aabb.oooo) - x251 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x251 += einsum("ijkl,ikab->jlab", x250, x4) * 0.5 del x250 ree2new_abab += einsum("ijab->ijab", x251) ree2new_baba += einsum("ijab->jiba", x251) del x251 - x260 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x260 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) x261 += einsum("ijab->ijab", x260) del x260 x261 += einsum("iabj->ijab", v.aabb.ovvo) - x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x262 += einsum("ia,jkab->ijkb", r1.aa, x261) x278 += einsum("ijka->jika", x262) del x262 - x307 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x307 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x307 += einsum("ia,jkab->ijkb", t1.aa, x261) del x261 x314 += einsum("ijka->jika", x307) del x307 - x264 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x264 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x265 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x265 += einsum("ijka->ikja", x264) del x264 x265 += einsum("iajk->ijka", v.aabb.ovoo) - x266 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x266 += einsum("ia,jkla->ijkl", r1.aa, x265) x270 += einsum("ijkl->ijkl", x266) del x266 - x310 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x310 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x310 += einsum("ia,jkla->ijkl", t1.aa, x265) del x265 x311 += einsum("ijkl->jikl", x310) del x310 - x267 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x267 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("ijka->jika", x267) del x267 x268 += einsum("ijka->ijka", v.aabb.ooov) - x269 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x269 += einsum("ia,jkla->jkil", r1.bb, x268) del x268 x270 += einsum("ijkl->jilk", x269) del x269 - x271 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x271 += einsum("ia,jkil->jkla", t1.bb, x270) del x270 x278 += einsum("ijka->jika", x271) * -1 del x271 - x273 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x273 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) x274 += einsum("ijab->jiab", x273) del x273 x274 += einsum("ijab->ijab", v.aabb.oovv) - x275 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x275 += einsum("ia,jkba->jkib", r1.bb, x274) del x274 x278 += einsum("ijka->ijka", x275) del x275 - x279 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x279 += einsum("ia,ijkb->jkab", t1.aa, x278) del x278 ree2new_abab += einsum("ijab->ijab", x279) * -1 ree2new_baba += einsum("ijab->jiba", x279) * -1 del x279 - x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x280 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x280 += einsum("ijka->kija", v.bbbb.ooov) x286 += einsum("ijka,liba->ljkb", x280, x4) x385 += einsum("ijka,liba->ljkb", x280, x4) * 0.5 del x4 - x455 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x455 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x455 += einsum("ijka,jlab->likb", x280, x57) x459 += einsum("ijka->jika", x455) * -1 del x455 - x460 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x460 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x460 += einsum("ia,ijkb->jkab", t1.bb, x459) * 0.5 del x459 x498 += einsum("ijab->ijba", x460) * -1 del x460 - x473 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x473 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x473 += einsum("ijab,jikc->kabc", r2.bbbb, x280) - x474 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x474 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x474 += einsum("iabc->iabc", x473) * -1 del x473 - x492 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x492 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x492 += einsum("ijab,ijkb->ka", t2.bbbb, x280) del x280 x497 += einsum("ia->ia", x492) * -1 del x492 - x281 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x281 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) x282 += einsum("ijab->ijab", x281) del x281 @@ -6967,7 +6968,7 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x286 += einsum("ia,jkba->jkib", r1.bb, x282) * 2 x385 += einsum("ia,jkba->jkib", r1.bb, x282) del x282 - x283 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x283 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) x284 += einsum("ijab->jiab", x283) del x283 @@ -6975,7 +6976,7 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x286 += einsum("ia,jkba->ijkb", r1.aa, x284) * 2 ree2new_abab += einsum("ia,jikb->jkba", t1.bb, x286) * -0.5 del x286 - x322 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x322 += einsum("ia,jkba->ijkb", t1.aa, x284) x324 += einsum("ijka->ijka", x322) del x322 @@ -6983,90 +6984,90 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No del x284 ree2new_baba += einsum("ia,jikb->kjab", t1.bb, x385) * -1 del x385 - x303 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x303 += einsum("ijab,kajl->iklb", t2.abab, v.aabb.ovoo) x314 += einsum("ijka->jika", x303) * -1 del x303 - x304 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x304 += einsum("ijab,kacb->ikjc", t2.abab, v.aabb.ovvv) x314 += einsum("ijka->jika", x304) del x304 - x309 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x309 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x309 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) x311 += einsum("ijkl->ijlk", x309) del x309 x311 += einsum("ijkl->ijkl", v.aabb.oooo) - x312 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x312 += einsum("ia,jkil->jkla", t1.bb, x311) x314 += einsum("ijka->ijka", x312) * -1 del x312 - x323 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x323 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x323 += einsum("ia,ijkl->jkla", t1.aa, x311) del x311 x324 += einsum("ijka->ijka", x323) * -1 del x323 x314 += einsum("ijak->ijka", v.aabb.oovo) - x315 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x315 += einsum("ia,ijkb->jkab", r1.aa, x314) del x314 ree2new_abab += einsum("ijab->ijab", x315) * -1 ree2new_baba += einsum("ijab->jiba", x315) * -1 del x315 - x316 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x316 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x316 += einsum("ijab,iklb->kjla", t2.abab, v.aabb.ooov) x324 += einsum("ijka->ikja", x316) * -1 del x316 - x317 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x317 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x317 += einsum("ijab,kbca->ijkc", t2.abab, v.bbaa.ovvv) x324 += einsum("ijka->ikja", x317) del x317 x324 += einsum("ijak->kija", v.bbaa.oovo) - x325 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x325 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x325 += einsum("ia,jikb->jkba", r1.bb, x324) del x324 ree2new_abab += einsum("ijab->ijab", x325) * -1 ree2new_baba += einsum("ijab->jiba", x325) * -1 del x325 - x336 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x336 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x336 += einsum("ijab,icjk->kacb", t2.abab, v.aabb.ovoo) x343 += einsum("iabc->iabc", x336) del x336 - x337 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x337 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x337 += einsum("ijab,icdb->jacd", t2.abab, v.aabb.ovvv) x343 += einsum("iabc->iabc", x337) * -1 del x337 - x340 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x340 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x340 += einsum("ijab,icjd->acbd", t2.abab, v.aabb.ovov) - x341 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x341 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x341 += einsum("abcd->abcd", x340) del x340 x341 += einsum("abcd->abcd", v.aabb.vvvv) - x342 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x342 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x342 += einsum("ia,bcda->ibcd", t1.bb, x341) x343 += einsum("iabc->iabc", x342) del x342 - x349 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x349 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x349 += einsum("ia,bacd->ibcd", t1.aa, x341) del x341 x350 += einsum("iabc->iabc", x349) del x349 x343 += einsum("abci->iabc", v.aabb.vvvo) - x344 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x344 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x344 += einsum("ia,jbac->ijbc", r1.aa, x343) del x343 ree2new_abab += einsum("ijab->ijab", x344) ree2new_baba += einsum("ijab->jiba", x344) del x344 - x345 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x345 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x345 += einsum("ijab,ikjc->kabc", t2.abab, v.aabb.ooov) x350 += einsum("iabc->iabc", x345) del x345 - x346 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x346 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x346 += einsum("ijab,jcda->idbc", t2.abab, v.bbaa.ovvv) x350 += einsum("iabc->iabc", x346) * -1 del x346 x350 += einsum("aibc->iabc", v.aabb.vovv) - x351 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x351 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x351 += einsum("ia,jbca->jibc", r1.bb, x350) del x350 ree2new_abab += einsum("ijab->ijab", x351) @@ -7076,17 +7077,17 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new_abab += einsum("ia,jb->jiba", r1.bb, x373) ree2new_baba += einsum("ia,jb->ijab", r1.bb, x373) del x373 - x374 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x374 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x374 += einsum("ia,ijab->jb", f.aa.ov, t2.abab) x384 += einsum("ia->ia", x374) x440 += einsum("ia->ia", x374) del x374 - x375 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x375 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x375 += einsum("ijab,iajk->kb", t2.abab, v.aabb.ovoo) x384 += einsum("ia->ia", x375) * -1 x497 += einsum("ia->ia", x375) del x375 - x376 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x376 += einsum("ijab,iacb->jc", t2.abab, v.aabb.ovvv) x384 += einsum("ia->ia", x376) x497 += einsum("ia->ia", x376) * -1 @@ -7097,105 +7098,105 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new_abab += einsum("ia,jb->ijab", r1.aa, x384) ree2new_baba += einsum("ia,jb->jiba", r1.aa, x384) del x384 - x386 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x386 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x386 += einsum("ijab,iakl->jklb", t2.abab, v.aabb.ovoo) - x400 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x400 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x400 += einsum("ijka->jika", x386) del x386 - x387 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x387 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x387 -= einsum("ijka->ikja", v.bbbb.ooov) x387 += einsum("ijka->kija", v.bbbb.ooov) - x388 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x388 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x388 += einsum("ijka,jlab->likb", x387, x61) del x387 x400 += einsum("ijka->jika", x388) del x388 - x389 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x389 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x389 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) x390 += einsum("ijab->ijab", x389) del x389 x390 += einsum("iabj->jiba", v.bbbb.ovvo) x390 -= einsum("ijab->jiab", v.bbbb.oovv) - x391 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x391 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x391 += einsum("ia,jkba->ijkb", t1.bb, x390) del x390 x400 -= einsum("ijka->kija", x391) del x391 x393 += einsum("ia->ia", f.bb.ov) - x394 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x394 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x394 += einsum("ia,jkab->jkib", x393, t2.bbbb) x400 += einsum("ijka->kjia", x394) del x394 - x420 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x420 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x420 += einsum("ia,ja->ij", r1.bb, x393) del x393 x422 += einsum("ij->ij", x420) del x420 - x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x423 += einsum("ij,jkab->kiab", x422, t2.bbbb) del x422 - x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x441 += einsum("ijab->jiba", x423) del x423 - x395 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x395 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x395 += einsum("ia,jakb->ikjb", t1.bb, v.bbbb.ovov) - x396 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x396 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x396 += einsum("ia,jkla->jilk", t1.bb, x395) - x398 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x398 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x398 += einsum("ijkl->lkji", x396) del x396 - x415 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x415 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x415 -= einsum("ijka->jkia", x395) del x395 - x397 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x397 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x397 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) x398 += einsum("ijkl->jkli", x397) x398 -= einsum("ijkl->kjli", x397) del x397 x398 += einsum("ijkl->kilj", v.bbbb.oooo) - x399 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x399 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x399 += einsum("ia,ijkl->jkla", t1.bb, x398) del x398 x400 += einsum("ijka->ikja", x399) del x399 x400 -= einsum("ijak->ijka", v.bbbb.oovo) - x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x401 += einsum("ia,ijkb->jkab", r1.bb, x400) del x400 x441 += einsum("ijab->ijab", x401) del x401 - x402 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x402 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x402 += einsum("ia,bcda->ibdc", t1.bb, v.bbbb.vvvv) - x406 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x406 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x406 -= einsum("iabc->iabc", x402) del x402 - x403 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x403 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x403 += einsum("ijab,iacd->jbcd", t2.abab, v.aabb.ovvv) x406 += einsum("iabc->iabc", x403) del x403 - x404 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x404 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x404 += einsum("iabc->ibac", v.bbbb.ovvv) x404 -= einsum("iabc->ibca", v.bbbb.ovvv) - x405 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x405 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x405 += einsum("iabc,ijcd->jdab", x404, x61) del x61 x406 += einsum("iabc->iabc", x405) del x405 - x424 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x424 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x424 += einsum("ia,ibca->bc", r1.bb, x404) x425 -= einsum("ab->ab", x424) del x424 - x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x426 += einsum("ab,ijbc->ijca", x425, t2.bbbb) del x425 x441 += einsum("ijab->jiab", x426) del x426 - x434 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x434 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x434 += einsum("ia,ibca->bc", t1.bb, x404) del x404 x435 -= einsum("ab->ab", x434) del x434 - x436 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x436 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x436 += einsum("ia,ba->ib", t1.bb, x435) del x435 x440 += einsum("ia->ia", x436) @@ -7203,141 +7204,141 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No x441 += einsum("ia,jb->ijab", r1.bb, x440) del x440 x406 += einsum("aibc->iabc", v.bbbb.vovv) - x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x407 += einsum("ia,jbca->ijbc", r1.bb, x406) del x406 x441 -= einsum("ijab->ijab", x407) del x407 - x408 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x408 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x408 -= einsum("iabc->ibac", v.bbbb.ovvv) x408 += einsum("iabc->ibca", v.bbbb.ovvv) - x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x409 += einsum("ia,jbca->ijbc", t1.bb, x408) del x408 x410 -= einsum("ijab->ijab", x409) del x409 x410 += einsum("iabj->jiba", v.bbbb.ovvo) x410 -= einsum("ijab->jiab", v.bbbb.oovv) - x411 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x411 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x411 += einsum("ia,jkba->ijkb", r1.bb, x410) del x410 x418 += einsum("ijka->ikja", x411) del x411 x415 += einsum("ijka->ikja", v.bbbb.ooov) - x416 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x416 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x416 += einsum("ia,jkla->ijkl", r1.bb, x415) del x415 - x417 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x417 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x417 += einsum("ia,jkil->jkla", t1.bb, x416) del x416 x418 += einsum("ijka->ijka", x417) del x417 - x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x419 += einsum("ia,jikb->jkab", t1.bb, x418) del x418 x441 -= einsum("ijab->ijab", x419) del x419 - x427 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x427 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x427 += einsum("ijka->ikja", v.bbbb.ooov) x427 -= einsum("ijka->kija", v.bbbb.ooov) - x428 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x428 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x428 += einsum("ia,ijka->jk", r1.bb, x427) x429 -= einsum("ij->ij", x428) del x428 - x430 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x430 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x430 += einsum("ij,ikab->kjab", x429, t2.bbbb) del x429 x441 -= einsum("ijab->ijba", x430) del x430 - ree2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + ree2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) ree2new_bbbb += einsum("ijab->ijab", x441) ree2new_bbbb -= einsum("ijab->ijba", x441) ree2new_bbbb -= einsum("ijab->jiab", x441) ree2new_bbbb += einsum("ijab->jiba", x441) del x441 - x501 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x501 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x501 += einsum("ia,ijka->jk", t1.bb, x427) del x427 x502 -= einsum("ij->ij", x501) del x501 - x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x442 += einsum("ijab,cadb->ijcd", r2.bbbb, v.bbbb.vvvv) x498 += einsum("ijab->ijab", x442) * 0.5 del x442 - x443 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x443 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x443 += einsum("ijab,kbla->ijlk", r2.bbbb, v.bbbb.ovov) - x444 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x444 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x444 += einsum("ijab,klji->klba", t2.bbbb, x443) x498 += einsum("ijab->ijab", x444) * 0.5 del x444 - x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x482 += einsum("ia,jkli->jkla", t1.bb, x443) del x443 x484 += einsum("ijka->ijka", x482) del x482 - x485 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x485 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x485 += einsum("ia,jkib->jkab", t1.bb, x484) * 0.5 del x484 x498 += einsum("ijab->ijab", x485) del x485 x445 += einsum("iabj->jiba", v.bbbb.ovvo) x445 += einsum("ijab->jiab", v.bbbb.oovv) * -1 - x446 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x446 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x446 += einsum("ijab,jkbc->kica", x445, x57) * 0.5 del x57 del x445 x498 += einsum("ijab->ijab", x446) del x446 - x448 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x448 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x448 += einsum("ijab,kalb->ijkl", t2.bbbb, v.bbbb.ovov) - x449 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x449 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x449 += einsum("ijkl->lkji", x448) - x487 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x487 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x487 += einsum("ia,jkil->kjla", t1.bb, x448) del x448 - x488 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x488 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x488 += einsum("ijka->ijka", x487) * -1 del x487 x449 += einsum("ijkl->kilj", v.bbbb.oooo) - x450 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x450 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x450 += einsum("ijab,jikl->klab", r2.bbbb, x449) * 0.5 del x449 x498 += einsum("ijab->jiab", x450) del x450 - x471 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x471 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x471 += einsum("ijab,jcid->abdc", r2.bbbb, v.bbbb.ovov) - x472 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x472 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x472 += einsum("ia,bcda->ibcd", t1.bb, x471) del x471 x474 += einsum("iabc->iabc", x472) del x472 - x475 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x475 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x475 += einsum("ia,jbca->ijbc", t1.bb, x474) * 0.5 del x474 x498 += einsum("ijab->ijab", x475) del x475 - x477 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x477 += einsum("ijab,jkic->kbac", t2.bbbb, v.bbbb.ooov) - x480 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x480 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x480 += einsum("iabc->iabc", x477) del x477 - x478 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x478 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x478 += einsum("ijab,icjd->abcd", t2.bbbb, v.bbbb.ovov) - x479 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x479 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x479 += einsum("ia,bcad->icbd", t1.bb, x478) del x478 x480 += einsum("iabc->iabc", x479) * -1 del x479 - x481 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x481 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x481 += einsum("ia,jbca->ijbc", r1.bb, x480) del x480 x498 += einsum("ijab->ijab", x481) * -1 del x481 - x486 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x486 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x486 += einsum("ijab,kbca->jikc", t2.bbbb, v.bbbb.ovvv) x488 += einsum("ijka->ijka", x486) del x486 - x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x489 += einsum("ia,jkib->jkab", r1.bb, x488) del x488 x498 += einsum("ijab->ijab", x489) * -1 @@ -7347,17 +7348,17 @@ def hbar_matvec_ee(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, l1=No ree2new_bbbb += einsum("ijab->jiab", x498) * -1 ree2new_bbbb += einsum("ijab->jiba", x498) del x498 - x499 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x499 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x499 += einsum("ab,ib->ia", f.bb.vv, t1.bb) - x504 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x504 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x504 -= einsum("ia->ia", x499) del x499 - x500 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x500 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x500 += einsum("ia,ja->ij", f.bb.ov, t1.bb) x502 += einsum("ij->ij", x500) del x500 x502 += einsum("ij->ij", f.bb.oo) - x503 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x503 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x503 += einsum("ia,ij->ja", t1.bb, x502) del x502 x504 += einsum("ia->ia", x503) diff --git a/ebcc/codegen/UCCSDT.py b/ebcc/codegen/UCCSDT.py index 782cb4a7..c74ef6dc 100644 --- a/ebcc/codegen/UCCSDT.py +++ b/ebcc/codegen/UCCSDT.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 2), ()) * -1.0 e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 2, 1, 3), ()) - x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x1 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(f.bb.ov, (0, 1), (0, 1)) x1 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) x1 += einsum(t1.bb, (0, 1), x0, (0, 2, 1, 3), (2, 3)) * -0.5 del x0 e_cc += einsum(t1.bb, (0, 1), x1, (0, 1), ()) del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(f.aa.ov, (0, 1), (0, 1)) x3 += einsum(t1.aa, (0, 1), x2, (0, 2, 1, 3), (2, 3)) * -0.5 del x2 @@ -37,55 +38,55 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new = Namespace() # T amplitudes - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) t1new_bb += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 1, 3), (4, 5)) * 2.0 t1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 2, 5, 1, 3), (4, 5)) * 3.0 t1new_bb += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 1, 5, 3), (4, 5)) - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 3, 1), (4, 5)) * 2.0 t1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 2, 5, 1, 3), (4, 5)) * 3.0 t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) t1new_aa += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 3, 5, 1), (4, 5)) * -1.0 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) * 2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x2, (4, 0, 1, 3), (4, 2)) * 2.0 t2new_abab += einsum(x2, (0, 1, 2, 3), t3.babbab, (1, 4, 2, 5, 6, 3), (4, 0, 6, 5)) * 2.0 del x2 - x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x4 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 0, 2), (4, 3)) * -1.0 t2new_abab += einsum(x4, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 6, 3), (4, 1, 5, 6)) * -2.0 - x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x5 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x5 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x5, (4, 3, 0, 1), (4, 2)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x5, (2, 3, 4, 1), (4, 0)) - x6 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x6 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x6 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x6, (0, 4, 1, 3), (4, 2)) * 2.0 - x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x7 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x7 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x8 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x8 += einsum(t1.bb, (0, 1), x7, (0, 2, 1, 3), (2, 3)) - x9 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(f.bb.ov, (0, 1), (0, 1)) x9 += einsum(x0, (0, 1), (0, 1)) x9 += einsum(x8, (0, 1), (0, 1)) * -1.0 @@ -95,15 +96,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x9, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_abab += einsum(x9, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 1), (3, 2, 5, 4)) * 2.0 t2new_bbbb += einsum(x9, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 - x10 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x10, (0, 1), (0, 1)) - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x11 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(t1.aa, (0, 1), x11, (0, 2, 1, 3), (2, 3)) - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(f.aa.ov, (0, 1), (0, 1)) x13 += einsum(x10, (0, 1), (0, 1)) del x10 @@ -114,24 +115,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x13, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 t2new_abab += einsum(x13, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 t2new_bbbb += einsum(x13, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 - x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x14 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 - x15 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x16 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x16 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 1, 3), (0, 4)) - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x19 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x19 += einsum(t1.bb, (0, 1), x18, (2, 3, 0, 1), (2, 3)) - x20 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x20 += einsum(t1.bb, (0, 1), x9, (2, 1), (2, 0)) - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum(f.bb.oo, (0, 1), (0, 1)) x21 += einsum(x15, (0, 1), (1, 0)) x21 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -140,52 +141,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x21 += einsum(x20, (0, 1), (0, 1)) t1new_bb += einsum(t1.bb, (0, 1), x21, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x21, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - t3new_abaaba = np.zeros((nocc[0], nocc[1], nocc[0], nvir[0], nvir[1], nvir[0]), dtype=np.float64) + t3new_abaaba = np.zeros((nocc[0], nocc[1], nocc[0], nvir[0], nvir[1], nvir[0]), dtype=types[float]) t3new_abaaba += einsum(x21, (0, 1), t3.abaaba, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 del x21 - x22 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x22 += einsum(f.bb.vv, (0, 1), (0, 1)) x22 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 2, 3, 1), (2, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x22, (1, 2), (0, 2)) del x22 - x23 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x23 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x24 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x24, (1, 3, 0, 4), (4, 2)) * -1.0 t2new_abab += einsum(x24, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 6, 1), (3, 4, 6, 5)) * -2.0 - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x26 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x26, (4, 0, 1, 3), (4, 2)) * 2.0 t2new_abab += einsum(x26, (0, 1, 2, 3), t3.abaaba, (1, 4, 2, 5, 6, 3), (0, 4, 5, 6)) * 2.0 del x26 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x27, (0, 4, 3, 1), (4, 2)) * -2.0 del x27 - x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x28, (0, 2, 1, 3), (2, 3)) * -1.0 - x29 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x30 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x31 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x32 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(t1.aa, (0, 1), x32, (2, 3, 0, 1), (2, 3)) - x34 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t1.aa, (0, 1), x13, (2, 1), (2, 0)) - x35 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(f.aa.oo, (0, 1), (0, 1)) x35 += einsum(x29, (0, 1), (1, 0)) x35 += einsum(x30, (0, 1), (1, 0)) @@ -194,63 +195,63 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x35 += einsum(x34, (0, 1), (0, 1)) t1new_aa += einsum(t1.aa, (0, 1), x35, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x35, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - t3new_babbab = np.zeros((nocc[1], nocc[0], nocc[1], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + t3new_babbab = np.zeros((nocc[1], nocc[0], nocc[1], nvir[1], nvir[0], nvir[1]), dtype=types[float]) t3new_babbab += einsum(x35, (0, 1), t3.babbab, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 del x35 - x36 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(f.aa.vv, (0, 1), (0, 1)) x36 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 1, 2, 3), (2, 3)) t1new_aa += einsum(t1.aa, (0, 1), x36, (1, 2), (0, 2)) del x36 - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x38 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x38 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) t2new_abab += einsum(x38, (0, 1, 2, 3), (2, 0, 3, 1)) - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(t2.abab, (0, 1, 2, 3), x38, (1, 3, 4, 5), (4, 0, 2, 5)) - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x40 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(x28, (0, 1, 2, 3), x40, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 - x42 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x42 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x43 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x43 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x43 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(t2.abab, (0, 1, 2, 3), x43, (1, 3, 4, 5), (4, 0, 5, 2)) del x43 - x45 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x45 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), x45, (2, 1, 3, 4), (2, 0, 3, 4)) - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t2.aaaa, (0, 1, 2, 3), x46, (1, 4, 5, 3), (0, 4, 2, 5)) * -2.0 - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x49 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(t1.aa, (0, 1), x49, (2, 3, 4, 0), (2, 4, 3, 1)) - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(t1.aa, (0, 1), x37, (2, 3, 1, 4), (0, 2, 3, 4)) - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 3, 4, 5), (4, 0, 5, 2)) - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x53 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.aaaa, (0, 1, 2, 3), x53, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x53 - x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x55 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.aaaa, (0, 1, 2, 3), x55, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(x48, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x57 += einsum(x50, (0, 1, 2, 3), (0, 2, 1, 3)) x57 += einsum(x51, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -259,10 +260,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x57 += einsum(x54, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x54 x57 += einsum(x56, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), x57, (2, 0, 3, 4), (2, 3, 4, 1)) del x57 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) x59 += einsum(x39, (0, 1, 2, 3), (0, 1, 2, 3)) del x39 @@ -279,13 +280,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x59, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x59 - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x61 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t2.abab, (0, 1, 2, 3), x7, (1, 4, 3, 5), (4, 5, 0, 2)) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(t2.abab, (0, 1, 2, 3), x61, (1, 3, 4, 5), (4, 0, 5, 2)) * -1.0 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x63 += einsum(x60, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x60 @@ -294,66 +295,66 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x63, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) del x63 - x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), x64, (2, 3, 1, 4), (0, 2, 3, 4)) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(v.aabb.vvov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 6, 0)) - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 3, 1), (4, 5, 6, 2)) * -1.0 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x68 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.aaaa, (0, 1, 2, 3), x68, (1, 4, 5, 3), (0, 4, 2, 5)) - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t2.aaaa, (0, 1, 2, 3), x69, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x69 - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x74 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(t1.aa, (0, 1), x45, (0, 1, 2, 3), (2, 3)) del x45 - x75 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(x71, (0, 1), (1, 0)) * -1.0 x75 += einsum(x72, (0, 1), (1, 0)) x75 += einsum(x73, (0, 1), (1, 0)) * 2.0 x75 += einsum(x74, (0, 1), (1, 0)) * -1.0 - x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x76 += einsum(x75, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x75 - x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x77 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 0, 6)) - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 3, 1), (4, 5, 0, 6)) * -1.0 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(x13, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x81 += einsum(t1.aa, (0, 1), x25, (2, 3, 4, 1), (2, 0, 4, 3)) - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x82 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x82 += einsum(x81, (0, 1, 2, 3), (3, 1, 2, 0)) - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(t1.aa, (0, 1), x82, (0, 2, 3, 4), (2, 3, 4, 1)) del x82 - x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x84 += einsum(x77, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 x84 += einsum(x78, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 x84 += einsum(x79, (0, 1, 2, 3), (2, 1, 0, 3)) * 6.0 x84 += einsum(x80, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x84 += einsum(x83, (0, 1, 2, 3), (1, 0, 2, 3)) del x83 - x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(t1.aa, (0, 1), x84, (0, 2, 3, 4), (2, 3, 4, 1)) del x84 - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) del x65 x86 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -369,31 +370,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x86, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x86 - x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x87 += einsum(v.aabb.ooov, (0, 1, 2, 3), t3.abaaba, (4, 2, 1, 5, 3, 6), (4, 0, 5, 6)) - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum(v.aaaa.ooov, (0, 1, 2, 3), t3.aaaaaa, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum(t2.aaaa, (0, 1, 2, 3), x49, (4, 5, 0, 1), (4, 5, 2, 3)) - x90 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x90 += einsum(x23, (0, 1, 2, 3), t3.abaaba, (4, 0, 3, 5, 1, 6), (2, 4, 5, 6)) - x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum(x25, (0, 1, 2, 3), t3.aaaaaa, (4, 1, 2, 5, 6, 3), (0, 4, 5, 6)) * -1.0 - x92 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x92 += einsum(f.aa.oo, (0, 1), (0, 1)) x92 += einsum(x34, (0, 1), (1, 0)) - x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x93 += einsum(x92, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x92 - x94 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x94 += einsum(x29, (0, 1), (1, 0)) x94 += einsum(x30, (0, 1), (1, 0)) x94 += einsum(x31, (0, 1), (1, 0)) * 2.0 x94 += einsum(x33, (0, 1), (1, 0)) * -1.0 - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum(x94, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x94 - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum(x87, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x87 x96 += einsum(x88, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 @@ -411,71 +412,71 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_aaaa += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x96, (0, 1, 2, 3), (1, 0, 2, 3)) del x96 - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_aaaa += einsum(x97, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x97, (0, 1, 2, 3), (1, 0, 2, 3)) del x97 - x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x98 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x98 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - x99 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x99 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x98, (4, 5, 1, 3), (0, 2, 4, 5)) - x100 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x100 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(x99, (0, 1, 2, 3), (1, 3, 0, 2)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x100, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 del x100 - x101 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x101 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(t1.aa, (0, 1), x101, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 x102 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x102 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_aaaa += einsum(t1.aa, (0, 1), x102, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x102 - x103 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x103 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 4), (1, 4, 2, 3)) - x104 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x104 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x104 += einsum(x103, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_abab += einsum(x104, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 0, 3), (4, 5, 6, 1)) * 2.0 - x105 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x105 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 2, 3, 4), (3, 4, 1, 2)) - x106 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x106 += einsum(x105, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_abab += einsum(x106, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 2, 1), (5, 4, 3, 6)) * 2.0 - x107 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x107 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 0, 4), (2, 1, 3, 4)) - x108 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x108 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) x108 += einsum(x107, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab += einsum(x108, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 2, 6, 3), (5, 4, 6, 1)) * 2.0 del x108 - x109 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 0, 4), (2, 1, 3, 4)) - x110 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) x110 += einsum(x109, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab += einsum(x110, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 2, 6, 3), (4, 5, 1, 6)) * 2.0 del x110 - x111 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x112 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x113 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x114 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x114 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x115 += einsum(t1.bb, (0, 1), x114, (2, 3, 1, 4), (2, 0, 3, 4)) - x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(t1.bb, (0, 1), x18, (2, 3, 0, 4), (2, 3, 4, 1)) - x117 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x117 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x117 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x117 += einsum(x111, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -484,13 +485,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x117 += einsum(x116, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x117, (1, 4, 3, 5), (0, 4, 2, 5)) del x117 - x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x118 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x119 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x119 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x119 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x120 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x120 += einsum(x11, (0, 1, 2, 3), x40, (0, 4, 3, 5), (1, 4, 2, 5)) * -2.0 @@ -499,74 +500,74 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x119 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x120, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x120 - x121 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x121 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x121 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 4), (1, 4, 2, 3)) - x122 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x123 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x123 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x123 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x123 += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) x123 += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x123 += einsum(v.aabb.ovov, (0, 1, 2, 3), x5, (2, 4, 5, 1), (3, 4, 0, 5)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x123, (3, 4, 0, 5), (5, 1, 2, 4)) del x123 - x124 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x124 += einsum(t1.aa, (0, 1), v.aabb.ooov, (2, 0, 3, 4), (3, 4, 2, 1)) - x125 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x125 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x125 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x125 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) x125 += einsum(v.aabb.ovov, (0, 1, 2, 3), x40, (0, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_abab += einsum(t2.bbbb, (0, 1, 2, 3), x125, (1, 3, 4, 5), (4, 0, 5, 2)) * 2.0 del x125 - x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x126 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x127 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x128 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x128 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x128 += einsum(x127, (0, 1, 2, 3), (0, 1, 2, 3)) x128 += einsum(t1.bb, (0, 1), x4, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 t2new_abab += einsum(x126, (0, 1, 2, 3), x128, (4, 5, 0, 2), (1, 4, 3, 5)) del x126, x128 - x129 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) - x130 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x130 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x130 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x131 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x131 += einsum(x129, (0, 1, 2, 3), (1, 0, 3, 2)) x131 += einsum(t1.aa, (0, 1), x130, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x131, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x131 - x132 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 4), (1, 4, 2, 3)) - x133 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x133 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 2, 3, 4), (3, 4, 1, 2)) - x134 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x134 += einsum(x132, (0, 1, 2, 3), (1, 0, 3, 2)) x134 += einsum(x133, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x134, (3, 4, 2, 5), (0, 1, 5, 4)) * -1.0 del x134 - x135 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 4, 1), (0, 4, 2, 3)) - x136 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x136 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x137 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x137 += einsum(v.aabb.ovov, (0, 1, 2, 3), x5, (4, 3, 5, 1), (4, 2, 5, 0)) - x138 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x138 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x138 += einsum(x135, (0, 1, 2, 3), (1, 0, 3, 2)) x138 += einsum(x136, (0, 1, 2, 3), (1, 0, 3, 2)) x138 += einsum(x137, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x138, (1, 4, 0, 5), (5, 4, 2, 3)) del x138 - x139 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x139 += einsum(t1.aa, (0, 1), x13, (0, 2), (2, 1)) - x140 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x140 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x140 += einsum(x71, (0, 1), (1, 0)) * -1.0 x140 += einsum(x72, (0, 1), (1, 0)) @@ -577,18 +578,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_abab += einsum(x140, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 t3new_babbab += einsum(x140, (0, 1), t3.babbab, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 del x140 - x141 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x141 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x142 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x143 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x144 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x144 += einsum(t1.bb, (0, 1), x114, (0, 2, 1, 3), (2, 3)) del x114 - x145 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(t1.bb, (0, 1), x9, (0, 2), (2, 1)) - x146 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x146 += einsum(x141, (0, 1), (1, 0)) * -1.0 x146 += einsum(x142, (0, 1), (1, 0)) * 2.0 @@ -598,21 +599,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_abab += einsum(x146, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 t3new_abaaba += einsum(x146, (0, 1), t3.abaaba, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 del x146 - x147 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x147 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x148 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x148 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x148 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) - x149 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x149 += einsum(t1.bb, (0, 1), x148, (2, 1, 3, 4), (2, 0, 3, 4)) del x148 - x150 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x150 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 0, 4)) - x151 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x151 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x151 += einsum(x135, (0, 1, 2, 3), (0, 1, 3, 2)) x151 += einsum(x150, (0, 1, 2, 3), (0, 1, 3, 2)) - x152 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x152 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x152 += einsum(x147, (0, 1, 2, 3), (1, 0, 2, 3)) x152 += einsum(x149, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -620,73 +621,73 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x151 t2new_abab += einsum(t1.bb, (0, 1), x152, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x152 - x153 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x153 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x154 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x154 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x154 += einsum(x153, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_abab += einsum(t1.bb, (0, 1), x154, (1, 2, 3, 4), (3, 0, 4, 2)) del x154 - x155 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x155 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x155 += einsum(t1.bb, (0, 1), v.aabb.oovv, (2, 3, 4, 1), (0, 4, 2, 3)) - x156 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x156 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x156 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x156 += einsum(x155, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_abab += einsum(t1.aa, (0, 1), x156, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x156 - x157 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum(t1.bb, (0, 1), x157, (2, 3, 1, 4), (0, 2, 3, 4)) - x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x159 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 1, 3), (4, 5, 6, 2)) - x160 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x160 += einsum(v.aabb.ovvv, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 6, 2)) - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(t2.bbbb, (0, 1, 2, 3), x7, (1, 4, 3, 5), (4, 0, 5, 2)) - x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x162 += einsum(t2.bbbb, (0, 1, 2, 3), x161, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x161 - x163 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x163 += einsum(t2.abab, (0, 1, 2, 3), x11, (0, 4, 2, 5), (1, 3, 4, 5)) - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(t2.abab, (0, 1, 2, 3), x163, (4, 5, 0, 2), (4, 1, 5, 3)) * -1.0 - x165 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(x141, (0, 1), (1, 0)) * -1.0 x165 += einsum(x142, (0, 1), (1, 0)) * 2.0 x165 += einsum(x143, (0, 1), (1, 0)) x165 += einsum(x144, (0, 1), (0, 1)) * -1.0 del x144 - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(x165, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x165 - x167 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x167 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x168 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x168 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 3, 1), (4, 5, 0, 6)) * -1.0 - x169 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x169 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 2, 6)) - x170 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x170 += einsum(x9, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 - x171 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x171 += einsum(t1.bb, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) - x172 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x172 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x172 += einsum(x171, (0, 1, 2, 3), (3, 1, 2, 0)) - x173 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x173 += einsum(t1.bb, (0, 1), x172, (0, 2, 3, 4), (2, 3, 4, 1)) del x172 - x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x174 += einsum(x167, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 x174 += einsum(x168, (0, 1, 2, 3), (2, 1, 0, 3)) * 6.0 x174 += einsum(x169, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 x174 += einsum(x170, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x174 += einsum(x173, (0, 1, 2, 3), (1, 0, 2, 3)) del x173 - x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x175 += einsum(t1.bb, (0, 1), x174, (0, 2, 3, 4), (2, 3, 4, 1)) del x174 - x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 += einsum(x158, (0, 1, 2, 3), (0, 1, 2, 3)) del x158 x176 += einsum(x159, (0, 1, 2, 3), (0, 1, 2, 3)) * -6.0 @@ -704,50 +705,50 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x176, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x176 - x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x177 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(t2.abab, (0, 1, 2, 3), x127, (4, 5, 0, 2), (4, 1, 3, 5)) - x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x179 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x179 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x179 += einsum(x111, (0, 1, 2, 3), (1, 0, 3, 2)) - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum(t2.bbbb, (0, 1, 2, 3), x179, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x179 - x181 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x181 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum(t1.bb, (0, 1), x181, (2, 1, 3, 4), (2, 0, 3, 4)) del x181 - x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum(t2.bbbb, (0, 1, 2, 3), x182, (1, 4, 5, 3), (4, 0, 5, 2)) * -2.0 - x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x184 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x185 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x185 += einsum(t1.bb, (0, 1), x184, (2, 3, 4, 0), (2, 4, 3, 1)) - x186 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x186 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 0, 2), (4, 1, 5, 3)) - x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x188 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum(t2.bbbb, (0, 1, 2, 3), x188, (1, 4, 5, 3), (4, 5, 0, 2)) * 2.0 - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x190 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x190 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) - x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x191 += einsum(t2.bbbb, (0, 1, 2, 3), x190, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 - x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x192 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x192 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x192 += einsum(x177, (0, 1, 2, 3), (0, 1, 2, 3)) - x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum(t1.bb, (0, 1), x192, (2, 3, 1, 4), (2, 3, 0, 4)) - x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x194 += einsum(x185, (0, 1, 2, 3), (0, 2, 1, 3)) x194 += einsum(x186, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x194 += einsum(x187, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -756,10 +757,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x194 += einsum(x191, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x191 x194 += einsum(x193, (0, 1, 2, 3), (2, 1, 0, 3)) - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum(t1.bb, (0, 1), x194, (2, 0, 3, 4), (2, 3, 4, 1)) del x194 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum(x177, (0, 1, 2, 3), (0, 1, 2, 3)) x196 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x196 += einsum(x178, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -775,33 +776,33 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x196, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x196, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x196 - x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum(v.bbbb.ooov, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 2, 5, 6, 3), (4, 0, 5, 6)) - x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x199 += einsum(t2.bbbb, (0, 1, 2, 3), x184, (4, 5, 0, 1), (4, 5, 2, 3)) - x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x200 += einsum(v.aabb.ovoo, (0, 1, 2, 3), t3.babbab, (4, 0, 3, 5, 1, 6), (4, 2, 5, 6)) - x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 += einsum(x1, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 2, 5, 6, 3), (0, 4, 5, 6)) * -1.0 - x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x202 += einsum(x3, (0, 1, 2, 3), t3.babbab, (4, 2, 1, 5, 3, 6), (0, 4, 5, 6)) - x203 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x203 += einsum(f.bb.oo, (0, 1), (0, 1)) x203 += einsum(x20, (0, 1), (1, 0)) - x204 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x204 += einsum(x203, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) * -2.0 del x203 - x205 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x205 += einsum(x15, (0, 1), (1, 0)) x205 += einsum(x16, (0, 1), (1, 0)) * 2.0 x205 += einsum(x17, (0, 1), (1, 0)) x205 += einsum(x19, (0, 1), (1, 0)) * -1.0 - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum(x205, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -2.0 del x205 - x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x207 += einsum(x197, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x197 x207 += einsum(x198, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 @@ -821,40 +822,40 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t2new_bbbb += einsum(x207, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x207, (0, 1, 2, 3), (1, 0, 2, 3)) del x207 - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x209 += einsum(x208, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x208 t2new_bbbb += einsum(x209, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x209, (0, 1, 2, 3), (0, 1, 2, 3)) del x209 - x210 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x210 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x211 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x211 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x211 += einsum(x210, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 x211 += einsum(x171, (0, 1, 2, 3), (2, 1, 3, 0)) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x211, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x211 - x212 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x212 += einsum(t1.bb, (0, 1), x210, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 x212 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x212 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_bbbb += einsum(t1.bb, (0, 1), x212, (2, 3, 0, 4), (2, 3, 1, 4)) del x212 - x213 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x213 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x213 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 7), (4, 5, 0, 6, 7, 1)) - x214 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x214 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 0, 1, 5), (4, 2, 3, 5)) - x215 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x215 += einsum(t2.aaaa, (0, 1, 2, 3), x214, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x216 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x216 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x216 += einsum(t2.aaaa, (0, 1, 2, 3), x77, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) - x217 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x217 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x217 += einsum(x28, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 5, 1, 6, 7, 3)) * 6.0 - x218 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x218 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x218 += einsum(x213, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 del x213 x218 += einsum(x215, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -4.0 @@ -863,7 +864,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x216 x218 += einsum(x217, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x217 - t3new_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + t3new_aaaaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) t3new_aaaaaa += einsum(x218, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_aaaaaa += einsum(x218, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new_aaaaaa += einsum(x218, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -1.0 @@ -874,44 +875,44 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x218, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new_aaaaaa += einsum(x218, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x218 - x219 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x219 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 5, 1, 3), (0, 2, 4, 5)) - x220 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x220 += einsum(t2.aaaa, (0, 1, 2, 3), x118, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 - x221 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x221 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x221 += einsum(x219, (0, 1, 2, 3), (0, 1, 3, 2)) x221 += einsum(x220, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x220 - x222 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x222 += einsum(t2.aaaa, (0, 1, 2, 3), x221, (4, 5, 3, 6), (0, 1, 4, 2, 5, 6)) * -2.0 del x221 - x223 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x223 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x223 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x224 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x224 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x224 += einsum(t1.aa, (0, 1), x223, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x223 - x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x225 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x226 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x226 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x226 += einsum(t2.aaaa, (0, 1, 2, 3), x68, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 - x227 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x227 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x227 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x227 += einsum(x225, (0, 1, 2, 3), (0, 1, 2, 3)) x227 += einsum(x226, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x228 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x228 += einsum(t2.aaaa, (0, 1, 2, 3), x227, (4, 5, 6, 3), (0, 1, 4, 5, 2, 6)) * -1.0 del x227 - x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x229 += einsum(x224, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x224 x229 += einsum(x228, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) * -1.0 del x228 - x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x230 += einsum(t1.aa, (0, 1), x229, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x229 - x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x231 += einsum(x222, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) del x222 x231 += einsum(x230, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) @@ -935,17 +936,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_aaaaaa += einsum(x231, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x231 - x232 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x232 += einsum(v.aaaa.oooo, (0, 1, 2, 3), t3.aaaaaa, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 6, 7)) * -1.0 - x233 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x233 += einsum(f.aa.oo, (0, 1), (0, 1)) x233 += einsum(x30, (0, 1), (1, 0)) x233 += einsum(x31, (0, 1), (1, 0)) * 2.0 x233 += einsum(x34, (0, 1), (0, 1)) - x234 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x234 += einsum(x233, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * 6.0 del x233 - x235 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x235 += einsum(x232, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 del x232 x235 += einsum(x234, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) @@ -954,17 +955,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x235, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_aaaaaa += einsum(x235, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x235 - x236 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x236 += einsum(v.aaaa.vvvv, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 3, 1), (4, 5, 6, 7, 0, 2)) * -1.0 - x237 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x237 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x237 += einsum(x72, (0, 1), (1, 0)) x237 += einsum(x73, (0, 1), (1, 0)) * 2.0 x237 += einsum(x139, (0, 1), (0, 1)) - x238 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x238 += einsum(x237, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) * 6.0 del x237 - x239 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x239 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x239 += einsum(x236, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x236 x239 += einsum(x238, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -1.0 @@ -973,29 +974,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x239, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 t3new_aaaaaa += einsum(x239, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x239 - x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x240 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 3, 6), (4, 5, 6, 1)) - x241 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x241 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x242 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x242 += einsum(x240, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x242 += einsum(x241, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 - x243 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x243 += einsum(t2.aaaa, (0, 1, 2, 3), x242, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) * -4.0 del x242 - x244 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x244 += einsum(v.aabb.ooov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 7), (4, 5, 0, 1, 6, 7)) - x245 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x245 += einsum(x32, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 7, 3), (4, 5, 0, 1, 6, 7)) * 3.0 - x246 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x246 += einsum(x244, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -1.0 del x244 x246 += einsum(x245, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x245 - x247 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x247 += einsum(t1.aa, (0, 1), x246, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x246 - x248 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x248 += einsum(x243, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 5, 4)) * -1.0 del x243 x248 += einsum(x247, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -1010,20 +1011,20 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x248, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) t3new_aaaaaa += einsum(x248, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x248 - x249 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x249 += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) x249 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) - x250 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x250 += einsum(x249, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 6, 7), (4, 0, 1, 5, 6, 7)) * -6.0 del x249 - x251 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x251 += einsum(x29, (0, 1), (1, 0)) del x29 x251 += einsum(x33, (0, 1), (1, 0)) * -1.0 del x33 - x252 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x252 += einsum(x251, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * 6.0 - x253 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x253 += einsum(x250, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x250 x253 += einsum(x252, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -1.0 @@ -1032,21 +1033,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x253, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 t3new_aaaaaa += einsum(x253, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x253 - x254 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x254 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x254 += einsum(t1.aa, (0, 1), x118, (0, 1, 2, 3), (2, 3)) - x255 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x255 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x255 += einsum(x71, (0, 1), (1, 0)) del x71 x255 += einsum(x254, (0, 1), (1, 0)) * -1.0 del x254 - x256 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x256 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x256 += einsum(x255, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) * 6.0 - x257 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x257 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x257 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 3, 1), (4, 5, 6, 0, 2, 7)) * -1.0 - x258 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x258 += einsum(x98, (0, 1, 2, 3), x257, (4, 5, 6, 0, 1, 7), (4, 5, 6, 2, 3, 7)) * 6.0 del x98, x257 - x259 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x259 += einsum(x256, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) del x256 x259 += einsum(x258, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -1055,21 +1056,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x259, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 t3new_aaaaaa += einsum(x259, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x259 - x260 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x260 += einsum(x38, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 1, 7), (2, 4, 5, 6, 7, 3)) - x261 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x261 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x261 += einsum(t2.aaaa, (0, 1, 2, 3), x25, (4, 0, 1, 5), (4, 2, 3, 5)) - x262 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x262 += einsum(t2.aaaa, (0, 1, 2, 3), x261, (4, 5, 6, 3), (4, 0, 1, 5, 6, 2)) * -1.0 - x263 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x263 += einsum(x46, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 3), (4, 5, 1, 6, 7, 2)) * -6.0 - x264 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x264 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) x264 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x265 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x265 += einsum(t2.aaaa, (0, 1, 2, 3), x264, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -4.0 del x264 - x266 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x266 += einsum(x260, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 del x260 x266 += einsum(x262, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -4.0 @@ -1088,28 +1089,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x266, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new_aaaaaa += einsum(x266, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x266 - x267 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x267 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0000000000000204 x267 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - x268 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x268 += einsum(x267, (0, 1, 2, 3), x68, (0, 4, 5, 2), (4, 1, 5, 3)) * 0.9999999999999901 del x267 - x269 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x269 += einsum(x225, (0, 1, 2, 3), (0, 1, 2, 3)) x269 += einsum(x268, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x268 - x270 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x270 += einsum(x269, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) * 6.0000000000000595 del x269 - x271 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x271 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x271 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x271 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.499999999999995 - x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x272 += einsum(v.aabb.ovov, (0, 1, 2, 3), x271, (0, 4, 1, 5), (2, 3, 4, 5)) - x273 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x273 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x273 += einsum(x272, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 1, 7), (4, 5, 2, 6, 7, 3)) * 4.00000000000004 del x272 - x274 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x274 += einsum(x270, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x270 x274 += einsum(x273, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) @@ -1124,24 +1125,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x274, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) t3new_aaaaaa += einsum(x274, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x274 - x275 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x275 += einsum(t2.aaaa, (0, 1, 2, 3), x64, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) - x276 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x276 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x276 += einsum(t2.aaaa, (0, 1, 2, 3), x25, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x277 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x277 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x277 += einsum(t1.aa, (0, 1), x276, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x276 - x278 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x278 += einsum(t2.aaaa, (0, 1, 2, 3), x46, (4, 5, 6, 3), (0, 1, 5, 4, 2, 6)) - x279 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x279 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x279 += einsum(x277, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 del x277 x279 += einsum(x278, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) * -1.0 del x278 - x280 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x280 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x280 += einsum(t1.aa, (0, 1), x279, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x279 - x281 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x281 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x281 += einsum(x275, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 del x275 x281 += einsum(x280, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 @@ -1165,7 +1166,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x281, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_aaaaaa += einsum(x281, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x281 - x282 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x282 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x282 += einsum(x49, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 6, 7), (0, 4, 1, 5, 6, 7)) t3new_aaaaaa += einsum(x282, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x282, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 @@ -1174,7 +1175,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x282, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x282, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 del x282 - x283 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x283 += einsum(x61, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 1, 7), (4, 5, 2, 6, 7, 3)) * -2.00000000000002 t3new_aaaaaa += einsum(x283, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) t3new_aaaaaa += einsum(x283, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 @@ -1186,9 +1187,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x283, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) t3new_aaaaaa += einsum(x283, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x283 - x284 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x284 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 1, 3), (4, 5, 6, 0, 7, 2)) - x285 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x285 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x285 += einsum(t1.aa, (0, 1), x284, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x284 t3new_aaaaaa += einsum(x285, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 6.0 @@ -1198,25 +1199,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x285, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x285, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x285 - x286 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x286 += einsum(t1.aa, (0, 1), v.aaaa.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x287 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x287 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x287 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x288 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x288 += einsum(x286, (0, 1, 2, 3), (0, 2, 1, 3)) x288 += einsum(x48, (0, 1, 2, 3), (0, 2, 1, 3)) x288 += einsum(x287, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 - x289 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x289 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x289 += einsum(t1.aa, (0, 1), x81, (2, 3, 0, 4), (3, 2, 4, 1)) del x81 - x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x290 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x290 += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) - x291 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x291 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x291 += einsum(t1.aa, (0, 1), x290, (2, 3, 1, 4), (2, 3, 0, 4)) - x292 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x292 += einsum(v.aaaa.ooov, (0, 1, 2, 3), x40, (1, 4, 3, 5), (0, 2, 4, 5)) * 2.0 - x293 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x293 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) x293 += einsum(x289, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x293 += einsum(x56, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1225,14 +1226,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x291 x293 += einsum(x292, (0, 1, 2, 3), (2, 0, 1, 3)) del x292 - x294 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x294 += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x101 x294 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x294 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 2, 1, 3)) - x295 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x295 += einsum(t1.aa, (0, 1), x294, (2, 3, 0, 4), (2, 3, 4, 1)) - x296 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x296 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x296 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x296 += einsum(x288, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1245,27 +1246,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x296 += einsum(x50, (0, 1, 2, 3), (1, 0, 2, 3)) x296 += einsum(x80, (0, 1, 2, 3), (2, 1, 0, 3)) x296 += einsum(x295, (0, 1, 2, 3), (1, 0, 2, 3)) - x297 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x297 += einsum(t2.aaaa, (0, 1, 2, 3), x296, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -2.0 del x296 t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) del x297 - x298 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x298 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x298 += einsum(x286, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 del x286 x298 += einsum(x48, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x298 += einsum(x287, (0, 1, 2, 3), (0, 2, 1, 3)) del x287 - x299 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x299 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x299 += einsum(t2.aaaa, (0, 1, 2, 3), x55, (4, 1, 5, 3), (0, 4, 5, 2)) - x300 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x300 += einsum(t1.aa, (0, 1), x290, (2, 3, 1, 4), (2, 3, 0, 4)) * 0.5 del x290 - x301 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x301 += einsum(v.aaaa.ooov, (0, 1, 2, 3), x40, (1, 4, 3, 5), (0, 2, 4, 5)) - x302 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x302 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x302 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x302 += einsum(x289, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x289 @@ -1275,12 +1276,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x300 x302 += einsum(x301, (0, 1, 2, 3), (2, 0, 1, 3)) del x301 - x303 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x303 += einsum(x13, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 - x304 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x304 += einsum(t1.aa, (0, 1), x294, (2, 3, 0, 4), (2, 3, 4, 1)) * 0.5 del x294 - x305 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x305 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x305 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x305 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 x305 += einsum(x298, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1295,7 +1296,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x303 x305 += einsum(x304, (0, 1, 2, 3), (1, 0, 2, 3)) del x304 - x306 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x306 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x306 += einsum(t2.aaaa, (0, 1, 2, 3), x305, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -4.0 del x305 t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -1.0 @@ -1305,66 +1306,66 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) del x306 - x307 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x307 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ovvv, (4, 5, 6, 3), (1, 4, 5, 6, 0, 2)) - x308 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x308 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 1), (5, 2, 7, 3, 4, 6)) - x309 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x309 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x309 += einsum(x127, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 7, 3), (0, 5, 7, 1, 4, 6)) - x310 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x310 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x310 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.00000000000002 x310 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - x311 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x311 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x311 += einsum(x310, (0, 1, 2, 3), x7, (0, 4, 2, 5), (4, 1, 5, 3)) del x310 - x312 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x312 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 x312 += einsum(x311, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x311 - x313 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x313 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x313 += einsum(x312, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 4, 2, 6, 5, 7)) * 2.0 del x312 - x314 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x314 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x314 += einsum(t2.abab, (0, 1, 2, 3), x11, (0, 4, 2, 5), (1, 3, 4, 5)) * 1.00000000000001 - x315 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x315 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x315 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x315 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.499999999999995 - x316 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x316 += einsum(v.aabb.ovov, (0, 1, 2, 3), x315, (2, 4, 3, 5), (4, 5, 0, 1)) * 2.00000000000002 - x317 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x317 += einsum(x314, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x317 += einsum(x316, (0, 1, 2, 3), (0, 1, 2, 3)) del x316 - x318 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x318 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x318 += einsum(x317, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 7, 3), (5, 0, 7, 1, 4, 6)) * 2.0 del x317 - x319 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x319 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x319 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), (0, 2, 3, 5, 1, 4)) x319 += einsum(t1.bb, (0, 1), t2.abab, (2, 3, 4, 5), (0, 3, 5, 1, 2, 4)) * -0.5 - x320 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x320 += einsum(x14, (0, 1, 2, 3), x319, (0, 4, 2, 5, 6, 7), (1, 4, 3, 5, 6, 7)) * 2.0 - x321 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x321 += einsum(x182, (0, 1, 2, 3), x319, (0, 4, 3, 5, 6, 7), (1, 4, 2, 5, 6, 7)) * -2.0 del x319 - x322 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x322 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 4, 5, 1), (5, 3, 2, 4)) - x323 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x323 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x323 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (0, 4, 5, 3), (1, 5, 2, 4)) - x324 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x324 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x325 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x325 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 5, 6, 1), (4, 6, 5, 3)) * -1.0 - x326 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x326 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x326 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x326 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) x326 += einsum(x109, (0, 1, 2, 3), (0, 2, 3, 1)) x326 += einsum(x109, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 - x327 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x327 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x327 += einsum(t2.abab, (0, 1, 2, 3), x326, (0, 4, 2, 5), (1, 3, 4, 5)) del x326 - x328 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x328 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x328 += einsum(x13, (0, 1), t2.abab, (0, 2, 3, 4), (2, 4, 1, 3)) - x329 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x329 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x329 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x329 += einsum(x105, (0, 1, 2, 3), (0, 1, 2, 3)) x329 += einsum(x322, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1377,87 +1378,87 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x327 x329 += einsum(x328, (0, 1, 2, 3), (0, 1, 3, 2)) del x328 - x330 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x330 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x330 += einsum(t2.abab, (0, 1, 2, 3), x329, (4, 5, 6, 2), (4, 1, 5, 3, 0, 6)) del x329 - x331 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x331 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x331 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (0, 2, 4, 5), (1, 3, 4, 5)) - x332 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x332 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x332 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x332 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x333 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x333 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x333 += einsum(t2.bbbb, (0, 1, 2, 3), x332, (1, 3, 4, 5), (0, 4, 5, 2)) * 2.0 del x332 - x334 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x334 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x334 += einsum(t1.bb, (0, 1), x1, (2, 0, 3, 4), (2, 3, 1, 4)) - x335 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x335 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x335 += einsum(t2.bbbb, (0, 1, 2, 3), x7, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 - x336 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x336 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x336 += einsum(x334, (0, 1, 2, 3), (0, 1, 2, 3)) del x334 x336 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) x336 += einsum(x335, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x337 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x337 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x337 += einsum(t1.bb, (0, 1), x336, (2, 0, 3, 4), (2, 3, 4, 1)) del x336 - x338 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x338 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x338 += einsum(x157, (0, 1, 2, 3), (0, 2, 1, 3)) x338 += einsum(x331, (0, 1, 2, 3), (0, 3, 2, 1)) x338 += einsum(x333, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x333 x338 += einsum(x337, (0, 1, 2, 3), (0, 2, 1, 3)) del x337 - x339 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x339 += einsum(t2.abab, (0, 1, 2, 3), x338, (4, 3, 5, 6), (4, 1, 5, 6, 0, 2)) del x338 - x340 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x340 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 6, 3), (1, 4, 5, 6, 0, 2)) - x341 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x341 += einsum(t1.bb, (0, 1), x340, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x340 - x342 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x342 += einsum(v.aabb.ovoo, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 1), (5, 2, 3, 7, 4, 6)) - x343 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x343 += einsum(x188, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 7, 3), (1, 2, 4, 6, 5, 7)) * 2.0 del x188 - x344 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x344 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 2, 3, 4), (3, 4, 1, 2)) - x345 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x345 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 5, 2, 4)) - x346 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x346 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x346 += einsum(x344, (0, 1, 2, 3), (1, 0, 3, 2)) x346 += einsum(x345, (0, 1, 2, 3), (0, 1, 3, 2)) del x345 - x347 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x347 += einsum(t2.abab, (0, 1, 2, 3), x346, (4, 5, 2, 6), (4, 5, 1, 3, 0, 6)) del x346 - x348 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x348 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x348 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x348 += einsum(x136, (0, 1, 2, 3), (1, 0, 3, 2)) x348 += einsum(x150, (0, 1, 2, 3), (0, 1, 3, 2)) del x150 - x349 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x349 += einsum(t2.abab, (0, 1, 2, 3), x348, (4, 5, 0, 6), (4, 5, 1, 3, 6, 2)) del x348 - x350 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum(t1.aa, (0, 1), x3, (2, 3, 0, 4), (2, 3, 1, 4)) - x351 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x351 += einsum(x129, (0, 1, 2, 3), (0, 1, 3, 2)) x351 += einsum(x350, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x350 - x352 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x352 += einsum(t2.abab, (0, 1, 2, 3), x351, (4, 5, 2, 6), (4, 5, 1, 3, 0, 6)) del x351 - x353 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x353 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x353 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x353 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) - x354 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x354 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x354 += einsum(t1.bb, (0, 1), x353, (2, 1, 3, 4), (2, 0, 3, 4)) - x355 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x355 += einsum(t2.abab, (0, 1, 2, 3), x354, (4, 5, 6, 0), (5, 4, 1, 3, 6, 2)) del x354 - x356 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x356 += einsum(x341, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) del x341 x356 += einsum(x342, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 @@ -1472,26 +1473,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x352 x356 += einsum(x355, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x355 - x357 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x357 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x357 += einsum(t1.bb, (0, 1), x356, (2, 0, 3, 4, 5, 6), (2, 3, 4, 1, 5, 6)) del x356 - x358 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x358 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x358 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (4, 2, 5, 1), (5, 3, 0, 4)) - x359 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x359 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x359 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (4, 2, 5, 3), (1, 5, 0, 4)) - x360 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x360 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x360 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 1, 3), (4, 6, 5, 0)) - x361 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x361 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x361 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 3, 6, 1), (5, 6, 4, 0)) * -1.0 - x362 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x362 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x362 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x362 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x362 += einsum(x25, (0, 1, 2, 3), (1, 0, 2, 3)) x362 += einsum(x25, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x363 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x363 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x363 += einsum(t2.abab, (0, 1, 2, 3), x362, (4, 5, 0, 2), (1, 3, 4, 5)) del x362 - x364 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x364 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x364 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x364 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x364 += einsum(x358, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1502,58 +1503,58 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x364 += einsum(x361, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x364 += einsum(x363, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x363 - x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x365 += einsum(t2.abab, (0, 1, 2, 3), x364, (4, 5, 6, 0), (4, 1, 5, 3, 6, 2)) del x364 - x366 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x366 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x367 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x367 += einsum(t1.aa, (0, 1), x127, (2, 3, 0, 4), (2, 3, 1, 4)) - x368 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x368 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x368 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 1, 0, 5), (4, 3, 2, 5)) - x369 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x369 += einsum(x366, (0, 1, 2, 3), (0, 1, 3, 2)) del x366 x369 += einsum(x367, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x367 x369 += einsum(x368, (0, 1, 2, 3), (0, 1, 3, 2)) del x368 - x370 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x370 += einsum(t2.abab, (0, 1, 2, 3), x369, (4, 5, 2, 6), (4, 1, 5, 3, 0, 6)) del x369 - x371 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x371 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x371 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 1, 5, 2), (4, 3, 0, 5)) - x372 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x372 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x372 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x372 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) - x373 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x373 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x373 += einsum(t1.bb, (0, 1), x372, (1, 2, 3, 4), (0, 2, 3, 4)) del x372 - x374 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x374 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x374 += einsum(x371, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x371 x374 += einsum(x373, (0, 1, 2, 3), (0, 1, 3, 2)) del x373 - x375 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x375 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x375 += einsum(t2.abab, (0, 1, 2, 3), x374, (4, 5, 0, 6), (4, 1, 5, 3, 6, 2)) del x374 - x376 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x376 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x376 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x376 += einsum(x105, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x105 - x377 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x377 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x377 += einsum(t2.bbbb, (0, 1, 2, 3), x376, (1, 3, 4, 5), (0, 2, 4, 5)) del x376 - x378 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x378 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x378 += einsum(t2.abab, (0, 1, 2, 3), x377, (4, 5, 6, 2), (4, 1, 5, 3, 0, 6)) * 2.0 del x377 - x379 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x379 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x379 += einsum(t2.bbbb, (0, 1, 2, 3), x353, (1, 3, 4, 5), (0, 2, 4, 5)) del x353 - x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x380 += einsum(t2.abab, (0, 1, 2, 3), x379, (4, 5, 6, 0), (4, 1, 5, 3, 6, 2)) * 2.0 del x379 - x381 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x381 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x381 += einsum(x307, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x307 x381 += einsum(x308, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -2.0 @@ -1589,45 +1590,45 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x381, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 5, 3)) t3new_babbab += einsum(x381, (0, 1, 2, 3, 4, 5), (1, 4, 0, 3, 5, 2)) * -1.0 del x381 - x382 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x382 += einsum(t2.bbbb, (0, 1, 2, 3), x1, (4, 0, 1, 5), (4, 2, 3, 5)) - x383 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x383 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x383 += einsum(t2.abab, (0, 1, 2, 3), x382, (4, 5, 6, 3), (4, 1, 5, 6, 0, 2)) * -1.0 - x384 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x384 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x384 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x384 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) * 0.99999999999999 - x385 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x385 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x385 += einsum(v.aabb.ovov, (0, 1, 2, 3), x384, (4, 3, 0, 5), (2, 4, 1, 5)) * 1.00000000000001 - x386 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x386 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x386 += einsum(x129, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x386 += einsum(x385, (0, 1, 2, 3), (1, 0, 2, 3)) del x385 - x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x387 += einsum(x386, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 2, 7), (0, 4, 6, 7, 5, 3)) * -2.0 del x386 - x388 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x388 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x388 += einsum(x135, (0, 1, 2, 3), (0, 1, 3, 2)) x388 += einsum(x137, (0, 1, 2, 3), (0, 1, 3, 2)) - x389 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x389 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x389 += einsum(x388, (0, 1, 2, 3), t3.babbab, (4, 2, 1, 5, 6, 7), (0, 4, 5, 7, 3, 6)) * -2.0 del x388 - x390 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x390 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x390 += einsum(t1.aa, (0, 1), v.aabb.oooo, (2, 0, 3, 4), (3, 4, 2, 1)) - x391 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x391 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x391 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 3, 6, 1), (4, 0, 5, 6)) * -1.0 - x392 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x392 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x392 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 3, 1), (5, 2, 4, 6)) - x393 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x393 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x393 += einsum(t2.abab, (0, 1, 2, 3), x18, (4, 5, 1, 3), (4, 5, 0, 2)) - x394 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x394 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x394 += einsum(t2.abab, (0, 1, 2, 3), x24, (4, 3, 0, 5), (4, 1, 5, 2)) - x395 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x395 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x395 += einsum(t2.abab, (0, 1, 2, 3), x106, (4, 3, 2, 5), (4, 1, 0, 5)) - x396 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x396 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x396 += einsum(x9, (0, 1), t2.abab, (2, 3, 4, 1), (0, 3, 2, 4)) - x397 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x397 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x397 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x40, (0, 4, 1, 5), (2, 3, 4, 5)) * 2.0 - x398 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x398 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x398 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x398 += einsum(x390, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x390 @@ -1644,53 +1645,53 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x396 x398 += einsum(x397, (0, 1, 2, 3), (1, 0, 2, 3)) del x397 - x399 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x399 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x399 += einsum(t2.bbbb, (0, 1, 2, 3), x398, (1, 4, 5, 6), (4, 0, 2, 3, 5, 6)) * -2.0 del x398 - x400 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x400 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x400 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x400 += einsum(x344, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x401 += einsum(x400, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 2, 7), (1, 4, 6, 7, 5, 3)) * -2.0 del x400 - x402 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x402 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x402 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 1, 0, 5), (4, 2, 3, 5)) * -1.0 - x403 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x403 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x403 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x404 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x404 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x404 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 1, 6), (4, 5, 6, 3)) - x405 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x405 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x405 += einsum(x402, (0, 1, 2, 3), (0, 2, 1, 3)) x405 += einsum(x403, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 x405 += einsum(x404, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x406 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x406 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x406 += einsum(t2.abab, (0, 1, 2, 3), x405, (4, 5, 6, 3), (4, 1, 5, 6, 0, 2)) * 2.0 del x405 - x407 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x407 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x407 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x407 += einsum(x136, (0, 1, 2, 3), (1, 0, 3, 2)) - x408 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x408 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x408 += einsum(x407, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 6, 7), (1, 4, 5, 7, 3, 6)) * -2.0 del x407 - x409 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x409 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x409 += einsum(f.bb.oo, (0, 1), (0, 1)) x409 += einsum(x16, (0, 1), (0, 1)) * 2.0 x409 += einsum(x17, (0, 1), (0, 1)) x409 += einsum(x20, (0, 1), (1, 0)) - x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x410 += einsum(x409, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (0, 2, 4, 6, 3, 5)) * -2.0 del x409 - x411 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x411 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x411 += einsum(t1.aa, (0, 1), x135, (2, 3, 4, 0), (2, 3, 4, 1)) - x412 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x412 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x412 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x412 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x413 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x413 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x413 += einsum(t2.abab, (0, 1, 2, 3), x412, (4, 5, 1, 3), (4, 5, 0, 2)) - x414 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x414 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x414 += einsum(x3, (0, 1, 2, 3), x40, (2, 4, 3, 5), (0, 1, 4, 5)) * 2.0 del x40 - x415 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x415 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x415 += einsum(x411, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x411 x415 += einsum(x413, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1699,17 +1700,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x149 x415 += einsum(x414, (0, 1, 2, 3), (0, 1, 2, 3)) del x414 - x416 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x416 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x416 += einsum(t2.bbbb, (0, 1, 2, 3), x415, (4, 1, 5, 6), (4, 0, 2, 3, 5, 6)) * -2.0 del x415 - x417 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x417 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x417 += einsum(x15, (0, 1), (1, 0)) del x15 x417 += einsum(x19, (0, 1), (1, 0)) * -1.0 del x19 - x418 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x418 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x418 += einsum(x417, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 6), (1, 2, 4, 6, 3, 5)) * -2.0 - x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x419 += einsum(x383, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 2.0 del x383 x419 += einsum(x387, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) @@ -1733,44 +1734,44 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x419, (0, 1, 2, 3, 4, 5), (0, 4, 1, 2, 5, 3)) * -1.0 t3new_babbab += einsum(x419, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 5, 3)) del x419 - x420 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x420 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x420 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (4, 6, 2, 7, 5, 0)) - x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x421 += einsum(t2.abab, (0, 1, 2, 3), x420, (4, 5, 1, 6, 7, 0), (4, 5, 3, 6, 7, 2)) del x420 - x422 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x422 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x422 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) x422 += einsum(x133, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x133 - x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x423 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), (0, 2, 3, 5, 1, 4)) x423 += einsum(t1.aa, (0, 1), t2.bbbb, (2, 3, 4, 5), (2, 3, 4, 5, 0, 1)) - x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x424 += einsum(x422, (0, 1, 2, 3), x423, (4, 5, 0, 6, 7, 2), (4, 5, 6, 1, 7, 3)) * 2.0 del x422 - x425 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x425 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x425 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x425 += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) - x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x426 += einsum(x425, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 7, 0), (4, 5, 1, 6, 3, 7)) * -2.0 del x425 - x427 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x427 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x427 += einsum(t1.aa, (0, 1), v.aabb.oovv, (2, 0, 3, 4), (3, 4, 2, 1)) - x428 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x428 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x428 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovvv, (1, 3, 4, 5), (4, 5, 0, 2)) - x429 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x429 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x429 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 6, 1), (6, 3, 4, 5)) - x430 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x430 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x430 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x430 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x431 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x431 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x431 += einsum(t2.abab, (0, 1, 2, 3), x430, (1, 4, 3, 5), (4, 5, 0, 2)) - x432 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x432 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x432 += einsum(t2.abab, (0, 1, 2, 3), x24, (1, 4, 0, 5), (4, 3, 5, 2)) del x24 - x433 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x433 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x433 += einsum(t2.abab, (0, 1, 2, 3), x106, (1, 4, 2, 5), (4, 3, 0, 5)) - x434 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x434 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x434 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x434 += einsum(x427, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x427 @@ -1783,47 +1784,47 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x432 x434 += einsum(x433, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x433 - x435 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x435 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x435 += einsum(t2.bbbb, (0, 1, 2, 3), x434, (3, 4, 5, 6), (0, 1, 4, 2, 5, 6)) * -2.0 del x434 - x436 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x436 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x436 += einsum(v.aabb.ovov, (0, 1, 2, 3), x384, (2, 4, 5, 1), (3, 4, 0, 5)) - x437 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x437 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x437 += einsum(x121, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.99999999999999 x437 += einsum(x436, (0, 1, 2, 3), (1, 0, 2, 3)) - x438 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x438 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x438 += einsum(x437, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 7, 1), (4, 5, 0, 6, 3, 7)) * -2.00000000000002 del x437 - x439 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x439 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x439 += einsum(t1.bb, (0, 1), x430, (0, 2, 1, 3), (2, 3)) - x440 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x440 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x440 += einsum(x141, (0, 1), (1, 0)) del x141 x440 += einsum(x439, (0, 1), (0, 1)) * -1.0 del x439 - x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x441 += einsum(x440, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 0), (2, 4, 1, 5, 3, 6)) * -2.0 - x442 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x442 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x442 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 3, 7, 1), (4, 6, 0, 2, 5, 7)) * -1.0 - x443 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x443 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x443 += einsum(x106, (0, 1, 2, 3), x423, (4, 5, 1, 6, 7, 2), (0, 4, 5, 6, 7, 3)) del x106, x423 - x444 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x444 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x444 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x444 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x444 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x42 - x445 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x445 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x445 += einsum(t2.bbbb, (0, 1, 2, 3), x444, (4, 3, 5, 6), (4, 0, 1, 2, 5, 6)) * -1.0 del x444 - x446 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x446 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x446 += einsum(f.bb.ov, (0, 1), (0, 1)) x446 += einsum(x0, (0, 1), (0, 1)) del x0 - x447 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x447 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x447 += einsum(x446, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (0, 2, 4, 5, 3, 6)) * -1.0 del x446 - x448 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x448 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x448 += einsum(x442, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 4, 5)) del x442 x448 += einsum(x443, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) @@ -1832,22 +1833,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x445 x448 += einsum(x447, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) del x447 - x449 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x449 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x449 += einsum(t1.bb, (0, 1), x448, (0, 2, 3, 4, 5, 6), (2, 3, 4, 1, 5, 6)) * 2.0 del x448 - x450 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x450 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x450 += einsum(f.bb.vv, (0, 1), (0, 1)) x450 += einsum(x143, (0, 1), (1, 0)) * -1.0 - x451 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x451 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x451 += einsum(x450, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 0), (2, 4, 1, 5, 3, 6)) * -2.0 del x450 - x452 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x452 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x452 += einsum(x167, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x452 += einsum(x169, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x453 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x453 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x453 += einsum(t2.abab, (0, 1, 2, 3), x452, (4, 5, 1, 6), (4, 5, 6, 3, 0, 2)) * 2.0 del x452 - x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x454 += einsum(x421, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x421 x454 += einsum(x424, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) * -1.0 @@ -1869,34 +1870,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x454, (0, 1, 2, 3, 4, 5), (0, 4, 1, 2, 5, 3)) * -1.0 t3new_babbab += einsum(x454, (0, 1, 2, 3, 4, 5), (0, 4, 1, 3, 5, 2)) del x454 - x455 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x455 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x455 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 5, 6, 3), (5, 1, 4, 6)) - x456 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x456 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x456 += einsum(t2.bbbb, (0, 1, 2, 3), x455, (4, 3, 5, 6), (0, 1, 2, 4, 5, 6)) - x457 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x457 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x457 += einsum(t2.abab, (0, 1, 2, 3), x168, (4, 5, 1, 6), (5, 4, 3, 6, 0, 2)) * -1.0 - x458 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x458 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x458 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 0, 1), (2, 3)) - x459 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x459 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x459 += einsum(t1.bb, (0, 1), x458, (0, 2), (1, 2)) del x458 - x460 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x460 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x460 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x6, (0, 2, 3, 4), (4, 1)) * 2.0 del x6 - x461 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x461 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x461 += einsum(x459, (0, 1), (0, 1)) del x459 x461 += einsum(x460, (0, 1), (0, 1)) * -1.0 del x460 - x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x462 += einsum(x461, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (2, 4, 0, 5, 3, 6)) * -2.0 del x461 - x463 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x463 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x463 += einsum(t2.bbbb, (0, 1, 2, 3), x61, (4, 3, 5, 6), (4, 0, 1, 2, 5, 6)) - x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x464 += einsum(t1.bb, (0, 1), x463, (0, 2, 3, 4, 5, 6), (3, 2, 4, 1, 5, 6)) * 2.0 del x463 - x465 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x465 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x465 += einsum(x456, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 4.0 del x456 x465 += einsum(x457, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -6.0 @@ -1908,7 +1909,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_babbab += einsum(x465, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 5, 3)) t3new_babbab += einsum(x465, (0, 1, 2, 3, 4, 5), (1, 4, 0, 3, 5, 2)) * -1.0 del x465 - x466 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x466 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x466 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x466 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x466 += einsum(x225, (0, 1, 2, 3), (1, 0, 3, 2)) * 1.00000000000001 @@ -1917,10 +1918,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x466 += einsum(t1.aa, (0, 1), x32, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 t3new_babbab += einsum(x466, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (4, 1, 5, 6, 3, 7)) * 2.0 del x466 - x467 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x467 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x467 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x467 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.4999999999999949 - x468 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x468 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x468 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x468 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x124 @@ -1930,38 +1931,38 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x467 t3new_babbab += einsum(x468, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 1), (4, 2, 5, 6, 3, 7)) * 6.0 del x468 - x469 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x469 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x469 += einsum(v.bbbb.vvvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x469 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 5), (5, 2, 4, 3)) x469 += einsum(t1.bb, (0, 1), x107, (0, 2, 3, 4), (4, 1, 3, 2)) t3new_babbab += einsum(x469, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 0, 7, 2), (4, 5, 6, 1, 7, 3)) * -2.0 del x469 - x470 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x470 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x470 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x470 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - x471 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x471 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x471 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x471 += einsum(x184, (0, 1, 2, 3), (3, 0, 2, 1)) x471 += einsum(x184, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 x471 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x470, (4, 5, 3, 1), (0, 5, 2, 4)) t3new_babbab += einsum(x471, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 5, 6, 7), (1, 4, 3, 5, 6, 7)) * 2.0 del x471 - x472 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x472 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x472 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x472 += einsum(x185, (0, 1, 2, 3), (1, 0, 2, 3)) - x473 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x473 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x473 += einsum(t2.bbbb, (0, 1, 2, 3), x18, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 - x474 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x474 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x474 += einsum(t2.bbbb, (0, 1, 2, 3), x190, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 - x475 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x475 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x475 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x475 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) - x476 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x476 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x476 += einsum(t1.bb, (0, 1), x475, (2, 3, 4, 1), (2, 3, 4, 0)) del x475 - x477 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x477 += einsum(t1.bb, (0, 1), x476, (2, 0, 3, 4), (4, 2, 3, 1)) - x478 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x478 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x478 += einsum(x186, (0, 1, 2, 3), (0, 2, 1, 3)) x478 += einsum(x187, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x478 += einsum(x473, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 @@ -1972,13 +1973,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x193 x478 += einsum(x477, (0, 1, 2, 3), (0, 2, 1, 3)) del x477 - x479 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x479 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x479 += einsum(x210, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 x479 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x479 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 2, 1, 3)) - x480 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x480 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x480 += einsum(t1.bb, (0, 1), x479, (2, 3, 0, 4), (2, 3, 4, 1)) - x481 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x481 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x481 += einsum(x472, (0, 1, 2, 3), (0, 1, 2, 3)) x481 += einsum(x472, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x472 @@ -1989,22 +1990,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x481 += einsum(x480, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 t3new_babbab += einsum(t2.abab, (0, 1, 2, 3), x481, (1, 4, 5, 6), (5, 0, 4, 6, 2, 3)) * -1.0 del x481 - x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x482 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x482 += einsum(x185, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 - x483 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x483 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x483 += einsum(t2.bbbb, (0, 1, 2, 3), x18, (4, 5, 1, 3), (4, 5, 0, 2)) del x18 - x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x484 += einsum(t2.bbbb, (0, 1, 2, 3), x190, (4, 5, 1, 3), (4, 5, 0, 2)) del x190 - x485 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x485 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x485 += einsum(t1.bb, (0, 1), x192, (2, 3, 1, 4), (2, 3, 0, 4)) * 0.5 del x192 - x486 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x486 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x486 += einsum(t1.bb, (0, 1), x476, (2, 0, 3, 4), (4, 2, 3, 1)) * 0.5 del x476 - x487 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x487 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x487 += einsum(x186, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x487 += einsum(x187, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x487 += einsum(x483, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 @@ -2015,7 +2016,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x485 x487 += einsum(x486, (0, 1, 2, 3), (0, 2, 1, 3)) del x486 - x488 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x488 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x488 += einsum(x482, (0, 1, 2, 3), (0, 1, 2, 3)) x488 += einsum(x482, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x482 @@ -2027,40 +2028,40 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x479 t3new_babbab += einsum(t2.abab, (0, 1, 2, 3), x488, (1, 4, 5, 6), (5, 0, 4, 3, 2, 6)) * 2.0 del x488 - x489 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x489 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x489 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (5, 2, 4, 6, 0, 7)) - x490 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x490 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x490 += einsum(t2.abab, (0, 1, 2, 3), x489, (4, 1, 5, 6, 0, 7), (4, 3, 5, 6, 2, 7)) del x489 - x491 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x491 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x491 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) x491 += einsum(x132, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x132 - x492 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x492 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x492 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 3, 5)) x492 += einsum(t1.bb, (0, 1), t2.aaaa, (2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) - x493 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x493 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x493 += einsum(x491, (0, 1, 2, 3), x492, (4, 0, 5, 6, 2, 7), (4, 1, 5, 6, 7, 3)) * 2.0 del x491 - x494 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x494 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x494 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x494 += einsum(x129, (0, 1, 2, 3), (1, 0, 3, 2)) del x129 - x495 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x495 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x495 += einsum(x494, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 7, 2), (1, 7, 4, 5, 6, 3)) * -2.0 del x494 - x496 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x496 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x496 += einsum(t1.bb, (0, 1), v.aabb.vvoo, (2, 3, 4, 0), (4, 1, 2, 3)) - x497 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x497 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x497 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.vvov, (4, 5, 1, 3), (0, 2, 4, 5)) - x498 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x498 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x498 += einsum(t2.abab, (0, 1, 2, 3), x118, (0, 2, 4, 5), (1, 3, 4, 5)) del x118 - x499 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x499 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x499 += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 0, 5), (4, 3, 5, 2)) - x500 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x500 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x500 += einsum(t2.abab, (0, 1, 2, 3), x104, (3, 4, 0, 5), (1, 4, 5, 2)) - x501 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x501 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x501 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x501 += einsum(x496, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x496 @@ -2076,21 +2077,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x499 x501 += einsum(x500, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x500 - x502 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x502 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x502 += einsum(t2.aaaa, (0, 1, 2, 3), x501, (4, 5, 3, 6), (4, 5, 0, 1, 2, 6)) * -2.0 del x501 - x503 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x503 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x503 += einsum(v.aabb.ovov, (0, 1, 2, 3), x384, (4, 3, 0, 5), (2, 4, 1, 5)) del x384 - x504 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x504 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x504 += einsum(x344, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.99999999999999 del x344 x504 += einsum(x503, (0, 1, 2, 3), (0, 1, 3, 2)) del x503 - x505 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x505 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x505 += einsum(x504, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 7, 3), (1, 7, 4, 5, 6, 2)) * -2.00000000000002 del x504 - x506 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x506 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x506 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x506 += einsum(x72, (0, 1), (0, 1)) del x72 @@ -2098,52 +2099,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x73 x506 += einsum(x139, (0, 1), (1, 0)) del x139 - x507 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x507 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x507 += einsum(x506, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (3, 6, 2, 4, 5, 0)) * -2.0 del x506 - x508 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x508 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x508 += einsum(x255, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 0), (3, 6, 2, 4, 5, 1)) * -2.0 del x255 - x509 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x509 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x509 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 1, 7, 3), (5, 7, 4, 6, 0, 2)) - x510 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x510 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x510 += einsum(x104, (0, 1, 2, 3), x492, (4, 0, 5, 6, 3, 7), (4, 1, 2, 5, 6, 7)) del x492 - x511 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x511 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x511 += einsum(t1.bb, (0, 1), v.aabb.ovoo, (2, 3, 4, 0), (4, 1, 2, 3)) - x512 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x512 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x512 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x513 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x513 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x513 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x513 += einsum(x511, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x513 += einsum(x512, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x512 x513 += einsum(x163, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x163 - x514 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x514 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x514 += einsum(t2.aaaa, (0, 1, 2, 3), x513, (4, 5, 6, 3), (4, 5, 0, 1, 6, 2)) * -1.0 del x513 - x515 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x515 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x515 += einsum(x509, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x509 x515 += einsum(x510, (0, 1, 2, 3, 4, 5), (0, 1, 4, 3, 2, 5)) del x510 x515 += einsum(x514, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x514 - x516 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x516 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x516 += einsum(t1.aa, (0, 1), x515, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x515 - x517 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x517 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x517 += einsum(x77, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x77 x517 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x78 x517 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) * -3.0 del x79 - x518 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x518 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x518 += einsum(t2.abab, (0, 1, 2, 3), x517, (4, 5, 0, 6), (1, 3, 4, 5, 6, 2)) * 2.0 del x517 - x519 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x519 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x519 += einsum(x490, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -2.0 del x490 x519 += einsum(x493, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 @@ -2165,82 +2166,82 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x519, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) t3new_abaaba += einsum(x519, (0, 1, 2, 3, 4, 5), (3, 0, 2, 5, 1, 4)) * -1.0 del x519 - x520 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x520 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x520 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 7, 3), (4, 6, 5, 0, 7, 1)) - x521 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x521 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x521 += einsum(t2.abab, (0, 1, 2, 3), x64, (4, 5, 2, 6), (1, 3, 4, 0, 6, 5)) del x64 - x522 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x522 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x522 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 0, 5, 3), (1, 5, 4, 2)) - x523 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x523 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x523 += einsum(t2.abab, (0, 1, 2, 3), x522, (4, 1, 5, 6), (4, 3, 0, 5, 6, 2)) del x522 - x524 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x524 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x524 += einsum(x38, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 7, 1), (4, 6, 2, 5, 7, 3)) - x525 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x525 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x525 += einsum(t2.abab, (0, 1, 2, 3), x23, (4, 3, 5, 0), (1, 4, 5, 2)) - x526 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x526 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x526 += einsum(t2.abab, (0, 1, 2, 3), x525, (4, 1, 5, 6), (4, 3, 5, 0, 6, 2)) del x525 - x527 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x527 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x527 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.00000000000002 x527 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - x528 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x528 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x528 += einsum(x527, (0, 1, 2, 3), x68, (0, 4, 5, 2), (4, 1, 5, 3)) del x68, x527 - x529 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x529 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x529 += einsum(x225, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 x529 += einsum(x528, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x528 - x530 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x530 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x530 += einsum(x529, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (5, 7, 4, 0, 6, 2)) * 2.0 del x529 - x531 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x531 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x531 += einsum(v.aabb.ovov, (0, 1, 2, 3), x271, (0, 4, 1, 5), (2, 3, 4, 5)) * 2.0 del x271 - x532 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x532 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x532 += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x61 x532 += einsum(x531, (0, 1, 2, 3), (0, 1, 2, 3)) del x531 - x533 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x533 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x533 += einsum(x532, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 7, 1), (4, 6, 2, 5, 3, 7)) * 2.00000000000002 del x532 - x534 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x534 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x534 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 3, 5)) x534 += einsum(t1.aa, (0, 1), t2.abab, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) * -0.5 - x535 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x535 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x535 += einsum(x28, (0, 1, 2, 3), x534, (4, 5, 0, 6, 2, 7), (4, 5, 1, 6, 3, 7)) * 2.0 del x28, x534 - x536 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x536 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x536 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 3, 5)) * 2.0 x536 += einsum(t1.aa, (0, 1), t2.abab, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) * -1.0 - x537 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x537 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x537 += einsum(x46, (0, 1, 2, 3), x536, (4, 5, 0, 6, 3, 7), (4, 5, 1, 6, 2, 7)) * -1.0 del x46, x536 - x538 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x538 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x538 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 0, 1, 5), (3, 5, 4, 2)) - x539 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x539 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x539 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 1, 5), (3, 5, 0, 4)) - x540 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x540 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x540 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x540 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) x540 += einsum(x107, (0, 1, 2, 3), (0, 2, 3, 1)) x540 += einsum(x107, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x107 - x541 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x541 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x541 += einsum(t2.abab, (0, 1, 2, 3), x540, (1, 4, 3, 5), (4, 5, 0, 2)) del x540 - x542 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x542 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x542 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x542 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x543 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x543 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x543 += einsum(t2.aaaa, (0, 1, 2, 3), x542, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x542 - x544 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x544 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x544 += einsum(x9, (0, 1), t2.abab, (2, 0, 3, 4), (1, 4, 2, 3)) del x9 - x545 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x545 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x545 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x545 += einsum(x103, (0, 1, 2, 3), (1, 0, 2, 3)) del x103 @@ -2258,28 +2259,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x543 x545 += einsum(x544, (0, 1, 2, 3), (0, 1, 2, 3)) del x544 - x546 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x546 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x546 += einsum(t2.abab, (0, 1, 2, 3), x545, (3, 4, 5, 6), (1, 4, 5, 0, 6, 2)) del x545 - x547 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x547 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x547 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x547 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x548 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x548 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x548 += einsum(t2.aaaa, (0, 1, 2, 3), x547, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 del x547 - x549 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x549 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x549 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) - x550 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x550 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x550 += einsum(x549, (0, 1, 2, 3), (1, 0, 2, 3)) del x549 x550 += einsum(x225, (0, 1, 2, 3), (0, 1, 2, 3)) del x225 x550 += einsum(x226, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x226 - x551 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x551 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x551 += einsum(t1.aa, (0, 1), x550, (2, 0, 3, 4), (2, 3, 4, 1)) del x550 - x552 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x552 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x552 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x552 += einsum(x219, (0, 1, 2, 3), (0, 1, 3, 2)) del x219 @@ -2287,54 +2288,54 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x548 x552 += einsum(x551, (0, 1, 2, 3), (0, 3, 1, 2)) del x551 - x553 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x553 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x553 += einsum(t2.abab, (0, 1, 2, 3), x552, (4, 5, 6, 2), (1, 3, 4, 0, 5, 6)) del x552 - x554 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x554 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x554 += einsum(v.aabb.ooov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 7, 3), (4, 6, 5, 0, 1, 7)) - x555 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x555 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x555 += einsum(t2.abab, (0, 1, 2, 3), x25, (4, 5, 6, 2), (1, 3, 4, 0, 6, 5)) - x556 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x556 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x556 += einsum(t1.aa, (0, 1), x555, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x555 - x557 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x557 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x557 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x557 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x558 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x558 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x558 += einsum(x557, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 3), (5, 7, 4, 1, 2, 6)) * 2.0 del x557 - x559 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x559 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x559 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (3, 5, 0, 4)) - x560 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x560 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x560 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x560 += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) x560 += einsum(x559, (0, 1, 2, 3), (1, 0, 3, 2)) del x559 - x561 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x561 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x561 += einsum(t2.abab, (0, 1, 2, 3), x560, (3, 4, 5, 6), (1, 4, 5, 6, 0, 2)) del x560 - x562 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x562 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x562 += einsum(x136, (0, 1, 2, 3), (1, 0, 2, 3)) x562 += einsum(x137, (0, 1, 2, 3), (1, 0, 2, 3)) del x137 - x563 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x563 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x563 += einsum(t2.abab, (0, 1, 2, 3), x562, (1, 4, 5, 6), (4, 3, 5, 6, 0, 2)) - x564 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x564 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x564 += einsum(t1.bb, (0, 1), x23, (0, 2, 3, 4), (1, 2, 3, 4)) - x565 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x565 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x565 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) x565 += einsum(x564, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x564 - x566 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x566 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x566 += einsum(t2.abab, (0, 1, 2, 3), x565, (3, 4, 5, 6), (1, 4, 5, 6, 0, 2)) del x565 - x567 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x567 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x567 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x567 += einsum(x135, (0, 1, 2, 3), (1, 0, 3, 2)) del x135 - x568 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x568 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x568 += einsum(t2.abab, (0, 1, 2, 3), x567, (1, 4, 5, 6), (4, 3, 5, 6, 0, 2)) - x569 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x569 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x569 += einsum(x554, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 del x554 x569 += einsum(x556, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -2349,21 +2350,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x566 x569 += einsum(x568, (0, 1, 2, 3, 4, 5), (0, 1, 4, 3, 2, 5)) * -1.0 del x568 - x570 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x570 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x570 += einsum(t1.aa, (0, 1), x569, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 6, 1)) del x569 - x571 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x571 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x571 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x571 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x571 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x571 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x572 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x572 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x572 += einsum(t2.abab, (0, 1, 2, 3), x571, (4, 5, 1, 3), (4, 5, 0, 2)) del x571 - x573 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x573 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x573 += einsum(t2.aaaa, (0, 1, 2, 3), x130, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x130 - x574 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x574 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x574 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x574 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) del x3 @@ -2375,36 +2376,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x572 x574 += einsum(x573, (0, 1, 2, 3), (1, 0, 2, 3)) del x573 - x575 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x575 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x575 += einsum(t2.abab, (0, 1, 2, 3), x574, (1, 4, 5, 6), (4, 3, 5, 0, 6, 2)) del x574 - x576 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x576 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x576 += einsum(t1.bb, (0, 1), x38, (0, 2, 3, 4), (1, 2, 3, 4)) del x38 - x577 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x577 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x577 += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 4, 5, 0), (3, 4, 5, 2)) - x578 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x578 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x578 += einsum(x153, (0, 1, 2, 3), (1, 0, 2, 3)) del x153 x578 += einsum(x576, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x576 x578 += einsum(x577, (0, 1, 2, 3), (1, 0, 2, 3)) del x577 - x579 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x579 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x579 += einsum(t2.abab, (0, 1, 2, 3), x578, (3, 4, 5, 6), (1, 4, 5, 0, 6, 2)) del x578 - x580 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x580 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x580 += einsum(v.aabb.vvov, (0, 1, 2, 3), x5, (4, 3, 5, 1), (4, 2, 5, 0)) del x5 - x581 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x581 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x581 += einsum(x147, (0, 1, 2, 3), (1, 0, 2, 3)) del x147 x581 += einsum(x580, (0, 1, 2, 3), (1, 0, 2, 3)) del x580 - x582 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x582 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x582 += einsum(t2.abab, (0, 1, 2, 3), x581, (1, 4, 5, 6), (4, 3, 5, 0, 6, 2)) del x581 - x583 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x583 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x583 += einsum(x520, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -2.0 del x520 x583 += einsum(x521, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 @@ -2440,36 +2441,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x583, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) t3new_abaaba += einsum(x583, (0, 1, 2, 3, 4, 5), (3, 0, 2, 5, 1, 4)) * -1.0 del x583 - x584 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x584 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x584 += einsum(t2.abab, (0, 1, 2, 3), x261, (4, 5, 6, 2), (1, 3, 4, 0, 5, 6)) * -1.0 del x261 - x585 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x585 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x585 += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.99999999999999 del x122 x585 += einsum(x436, (0, 1, 2, 3), (0, 1, 3, 2)) del x436 - x586 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x586 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x586 += einsum(x585, (0, 1, 2, 3), t3.abaaba, (4, 5, 3, 6, 0, 7), (5, 1, 4, 2, 6, 7)) * -2.00000000000002 del x585 - x587 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x587 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x587 += einsum(x562, (0, 1, 2, 3), t3.abaaba, (4, 0, 3, 5, 6, 7), (1, 6, 4, 2, 5, 7)) * -2.0 del x562 - x588 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x588 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x588 += einsum(t1.bb, (0, 1), v.aabb.oooo, (2, 3, 4, 0), (4, 1, 2, 3)) - x589 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x589 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x589 += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 5, 2), (4, 3, 5, 0)) del x4 - x590 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x590 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x590 += einsum(t2.abab, (0, 1, 2, 3), x32, (4, 5, 0, 2), (1, 3, 4, 5)) - x591 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x591 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x591 += einsum(t2.abab, (0, 1, 2, 3), x104, (3, 4, 5, 2), (1, 4, 5, 0)) del x104 - x592 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x592 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x592 += einsum(x13, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 0, 2)) del x13 - x593 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x593 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x593 += einsum(v.aabb.ooov, (0, 1, 2, 3), x113, (2, 4, 3, 5), (4, 5, 0, 1)) * 2.0 - x594 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x594 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x594 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x594 += einsum(x588, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x588 @@ -2489,30 +2490,30 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x592 x594 += einsum(x593, (0, 1, 2, 3), (0, 1, 3, 2)) del x593 - x595 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x595 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x595 += einsum(t2.aaaa, (0, 1, 2, 3), x594, (4, 5, 1, 6), (4, 5, 0, 6, 2, 3)) * -2.0 del x594 - x596 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x596 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x596 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x596 += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x121 - x597 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x597 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x597 += einsum(x596, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 0, 7), (5, 1, 4, 3, 6, 7)) * -2.0 del x596 - x598 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x598 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x598 += einsum(x214, (0, 1, 2, 3), (0, 2, 1, 3)) del x214 x598 += einsum(x240, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x240 x598 += einsum(x241, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 del x241 - x599 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x599 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x599 += einsum(t2.abab, (0, 1, 2, 3), x598, (4, 5, 6, 2), (1, 3, 4, 0, 5, 6)) * 2.0 del x598 - x600 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x600 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x600 += einsum(x567, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 6, 7), (1, 6, 4, 3, 5, 7)) * -2.0 del x567 - x601 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x601 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x601 += einsum(f.aa.oo, (0, 1), (0, 1)) x601 += einsum(x30, (0, 1), (0, 1)) del x30 @@ -2520,24 +2521,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x31 x601 += einsum(x34, (0, 1), (1, 0)) del x34 - x602 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x602 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x602 += einsum(x601, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (3, 5, 2, 0, 4, 6)) * -2.0 del x601 - x603 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x603 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x603 += einsum(t1.bb, (0, 1), x136, (2, 0, 3, 4), (2, 1, 3, 4)) del x136 - x604 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x604 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x604 += einsum(t2.abab, (0, 1, 2, 3), x55, (4, 0, 5, 2), (1, 3, 4, 5)) - x605 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x605 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x605 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x605 += einsum(x127, (0, 1, 2, 3), (0, 1, 2, 3)) - x606 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x606 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x606 += einsum(t1.aa, (0, 1), x605, (2, 3, 4, 1), (2, 3, 4, 0)) del x605 - x607 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x607 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x607 += einsum(x113, (0, 1, 2, 3), x23, (0, 2, 4, 5), (1, 3, 4, 5)) * 2.0 del x23 - x608 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x608 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x608 += einsum(x603, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x603 x608 += einsum(x604, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -2546,13 +2547,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x606 x608 += einsum(x607, (0, 1, 2, 3), (0, 1, 2, 3)) del x607 - x609 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x609 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x609 += einsum(t2.aaaa, (0, 1, 2, 3), x608, (4, 5, 6, 1), (4, 5, 0, 6, 2, 3)) * -2.0 del x608 - x610 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x610 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x610 += einsum(x251, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 6), (3, 5, 2, 1, 4, 6)) * -2.0 del x251 - x611 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x611 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x611 += einsum(x584, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 del x584 x611 += einsum(x586, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) @@ -2576,7 +2577,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_abaaba += einsum(x611, (0, 1, 2, 3, 4, 5), (2, 0, 3, 4, 1, 5)) * -1.0 t3new_abaaba += einsum(x611, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) del x611 - x612 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x612 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x612 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x612 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x612 += einsum(x111, (0, 1, 2, 3), (1, 0, 3, 2)) * 1.00000000000001 @@ -2588,10 +2589,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x116 t3new_abaaba += einsum(x612, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 2, 7), (4, 1, 5, 6, 3, 7)) * 2.0 del x612 - x613 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x613 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x613 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x613 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.4999999999999949 - x614 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x614 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x614 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x614 += einsum(x511, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x511 @@ -2602,14 +2603,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x613 t3new_abaaba += einsum(x614, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 7, 3), (4, 0, 5, 6, 1, 7)) * 6.0 del x614 - x615 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x615 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x615 += einsum(v.aaaa.vvvv, (0, 1, 2, 3), (0, 1, 2, 3)) x615 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 5), (5, 2, 3, 4)) * -1.0 x615 += einsum(t1.aa, (0, 1), x109, (0, 2, 3, 4), (4, 1, 2, 3)) * -1.0 del x109 t3new_abaaba += einsum(x615, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 0, 7, 3), (4, 5, 6, 2, 7, 1)) * -2.0 del x615 - x616 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x616 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x616 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x616 += einsum(x49, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 x616 += einsum(x49, (0, 1, 2, 3), (2, 1, 3, 0)) @@ -2618,35 +2619,35 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x99 t3new_abaaba += einsum(x616, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 5, 6, 7), (1, 4, 3, 5, 6, 7)) * 2.0 del x616 - x617 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x617 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x617 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x617 += einsum(x50, (0, 1, 2, 3), (1, 0, 2, 3)) del x50 - x618 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x618 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x618 += einsum(t2.aaaa, (0, 1, 2, 3), x32, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x32 - x619 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x619 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x619 += einsum(t2.aaaa, (0, 1, 2, 3), x55, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x55 - x620 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x620 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x620 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x620 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x620 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) del x37 - x621 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x621 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x621 += einsum(t1.aa, (0, 1), x620, (2, 3, 1, 4), (2, 3, 0, 4)) del x620 - x622 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x622 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x622 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x622 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) del x25 - x623 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x623 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x623 += einsum(t1.aa, (0, 1), x622, (2, 3, 4, 1), (2, 3, 4, 0)) del x622 - x624 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x624 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x624 += einsum(t1.aa, (0, 1), x623, (2, 0, 3, 4), (4, 2, 3, 1)) del x623 - x625 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x625 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x625 += einsum(x48, (0, 1, 2, 3), (0, 2, 1, 3)) del x48 x625 += einsum(x52, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -2659,7 +2660,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x621 x625 += einsum(x624, (0, 1, 2, 3), (0, 2, 1, 3)) del x624 - x626 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x626 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x626 += einsum(x617, (0, 1, 2, 3), (0, 1, 2, 3)) x626 += einsum(x617, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x617 @@ -2670,52 +2671,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x80 x626 += einsum(x295, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x295 - x627 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x627 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x627 += einsum(t2.abab, (0, 1, 2, 3), x626, (0, 4, 5, 6), (1, 3, 4, 5, 6, 2)) del x626 t3new_abaaba += einsum(x627, (0, 1, 2, 3, 4, 5), (3, 0, 2, 4, 1, 5)) * -1.0 t3new_abaaba += einsum(x627, (0, 1, 2, 3, 4, 5), (3, 0, 2, 5, 1, 4)) del x627 - x628 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x628 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x628 += einsum(t2.bbbb, (0, 1, 2, 3), x430, (1, 4, 3, 5), (0, 4, 5, 2)) * 2.0 del x430 - x629 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x629 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x629 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x629 += einsum(x331, (0, 1, 2, 3), (0, 1, 3, 2)) del x331 x629 += einsum(x628, (0, 1, 2, 3), (0, 3, 1, 2)) * -1.0 del x628 - x630 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x630 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x630 += einsum(t2.bbbb, (0, 1, 2, 3), x629, (4, 5, 3, 6), (4, 0, 1, 5, 6, 2)) * -2.0 del x629 - x631 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x631 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x631 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x632 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x632 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x632 += einsum(t1.bb, (0, 1), x631, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x631 - x633 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x633 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x633 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x633 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x633 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) x633 += einsum(x335, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x335 - x634 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x634 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x634 += einsum(t2.bbbb, (0, 1, 2, 3), x633, (4, 5, 6, 3), (4, 5, 0, 1, 6, 2)) * -1.0 del x633 - x635 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x635 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x635 += einsum(x632, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) del x632 x635 += einsum(x634, (0, 1, 2, 3, 4, 5), (3, 2, 1, 0, 5, 4)) * -1.0 del x634 - x636 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x636 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x636 += einsum(t1.bb, (0, 1), x635, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x635 - x637 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x637 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x637 += einsum(x630, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x630 x637 += einsum(x636, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x636 - t3new_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + t3new_bbbbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) t3new_bbbbbb += einsum(x637, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 t3new_bbbbbb += einsum(x637, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) t3new_bbbbbb += einsum(x637, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) @@ -2735,18 +2736,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x637, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_bbbbbb += einsum(x637, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x637 - x638 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x638 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x638 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 7), (4, 5, 2, 6, 7, 3)) - x639 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x639 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x639 += einsum(t2.bbbb, (0, 1, 2, 3), x402, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) del x402 - x640 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x640 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x640 += einsum(t2.bbbb, (0, 1, 2, 3), x167, (4, 5, 1, 6), (4, 5, 0, 2, 3, 6)) del x167 - x641 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x641 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x641 += einsum(x14, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 2), (4, 5, 1, 6, 7, 3)) * 6.0 del x14 - x642 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x642 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x642 += einsum(x638, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 del x638 x642 += einsum(x639, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -4.0 @@ -2765,23 +2766,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x642, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -1.0 t3new_bbbbbb += einsum(x642, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x642 - x643 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x643 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x643 += einsum(x127, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 3, 7), (0, 4, 5, 6, 7, 1)) del x127 - x644 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x644 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x644 += einsum(t2.bbbb, (0, 1, 2, 3), x382, (4, 5, 6, 3), (4, 0, 1, 5, 6, 2)) * -1.0 del x382 - x645 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x645 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x645 += einsum(x182, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 3), (4, 5, 1, 6, 7, 2)) * -6.0 - x646 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x646 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x646 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) del x168 x646 += einsum(x169, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 del x169 - x647 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x647 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x647 += einsum(t2.bbbb, (0, 1, 2, 3), x646, (4, 5, 1, 6), (4, 5, 0, 6, 2, 3)) * -12.0 del x646 - x648 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x648 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x648 += einsum(x643, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 del x643 x648 += einsum(x644, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -4.0 @@ -2800,9 +2801,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x648, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) t3new_bbbbbb += einsum(x648, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x648 - x649 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x649 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x649 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 1, 3), (4, 5, 6, 0, 7, 2)) - x650 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x650 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x650 += einsum(t1.bb, (0, 1), x649, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x649 t3new_bbbbbb += einsum(x650, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 6.0 @@ -2812,15 +2813,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x650, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x650, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x650 - x651 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x651 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x651 += einsum(x440, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) * 6.0 del x440 - x652 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x652 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x652 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 1), (4, 5, 6, 0, 2, 7)) * -1.0 - x653 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x653 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x653 += einsum(x470, (0, 1, 2, 3), x652, (4, 5, 6, 0, 1, 7), (4, 5, 6, 2, 3, 7)) * 6.0 del x470, x652 - x654 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x654 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x654 += einsum(x651, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) del x651 x654 += einsum(x653, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -2829,27 +2830,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x654, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 t3new_bbbbbb += einsum(x654, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) del x654 - x655 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x655 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x655 += einsum(t2.bbbb, (0, 1, 2, 3), x157, (4, 5, 3, 6), (4, 0, 1, 2, 6, 5)) del x157 - x656 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x656 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x656 += einsum(t2.bbbb, (0, 1, 2, 3), x1, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) del x1 - x657 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x657 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x657 += einsum(t1.bb, (0, 1), x656, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) del x656 - x658 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x658 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x658 += einsum(t2.bbbb, (0, 1, 2, 3), x182, (4, 5, 6, 3), (5, 4, 0, 1, 6, 2)) del x182 - x659 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x659 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x659 += einsum(x657, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -1.0 del x657 x659 += einsum(x658, (0, 1, 2, 3, 4, 5), (0, 3, 2, 1, 5, 4)) * -1.0 del x658 - x660 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x660 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x660 += einsum(t1.bb, (0, 1), x659, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x659 - x661 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x661 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x661 += einsum(x655, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 del x655 x661 += einsum(x660, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 @@ -2873,9 +2874,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x661, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) t3new_bbbbbb += einsum(x661, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x661 - x662 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x662 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x662 += einsum(v.bbbb.oooo, (0, 1, 2, 3), t3.bbbbbb, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 6, 7)) * -1.0 - x663 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x663 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x663 += einsum(f.bb.oo, (0, 1), (0, 1)) x663 += einsum(x16, (0, 1), (1, 0)) * 2.0 del x16 @@ -2883,10 +2884,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x17 x663 += einsum(x20, (0, 1), (0, 1)) del x20 - x664 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x664 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x664 += einsum(x663, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * 6.0 del x663 - x665 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x665 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x665 += einsum(x662, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 del x662 x665 += einsum(x664, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) @@ -2895,9 +2896,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x665, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_bbbbbb += einsum(x665, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) del x665 - x666 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x666 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x666 += einsum(v.bbbb.vvvv, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 1), (4, 5, 6, 7, 0, 2)) * -1.0 - x667 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x667 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x667 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x667 += einsum(x142, (0, 1), (1, 0)) * 2.0 del x142 @@ -2905,10 +2906,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x143 x667 += einsum(x145, (0, 1), (0, 1)) del x145 - x668 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x668 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x668 += einsum(x667, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) * 6.0 del x667 - x669 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x669 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x669 += einsum(x666, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x666 x669 += einsum(x668, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -1.0 @@ -2917,17 +2918,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x669, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 t3new_bbbbbb += einsum(x669, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x669 - x670 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x670 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x670 += einsum(x210, (0, 1, 2, 3), (1, 0, 3, 2)) del x210 x670 += einsum(x171, (0, 1, 2, 3), (0, 1, 2, 3)) - x671 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x671 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x671 += einsum(x670, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 6, 7), (4, 0, 1, 5, 6, 7)) * -6.0 del x670 - x672 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x672 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x672 += einsum(x417, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) * 6.0 del x417 - x673 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x673 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x673 += einsum(x671, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) del x671 x673 += einsum(x672, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -1.0 @@ -2936,31 +2937,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x673, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -1.0 t3new_bbbbbb += einsum(x673, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -1.0 del x673 - x674 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x674 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x674 += einsum(x403, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x403 x674 += einsum(x404, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 del x404 - x675 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x675 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x675 += einsum(t2.bbbb, (0, 1, 2, 3), x674, (4, 5, 6, 3), (4, 0, 1, 5, 6, 2)) * -12.0 del x674 - x676 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x676 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x676 += einsum(v.aabb.ovoo, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 7), (4, 5, 2, 3, 6, 7)) - x677 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x677 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x677 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x677 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x678 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x678 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x678 += einsum(x677, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 3), (4, 5, 1, 2, 6, 7)) del x677 - x679 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x679 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x679 += einsum(x676, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -0.3333333333333333 del x676 x679 += einsum(x678, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x678 - x680 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x680 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x680 += einsum(t1.bb, (0, 1), x679, (2, 3, 0, 4, 5, 6), (2, 3, 4, 5, 6, 1)) * 6.0 del x679 - x681 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x681 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x681 += einsum(x675, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -1.0 del x675 x681 += einsum(x680, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -2975,35 +2976,35 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x681, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) t3new_bbbbbb += einsum(x681, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x681 - x682 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x682 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x682 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0000000000000204 x682 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - x683 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x683 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x683 += einsum(x682, (0, 1, 2, 3), x7, (0, 4, 2, 5), (4, 1, 5, 3)) * 0.4999999999999949 del x7, x682 - x684 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x684 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x684 += einsum(x111, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.49999999999999983 del x111 x684 += einsum(x683, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x683 - x685 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x685 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x685 += einsum(x684, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) * 12.000000000000123 del x684 - x686 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x686 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x686 += einsum(t2.abab, (0, 1, 2, 3), x11, (0, 4, 2, 5), (1, 3, 4, 5)) * 0.5 del x11 - x687 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x687 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x687 += einsum(v.aabb.ovov, (0, 1, 2, 3), x315, (2, 4, 3, 5), (4, 5, 0, 1)) del x315 - x688 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x688 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x688 += einsum(x686, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x686 x688 += einsum(x687, (0, 1, 2, 3), (0, 1, 2, 3)) del x687 - x689 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x689 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x689 += einsum(x688, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 3, 7), (0, 4, 5, 1, 6, 7)) * 4.00000000000004 del x688 - x690 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x690 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x690 += einsum(x685, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x685 x690 += einsum(x689, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -3018,7 +3019,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x690, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) t3new_bbbbbb += einsum(x690, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -1.0 del x690 - x691 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x691 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x691 += einsum(x184, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 6, 7), (0, 4, 1, 5, 6, 7)) del x184 t3new_bbbbbb += einsum(x691, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 @@ -3028,34 +3029,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, t3new_bbbbbb += einsum(x691, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x691, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 del x691 - x692 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x692 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x692 += einsum(t1.bb, (0, 1), v.bbbb.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x693 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x693 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x693 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x694 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x694 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x694 += einsum(x692, (0, 1, 2, 3), (0, 2, 1, 3)) del x692 x694 += einsum(x693, (0, 1, 2, 3), (0, 2, 1, 3)) * 2.0 del x693 x694 += einsum(x186, (0, 1, 2, 3), (0, 2, 1, 3)) del x186 - x695 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x695 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x695 += einsum(t1.bb, (0, 1), x171, (2, 3, 0, 4), (3, 2, 4, 1)) del x171 - x696 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x696 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x696 += einsum(t2.bbbb, (0, 1, 2, 3), x412, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x412 - x697 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x697 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x697 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x697 += einsum(x177, (0, 1, 2, 3), (1, 0, 2, 3)) del x177 - x698 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x698 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x698 += einsum(t1.bb, (0, 1), x697, (2, 3, 1, 4), (2, 3, 0, 4)) del x697 - x699 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x699 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x699 += einsum(v.bbbb.ooov, (0, 1, 2, 3), x113, (1, 4, 3, 5), (4, 0, 2, 5)) * 2.0 del x113 - x700 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x700 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x700 += einsum(x695, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x695 x700 += einsum(x187, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -3066,7 +3067,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x698 x700 += einsum(x699, (0, 1, 2, 3), (0, 1, 2, 3)) del x699 - x701 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x701 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x701 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x701 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x701 += einsum(x694, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -3082,7 +3083,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x170 x701 += einsum(x480, (0, 1, 2, 3), (1, 0, 2, 3)) del x480 - x702 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x702 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x702 += einsum(t2.bbbb, (0, 1, 2, 3), x701, (4, 5, 1, 6), (4, 5, 0, 6, 2, 3)) * -2.0 del x701 t3new_bbbbbb += einsum(x702, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) @@ -3114,21 +3115,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new = Namespace() # L amplitudes - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum(f.bb.ov, (0, 1), (1, 0)) l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (3, 0, 4, 1), (4, 2)) * -2.0 - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum(f.aa.ov, (0, 1), (1, 0)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(l1.aa, (0, 1), v.aabb.vvov, (2, 0, 3, 4), (2, 4, 1, 3)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (1, 3, 0, 2)) l2new_abab += einsum(l1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 0), (3, 4, 2, 1)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 0, 5, 1), (4, 5, 2, 3)) * 2.0 - l3new_aaaaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + l3new_aaaaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (0, 5, 3, 1, 2, 4)) * -1.0 l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (0, 3, 5, 1, 2, 4)) l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (5, 0, 3, 1, 2, 4)) @@ -3147,11 +3148,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (3, 0, 5, 2, 4, 1)) * -1.0 l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (5, 3, 0, 2, 4, 1)) * -1.0 l3new_aaaaaa += einsum(l1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) - l3new_babbab = np.zeros((nvir[1], nvir[0], nvir[1], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + l3new_babbab = np.zeros((nvir[1], nvir[0], nvir[1], nocc[1], nocc[0], nocc[1]), dtype=types[float]) l3new_babbab += einsum(v.bbbb.vvvv, (0, 1, 2, 3), l3.babbab, (3, 4, 1, 5, 6, 7), (0, 4, 2, 5, 6, 7)) * -2.0 - l3new_abaaba = np.zeros((nvir[0], nvir[1], nvir[0], nocc[0], nocc[1], nocc[0]), dtype=np.float64) + l3new_abaaba = np.zeros((nvir[0], nvir[1], nvir[0], nocc[0], nocc[1], nocc[0]), dtype=types[float]) l3new_abaaba += einsum(v.aaaa.vvvv, (0, 1, 2, 3), l3.abaaba, (1, 4, 3, 5, 6, 7), (0, 4, 2, 5, 6, 7)) * 2.0 - l3new_bbbbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + l3new_bbbbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (0, 5, 3, 1, 2, 4)) * -1.0 l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (0, 3, 5, 1, 2, 4)) l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (5, 0, 3, 1, 2, 4)) @@ -3170,68 +3171,68 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (3, 0, 5, 2, 4, 1)) * -1.0 l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (5, 3, 0, 2, 4, 1)) * -1.0 l3new_bbbbbb += einsum(l1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) - x0 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) l1new_bb += einsum(v.bbbb.vvvv, (0, 1, 2, 3), x0, (4, 3, 1, 2), (0, 4)) * -6.0 - x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x2 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x2 += einsum(t1.bb, (0, 1), x1, (2, 3, 4, 1), (3, 2, 4, 0)) l1new_bb += einsum(v.bbbb.ooov, (0, 1, 2, 3), x2, (4, 1, 0, 2), (3, 4)) * -2.0 - x3 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x4 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x4 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x4 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x4 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x4 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x5 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x5 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_abab += einsum(x1, (0, 1, 2, 3), x5, (1, 2, 4, 5), (5, 3, 4, 0)) * -2.0 - x6 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x6 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(l1.bb, (0, 1), x6, (1, 2, 3, 4), (4, 0, 3, 2)) * -1.0 - x7 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x8 += einsum(x7, (0, 1, 2, 3), (0, 1, 3, 2)) - x9 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x9 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x10 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x10 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x11 += einsum(t2.bbbb, (0, 1, 2, 3), x10, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 - x12 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x12 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x12 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x13 += einsum(t1.bb, (0, 1), x12, (2, 3, 1, 4), (0, 2, 3, 4)) - x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x14 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x14 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x14 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x14 += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x15 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) l2new_abab += einsum(l2.aaaa, (0, 1, 2, 3), x15, (4, 5, 3, 1), (0, 5, 2, 4)) * 2.0 - x16 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x16 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x17 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), x10, (1, 4, 3, 5), (4, 5, 0, 2)) - x18 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x18 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x18 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x18 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x19 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x19 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) - x20 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x20 += einsum(t1.bb, (0, 1), x10, (0, 2, 1, 3), (2, 3)) - x21 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x21 += einsum(f.bb.ov, (0, 1), (0, 1)) x21 += einsum(x19, (0, 1), (0, 1)) x21 += einsum(x20, (0, 1), (0, 1)) * -1.0 @@ -3250,49 +3251,49 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x21, (0, 1), l2.bbbb, (2, 3, 4, 5), (2, 1, 3, 4, 5, 0)) * -2.0 l3new_bbbbbb += einsum(x21, (0, 1), l2.bbbb, (2, 3, 4, 5), (2, 1, 3, 0, 4, 5)) * -2.0 l3new_bbbbbb += einsum(x21, (0, 1), l2.bbbb, (2, 3, 4, 5), (1, 2, 3, 4, 0, 5)) * -2.0 - x22 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) - x23 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 5, 2, 4)) - x24 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x24 += einsum(x22, (0, 1, 2, 3), (0, 1, 3, 2)) x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x25 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x25 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x26 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x26 += einsum(t1.bb, (0, 1), x3, (2, 3, 4, 1), (0, 2, 3, 4)) - x27 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x27 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x28 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x28 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(x25, (0, 1, 2, 3), (3, 1, 2, 0)) x28 += einsum(x26, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 x28 += einsum(x27, (0, 1, 2, 3), (2, 0, 3, 1)) * -1.0 x28 += einsum(x27, (0, 1, 2, 3), (3, 0, 2, 1)) - x29 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x30 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 0, 4)) - x31 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x31 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(l1.aa, (0, 1), x31, (2, 3, 1, 4), (0, 3, 4, 2)) * -1.0 - x32 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x32 += einsum(t1.bb, (0, 1), x31, (2, 1, 3, 4), (0, 2, 3, 4)) - x33 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x33 += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) x33 += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) x33 += einsum(x32, (0, 1, 2, 3), (0, 1, 3, 2)) - x34 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x34 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 3, 7, 1), (4, 6, 0, 2, 5, 7)) * -1.0 l2new_bbbb += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), x34, (3, 5, 6, 7, 4, 1), (0, 2, 6, 7)) * 1.9999999999999203 - x35 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x35 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 6, 3), (1, 4, 5, 6, 0, 2)) - x36 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 6, 3), (4, 1, 6, 5, 0, 2)) - x37 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x37 += einsum(x34, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -0.9999999999999601 del x34 x37 += einsum(x35, (0, 1, 2, 3, 4, 5), (1, 0, 2, 3, 4, 5)) @@ -3301,19 +3302,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x37 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x37 += einsum(x36, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x36 - x38 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (4, 6, 2, 7, 5, 0)) l2new_abab += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), x38, (5, 3, 6, 2, 4, 7), (1, 0, 7, 6)) * 1.9999999999999194 - x39 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x39 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x39 += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) - x40 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(t2.abab, (0, 1, 2, 3), x39, (4, 5, 6, 2), (1, 4, 5, 3, 0, 6)) - x41 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(x38, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 0.9999999999999597 x41 += einsum(t2.bbbb, (0, 1, 2, 3), x31, (4, 3, 5, 6), (0, 1, 4, 2, 6, 5)) x41 += einsum(x40, (0, 1, 2, 3, 4, 5), (2, 0, 1, 3, 5, 4)) * -1.0 - x42 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x42 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 3, 7, 1), (0, 4, 6, 2, 5, 7)) * -0.9999999999999601 x42 += einsum(v.aabb.vvov, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (2, 4, 6, 7, 5, 0)) * -0.9999999999999597 x42 += einsum(x4, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (2, 4, 0, 6, 5, 7)) * -2.0 @@ -3331,21 +3332,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x41 l1new_bb += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), x42, (6, 3, 5, 2, 4, 1), (0, 6)) * -2.0 del x42 - x43 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x43 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x43 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x43 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x43 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) - x44 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x44 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (5, 2, 4, 6, 0, 7)) l2new_abab += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), x44, (4, 6, 5, 3, 7, 2), (0, 1, 7, 6)) * 1.9999999999999194 - x45 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum(t2.aaaa, (0, 1, 2, 3), x39, (4, 5, 6, 3), (4, 5, 0, 1, 6, 2)) * -1.0 - x46 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum(x44, (0, 1, 2, 3, 4, 5), (0, 1, 3, 4, 2, 5)) * 0.9999999999999597 x46 += einsum(t2.abab, (0, 1, 2, 3), x31, (4, 3, 5, 6), (1, 4, 0, 6, 5, 2)) * -1.0 x46 += einsum(x45, (0, 1, 2, 3, 4, 5), (1, 0, 3, 4, 2, 5)) * -1.0 - x47 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(v.aabb.vvov, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (2, 5, 4, 6, 7, 0)) * -1.9999999999999194 x47 += einsum(x43, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 7), (1, 0, 4, 5, 6, 7)) * -1.0 x47 += einsum(x6, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 7, 3), (1, 0, 4, 5, 6, 7)) * -3.0 @@ -3361,20 +3362,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x46 l1new_bb += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), x47, (6, 4, 3, 5, 0, 2), (1, 6)) del x47 - x48 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x48 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x48 += einsum(x25, (0, 1, 2, 3), (3, 1, 2, 0)) x48 += einsum(x26, (0, 1, 2, 3), (3, 1, 2, 0)) x48 += einsum(x27, (0, 1, 2, 3), (2, 1, 3, 0)) x48 += einsum(x27, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 1), (4, 5, 6, 0, 2, 7)) * -1.0 l2new_bbbb += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), x49, (5, 4, 3, 6, 7, 2), (0, 1, 6, 7)) * -5.9999999999997575 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x50 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum(t2.bbbb, (0, 1, 2, 3), x3, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x52 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x52 += einsum(x49, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.9999999999999596 del x49 x52 += einsum(x50, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 @@ -3383,7 +3384,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x52 += einsum(x51, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * -1.0 x52 += einsum(x51, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) del x51 - x53 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 1, 3), (0, 4, 5, 6, 7, 2)) * -0.9999999999999596 x53 += einsum(x43, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 7, 3), (1, 4, 0, 5, 6, 7)) * -1.5 del x43 @@ -3396,38 +3397,38 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x52 l1new_bb += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), x53, (6, 3, 5, 4, 2, 1), (0, 6)) * -6.0 del x53 - x54 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) - x55 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) - x56 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.babbab, (4, 6, 5, 1, 7, 2), (3, 0, 6, 7)) - x57 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 5, 4, 7, 2, 1), (3, 0, 6, 7)) - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), l3.babbab, (2, 1, 3, 4, 5, 6), (4, 6, 2, 3, 5, 0)) - x59 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.abab, (0, 1, 2, 3), x58, (4, 1, 5, 3, 0, 6), (4, 5, 6, 2)) - x60 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 3, 5, 7, 0, 2), (4, 1, 6, 7)) - x61 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t1.aa, (0, 1), l3.abaaba, (2, 3, 1, 4, 5, 6), (5, 3, 4, 6, 0, 2)) - x62 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(t2.aaaa, (0, 1, 2, 3), x61, (4, 5, 0, 1, 6, 3), (4, 5, 6, 2)) * -1.0 - x63 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x63 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x63 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) l2new_abab += einsum(x5, (0, 1, 2, 3), x63, (0, 4, 5, 2), (3, 4, 5, 1)) - x64 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x64 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 6, 1), (5, 4, 6, 0)) - x65 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x65 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (2, 4, 3, 5, 6, 1), (6, 4, 5, 0)) - x66 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x66 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x66 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x66 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) x66 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(v.aabb.ovvv, (0, 1, 2, 3), x66, (4, 3, 5, 0), (1, 2, 5, 4)) * -2.0 l2new_abab += einsum(v.aabb.ovoo, (0, 1, 2, 3), x66, (3, 4, 5, 0), (1, 4, 5, 2)) * 2.0 - x67 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x67 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x67 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x67 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -3439,59 +3440,59 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x67 += einsum(t1.aa, (0, 1), x66, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 l1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x67, (4, 3, 0, 1), (2, 4)) del x67 - x68 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) - x69 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (4, 5, 3, 0, 6, 1), (6, 5, 4, 2)) - x70 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (4, 3, 2, 1)) * 0.5 x70 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) x70 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) l1new_bb += einsum(v.aabb.vvvv, (0, 1, 2, 3), x70, (4, 3, 0, 1), (2, 4)) * 2.0 del x70 - x71 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x71 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x71 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x72 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x72 += einsum(t1.bb, (0, 1), l3.bbbbbb, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) l3new_babbab += einsum(v.aabb.ovoo, (0, 1, 2, 3), x72, (4, 2, 5, 3, 6, 7), (6, 1, 7, 5, 0, 4)) * -6.0 l3new_babbab += einsum(x5, (0, 1, 2, 3), x72, (0, 4, 5, 1, 6, 7), (7, 3, 6, 4, 2, 5)) * 6.0 - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(t2.bbbb, (0, 1, 2, 3), x72, (0, 4, 1, 5, 6, 3), (4, 5, 6, 2)) - x74 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum(t1.bb, (0, 1), l3.babbab, (2, 3, 1, 4, 5, 6), (4, 6, 0, 2, 5, 3)) l2new_abab += einsum(x22, (0, 1, 2, 3), x74, (0, 4, 1, 5, 6, 3), (2, 5, 6, 4)) * 2.0 - x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x75 += einsum(t2.abab, (0, 1, 2, 3), x74, (4, 1, 5, 6, 0, 2), (4, 5, 6, 3)) - x76 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x76 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) - x77 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x77 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) - x78 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x78 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) x78 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * -3.0 x78 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 l1new_bb += einsum(v.bbbb.oovv, (0, 1, 2, 3), x78, (0, 4, 1, 3), (2, 4)) * -2.0 - x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x79 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 x79 += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(t1.bb, (0, 1), x78, (0, 2, 3, 4), (2, 3, 4, 1)) l1new_bb += einsum(x71, (0, 1, 2, 3), x79, (4, 0, 2, 1), (3, 4)) * 2.0 del x79 - x80 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x80 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x81 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) - x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) - x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) - x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x85 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) - x86 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x86 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 x86 += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) x86 += einsum(x83, (0, 1, 2, 3), (0, 1, 2, 3)) * 9.0 @@ -3499,31 +3500,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x86 += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) l1new_bb += einsum(x80, (0, 1, 2, 3), x86, (4, 0, 2, 1), (3, 4)) del x86 - x87 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x87 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) - x88 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 0, 7, 2), (3, 6, 1, 7)) - x89 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum(t2.abab, (0, 1, 2, 3), x74, (4, 1, 5, 3, 0, 6), (4, 5, 6, 2)) * -1.0 - x90 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x90 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 7, 1, 2), (4, 6, 0, 7)) - x91 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum(t1.bb, (0, 1), l3.abaaba, (2, 1, 3, 4, 5, 6), (5, 0, 4, 6, 2, 3)) l3new_abaaba += einsum(x21, (0, 1), x91, (2, 0, 3, 4, 5, 6), (5, 1, 6, 4, 2, 3)) * 2.0 - x92 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x92 += einsum(t2.aaaa, (0, 1, 2, 3), x91, (4, 5, 0, 1, 3, 6), (4, 5, 6, 2)) * -1.0 - x93 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x93 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) l2new_abab += einsum(x7, (0, 1, 2, 3), x93, (4, 0, 2, 5), (5, 1, 3, 4)) - x94 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x94 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (2, 4, 3, 5, 6, 1), (5, 0, 6, 4)) - x95 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x95 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 6, 0), (6, 1, 5, 4)) - x96 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x96 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) x96 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x96 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x97 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum(x87, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x97 += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) x97 += einsum(x89, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -3532,59 +3533,59 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x97 += einsum(t1.aa, (0, 1), x96, (2, 3, 0, 4), (2, 3, 1, 4)) * 0.5 l1new_bb += einsum(v.aabb.vvov, (0, 1, 2, 3), x97, (4, 2, 1, 0), (3, 4)) * -2.0 del x97 - x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x98 += einsum(t1.bb, (0, 1), x58, (2, 3, 4, 1, 5, 6), (2, 3, 0, 4, 5, 6)) - x99 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x99 += einsum(t1.bb, (0, 1), x61, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) - x100 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) del x68 x100 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) del x69 l2new_abab += einsum(v.aabb.ovvv, (0, 1, 2, 3), x100, (4, 3, 5, 1), (5, 2, 0, 4)) * -2.0 l2new_abab += einsum(x100, (0, 1, 2, 3), x6, (0, 4, 5, 3), (2, 1, 5, 4)) * 2.0 - x101 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x101 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) x101 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x101 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 l1new_bb += einsum(v.aabb.oovv, (0, 1, 2, 3), x101, (4, 3, 0, 1), (2, 4)) * -1.0 - x102 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x102 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) - x103 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x103 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 7, 5, 0, 1, 2), (3, 6, 4, 7)) - x104 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x104 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 7, 5, 0, 1, 2), (4, 7, 3, 6)) - x105 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), x101, (2, 1, 3, 4), (0, 2, 3, 4)) - x106 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x106 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) x106 += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) - x107 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), x106, (2, 3, 4, 1), (2, 3, 0, 4)) * 2.0 - x108 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x108 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x108 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) x108 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 x108 += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 x108 += einsum(x105, (0, 1, 2, 3), (1, 0, 2, 3)) x108 += einsum(x107, (0, 1, 2, 3), (0, 1, 3, 2)) l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x108, (4, 2, 5, 0), (1, 3, 5, 4)) - x109 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x109 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x110 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x110 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x111 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x111 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 4, 5, 0, 1, 2), (3, 6)) - x112 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x112 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x112 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 0, 1, 2), (3, 6)) - x113 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x113 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 0, 1, 2), (4, 6)) - x114 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x114 += einsum(x109, (0, 1), (0, 1)) x114 += einsum(x110, (0, 1), (0, 1)) * 0.5 x114 += einsum(x111, (0, 1), (0, 1)) * 1.4999999999999394 x114 += einsum(x112, (0, 1), (0, 1)) * 0.9999999999999597 x114 += einsum(x113, (0, 1), (0, 1)) * 0.49999999999998007 - x115 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) x115 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) x115 += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (4, 5, 3, 0, 6, 1), (2, 4, 5, 6)) * 2.0 @@ -3606,46 +3607,46 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x115 += einsum(t1.aa, (0, 1), x114, (2, 3), (2, 3, 0, 1)) * 2.0 l1new_bb += einsum(v.aabb.ovov, (0, 1, 2, 3), x115, (4, 2, 0, 1), (3, 4)) * -1.0 del x115 - x116 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 5, 6, 0, 1), (6, 4, 5, 3)) - x117 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x117 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) x117 += einsum(x116, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_bb += einsum(v.bbbb.vvvv, (0, 1, 2, 3), x117, (4, 1, 2, 3), (0, 4)) * 2.0 del x117 - x118 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) - x119 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x119 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 5, 3), (1, 5, 0, 4)) - x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x120 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 1, 6, 3), (4, 0, 5, 6)) - x121 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x121 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 3, 1), (5, 2, 4, 6)) - x122 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x122 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x122 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x122 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) x122 += einsum(x3, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x123 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x123 += einsum(t2.abab, (0, 1, 2, 3), x122, (4, 5, 1, 3), (4, 5, 0, 2)) - x124 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x124 += einsum(t2.aaaa, (0, 1, 2, 3), x39, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 - x125 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x125 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 3, 0, 5), (1, 4, 5, 2)) - x126 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x126 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x126 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) - x127 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x127 += einsum(t1.bb, (0, 1), x126, (2, 1, 3, 4), (0, 2, 3, 4)) - x128 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x128 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x128 += einsum(x29, (0, 1, 2, 3), (1, 0, 3, 2)) x128 += einsum(x30, (0, 1, 2, 3), (1, 0, 3, 2)) x128 += einsum(x32, (0, 1, 2, 3), (1, 0, 3, 2)) del x32 - x129 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x129 += einsum(t1.aa, (0, 1), x128, (2, 3, 0, 4), (2, 3, 4, 1)) - x130 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x130 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x130 += einsum(x118, (0, 1, 2, 3), (1, 0, 2, 3)) x130 += einsum(x119, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -3659,27 +3660,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x130 += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x130, (3, 4, 2, 0), (1, 4)) * -1.0 del x130 - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x72, (6, 2, 1, 7, 4, 5), (6, 7, 0, 3)) * -1.0 - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(t1.bb, (0, 1), x72, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x133 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x74, (6, 2, 7, 5, 1, 4), (6, 7, 0, 3)) * -1.0 - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x134 += einsum(t1.bb, (0, 1), x74, (2, 3, 4, 1, 5, 6), (2, 3, 0, 4, 5, 6)) - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x91, (6, 7, 0, 2, 3, 5), (6, 7, 1, 4)) - x136 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x136 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x136 += einsum(x116, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 - x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x137 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x137 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 x137 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(v.aabb.ovoo, (0, 1, 2, 3), x137, (2, 4, 3, 5), (1, 5, 0, 4)) * 2.0 - x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x138 += einsum(t2.bbbb, (0, 1, 2, 3), x137, (4, 1, 5, 3), (0, 4, 5, 2)) * 4.0 - x139 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x139 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x139 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) del x94 @@ -3689,21 +3690,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_abab += einsum(v.aabb.vvov, (0, 1, 2, 3), x139, (4, 2, 5, 1), (0, 3, 5, 4)) * -2.0 l2new_abab += einsum(v.aabb.ooov, (0, 1, 2, 3), x139, (4, 2, 1, 5), (5, 3, 0, 4)) * 2.0 l2new_abab += einsum(x21, (0, 1), x139, (2, 0, 3, 4), (4, 1, 3, 2)) * -2.0 - x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x140 += einsum(t2.abab, (0, 1, 2, 3), x139, (4, 5, 0, 2), (1, 4, 5, 3)) * 2.0 - x141 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x141 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - x142 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x142 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) - x143 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x143 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 7, 0, 1, 2), (3, 5, 6, 7)) l2new_bbbb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x143, (4, 5, 0, 2), (1, 3, 4, 5)) * 1.9999999999999203 - x144 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x144 += einsum(x141, (0, 1, 2, 3), (1, 0, 3, 2)) x144 += einsum(x142, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.9999999999998788 x144 += einsum(x143, (0, 1, 2, 3), (0, 1, 3, 2)) * -0.9999999999999601 x144 += einsum(t1.bb, (0, 1), x137, (2, 3, 4, 1), (2, 3, 0, 4)) - x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x145 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 x145 += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 3, 6, 0, 1), (4, 2, 5, 6)) * 6.0 x145 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * 6.0 @@ -3721,32 +3722,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x145 += einsum(t1.bb, (0, 1), x114, (2, 3), (0, 2, 3, 1)) * 2.0 l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x145, (0, 4, 2, 1), (3, 4)) * -1.0 del x145 - x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x146 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x147 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 1, 3), (4, 5, 0, 6)) - x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 2, 6)) - x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x149 += einsum(t2.bbbb, (0, 1, 2, 3), x4, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x4 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum(t2.abab, (0, 1, 2, 3), x6, (4, 5, 0, 2), (1, 4, 5, 3)) - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 += einsum(x21, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x153 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x153 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x153 += einsum(x152, (0, 1, 2, 3), (0, 1, 2, 3)) - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum(t1.bb, (0, 1), x153, (2, 3, 1, 4), (0, 2, 3, 4)) del x153 - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 += einsum(t1.bb, (0, 1), x28, (0, 2, 3, 4), (2, 3, 4, 1)) del x28 - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x156 += einsum(x146, (0, 1, 2, 3), (2, 1, 0, 3)) x156 += einsum(x147, (0, 1, 2, 3), (2, 1, 0, 3)) * -3.0 @@ -3758,12 +3759,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x156 += einsum(x155, (0, 1, 2, 3), (1, 2, 0, 3)) l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x156, (4, 2, 3, 1), (0, 4)) * 2.0 del x156 - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x157 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) x157 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 - x158 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x158 += einsum(t1.bb, (0, 1), x157, (2, 3, 4, 1), (0, 2, 3, 4)) - x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x159 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) * 2.0 x159 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 0, 1), (3, 4, 5, 6)) * 2.0 x159 += einsum(x131, (0, 1, 2, 3), (0, 2, 1, 3)) * 9.0 @@ -3781,17 +3782,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x114 l1new_bb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x159, (4, 0, 2, 3), (1, 4)) del x159 - x160 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x160 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x161 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x162 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x162 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x163 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x163 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (3, 4, 5, 6, 1, 2), (0, 6)) - x164 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 6, 1, 2), (0, 6)) - x165 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(x160, (0, 1), (0, 1)) x165 += einsum(x161, (0, 1), (0, 1)) * 2.0 x165 += einsum(x162, (0, 1), (0, 1)) @@ -3799,36 +3800,36 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x165 += einsum(x164, (0, 1), (0, 1)) * 1.9999999999999194 l1new_bb += einsum(x165, (0, 1), x12, (2, 3, 1, 0), (3, 2)) * -1.0 del x165 - x166 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x166 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x167 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x167 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x168 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x168 += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 0, 1), (4, 5)) - x169 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x169 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 3, 5, 0, 1), (4, 5)) - x170 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x170 += einsum(l2.aaaa, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 0, 5, 1), (4, 5)) - x171 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x171 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x72, (0, 1, 2, 6, 4, 5), (6, 3)) - x172 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x172 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x74, (0, 2, 6, 5, 1, 4), (6, 3)) * -1.0 - x173 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x173 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x91, (1, 6, 0, 2, 3, 5), (6, 4)) - x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x174 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x174 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.9999999999999996 x174 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) - x175 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x175 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) - x176 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x176 += einsum(x175, (0, 1), (0, 1)) x176 += einsum(x109, (0, 1), (0, 1)) * 2.0 x176 += einsum(x110, (0, 1), (0, 1)) x176 += einsum(x111, (0, 1), (0, 1)) * 2.9999999999998783 x176 += einsum(x112, (0, 1), (0, 1)) * 1.9999999999999192 x176 += einsum(x113, (0, 1), (0, 1)) * 0.99999999999996 - x177 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x177 += einsum(t1.bb, (0, 1), (0, 1)) * -0.5000000000000202 x177 += einsum(x166, (0, 1), (0, 1)) * -1.0000000000000404 x177 += einsum(x167, (0, 1), (0, 1)) * -0.5000000000000202 @@ -3843,24 +3844,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x177 += einsum(t2.abab, (0, 1, 2, 3), x139, (1, 4, 0, 2), (4, 3)) * 1.0000000000000404 x177 += einsum(t1.bb, (0, 1), x176, (0, 2), (2, 1)) * 0.5000000000000202 del x176 - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x178 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) l1new_bb += einsum(x177, (0, 1), x178, (0, 2, 1, 3), (3, 2)) * -1.9999999999999194 del x177, x178 - x179 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x179 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x180 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x180 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x181 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x181 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x182 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x182 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 0, 6, 2), (1, 6)) - x183 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x183 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 6, 1, 2), (0, 6)) - x184 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x184 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (3, 4, 5, 6, 1, 2), (0, 6)) - x185 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x185 += einsum(x179, (0, 1), (0, 1)) * 1.00000000000004 x185 += einsum(x180, (0, 1), (0, 1)) * 1.00000000000004 x185 += einsum(x181, (0, 1), (0, 1)) * 2.00000000000008 @@ -3869,57 +3870,57 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x185 += einsum(x184, (0, 1), (1, 0)) * 2.9999999999999982 l1new_bb += einsum(x185, (0, 1), v.aabb.vvov, (1, 0, 2, 3), (3, 2)) * 0.9999999999999601 del x185 - x186 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x186 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x187 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x187 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x188 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x188 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x188 += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 0, 5, 1), (4, 5)) - x189 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x189 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x189 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 2, 5, 1, 0), (4, 5)) - x190 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x190 += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 0, 1), (4, 5)) - x191 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x191 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x191 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x58, (0, 2, 3, 5, 1, 6), (6, 4)) - x192 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x192 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x61, (1, 4, 0, 2, 6, 5), (6, 3)) * -1.0 - x193 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x193 += einsum(t1.aa, (0, 1), l3.aaaaaa, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) l3new_abaaba += einsum(v.aabb.ooov, (0, 1, 2, 3), x193, (4, 0, 5, 1, 6, 7), (6, 3, 7, 5, 2, 4)) * -6.0 l3new_abaaba += einsum(x7, (0, 1, 2, 3), x193, (2, 4, 5, 3, 6, 7), (6, 1, 7, 4, 0, 5)) * -6.0 - x194 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x194 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x193, (0, 1, 2, 6, 4, 5), (6, 3)) - x195 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x195 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) l2new_abab += einsum(x195, (0, 1, 2, 3), x7, (4, 5, 1, 2), (3, 5, 0, 4)) * -2.0 - x196 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x196 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 1, 6), (5, 6, 0, 4)) - x197 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x197 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) - x198 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x198 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.33333333333333337 x198 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.33333333333333337 x198 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) - x199 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x199 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) - x200 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x200 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x201 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x201 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x202 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x202 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 0, 1, 2), (4, 6)) - x203 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x203 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 0, 1, 2), (3, 6)) - x204 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x204 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 4, 5, 0, 1, 2), (3, 6)) - x205 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x205 += einsum(x199, (0, 1), (0, 1)) x205 += einsum(x200, (0, 1), (0, 1)) x205 += einsum(x201, (0, 1), (0, 1)) * 2.0 x205 += einsum(x202, (0, 1), (0, 1)) * 0.99999999999996 x205 += einsum(x203, (0, 1), (0, 1)) * 1.9999999999999192 x205 += einsum(x204, (0, 1), (0, 1)) * 2.9999999999998783 - x206 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x206 += einsum(l1.aa, (0, 1), (1, 0)) * -1.00000000000004 x206 += einsum(t1.aa, (0, 1), (0, 1)) * -1.00000000000004 x206 += einsum(x186, (0, 1), (0, 1)) * -1.00000000000004 @@ -3935,7 +3936,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x206 += einsum(t1.aa, (0, 1), x205, (0, 2), (2, 1)) * 1.00000000000004 l1new_bb += einsum(x206, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (3, 2)) * -0.9999999999999601 del x206 - x207 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x207 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) x207 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 x207 += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 @@ -3945,38 +3946,38 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x107 l1new_bb += einsum(v.aabb.ooov, (0, 1, 2, 3), x207, (4, 2, 1, 0), (3, 4)) del x207 - x208 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x208 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x208 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x208, (0, 1, 2, 3), x96, (0, 1, 4, 5), (5, 3, 4, 2)) * -1.0 l3new_abaaba += einsum(x208, (0, 1, 2, 3), x91, (0, 1, 4, 5, 6, 7), (6, 3, 7, 5, 2, 4)) * 2.0 - x209 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x209 += einsum(t1.bb, (0, 1), x157, (2, 3, 4, 1), (2, 3, 0, 4)) * 3.0 l1new_bb += einsum(x208, (0, 1, 2, 3), x209, (4, 0, 2, 1), (3, 4)) * 2.0 del x209 - x210 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x210 += einsum(x141, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.00000000000004 x210 += einsum(x142, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.9999999999999982 x210 += einsum(x143, (0, 1, 2, 3), (0, 1, 3, 2)) del x143 l1new_bb += einsum(v.bbbb.ooov, (0, 1, 2, 3), x210, (1, 4, 2, 0), (3, 4)) * 1.9999999999999203 del x210 - x211 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x211 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 0, 6, 2), (1, 6)) l1new_bb += einsum(x211, (0, 1), x71, (2, 3, 0, 1), (3, 2)) * -0.9999999999999601 - x212 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x212 += einsum(x175, (0, 1), (0, 1)) * 0.5 x212 += einsum(x109, (0, 1), (0, 1)) x212 += einsum(x110, (0, 1), (0, 1)) * 0.5 x212 += einsum(x111, (0, 1), (0, 1)) * 1.4999999999999394 x212 += einsum(x112, (0, 1), (0, 1)) * 0.9999999999999597 - x213 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x213 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x213 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) l1new_bb += einsum(x212, (0, 1), x213, (0, 2, 1, 3), (3, 2)) * -2.0 del x212 l1new_bb += einsum(x113, (0, 1), x213, (0, 1, 2, 3), (3, 2)) * 0.9999999999999601 - x214 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x214 += einsum(x199, (0, 1), (0, 1)) x214 += einsum(x200, (0, 1), (0, 1)) x214 += einsum(x201, (0, 1), (0, 1)) * 2.0 @@ -3985,37 +3986,37 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x214 += einsum(x204, (0, 1), (1, 0)) * 2.9999999999998788 l1new_bb += einsum(x214, (0, 1), v.aabb.ooov, (1, 0, 2, 3), (3, 2)) * -1.0 del x214 - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x215 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_bb += einsum(l1.bb, (0, 1), x215, (1, 2, 0, 3), (3, 2)) * -1.0 del x215 - x216 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x216 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x216 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x217 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x217 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x217 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x218 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x218 += einsum(f.bb.vv, (0, 1), (0, 1)) x218 += einsum(x216, (0, 1), (1, 0)) x218 += einsum(t1.bb, (0, 1), x217, (0, 2, 1, 3), (3, 2)) * -1.0 l1new_bb += einsum(l1.bb, (0, 1), x218, (0, 2), (2, 1)) del x218 - x219 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x219 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x220 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x220 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 1, 3), (0, 4)) - x221 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x221 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x222 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x222 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x222 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x223 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x223 += einsum(t1.bb, (0, 1), x222, (2, 3, 0, 1), (2, 3)) del x222 - x224 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x224 += einsum(t1.bb, (0, 1), x21, (2, 1), (0, 2)) - x225 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x225 += einsum(f.bb.oo, (0, 1), (0, 1)) x225 += einsum(x219, (0, 1), (1, 0)) x225 += einsum(x220, (0, 1), (0, 1)) * 2.0 @@ -4027,7 +4028,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_abab += einsum(x225, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 l3new_abaaba += einsum(x225, (0, 1), l3.abaaba, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 del x225 - x226 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x226 += einsum(x175, (0, 1), (0, 1)) * 0.5000000000000202 x226 += einsum(x109, (0, 1), (0, 1)) * 1.0000000000000404 x226 += einsum(x110, (0, 1), (0, 1)) * 0.5000000000000202 @@ -4036,61 +4037,61 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x226 += einsum(x113, (0, 1), (0, 1)) * 0.5000000000000002 l1new_bb += einsum(f.bb.ov, (0, 1), x226, (2, 0), (1, 2)) * -1.9999999999999194 del x226 - x227 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x227 += einsum(x19, (0, 1), (0, 1)) x227 += einsum(x20, (0, 1), (0, 1)) * -1.0 l1new_bb += einsum(x175, (0, 1), x227, (1, 2), (2, 0)) * -1.0 - x228 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x228 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) l1new_aa += einsum(v.aaaa.vvvv, (0, 1, 2, 3), x228, (4, 1, 2, 3), (0, 4)) * 6.0 - x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x229 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x229, (1, 4, 2, 0), (3, 4)) * -5.9999999999997575 - x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x230 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x231 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x231 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x231 += einsum(x230, (0, 1, 2, 3), (0, 1, 2, 3)) x231 += einsum(x230, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x232 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x232 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x233 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x233 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x233 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x234 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x234 += einsum(t2.aaaa, (0, 1, 2, 3), x233, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0 - x235 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x235 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x235 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x235 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x236 += einsum(t1.aa, (0, 1), x235, (2, 3, 1, 4), (0, 2, 3, 4)) - x237 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x237 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x237 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x237 += einsum(x232, (0, 1, 2, 3), (0, 1, 2, 3)) x237 += einsum(x234, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x237 += einsum(x236, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x238 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x238 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_abab += einsum(l2.bbbb, (0, 1, 2, 3), x238, (3, 1, 4, 5), (5, 0, 4, 2)) * 2.0 - x239 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x239 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x239 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x240 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x240 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x240 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x241 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x241 += einsum(t2.abab, (0, 1, 2, 3), x240, (0, 4, 2, 5), (1, 3, 4, 5)) - x242 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x242 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x242 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) x242 += einsum(x239, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x242 += einsum(x241, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x243 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x243 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) - x244 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x244 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x244 += einsum(t1.aa, (0, 1), x240, (0, 2, 1, 3), (2, 3)) - x245 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x245 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x245 += einsum(f.aa.ov, (0, 1), (0, 1)) x245 += einsum(x243, (0, 1), (0, 1)) x245 += einsum(x244, (0, 1), (0, 1)) * -1.0 @@ -4111,48 +4112,48 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_abaaba += einsum(x245, (0, 1), l2.abab, (2, 3, 4, 5), (2, 3, 1, 4, 5, 0)) l3new_abaaba += einsum(x245, (0, 1), l2.abab, (2, 3, 4, 5), (2, 3, 1, 0, 5, 4)) * -1.0 l3new_abaaba += einsum(x245, (0, 1), l2.abab, (2, 3, 4, 5), (1, 3, 2, 4, 5, 0)) * -1.0 - x246 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x246 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x246 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 0, 2)) l2new_abab += einsum(x246, (0, 1, 2, 3), x61, (4, 1, 2, 5, 3, 6), (6, 0, 5, 4)) * 2.0 - x247 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x247 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x247 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (3, 5, 0, 4)) - x248 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x248 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x248 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x248 += einsum(x246, (0, 1, 2, 3), (1, 0, 2, 3)) x248 += einsum(x247, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x249 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x249 += einsum(t1.bb, (0, 1), x8, (2, 1, 3, 4), (0, 2, 3, 4)) - x250 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x250 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x250 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) x250 += einsum(x30, (0, 1, 2, 3), (1, 0, 2, 3)) x250 += einsum(x249, (0, 1, 2, 3), (1, 0, 3, 2)) - x251 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x251 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x252 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x252 += einsum(t1.aa, (0, 1), x230, (2, 3, 4, 1), (0, 2, 3, 4)) - x253 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x253 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x254 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x254 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x254 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x254 += einsum(x251, (0, 1, 2, 3), (3, 1, 2, 0)) x254 += einsum(x252, (0, 1, 2, 3), (3, 1, 2, 0)) x254 += einsum(x253, (0, 1, 2, 3), (2, 1, 3, 0)) x254 += einsum(x253, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 - x255 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x255 += einsum(x44, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 0.9999999999999597 del x44 x255 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 3, 5, 6), (1, 4, 0, 6, 5, 2)) * -1.0 x255 += einsum(x45, (0, 1, 2, 3, 4, 5), (1, 0, 3, 2, 4, 5)) * -1.0 del x45 - x256 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x256 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x256 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 3, 7, 1), (5, 7, 4, 6, 0, 2)) * -1.0 l2new_aaaa += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), x256, (4, 1, 5, 3, 6, 7), (0, 2, 6, 7)) * -1.9999999999999203 - x257 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x257 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x257 += einsum(t2.abab, (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 6, 2), (1, 3, 0, 4, 5, 6)) - x258 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x258 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x258 += einsum(t2.abab, (0, 1, 2, 3), x230, (4, 5, 6, 2), (1, 3, 4, 0, 6, 5)) - x259 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x259 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x259 += einsum(x256, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * 0.9999999999999601 del x256 x259 += einsum(x257, (0, 1, 2, 3, 4, 5), (0, 1, 4, 2, 3, 5)) @@ -4161,7 +4162,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x259 += einsum(x258, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) x259 += einsum(x258, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 del x258 - x260 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x260 += einsum(v.aabb.ovvv, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (5, 2, 0, 4, 6, 7)) * -0.9999999999999597 x260 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 3, 7, 1), (5, 7, 0, 4, 6, 2)) * -0.9999999999999601 x260 += einsum(x231, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (5, 7, 2, 4, 0, 6)) * -2.0 @@ -4179,18 +4180,18 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x259 l1new_aa += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), x260, (4, 1, 6, 5, 3, 2), (0, 6)) * 2.0 del x260 - x261 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x261 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x261 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x261 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x261 += einsum(x230, (0, 1, 2, 3), (1, 0, 2, 3)) x261 += einsum(x230, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x262 += einsum(x38, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 0.9999999999999597 del x38 x262 += einsum(t2.bbbb, (0, 1, 2, 3), x8, (4, 3, 5, 6), (0, 1, 4, 2, 6, 5)) x262 += einsum(x40, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) del x40 - x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x263 += einsum(v.aabb.ovvv, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (4, 6, 7, 2, 0, 5)) * -0.9999999999999597 x263 += einsum(x261, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 3, 7), (4, 5, 6, 7, 2, 1)) * -0.5 x263 += einsum(x31, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 1), (4, 5, 6, 7, 3, 2)) * -1.5 @@ -4206,25 +4207,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x262 l1new_aa += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), x263, (3, 5, 0, 2, 6, 4), (1, 6)) * 2.0 del x263 - x264 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x264 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x264 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x264 += einsum(x230, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x264 += einsum(x230, (0, 1, 2, 3), (2, 0, 1, 3)) - x265 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x265 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x265 += einsum(x251, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 x265 += einsum(x252, (0, 1, 2, 3), (2, 1, 3, 0)) x265 += einsum(x253, (0, 1, 2, 3), (2, 0, 3, 1)) x265 += einsum(x253, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x266 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x266 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 1, 3), (4, 5, 6, 0, 2, 7)) l2new_aaaa += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), x266, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 5.9999999999997575 - x267 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x267 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 6, 3), (0, 1, 4, 5, 6, 2)) - x268 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x268 += einsum(t2.aaaa, (0, 1, 2, 3), x230, (4, 5, 6, 3), (4, 0, 1, 6, 5, 2)) - x269 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x269 += einsum(x266, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -0.9999999999999596 del x266 x269 += einsum(x267, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 @@ -4233,7 +4234,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x269 += einsum(x268, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * -1.0 x269 += einsum(x268, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) del x268 - x270 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x270 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 3, 1), (0, 4, 5, 6, 7, 2)) * -0.9999999999999596 x270 += einsum(x264, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 3), (2, 4, 1, 5, 6, 7)) * -1.5 del x264 @@ -4247,21 +4248,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x269 l1new_aa += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), x270, (6, 4, 3, 5, 2, 1), (0, 6)) * 6.0 del x270 - x271 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x271 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x271 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) - x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x272 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x272 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) - x273 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x273 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x273 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 3, 5, 7, 0, 2), (6, 7, 4, 1)) - x274 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x274 += einsum(t2.bbbb, (0, 1, 2, 3), x74, (0, 1, 4, 3, 5, 6), (4, 2, 5, 6)) * -1.0 - x275 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x275 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 5, 4, 7, 2, 1), (6, 7, 3, 0)) - x276 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x276 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x276 += einsum(t2.abab, (0, 1, 2, 3), x91, (1, 4, 5, 0, 2, 6), (4, 3, 5, 6)) * -1.0 - x277 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x277 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x277 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.abaaba, (4, 6, 5, 1, 7, 2), (6, 7, 3, 0)) - x278 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x278 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x278 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x278 += einsum(x271, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x278 += einsum(x272, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -4273,35 +4274,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x278 += einsum(t1.bb, (0, 1), x96, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 l1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x278, (2, 3, 4, 1), (0, 4)) del x278 - x279 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x279 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x279 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (4, 5, 3, 0, 6, 1), (4, 2, 6, 5)) - x280 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x280 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x280 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 5, 2, 6, 1, 0), (5, 3, 6, 4)) - x281 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x281 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x281 += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (3, 1, 4, 2)) * 0.5 x281 += einsum(x279, (0, 1, 2, 3), (0, 1, 2, 3)) x281 += einsum(x280, (0, 1, 2, 3), (0, 1, 2, 3)) l1new_aa += einsum(v.aabb.vvvv, (0, 1, 2, 3), x281, (2, 3, 4, 1), (0, 4)) * 2.0 del x281 - x282 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x282 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x282 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) - x283 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x283 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) - x284 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x284 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) - x285 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x285 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x285 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) - x286 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x286 += einsum(t2.abab, (0, 1, 2, 3), x61, (1, 3, 0, 4, 5, 6), (4, 5, 6, 2)) * -1.0 - x287 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x287 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x287 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) - x288 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x288 += einsum(t2.aaaa, (0, 1, 2, 3), x193, (4, 0, 1, 5, 6, 3), (4, 5, 6, 2)) * -1.0 - x289 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x289 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x289 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) x289 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x289 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * -3.0 - x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x290 += einsum(x282, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.1111111111111111 x290 += einsum(x283, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.4444444444444444 x290 += einsum(x284, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.1111111111111111 @@ -4312,17 +4313,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x290 += einsum(t1.aa, (0, 1), x289, (0, 2, 3, 4), (2, 3, 1, 4)) * 0.2222222222222222 l1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x290, (4, 0, 2, 3), (1, 4)) * 9.0 del x290 - x291 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x291 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x291 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) - x292 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x292 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x292 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 7, 1, 2), (0, 7, 4, 6)) - x293 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x293 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x293 += einsum(t2.bbbb, (0, 1, 2, 3), x58, (0, 1, 4, 3, 5, 6), (4, 2, 5, 6)) - x294 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x294 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x294 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 0, 7, 2), (1, 7, 3, 6)) - x295 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x295 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x295 += einsum(t2.abab, (0, 1, 2, 3), x61, (1, 4, 0, 5, 6, 2), (4, 3, 5, 6)) - x296 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x296 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x296 += einsum(x291, (0, 1, 2, 3), (0, 1, 2, 3)) x296 += einsum(x292, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x296 += einsum(x293, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 @@ -4331,7 +4332,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x296 += einsum(t1.bb, (0, 1), x101, (0, 2, 3, 4), (1, 2, 3, 4)) l1new_aa += einsum(v.aabb.ovvv, (0, 1, 2, 3), x296, (3, 2, 4, 0), (1, 4)) * -1.0 del x296 - x297 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x297 += einsum(x279, (0, 1, 2, 3), (0, 1, 2, 3)) del x279 x297 += einsum(x280, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -4340,13 +4341,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x71 l2new_abab += einsum(v.aabb.vvov, (0, 1, 2, 3), x297, (4, 3, 5, 1), (0, 4, 5, 2)) * -2.0 l2new_abab += einsum(x297, (0, 1, 2, 3), x31, (4, 1, 2, 5), (3, 0, 5, 4)) * 2.0 - x298 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x298 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x298 += einsum(x200, (0, 1), (0, 1)) x298 += einsum(x201, (0, 1), (0, 1)) * 2.0 x298 += einsum(x202, (0, 1), (0, 1)) * 0.9999999999999601 x298 += einsum(x203, (0, 1), (0, 1)) * 1.9999999999999194 x298 += einsum(x204, (0, 1), (0, 1)) * 2.9999999999998788 - x299 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x299 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x299 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) x299 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) x299 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 5, 3, 6, 0, 1), (4, 6, 2, 5)) * 2.0 @@ -4369,49 +4370,49 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x299 += einsum(t1.bb, (0, 1), x298, (2, 3), (0, 1, 2, 3)) l1new_aa += einsum(v.aabb.ovov, (0, 1, 2, 3), x299, (2, 3, 4, 0), (1, 4)) * -1.0 del x299 - x300 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x300 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.3333333333333333 x300 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 x300 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 l1new_aa += einsum(v.aaaa.oovv, (0, 1, 2, 3), x300, (1, 4, 0, 3), (2, 4)) * -6.0 - x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x301 += einsum(l2.aaaa, (0, 1, 2, 3), (2, 3, 0, 1)) * -0.3333333333333333 x301 += einsum(x286, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 x301 += einsum(x288, (0, 1, 2, 3), (0, 1, 2, 3)) x301 += einsum(t1.aa, (0, 1), x300, (0, 2, 3, 4), (2, 3, 4, 1)) l1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x301, (4, 0, 3, 1), (2, 4)) * -6.0 del x301 - x302 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x302 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x302 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 5, 6, 1, 0), (6, 4, 5, 2)) - x303 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x303 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x303 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) x303 += einsum(x302, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_aa += einsum(v.aaaa.vvvv, (0, 1, 2, 3), x303, (4, 3, 1, 2), (0, 4)) * -2.0 del x303 - x304 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x304 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x304 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (4, 2, 5, 3), (1, 5, 0, 4)) - x305 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x305 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x305 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 1, 3), (4, 6, 5, 0)) - x306 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x306 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x306 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 3, 6, 1), (5, 6, 4, 0)) * -1.0 - x307 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x307 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x307 += einsum(t2.abab, (0, 1, 2, 3), x261, (4, 5, 0, 2), (1, 3, 4, 5)) del x261 - x308 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x308 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x308 += einsum(t2.bbbb, (0, 1, 2, 3), x8, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 - x309 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x309 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x309 += einsum(t2.abab, (0, 1, 2, 3), x39, (1, 4, 5, 2), (4, 3, 0, 5)) - x310 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x310 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x310 += einsum(x245, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 2, 0)) - x311 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x311 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x311 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x311 += einsum(x246, (0, 1, 2, 3), (1, 0, 3, 2)) - x312 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x312 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x312 += einsum(t1.bb, (0, 1), x311, (1, 2, 3, 4), (0, 2, 3, 4)) del x311 - x313 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x313 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x313 += einsum(t1.bb, (0, 1), x128, (0, 2, 3, 4), (2, 1, 3, 4)) - x314 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x314 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x314 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x314 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x314 += einsum(x304, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -4425,19 +4426,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x314 += einsum(x313, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x314, (3, 1, 2, 4), (0, 4)) * -1.0 del x314 - x315 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x315 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x316 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x316 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 0, 6)) - x317 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x317 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 1, 3), (4, 5, 0, 6)) - x318 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x318 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x318 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x319 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x319 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x319 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x319 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x319 += einsum(x318, (0, 1, 2, 3), (0, 1, 2, 3)) - x320 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x320 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x320 += einsum(x315, (0, 1, 2, 3), (2, 1, 0, 3)) x320 += einsum(x316, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 @@ -4449,29 +4450,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x320 += einsum(t1.aa, (0, 1), x254, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x320, (4, 3, 2, 1), (0, 4)) * -2.0 del x320 - x321 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x321 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x58, (0, 2, 3, 5, 6, 7), (6, 7, 1, 4)) - x322 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x322 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x61, (1, 4, 6, 2, 7, 5), (6, 7, 0, 3)) * -1.0 - x323 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x323 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x323 += einsum(t1.aa, (0, 1), x61, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 0, 6)) - x324 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x324 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x193, (6, 2, 1, 7, 4, 5), (6, 7, 0, 3)) * -1.0 - x325 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x325 += einsum(t1.aa, (0, 1), x193, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x326 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x326 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x326 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x326 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 x326 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) - x327 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x327 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x327 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x327 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) x327 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 l2new_abab += einsum(v.aabb.ooov, (0, 1, 2, 3), x327, (0, 4, 1, 5), (5, 3, 4, 2)) * 2.0 - x328 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x328 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x328 += einsum(x229, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 x328 += einsum(t1.aa, (0, 1), x327, (2, 3, 4, 1), (2, 3, 0, 4)) * 0.3333333333333468 - x329 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x329 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x329 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) * 0.3333333333333333 x329 += einsum(x195, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.3333333333333333 x329 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 5, 6, 1, 0), (2, 4, 5, 6)) * 0.3333333333333333 @@ -4490,7 +4491,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x329 += einsum(t1.aa, (0, 1), x298, (2, 3), (2, 0, 3, 1)) * 0.16666666666666666 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x329, (4, 2, 0, 3), (1, 4)) * -6.0 del x329 - x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x330 += einsum(x282, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.1111111111111111 x330 += einsum(x283, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.4444444444444444 x330 += einsum(x284, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.1111111111111111 @@ -4498,20 +4499,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x330 += einsum(x287, (0, 1, 2, 3), (0, 1, 2, 3)) l1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x330, (4, 0, 3, 1), (2, 4)) * 9.0 del x330 - x331 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x331 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x331 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) - x332 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x332 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x332 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 7, 0, 1, 2), (3, 5, 6, 7)) - x333 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x333 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x333 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) x333 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x334 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x334 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x334 += einsum(t1.aa, (0, 1), x333, (2, 3, 4, 1), (0, 2, 3, 4)) - x335 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x335 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x335 += einsum(x331, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x335 += einsum(x332, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.9999999999999601 x335 += einsum(x334, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x336 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x336 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x336 += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) * 0.5 x336 += einsum(x321, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.08333333333333333 del x321 @@ -4528,7 +4529,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x298 l1new_aa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x336, (4, 2, 0, 1), (3, 4)) * 12.0 del x336 - x337 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x337 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x337 += einsum(t1.aa, (0, 1), (0, 1)) * -0.5000000000000202 x337 += einsum(x186, (0, 1), (0, 1)) * -0.5000000000000202 del x186 @@ -4553,19 +4554,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x205 l1new_aa += einsum(x337, (0, 1), x240, (0, 2, 1, 3), (3, 2)) * 1.9999999999999194 del x337 - x338 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x338 += einsum(x179, (0, 1), (0, 1)) * 0.5 del x179 x338 += einsum(x180, (0, 1), (0, 1)) * 0.5 x338 += einsum(x181, (0, 1), (0, 1)) x338 += einsum(x182, (0, 1), (0, 1)) * 0.49999999999998007 - x339 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x339 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x339 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 l1new_aa += einsum(x338, (0, 1), x339, (2, 1, 0, 3), (3, 2)) * -2.0 del x338 l2new_abab += einsum(x100, (0, 1, 2, 3), x339, (4, 3, 2, 5), (5, 1, 4, 0)) * -2.0 - x340 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x340 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x340 += einsum(x160, (0, 1), (0, 1)) * 0.5 del x160 x340 += einsum(x161, (0, 1), (0, 1)) @@ -4575,7 +4576,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x340 += einsum(x211, (0, 1), (0, 1)) * 0.49999999999998007 l1new_aa += einsum(x340, (0, 1), v.aabb.ovvv, (2, 3, 1, 0), (3, 2)) * 2.0 del x340 - x341 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x341 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x341 += einsum(x175, (0, 1), (0, 1)) x341 += einsum(x109, (0, 1), (0, 1)) * 2.0 x341 += einsum(x110, (0, 1), (0, 1)) @@ -4583,7 +4584,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x341 += einsum(x112, (0, 1), (0, 1)) * 1.9999999999999194 x341 += einsum(x113, (0, 1), (0, 1)) * 0.9999999999999601 l2new_abab += einsum(x341, (0, 1), v.aabb.ovov, (2, 3, 1, 4), (3, 4, 2, 0)) * -1.0 - x342 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x342 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x342 += einsum(l1.bb, (0, 1), (1, 0)) * -1.0 x342 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x342 += einsum(x166, (0, 1), (0, 1)) * -2.0 @@ -4607,7 +4608,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x342 += einsum(t1.bb, (0, 1), x341, (0, 2), (2, 1)) l1new_aa += einsum(x342, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (3, 2)) * -1.0 del x342 - x343 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x343 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x343 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5000000000000202 del x102 x343 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -4618,28 +4619,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x343 += einsum(t1.aa, (0, 1), x106, (2, 3, 4, 1), (3, 2, 4, 0)) * 1.0000000000000404 l1new_aa += einsum(v.aabb.ovoo, (0, 1, 2, 3), x343, (3, 2, 4, 0), (1, 4)) * 1.9999999999999194 del x343 - x344 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x344 += einsum(x183, (0, 1), (0, 1)) x344 += einsum(x184, (0, 1), (0, 1)) * 1.4999999999999998 l1new_aa += einsum(x344, (0, 1), x339, (2, 1, 0, 3), (3, 2)) * -1.9999999999999194 del x344 - x345 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x345 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x345 += einsum(x331, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.3333333333333333 x345 += einsum(x332, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.33333333333332005 x345 += einsum(t1.aa, (0, 1), x327, (2, 3, 4, 1), (0, 2, 3, 4)) * 0.3333333333333333 l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x345, (0, 4, 1, 2), (3, 4)) * -6.0 del x345 - x346 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x346 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x346 += einsum(t1.aa, (0, 1), x333, (2, 3, 4, 1), (2, 3, 0, 4)) * 0.3333333333333333 l1new_aa += einsum(v.aaaa.ooov, (0, 1, 2, 3), x346, (4, 1, 2, 0), (3, 4)) * 6.0 del x346 - x347 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x347 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x347 += einsum(x199, (0, 1), (0, 1)) * 0.3333333333333468 x347 += einsum(x200, (0, 1), (0, 1)) * 0.3333333333333468 x347 += einsum(x201, (0, 1), (0, 1)) * 0.6666666666666936 x347 += einsum(x202, (0, 1), (0, 1)) * 0.33333333333333354 x347 += einsum(x204, (0, 1), (0, 1)) - x348 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x348 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x348 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) l1new_aa += einsum(x347, (0, 1), x348, (0, 2, 1, 3), (3, 2)) * -2.9999999999998788 @@ -4647,7 +4648,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l1new_aa += einsum(x203, (0, 1), x348, (0, 1, 2, 3), (3, 2)) * 1.9999999999999194 l2new_abab += einsum(x348, (0, 1, 2, 3), x66, (4, 5, 0, 1), (3, 5, 2, 4)) * 2.0 l3new_babbab += einsum(x348, (0, 1, 2, 3), x58, (4, 5, 6, 7, 0, 2), (6, 3, 7, 5, 1, 4)) * 2.0 - x349 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x349 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x349 += einsum(x175, (0, 1), (0, 1)) * 0.5 del x175 x349 += einsum(x109, (0, 1), (0, 1)) @@ -4662,34 +4663,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x113 l1new_aa += einsum(x349, (0, 1), v.aabb.ovoo, (2, 3, 1, 0), (3, 2)) * -2.0 del x349 - x350 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x350 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l1new_aa += einsum(l1.aa, (0, 1), x350, (1, 2, 0, 3), (3, 2)) * -1.0 del x350 - x351 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x351 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x352 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x352 += einsum(f.aa.vv, (0, 1), (0, 1)) x352 += einsum(x351, (0, 1), (1, 0)) x352 += einsum(t1.aa, (0, 1), x235, (0, 1, 2, 3), (3, 2)) * -1.0 l1new_aa += einsum(l1.aa, (0, 1), x352, (0, 2), (2, 1)) del x352 - x353 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x353 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x354 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x354 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x354 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x355 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x355 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x355 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 1, 3), (0, 4)) - x356 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x356 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x356 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x357 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x357 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x357 += einsum(t1.aa, (0, 1), x356, (2, 3, 0, 1), (2, 3)) del x356 - x358 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x358 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x358 += einsum(t1.aa, (0, 1), x245, (2, 1), (0, 2)) - x359 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x359 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x359 += einsum(f.aa.oo, (0, 1), (0, 1)) x359 += einsum(x353, (0, 1), (1, 0)) x359 += einsum(x354, (0, 1), (0, 1)) @@ -4701,7 +4702,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_abab += einsum(x359, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 l3new_babbab += einsum(x359, (0, 1), l3.babbab, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 del x359 - x360 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x360 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x360 += einsum(x199, (0, 1), (0, 1)) * 0.3333333333333468 x360 += einsum(x200, (0, 1), (0, 1)) * 0.3333333333333468 x360 += einsum(x201, (0, 1), (0, 1)) * 0.6666666666666936 @@ -4710,34 +4711,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x360 += einsum(x204, (0, 1), (0, 1)) l1new_aa += einsum(f.aa.ov, (0, 1), x360, (2, 0), (1, 2)) * -2.9999999999998788 del x360 - x361 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x361 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x361 += einsum(x243, (0, 1), (0, 1)) del x243 x361 += einsum(x244, (0, 1), (0, 1)) * -1.0 del x244 l1new_aa += einsum(x199, (0, 1), x361, (1, 2), (2, 0)) * -1.0 - x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x362 += einsum(l1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x363 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x363 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x363 += einsum(l2.abab, (0, 1, 2, 3), x238, (3, 1, 4, 5), (2, 4, 0, 5)) - x364 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x364 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x364 += einsum(x5, (0, 1, 2, 3), x93, (0, 1, 4, 5), (4, 2, 5, 3)) - x365 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x365 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x365 += einsum(x302, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 x365 += einsum(x228, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(v.aabb.vvov, (0, 1, 2, 3), x365, (4, 5, 0, 1), (5, 3, 4, 2)) * 6.0 - x366 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x366 += einsum(x339, (0, 1, 2, 3), x365, (4, 2, 5, 1), (0, 4, 3, 5)) * 6.0 del x365 - x367 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x367 += einsum(x196, (0, 1, 2, 3), (0, 1, 2, 3)) del x196 x367 += einsum(x197, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0000000000000004 del x197 - x368 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x368 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x368 += einsum(t1.aa, (0, 1), x367, (2, 0, 3, 4), (2, 3, 1, 4)) * 0.22222222222223104 del x367 - x369 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x369 += einsum(x282, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.11111111111111552 x369 += einsum(x283, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.4444444444444621 x369 += einsum(x284, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.11111111111111108 @@ -4747,12 +4748,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x369 += einsum(x288, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.6666666666666932 x369 += einsum(x368, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x368 - x370 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x370 += einsum(x233, (0, 1, 2, 3), x369, (4, 0, 5, 3), (1, 4, 2, 5)) * 8.999999999999643 del x369 - x371 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x371 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x371 += einsum(t1.bb, (0, 1), x106, (0, 2, 3, 4), (2, 1, 3, 4)) * 2.0 - x372 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x372 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x372 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x372 += einsum(x271, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x372 += einsum(x272, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -4763,56 +4764,56 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x372 += einsum(x277, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.999999999999881 x372 += einsum(x371, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x371 - x373 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x373 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x373 += einsum(v.aabb.ovov, (0, 1, 2, 3), x372, (2, 3, 4, 5), (0, 4, 1, 5)) del x372 - x374 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x374 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x374 += einsum(v.aabb.ovvv, (0, 1, 2, 3), x297, (2, 3, 4, 5), (0, 4, 1, 5)) * 2.0 - x375 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x375 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x375 += einsum(t1.aa, (0, 1), x339, (2, 1, 3, 4), (0, 2, 3, 4)) - x376 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x376 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x376 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x376 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x376 += einsum(x375, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x375 - x377 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x377 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x377 += einsum(l2.aaaa, (0, 1, 2, 3), x376, (3, 4, 5, 1), (2, 4, 0, 5)) * 2.0 del x376 - x378 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x378 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x378 += einsum(x327, (0, 1, 2, 3), x348, (1, 4, 2, 5), (0, 4, 3, 5)) * 2.0 del x327 - x379 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x379 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x379 += einsum(x180, (0, 1), (0, 1)) x379 += einsum(x181, (0, 1), (0, 1)) * 2.0 x379 += einsum(x182, (0, 1), (0, 1)) * 0.9999999999999601 x379 += einsum(x183, (0, 1), (0, 1)) * 1.9999999999999194 x379 += einsum(x184, (0, 1), (0, 1)) * 2.9999999999998788 - x380 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x380 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x380 += einsum(x379, (0, 1), v.aaaa.ovov, (2, 1, 3, 4), (2, 3, 0, 4)) del x379 - x381 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x381 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x381 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x96, (2, 3, 4, 5), (0, 4, 1, 5)) - x382 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x382 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x382 += einsum(x230, (0, 1, 2, 3), (0, 1, 2, 3)) x382 += einsum(x230, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x383 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x383 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x383 += einsum(x195, (0, 1, 2, 3), x382, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 - x384 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x384 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x384 += einsum(x199, (0, 1), (0, 1)) x384 += einsum(x200, (0, 1), (0, 1)) x384 += einsum(x201, (0, 1), (0, 1)) * 2.0 x384 += einsum(x202, (0, 1), (0, 1)) * 0.9999999999999601 x384 += einsum(x203, (0, 1), (0, 1)) * 1.9999999999999194 x384 += einsum(x204, (0, 1), (0, 1)) * 2.9999999999998788 - x385 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x385 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x385 += einsum(x384, (0, 1), v.aaaa.ovov, (2, 3, 1, 4), (0, 2, 4, 3)) del x384 - x386 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x386 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x386 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x386 += einsum(x230, (0, 1, 2, 3), (0, 1, 2, 3)) - x387 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x387 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x387 += einsum(l1.aa, (0, 1), x386, (1, 2, 3, 4), (2, 3, 0, 4)) - x388 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x388 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x388 += einsum(f.aa.ov, (0, 1), l1.aa, (2, 3), (0, 3, 1, 2)) x388 += einsum(x362, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x362 @@ -4848,25 +4849,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_aaaa += einsum(x388, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x388, (0, 1, 2, 3), (3, 2, 1, 0)) del x388 - x389 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x389 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x389 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x390 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x390 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x390 += einsum(x389, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) - x391 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x391 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x391 += einsum(l2.aaaa, (0, 1, 2, 3), x253, (2, 4, 3, 5), (4, 5, 0, 1)) - x392 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x392 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x392 += einsum(f.aa.ov, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 0, 2)) - x393 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x393 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x393 += einsum(x392, (0, 1, 2, 3), l3.abaaba, (4, 1, 5, 6, 0, 3), (2, 6, 4, 5)) del x392 - x394 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x394 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x394 += einsum(f.aa.ov, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) - x395 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x395 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x395 += einsum(x394, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 3, 6, 1, 2), (0, 6, 4, 5)) * -1.0 del x394 - x396 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x396 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x396 += einsum(x361, (0, 1), t2.abab, (2, 3, 1, 4), (3, 4, 2, 0)) - x397 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x397 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x397 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x397 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x397 += einsum(x304, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -4879,39 +4880,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x396 x397 += einsum(x312, (0, 1, 2, 3), (0, 1, 3, 2)) x397 += einsum(x313, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x398 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x398 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x398 += einsum(x397, (0, 1, 2, 3), l3.abaaba, (4, 1, 5, 6, 0, 2), (6, 3, 4, 5)) * -2.0 del x397 - x399 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x399 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x399 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x399 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x399 += einsum(x230, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x399 += einsum(x230, (0, 1, 2, 3), (0, 2, 1, 3)) - x400 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x400 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x400 += einsum(t2.aaaa, (0, 1, 2, 3), x399, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x399 - x401 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x401 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x401 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 3, 4, 5), (0, 4, 5, 2)) - x402 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x402 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x402 += einsum(x361, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x403 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x403 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x403 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x403 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x403 += einsum(x318, (0, 1, 2, 3), (1, 0, 2, 3)) del x318 - x404 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x404 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x404 += einsum(t1.aa, (0, 1), x403, (2, 3, 1, 4), (0, 2, 3, 4)) del x403 - x405 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x405 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x405 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x405 += einsum(x251, (0, 1, 2, 3), (3, 1, 0, 2)) x405 += einsum(x252, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 x405 += einsum(x253, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 x405 += einsum(x253, (0, 1, 2, 3), (3, 0, 2, 1)) - x406 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x406 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x406 += einsum(t1.aa, (0, 1), x405, (0, 2, 3, 4), (2, 3, 4, 1)) del x405 - x407 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x407 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x407 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x407 += einsum(x315, (0, 1, 2, 3), (1, 0, 2, 3)) x407 += einsum(x316, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.9999999999999606 @@ -4926,23 +4927,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x404 x407 += einsum(x406, (0, 1, 2, 3), (1, 0, 2, 3)) del x406 - x408 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x408 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x408 += einsum(x407, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 3, 6, 0, 1), (6, 2, 4, 5)) * -6.0 del x407 - x409 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x409 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x409 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x409 += einsum(x230, (0, 1, 2, 3), (0, 2, 1, 3)) - x410 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x410 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x410 += einsum(x302, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x302 x410 += einsum(x228, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 del x228 - x411 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x411 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x411 += einsum(x409, (0, 1, 2, 3), x410, (0, 4, 5, 3), (1, 2, 4, 5)) * 2.0 del x409 - x412 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x412 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x412 += einsum(t1.aa, (0, 1), x361, (2, 1), (0, 2)) - x413 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x413 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x413 += einsum(x353, (0, 1), (1, 0)) del x353 x413 += einsum(x354, (0, 1), (0, 1)) @@ -4953,9 +4954,9 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x357 x413 += einsum(x412, (0, 1), (0, 1)) del x412 - x414 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x414 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x414 += einsum(x413, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 1, 2, 3)) * -2.0 - x415 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x415 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x415 += einsum(x390, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x390 x415 += einsum(x391, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -4975,29 +4976,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_aaaa += einsum(x415, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x415, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x415 - x416 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x416 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x416 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x417 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x417 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x417 += einsum(x22, (0, 1, 2, 3), x91, (0, 1, 4, 5, 6, 3), (4, 5, 6, 2)) - x418 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x418 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x418 += einsum(t1.bb, (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x419 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x419 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x419 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.vvov, (4, 5, 1, 3), (0, 2, 4, 5)) - x420 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x420 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x420 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (0, 4, 5, 3), (1, 5, 2, 4)) - x421 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x421 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x421 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x422 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x422 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x422 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 5, 6, 1), (4, 6, 5, 3)) * -1.0 - x423 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x423 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x423 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x423 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x424 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x424 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x424 += einsum(t2.abab, (0, 1, 2, 3), x423, (0, 2, 4, 5), (1, 3, 4, 5)) del x423 - x425 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x425 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x425 += einsum(t2.abab, (0, 1, 2, 3), x39, (1, 4, 0, 5), (4, 3, 2, 5)) - x426 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x426 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x426 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x426 += einsum(x418, (0, 1, 2, 3), (0, 1, 3, 2)) x426 += einsum(x419, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 @@ -5007,28 +5008,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x426 += einsum(x424, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x424 x426 += einsum(x425, (0, 1, 2, 3), (0, 1, 3, 2)) - x427 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x427 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x427 += einsum(x426, (0, 1, 2, 3), l3.abaaba, (4, 1, 3, 5, 0, 6), (5, 6, 4, 2)) * -2.0 del x426 - x428 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x428 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x428 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x429 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x429 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x429 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 5, 1, 3), (0, 2, 4, 5)) - x430 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x430 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x430 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 3, 6), (4, 5, 6, 1)) - x431 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x431 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x431 += einsum(v.aaaa.ovov, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x432 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x432 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x432 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x432 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x433 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x433 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x433 += einsum(t2.aaaa, (0, 1, 2, 3), x432, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 - x434 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x434 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x434 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x434 += einsum(x230, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x435 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x435 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x435 += einsum(t2.aaaa, (0, 1, 2, 3), x434, (0, 4, 1, 5), (4, 2, 3, 5)) - x436 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x436 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x436 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x436 += einsum(x428, (0, 1, 2, 3), (0, 2, 3, 1)) x436 += einsum(x429, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -5038,12 +5039,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x433 x436 += einsum(x435, (0, 1, 2, 3), (0, 2, 1, 3)) del x435 - x437 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x437 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x437 += einsum(x436, (0, 1, 2, 3), l3.aaaaaa, (4, 1, 2, 5, 6, 0), (5, 6, 4, 3)) * -6.0 del x436 - x438 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x438 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x438 += einsum(t1.bb, (0, 1), x39, (0, 2, 3, 4), (2, 1, 3, 4)) - x439 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x439 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x439 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x439 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) x439 += einsum(x239, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -5052,66 +5053,66 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x439 += einsum(x438, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x438 l2new_abab += einsum(x439, (0, 1, 2, 3), x58, (0, 4, 5, 1, 6, 2), (3, 5, 6, 4)) * 2.0 - x440 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x440 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x440 += einsum(x439, (0, 1, 2, 3), x61, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 2.0 del x439 - x441 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x441 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x441 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x442 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x442 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x442 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x442 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x442 += einsum(x441, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x441 x442 += einsum(x232, (0, 1, 2, 3), (0, 1, 2, 3)) x442 += einsum(x234, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x443 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x443 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x443 += einsum(x442, (0, 1, 2, 3), x193, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) * 6.0 del x442 - x444 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x444 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x444 += einsum(t1.aa, (0, 1), x230, (2, 3, 0, 4), (2, 3, 1, 4)) - x445 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x445 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x445 += einsum(t1.aa, (0, 1), x235, (2, 1, 3, 4), (0, 2, 3, 4)) - x446 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x446 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x446 += einsum(x444, (0, 1, 2, 3), (0, 1, 2, 3)) del x444 x446 += einsum(x445, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 l2new_abab += einsum(x446, (0, 1, 2, 3), x61, (4, 5, 0, 6, 1, 2), (3, 5, 6, 4)) * 2.0 - x447 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x447 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x447 += einsum(x446, (0, 1, 2, 3), x193, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) * 6.0 del x446 - x448 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x448 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x448 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x448 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 l2new_abab += einsum(x448, (0, 1, 2, 3), x74, (0, 4, 1, 5, 6, 2), (3, 5, 6, 4)) * 2.0 - x449 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x449 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x449 += einsum(x448, (0, 1, 2, 3), x91, (0, 1, 4, 5, 2, 6), (4, 5, 6, 3)) * 2.0 del x448 - x450 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x450 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x450 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x326, (4, 5, 0, 3), (4, 5, 1, 2)) * 6.0 - x451 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x451 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x451 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x452 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x452 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x452 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x453 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x453 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x453 += einsum(t1.aa, (0, 1), x339, (0, 1, 2, 3), (2, 3)) del x339 - x454 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x454 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x454 += einsum(x351, (0, 1), (1, 0)) * -1.0 x454 += einsum(x451, (0, 1), (1, 0)) x454 += einsum(x452, (0, 1), (1, 0)) * 2.0 x454 += einsum(x453, (0, 1), (1, 0)) * -1.0 del x453 - x455 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x455 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x455 += einsum(x454, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 2, 0)) * -2.0 - x456 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x456 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x456 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x334, (0, 4, 5, 2), (4, 5, 3, 1)) * 2.0 del x334 - x457 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x457 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x457 += einsum(x361, (0, 1), x289, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 - x458 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x458 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x458 += einsum(f.aa.ov, (0, 1), x300, (2, 3, 0, 4), (2, 3, 4, 1)) * 6.0 del x300 - x459 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x459 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x459 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x459 += einsum(x416, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x416 @@ -5142,12 +5143,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_aaaa += einsum(x459, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x459, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x459 - x460 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x460 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x460 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x460, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x460, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x460 - x461 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x461 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x461 += einsum(x331, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.3333333333333468 del x331 x461 += einsum(t1.aa, (0, 1), x195, (2, 3, 4, 1), (2, 3, 4, 0)) * 0.3333333333333468 @@ -5158,26 +5159,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x229 l2new_aaaa += einsum(v.aaaa.ovov, (0, 1, 2, 3), x461, (4, 5, 0, 2), (3, 1, 5, 4)) * -5.9999999999997575 del x461 - x462 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x462 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x462 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x462 += einsum(x251, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 x462 += einsum(x252, (0, 1, 2, 3), (0, 3, 1, 2)) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x462, (2, 4, 3, 5), (0, 1, 4, 5)) * -2.0 - x463 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x463 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x463 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) - x464 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x464 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x464 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 1, 5), (3, 5, 0, 4)) - x465 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x465 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x465 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovvv, (1, 3, 4, 5), (4, 5, 0, 2)) - x466 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x466 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x466 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 5, 6, 3), (5, 1, 4, 6)) - x467 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x467 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x467 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 6, 1), (6, 3, 4, 5)) - x468 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x468 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x468 += einsum(t2.abab, (0, 1, 2, 3), x217, (1, 4, 3, 5), (4, 5, 0, 2)) - x469 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x469 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x469 += einsum(t2.abab, (0, 1, 2, 3), x8, (1, 4, 0, 5), (3, 4, 5, 2)) - x470 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x470 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x470 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x470 += einsum(x463, (0, 1, 2, 3), (1, 0, 2, 3)) x470 += einsum(x464, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -5188,7 +5189,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x470 += einsum(x469, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x470, (0, 1, 2, 3), l3.abaaba, (4, 0, 3, 5, 6, 2), (4, 1, 5, 6)) * 2.0 del x470 - x471 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x471 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x471 += einsum(v.aabb.vvov, (0, 1, 2, 3), (2, 3, 0, 1)) x471 += einsum(x418, (0, 1, 2, 3), (0, 1, 3, 2)) del x418 @@ -5205,7 +5206,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x425 l2new_abab += einsum(x471, (0, 1, 2, 3), l3.babbab, (4, 2, 1, 5, 6, 0), (3, 4, 6, 5)) * 2.0 del x471 - x472 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x472 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x472 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x472 += einsum(x428, (0, 1, 2, 3), (0, 3, 2, 1)) * -0.5 del x428 @@ -5221,23 +5222,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x434 l2new_abab += einsum(x472, (0, 1, 2, 3), l3.abaaba, (1, 4, 2, 5, 6, 0), (3, 4, 5, 6)) * 4.0 del x472 - x473 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x473 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x473 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x474 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x474 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x474 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (0, 2, 4, 5), (1, 3, 4, 5)) - x475 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x475 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x475 += einsum(v.bbbb.ovov, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 2, 5, 6, 3), (4, 5, 6, 1)) - x476 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x476 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x476 += einsum(v.aabb.ovov, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 1, 6), (4, 5, 6, 3)) - x477 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x477 += einsum(t2.bbbb, (0, 1, 2, 3), x217, (1, 3, 4, 5), (0, 2, 4, 5)) * 2.0 - x478 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x478 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x478 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x478 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x479 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x479 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x479 += einsum(t2.bbbb, (0, 1, 2, 3), x478, (0, 4, 1, 5), (4, 2, 3, 5)) * -1.0 del x478 - x480 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x480 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x480 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x480 += einsum(x473, (0, 1, 2, 3), (0, 2, 3, 1)) x480 += einsum(x474, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -5247,7 +5248,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x480 += einsum(x479, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x480, (0, 1, 2, 3), l3.babbab, (1, 4, 2, 5, 6, 0), (4, 3, 6, 5)) * 2.0 del x480 - x481 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x481 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x481 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x481 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) x481 += einsum(x304, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -5270,7 +5271,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x313 l2new_abab += einsum(x481, (0, 1, 2, 3), l3.babbab, (4, 5, 1, 6, 2, 0), (5, 4, 3, 6)) * -2.0 del x481 - x482 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x482 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x482 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x482 += einsum(x118, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.5 x482 += einsum(x119, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -5288,7 +5289,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x128 l2new_abab += einsum(x482, (0, 1, 2, 3), l3.abaaba, (4, 5, 3, 6, 0, 2), (4, 5, 6, 1)) * -4.0 del x482 - x483 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x483 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x483 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.3333333333333466 x483 += einsum(x315, (0, 1, 2, 3), (2, 1, 0, 3)) * 0.3333333333333466 del x315 @@ -5307,7 +5308,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x254 l2new_abab += einsum(x483, (0, 1, 2, 3), l3.abaaba, (4, 5, 3, 1, 6, 2), (4, 5, 0, 6)) * 5.999999999999762 del x483 - x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x484 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x484 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x484 += einsum(x146, (0, 1, 2, 3), (2, 1, 0, 3)) x484 += einsum(x147, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.999999999999881 @@ -5323,10 +5324,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x155 l2new_abab += einsum(x484, (0, 1, 2, 3), l3.babbab, (4, 5, 3, 1, 6, 2), (5, 4, 6, 0)) * 2.0 del x484 - x485 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x485 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x485 += einsum(t1.aa, (0, 1), x8, (2, 3, 0, 4), (2, 3, 4, 1)) del x8 - x486 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x486 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x486 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x486 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x486 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -5335,7 +5336,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x486 += einsum(x485, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x485 l2new_abab += einsum(x486, (0, 1, 2, 3), x91, (4, 0, 2, 5, 6, 3), (6, 1, 5, 4)) * 2.0 - x487 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x487 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x487 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x487 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x487 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) @@ -5344,7 +5345,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x234 l2new_abab += einsum(x487, (0, 1, 2, 3), x61, (4, 5, 0, 6, 1, 2), (3, 5, 6, 4)) * -2.0 del x487 - x488 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x488 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x488 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x488 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x488 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 0, 4), (2, 3, 1, 4)) @@ -5352,14 +5353,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x488 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 l2new_abab += einsum(x488, (0, 1, 2, 3), x74, (0, 4, 1, 2, 5, 6), (6, 3, 5, 4)) * -2.0 del x488 - x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x489 += einsum(t1.bb, (0, 1), x12, (2, 1, 3, 4), (0, 2, 3, 4)) - x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x490 += einsum(t1.bb, (0, 1), x3, (2, 3, 0, 4), (2, 3, 1, 4)) x490 += einsum(x489, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 l2new_abab += einsum(x490, (0, 1, 2, 3), x74, (0, 4, 1, 2, 5, 6), (6, 3, 5, 4)) * 2.0 del x490 - x491 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x491 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x491 += einsum(x271, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5000000000000198 del x271 x491 += einsum(x272, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5000000000000198 @@ -5377,11 +5378,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x491 += einsum(t1.bb, (0, 1), x106, (0, 2, 3, 4), (2, 1, 3, 4)) * -0.5000000000000198 l2new_abab += einsum(x10, (0, 1, 2, 3), x491, (0, 2, 4, 5), (5, 3, 4, 1)) * -3.999999999999842 del x491 - x492 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x492 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x492 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x492 += einsum(x247, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 l2new_abab += einsum(x492, (0, 1, 2, 3), x61, (4, 0, 2, 5, 3, 6), (6, 1, 5, 4)) * 2.0 - x493 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x493 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x493 += einsum(l2.aaaa, (0, 1, 2, 3), (2, 3, 0, 1)) x493 += einsum(x282, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.5 del x282 @@ -5401,14 +5402,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x333 l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x493, (0, 4, 1, 5), (5, 3, 4, 2)) * 2.0 del x493 - x494 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x494 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x494 += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) del x64 x494 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) del x65 - x495 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x495 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x495 += einsum(t1.aa, (0, 1), x494, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 - x496 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x496 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x496 += einsum(l2.abab, (0, 1, 2, 3), (3, 1, 2, 0)) x496 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x496 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -5420,7 +5421,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x496 += einsum(x495, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x495 l2new_abab += einsum(v.aaaa.ovov, (0, 1, 2, 3), x496, (4, 5, 2, 3), (1, 5, 0, 4)) - x497 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x497 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x497 += einsum(l2.bbbb, (0, 1, 2, 3), (2, 3, 0, 1)) * 2.0 x497 += einsum(x81, (0, 1, 2, 3), (1, 0, 3, 2)) * 4.0 x497 += einsum(x82, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -5432,7 +5433,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x497 += einsum(t1.bb, (0, 1), x157, (0, 2, 3, 4), (3, 2, 1, 4)) * 6.0 l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x497, (2, 4, 3, 5), (1, 5, 0, 4)) del x497 - x498 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x498 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x498 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) del x54 x498 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -5450,11 +5451,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x498 += einsum(t1.aa, (0, 1), x494, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 l2new_abab += einsum(v.aaaa.ovov, (0, 1, 2, 3), x498, (4, 5, 2, 1), (3, 5, 0, 4)) * -2.0 del x498 - x499 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x499 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x499 += einsum(x0, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 x499 += einsum(x116, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(v.aabb.ovvv, (0, 1, 2, 3), x499, (4, 5, 2, 3), (1, 5, 0, 4)) * 2.0 - x500 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x500 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x500 += einsum(x291, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x291 x500 += einsum(x292, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.99999999999996 @@ -5469,7 +5470,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x494 l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x500, (4, 3, 5, 0), (1, 4, 5, 2)) * 2.0 del x500 - x501 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x501 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x501 += einsum(x87, (0, 1, 2, 3), (0, 1, 2, 3)) del x87 x501 += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.99999999999992 @@ -5484,30 +5485,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x106 l2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), x501, (4, 2, 5, 1), (5, 3, 0, 4)) del x501 - x502 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x502 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x502 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x502 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x502 += einsum(x489, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x489 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x502, (3, 4, 1, 5), (0, 5, 2, 4)) * -1.0 del x502 - x503 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x503 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x503 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x503 += einsum(x445, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x445 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x503, (2, 4, 0, 5), (5, 1, 4, 3)) * -1.0 del x503 - x504 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x504 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x504 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x504 += einsum(x246, (0, 1, 2, 3), (1, 0, 2, 3)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x504, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x504 - x505 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x505 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x505 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x505 += einsum(x22, (0, 1, 2, 3), (0, 1, 3, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x505, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x505 - x506 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x506 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x506 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x506 += einsum(x29, (0, 1, 2, 3), (1, 0, 2, 3)) del x29 @@ -5516,10 +5517,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x506 += einsum(x249, (0, 1, 2, 3), (0, 1, 3, 2)) del x249 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x506, (3, 4, 2, 5), (0, 1, 5, 4)) - x507 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x507 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x507 += einsum(t1.aa, (0, 1), x235, (0, 2, 1, 3), (2, 3)) del x235 - x508 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x508 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x508 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x508 += einsum(x351, (0, 1), (1, 0)) * -1.0 del x351 @@ -5532,14 +5533,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_abab += einsum(x508, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 l3new_babbab += einsum(x508, (0, 1), l3.babbab, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 del x508 - x509 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x509 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x509 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x510 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x510 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x510 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x511 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x511 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x511 += einsum(t1.bb, (0, 1), x217, (0, 1, 2, 3), (2, 3)) del x217 - x512 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x512 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x512 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x512 += einsum(x216, (0, 1), (1, 0)) * -1.0 x512 += einsum(x509, (0, 1), (0, 1)) * 2.0 @@ -5549,7 +5550,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_abab += einsum(x512, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 l3new_abaaba += einsum(x512, (0, 1), l3.abaaba, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 del x512 - x513 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x513 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x513 += einsum(x180, (0, 1), (0, 1)) * 1.00000000000004 del x180 x513 += einsum(x181, (0, 1), (0, 1)) * 2.00000000000008 @@ -5562,7 +5563,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x184 l2new_abab += einsum(x513, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (0, 4, 2, 3)) * -0.9999999999999601 del x513 - x514 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x514 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x514 += einsum(x161, (0, 1), (0, 1)) * 2.0 x514 += einsum(x162, (0, 1), (0, 1)) x514 += einsum(x163, (0, 1), (0, 1)) * 2.9999999999998788 @@ -5570,18 +5571,18 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x514 += einsum(x211, (0, 1), (0, 1)) * 0.9999999999999601 l2new_abab += einsum(x514, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (3, 0, 2, 4)) * -1.0 del x514 - x515 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x515 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x515 += einsum(x230, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x515 += einsum(x230, (0, 1, 2, 3), (0, 2, 1, 3)) l2new_abab += einsum(x515, (0, 1, 2, 3), x63, (4, 5, 0, 1), (3, 5, 2, 4)) * -1.0 l3new_babbab += einsum(x515, (0, 1, 2, 3), x58, (4, 5, 6, 7, 0, 1), (6, 3, 7, 5, 2, 4)) * 2.0 - x516 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x516 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x516 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x516 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) l2new_abab += einsum(x516, (0, 1, 2, 3), x93, (0, 2, 4, 5), (5, 3, 4, 1)) del x93 l3new_abaaba += einsum(x516, (0, 1, 2, 3), x91, (0, 1, 4, 5, 6, 7), (6, 3, 7, 5, 2, 4)) * 2.0 - x517 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x517 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x517 += einsum(x199, (0, 1), (0, 1)) * 1.00000000000004 del x199 x517 += einsum(x200, (0, 1), (0, 1)) * 1.00000000000004 @@ -5596,20 +5597,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x204 l2new_abab += einsum(x517, (0, 1), v.aabb.ovov, (1, 2, 3, 4), (2, 4, 0, 3)) * -0.9999999999999601 del x517 - x518 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x518 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x518 += einsum(l1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 0), (1, 2, 3, 4)) - x519 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x519 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x519 += einsum(l2.abab, (0, 1, 2, 3), x15, (4, 5, 2, 0), (3, 4, 1, 5)) - x520 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x520 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x520 += einsum(x63, (0, 1, 2, 3), x7, (4, 5, 2, 3), (0, 4, 1, 5)) del x63 - x521 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x521 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x521 += einsum(x499, (0, 1, 2, 3), x80, (4, 3, 1, 5), (4, 0, 5, 2)) * 2.0 del x499 - x522 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x522 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x522 += einsum(t1.bb, (0, 1), x157, (2, 0, 3, 4), (2, 3, 1, 4)) * 3.0 del x157 - x523 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x523 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x523 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x81 x523 += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -5626,35 +5627,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x85 x523 += einsum(x522, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x522 - x524 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x524 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x524 += einsum(x10, (0, 1, 2, 3), x523, (4, 0, 5, 2), (1, 4, 3, 5)) * 2.0 del x523 - x525 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x525 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x525 += einsum(v.aabb.ovov, (0, 1, 2, 3), x496, (4, 5, 0, 1), (2, 4, 3, 5)) del x496 - x526 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x526 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x526 += einsum(v.aabb.vvov, (0, 1, 2, 3), x100, (4, 5, 0, 1), (2, 4, 3, 5)) * 2.0 - x527 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x527 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x527 += einsum(t1.bb, (0, 1), x80, (2, 1, 3, 4), (0, 2, 3, 4)) del x80 - x528 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x528 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x528 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x528 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x528 += einsum(x527, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x527 - x529 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x529 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x529 += einsum(l2.bbbb, (0, 1, 2, 3), x528, (3, 4, 5, 1), (2, 4, 0, 5)) * 2.0 del x528 - x530 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x530 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x530 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x530 += einsum(x76, (0, 1, 2, 3), (0, 1, 2, 3)) del x76 x530 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 del x77 - x531 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x531 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x531 += einsum(x213, (0, 1, 2, 3), x530, (4, 0, 2, 5), (1, 4, 3, 5)) * 6.0 del x530 - x532 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x532 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x532 += einsum(x161, (0, 1), (0, 1)) del x161 x532 += einsum(x162, (0, 1), (0, 1)) * 0.5 @@ -5665,24 +5666,24 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x164 x532 += einsum(x211, (0, 1), (0, 1)) * 0.49999999999998007 del x211 - x533 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x533 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x533 += einsum(x532, (0, 1), v.bbbb.ovov, (2, 1, 3, 4), (2, 3, 4, 0)) * 2.0 del x532 - x534 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x534 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x534 += einsum(v.aabb.ooov, (0, 1, 2, 3), x101, (4, 5, 0, 1), (2, 4, 3, 5)) del x101 - x535 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x535 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x535 += einsum(x1, (0, 1, 2, 3), x516, (0, 2, 4, 5), (1, 4, 3, 5)) * 2.0 del x1 - x536 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x536 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x536 += einsum(x341, (0, 1), v.bbbb.ovov, (2, 3, 1, 4), (2, 0, 4, 3)) del x341 - x537 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x537 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x537 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x537 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x538 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x538 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x538 += einsum(l1.bb, (0, 1), x537, (1, 2, 3, 4), (2, 3, 0, 4)) - x539 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x539 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x539 += einsum(f.bb.ov, (0, 1), l1.bb, (2, 3), (0, 3, 1, 2)) x539 += einsum(x518, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x518 @@ -5718,25 +5719,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_bbbb += einsum(x539, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x539, (0, 1, 2, 3), (3, 2, 1, 0)) del x539 - x540 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x540 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x540 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x541 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x541 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x541 += einsum(x540, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) - x542 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x542 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x542 += einsum(l2.bbbb, (0, 1, 2, 3), x27, (3, 2, 4, 5), (4, 5, 0, 1)) * -1.0 - x543 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x543 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x543 += einsum(f.bb.ov, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) - x544 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x544 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x544 += einsum(x543, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 3, 6, 1, 2), (0, 6, 4, 5)) * -1.0 del x543 - x545 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x545 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x545 += einsum(f.bb.ov, (0, 1), t2.abab, (2, 3, 4, 1), (0, 3, 2, 4)) - x546 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x546 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x546 += einsum(x545, (0, 1, 2, 3), l3.babbab, (4, 3, 5, 6, 2, 1), (0, 6, 4, 5)) del x545 - x547 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x547 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x547 += einsum(x227, (0, 1), t2.abab, (2, 3, 4, 1), (3, 0, 2, 4)) - x548 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x548 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x548 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x548 += einsum(x118, (0, 1, 2, 3), (1, 0, 2, 3)) del x118 @@ -5758,26 +5759,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x127 x548 += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x129 - x549 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x549 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x549 += einsum(x548, (0, 1, 2, 3), l3.babbab, (4, 3, 5, 6, 2, 0), (6, 1, 4, 5)) * -2.0 del x548 - x550 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x550 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x550 += einsum(t2.abab, (0, 1, 2, 3), x39, (4, 5, 0, 2), (1, 4, 5, 3)) del x39 - x551 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x551 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x551 += einsum(x227, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x552 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x552 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x552 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x552 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x552 += einsum(x152, (0, 1, 2, 3), (1, 0, 2, 3)) del x152 - x553 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x553 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x553 += einsum(t1.bb, (0, 1), x552, (2, 3, 1, 4), (0, 2, 3, 4)) del x552 - x554 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x554 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x554 += einsum(t1.bb, (0, 1), x48, (0, 2, 3, 4), (2, 3, 4, 1)) del x48 - x555 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x555 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x555 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) x555 += einsum(x146, (0, 1, 2, 3), (1, 0, 2, 3)) del x146 @@ -5795,27 +5796,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x553 x555 += einsum(x554, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x554 - x556 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x556 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x556 += einsum(x555, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 3, 6, 0, 1), (6, 2, 4, 5)) * -6.0 del x555 - x557 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x557 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x557 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x557 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) - x558 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x558 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x558 += einsum(x136, (0, 1, 2, 3), x557, (0, 4, 5, 3), (4, 5, 1, 2)) * 6.0 del x557 - x559 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x559 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x559 += einsum(t1.bb, (0, 1), x227, (2, 1), (0, 2)) - x560 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x560 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x560 += einsum(x219, (0, 1), (1, 0)) x560 += einsum(x220, (0, 1), (0, 1)) * 2.0 x560 += einsum(x221, (0, 1), (0, 1)) x560 += einsum(x223, (0, 1), (1, 0)) * -1.0 x560 += einsum(x559, (0, 1), (0, 1)) del x559 - x561 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x561 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x561 += einsum(x560, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 1, 2, 3)) * -2.0 - x562 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x562 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x562 += einsum(x541, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x541 x562 += einsum(x542, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -5835,11 +5836,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_bbbb += einsum(x562, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x562, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x562 - x563 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x563 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x563 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x564 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x564 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x564 += einsum(x246, (0, 1, 2, 3), x58, (4, 5, 6, 1, 2, 3), (4, 5, 6, 0)) - x565 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x565 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x565 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x565 += einsum(x463, (0, 1, 2, 3), (1, 0, 2, 3)) del x463 @@ -5855,10 +5856,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x468 x565 += einsum(x469, (0, 1, 2, 3), (1, 0, 2, 3)) del x469 - x566 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x566 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x566 += einsum(x565, (0, 1, 2, 3), l3.babbab, (4, 3, 1, 5, 2, 6), (5, 6, 4, 0)) * -2.0 del x565 - x567 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x567 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x567 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) x567 += einsum(x473, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 del x473 @@ -5872,15 +5873,15 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x477 x567 += einsum(x479, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x479 - x568 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x568 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x568 += einsum(x567, (0, 1, 2, 3), l3.bbbbbb, (4, 1, 2, 5, 6, 0), (5, 6, 4, 3)) * -6.0 del x567 - x569 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x569 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x569 += einsum(x486, (0, 1, 2, 3), x74, (4, 5, 0, 6, 2, 3), (4, 5, 6, 1)) * 2.0 del x486 - x570 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x570 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x570 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x571 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x571 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x571 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x571 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x571 += einsum(x570, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -5888,27 +5889,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x571 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) x571 += einsum(x11, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x11 - x572 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x572 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x572 += einsum(x571, (0, 1, 2, 3), x72, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) * 6.0 del x571 - x573 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x573 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x573 += einsum(t1.bb, (0, 1), x3, (2, 0, 3, 4), (2, 3, 1, 4)) - x574 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x574 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x574 += einsum(x573, (0, 1, 2, 3), (0, 1, 2, 3)) del x573 x574 += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x575 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x575 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x575 += einsum(x574, (0, 1, 2, 3), x72, (4, 5, 0, 1, 2, 6), (4, 5, 6, 3)) * 6.0 del x574 - x576 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x576 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x576 += einsum(x492, (0, 1, 2, 3), x58, (4, 5, 0, 6, 2, 3), (4, 5, 6, 1)) * 2.0 del x492 - x577 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x577 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x577 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x137, (4, 5, 0, 3), (4, 5, 1, 2)) * 2.0 - x578 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x578 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x578 += einsum(t1.bb, (0, 1), x12, (0, 2, 1, 3), (2, 3)) del x12 - x579 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x579 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x579 += einsum(x216, (0, 1), (1, 0)) * -1.0 del x216 x579 += einsum(x509, (0, 1), (1, 0)) * 2.0 @@ -5917,16 +5918,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x510 x579 += einsum(x578, (0, 1), (0, 1)) * -1.0 del x578 - x580 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x580 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x580 += einsum(x579, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 2, 0)) * -2.0 - x581 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x581 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x581 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x158, (2, 4, 5, 0), (4, 5, 1, 3)) * 6.0 del x158 - x582 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x582 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x582 += einsum(x227, (0, 1), x78, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 - x583 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x583 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x583 += einsum(f.bb.ov, (0, 1), x78, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 - x584 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x584 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x584 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x584 += einsum(x563, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x563 @@ -5957,17 +5958,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l2new_bbbb += einsum(x584, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x584, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x584 - x585 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x585 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x585 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x585, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x585, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x585 - x586 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x586 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x586 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x586 += einsum(x25, (0, 1, 2, 3), (1, 3, 2, 0)) x586 += einsum(x26, (0, 1, 2, 3), (0, 2, 3, 1)) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x586, (3, 4, 5, 2), (0, 1, 5, 4)) * 2.0 - x587 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x587 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x587 += einsum(x141, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.3333333333333468 del x141 x587 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.3333333333333468 @@ -5976,39 +5977,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x142 l2new_bbbb += einsum(v.bbbb.ovov, (0, 1, 2, 3), x587, (4, 5, 2, 0), (1, 3, 5, 4)) * -5.9999999999997575 del x587 - x588 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x588 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x588 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x91, (2, 3, 4, 5, 6, 7), (4, 5, 0, 6, 7, 1)) - x589 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x589 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x589 += einsum(t2.aaaa, (0, 1, 2, 3), x233, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.0000000000000204 - x590 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x590 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x590 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x590 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x590 += einsum(x232, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 x590 += einsum(x589, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x589 x590 += einsum(x236, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x591 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x591 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x591 += einsum(x590, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 2, 6, 7, 0), (6, 7, 1, 4, 5, 3)) * 6.0 del x590 - x592 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x592 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x592 += einsum(t2.abab, (0, 1, 2, 3), x240, (0, 4, 2, 5), (1, 3, 4, 5)) * 1.00000000000001 - x593 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x593 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x593 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x593 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) x593 += einsum(x592, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x594 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x594 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x594 += einsum(x593, (0, 1, 2, 3), l3.abaaba, (4, 1, 5, 6, 0, 7), (6, 7, 2, 4, 5, 3)) * 2.0 del x593 - x595 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x595 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x595 += einsum(x515, (0, 1, 2, 3), x193, (4, 5, 0, 1, 6, 7), (4, 5, 2, 6, 7, 3)) * 6.0 del x515 - x596 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x596 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x596 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x596 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x597 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x597 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x597 += einsum(x596, (0, 1, 2, 3), x193, (4, 5, 0, 1, 6, 7), (4, 5, 2, 6, 7, 3)) * 6.0 del x596 - x598 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x598 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x598 += einsum(x588, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 del x588 x598 += einsum(x591, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) @@ -6029,7 +6030,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x598, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 l3new_aaaaaa += einsum(x598, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) * -1.0 del x598 - x599 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x599 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x599 += einsum(l2.aaaa, (0, 1, 2, 3), x230, (3, 4, 5, 6), (2, 4, 5, 0, 1, 6)) del x230 l3new_aaaaaa += einsum(x599, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * 2.0 @@ -6051,12 +6052,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x599, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -2.0 l3new_aaaaaa += einsum(x599, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * 2.0 del x599 - x600 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x600 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x600 += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x601 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x601 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x601 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x326, (4, 5, 2, 6), (4, 5, 0, 6, 3, 1)) * 6.0 del x326 - x602 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x602 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x602 += einsum(x600, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x600 x602 += einsum(x601, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 @@ -6080,13 +6081,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x602, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) l3new_aaaaaa += einsum(x602, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * -1.0 del x602 - x603 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x603 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x603 += einsum(f.aa.vv, (0, 1), l3.aaaaaa, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x604 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x604 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x604 += einsum(f.aa.ov, (0, 1), x193, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) - x605 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x605 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x605 += einsum(v.aaaa.vvvv, (0, 1, 2, 3), l3.aaaaaa, (4, 1, 3, 5, 6, 7), (5, 6, 7, 4, 0, 2)) - x606 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x606 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x606 += einsum(x603, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x603 x606 += einsum(x604, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 @@ -6097,16 +6098,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x606, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) l3new_aaaaaa += einsum(x606, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 del x606 - x607 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x607 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x607 += einsum(x462, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 6, 7, 0, 2), (7, 1, 3, 4, 5, 6)) * -6.0 del x462 - x608 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x608 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x608 += einsum(f.aa.oo, (0, 1), (0, 1)) x608 += einsum(x389, (0, 1), (1, 0)) del x389 - x609 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x609 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x609 += einsum(x608, (0, 1), l3.aaaaaa, (2, 3, 4, 5, 6, 0), (5, 6, 1, 2, 3, 4)) * 6.0 - x610 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x610 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x610 += einsum(x607, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) del x607 x610 += einsum(x609, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * -1.0 @@ -6115,25 +6116,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x610, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 0, 2)) * -1.0 l3new_aaaaaa += einsum(x610, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) del x610 - x611 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x611 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x611 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) - x612 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x612 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x612 += einsum(x611, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x611 x612 += einsum(x325, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x325 - x613 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x613 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x613 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x612, (4, 5, 6, 0, 2, 7), (4, 5, 6, 7, 1, 3)) * 6.0 del x612 l3new_aaaaaa += einsum(x613, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 2, 0)) * -1.0 l3new_aaaaaa += einsum(x613, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) l3new_aaaaaa += einsum(x613, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 del x613 - x614 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x614 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x614 += einsum(l2.aaaa, (0, 1, 2, 3), v.aaaa.ooov, (4, 3, 5, 6), (2, 4, 5, 0, 1, 6)) - x615 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x615 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x615 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x410, (4, 5, 6, 1), (4, 0, 2, 5, 6, 3)) * 2.0 - x616 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x616 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x616 += einsum(x614, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x614 x616 += einsum(x615, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) @@ -6157,11 +6158,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x616, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) l3new_aaaaaa += einsum(x616, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) del x616 - x617 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x617 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x617 += einsum(x454, (0, 1), l3.aaaaaa, (2, 3, 1, 4, 5, 6), (4, 5, 6, 2, 3, 0)) * 6.0 - x618 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x618 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x618 += einsum(x361, (0, 1), x193, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 6.0 - x619 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x619 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x619 += einsum(x617, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) del x617 x619 += einsum(x618, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -6170,13 +6171,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x619, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -1.0 l3new_aaaaaa += einsum(x619, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 del x619 - x620 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x620 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x620 += einsum(x413, (0, 1), l3.aaaaaa, (2, 3, 4, 5, 6, 0), (5, 6, 1, 2, 3, 4)) * 6.0 l3new_aaaaaa += einsum(x620, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) l3new_aaaaaa += einsum(x620, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 l3new_aaaaaa += einsum(x620, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) del x620 - x621 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x621 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x621 += einsum(x253, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 6, 7, 0, 1), (7, 2, 3, 4, 5, 6)) l3new_aaaaaa += einsum(x621, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * -6.0 l3new_aaaaaa += einsum(x621, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 2, 1)) * 6.0 @@ -6185,11 +6186,11 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x621, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) * -6.0 l3new_aaaaaa += einsum(x621, (0, 1, 2, 3, 4, 5), (3, 4, 5, 2, 1, 0)) * 6.0 del x621 - x622 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x622 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x622 += einsum(x239, (0, 1, 2, 3), l3.abaaba, (4, 1, 5, 6, 0, 7), (6, 7, 2, 4, 5, 3)) - x623 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x623 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x623 += einsum(x5, (0, 1, 2, 3), x91, (0, 1, 4, 5, 6, 7), (4, 5, 2, 6, 7, 3)) - x624 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x624 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x624 += einsum(x622, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 4.00000000000004 del x622 x624 += einsum(x623, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -2.0 @@ -6204,7 +6205,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x624, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 l3new_aaaaaa += einsum(x624, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) del x624 - x625 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x625 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x625 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x193, (4, 5, 6, 0, 7, 3), (4, 5, 6, 7, 1, 2)) * -1.0 del x193 l3new_aaaaaa += einsum(x625, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) * -6.0 @@ -6214,26 +6215,26 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_aaaaaa += einsum(x625, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -6.0 l3new_aaaaaa += einsum(x625, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * 6.0 del x625 - x626 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x626 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x626 += einsum(l2.bbbb, (0, 1, 2, 3), v.aabb.ovoo, (4, 5, 6, 3), (2, 6, 0, 1, 4, 5)) - x627 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x627 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x627 += einsum(v.aabb.ovov, (0, 1, 2, 3), x116, (4, 5, 6, 3), (4, 2, 5, 6, 0, 1)) del x116 - x628 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x628 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x628 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x628 += einsum(x22, (0, 1, 2, 3), (0, 1, 3, 2)) x628 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.00000000000001 - x629 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x629 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x629 += einsum(x628, (0, 1, 2, 3), l3.babbab, (4, 2, 5, 6, 7, 0), (6, 1, 4, 5, 7, 3)) * -2.0 del x628 - x630 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x630 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x630 += einsum(x506, (0, 1, 2, 3), l3.babbab, (4, 5, 6, 7, 2, 0), (7, 1, 4, 6, 3, 5)) * -2.0 - x631 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x631 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x631 += einsum(x6, (0, 1, 2, 3), x58, (4, 0, 5, 6, 7, 2), (4, 1, 5, 6, 7, 3)) * 2.0 - x632 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x632 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x632 += einsum(t1.bb, (0, 1), x19, (2, 1), (0, 2)) del x19 - x633 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x633 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x633 += einsum(x219, (0, 1), (1, 0)) del x219 x633 += einsum(x221, (0, 1), (0, 1)) @@ -6242,16 +6243,16 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x632 x633 += einsum(x223, (0, 1), (1, 0)) * -1.0 del x223 - x634 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x634 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x634 += einsum(x633, (0, 1), l3.babbab, (2, 3, 4, 5, 6, 0), (5, 1, 2, 4, 6, 3)) * -2.0 del x633 - x635 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x635 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x635 += einsum(f.bb.oo, (0, 1), (0, 1)) x635 += einsum(x540, (0, 1), (1, 0)) del x540 - x636 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x636 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x636 += einsum(x635, (0, 1), l3.babbab, (2, 3, 4, 5, 6, 0), (5, 1, 2, 4, 6, 3)) * -2.0 - x637 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x637 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x637 += einsum(x626, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 2.0 del x626 x637 += einsum(x627, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 2.0 @@ -6269,17 +6270,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (3, 5, 2, 0, 4, 1)) * -1.0 l3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (3, 5, 2, 1, 4, 0)) del x637 - x638 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x638 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x638 += einsum(l2.abab, (0, 1, 2, 3), v.bbbb.ovvv, (4, 5, 6, 1), (3, 4, 5, 6, 2, 0)) - x639 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x639 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x639 += einsum(l2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 0, 5, 6), (3, 5, 1, 6, 2, 4)) - x640 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x640 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x640 += einsum(v.aabb.ooov, (0, 1, 2, 3), x61, (4, 5, 6, 0, 1, 7), (4, 2, 5, 3, 6, 7)) - x641 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x641 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x641 += einsum(x7, (0, 1, 2, 3), x61, (4, 5, 2, 6, 3, 7), (4, 0, 5, 1, 6, 7)) * -1.0 - x642 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x642 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x642 += einsum(t2.bbbb, (0, 1, 2, 3), x10, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.00000000000002 - x643 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x643 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x643 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x643 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x643 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 @@ -6287,39 +6288,39 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x642 x643 += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 l3new_abaaba += einsum(x643, (0, 1, 2, 3), l3.abaaba, (4, 2, 5, 6, 0, 7), (4, 3, 5, 6, 1, 7)) * 2.0 - x644 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x644 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x644 += einsum(x643, (0, 1, 2, 3), l3.babbab, (4, 5, 2, 6, 7, 0), (6, 1, 4, 3, 7, 5)) * 2.0 del x643 - x645 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x645 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x645 += einsum(t2.abab, (0, 1, 2, 3), x10, (1, 4, 3, 5), (4, 5, 0, 2)) * 1.00000000000001 - x646 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x646 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x646 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x646 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) x646 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.00000000000002 x646 += einsum(x645, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 - x647 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x647 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x647 += einsum(x646, (0, 1, 2, 3), l3.abaaba, (4, 5, 3, 6, 7, 2), (7, 0, 5, 1, 6, 4)) * 2.0 - x648 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x648 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x648 += einsum(x516, (0, 1, 2, 3), x74, (4, 0, 1, 5, 6, 7), (4, 2, 5, 3, 6, 7)) * 2.0 del x516 - x649 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x649 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x649 += einsum(x213, (0, 1, 2, 3), x74, (4, 0, 2, 5, 6, 7), (4, 1, 5, 3, 6, 7)) * 2.0 del x213 - x650 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x650 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x650 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x297, (4, 1, 5, 6), (0, 2, 3, 4, 5, 6)) * 2.0 - x651 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x651 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x651 += einsum(v.aabb.ovov, (0, 1, 2, 3), x100, (4, 5, 6, 1), (2, 4, 3, 5, 0, 6)) * 2.0 - x652 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x652 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x652 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x96, (4, 2, 5, 6), (0, 4, 3, 1, 5, 6)) del x96 - x653 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x653 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x653 += einsum(v.aabb.ovov, (0, 1, 2, 3), x66, (4, 5, 6, 0), (2, 4, 3, 5, 6, 1)) * 2.0 - x654 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x654 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x654 += einsum(l2.abab, (0, 1, 2, 3), x537, (3, 4, 5, 6), (4, 5, 1, 6, 2, 0)) del x537 - x655 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x655 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x655 += einsum(l2.abab, (0, 1, 2, 3), x31, (4, 5, 2, 6), (3, 4, 1, 5, 6, 0)) - x656 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x656 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x656 += einsum(l1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 5), (1, 4, 0, 5, 2, 3)) x656 += einsum(x638, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -1.0 del x638 @@ -6354,48 +6355,48 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_babbab += einsum(x656, (0, 1, 2, 3, 4, 5), (2, 5, 3, 1, 4, 0)) * -1.0 l3new_babbab += einsum(x656, (0, 1, 2, 3, 4, 5), (3, 5, 2, 1, 4, 0)) del x656 - x657 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x657 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x657 += einsum(l2.bbbb, (0, 1, 2, 3), v.aabb.ovvv, (4, 5, 6, 1), (2, 3, 0, 6, 4, 5)) - x658 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x658 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x658 += einsum(f.bb.vv, (0, 1), l3.babbab, (2, 3, 1, 4, 5, 6), (4, 6, 0, 2, 5, 3)) - x659 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x659 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x659 += einsum(f.bb.ov, (0, 1), x74, (2, 3, 0, 4, 5, 6), (2, 3, 1, 4, 5, 6)) - x660 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x660 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x660 += einsum(v.aabb.vvvv, (0, 1, 2, 3), l3.babbab, (4, 1, 3, 5, 6, 7), (5, 7, 4, 2, 6, 0)) - x661 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x661 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x661 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x74, (4, 5, 0, 3, 6, 7), (4, 5, 1, 2, 6, 7)) * -1.0 - x662 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x662 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x662 += einsum(v.aabb.vvov, (0, 1, 2, 3), x74, (4, 5, 2, 6, 7, 1), (4, 5, 6, 3, 7, 0)) - x663 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x663 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x663 += einsum(v.aabb.ovvv, (0, 1, 2, 3), x58, (4, 5, 6, 3, 7, 0), (4, 5, 6, 2, 7, 1)) - x664 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x664 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x664 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.99999999999999 x664 += einsum(x246, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.99999999999999 del x246 x664 += einsum(x247, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x247 - x665 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x665 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x665 += einsum(x664, (0, 1, 2, 3), l3.babbab, (4, 5, 0, 6, 2, 7), (6, 7, 4, 1, 3, 5)) * -2.00000000000002 - x666 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x666 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x666 += einsum(x579, (0, 1), l3.babbab, (2, 3, 1, 4, 5, 6), (4, 6, 2, 0, 5, 3)) * -2.0 - x667 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x667 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x667 += einsum(x31, (0, 1, 2, 3), x74, (4, 5, 0, 6, 2, 7), (4, 5, 6, 1, 3, 7)) * 2.0 - x668 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x668 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x668 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 6, 7), (5, 7, 1, 4, 6, 0)) - x669 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x669 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x669 += einsum(x668, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x668 x669 += einsum(x98, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x98 - x670 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x670 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x670 += einsum(v.aabb.ovov, (0, 1, 2, 3), x669, (4, 5, 2, 6, 7, 0), (4, 5, 3, 6, 7, 1)) * 2.0 del x669 - x671 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x671 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x671 += einsum(x227, (0, 1), x74, (2, 3, 0, 4, 5, 6), (2, 3, 4, 1, 5, 6)) * 2.0 - x672 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x672 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x672 += einsum(v.aabb.ovov, (0, 1, 2, 3), x78, (4, 5, 2, 6), (4, 5, 3, 6, 0, 1)) * 2.0 del x78 - x673 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x673 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x673 += einsum(l1.aa, (0, 1), v.bbbb.ovov, (2, 3, 4, 5), (2, 4, 3, 5, 1, 0)) * -1.0 x673 += einsum(x657, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 2.0 del x657 @@ -6426,23 +6427,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_babbab += einsum(x673, (0, 1, 2, 3, 4, 5), (3, 5, 2, 0, 4, 1)) l3new_babbab += einsum(x673, (0, 1, 2, 3, 4, 5), (2, 5, 3, 0, 4, 1)) * -1.0 del x673 - x674 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x674 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x674 += einsum(l2.bbbb, (0, 1, 2, 3), x5, (3, 4, 5, 6), (2, 4, 0, 1, 5, 6)) - x675 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x675 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x675 += einsum(v.aabb.ovov, (0, 1, 2, 3), x0, (4, 5, 6, 3), (4, 2, 5, 6, 0, 1)) * -1.0 del x0 - x676 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x676 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x676 += einsum(t1.bb, (0, 1), x20, (2, 1), (0, 2)) * -1.0 del x20 - x677 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x677 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x677 += einsum(x220, (0, 1), (0, 1)) * 2.0 del x220 x677 += einsum(x676, (0, 1), (0, 1)) del x676 - x678 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x678 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x678 += einsum(x677, (0, 1), l3.babbab, (2, 3, 4, 5, 6, 0), (5, 1, 2, 4, 6, 3)) * -2.0 del x677 - x679 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x679 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x679 += einsum(x674, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x674 x679 += einsum(x675, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * 6.0 @@ -6452,10 +6453,10 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_babbab += einsum(x679, (0, 1, 2, 3, 4, 5), (3, 5, 2, 0, 4, 1)) l3new_babbab += einsum(x679, (0, 1, 2, 3, 4, 5), (3, 5, 2, 1, 4, 0)) * -1.0 del x679 - x680 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x680 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x680 += einsum(t2.aaaa, (0, 1, 2, 3), x233, (1, 4, 5, 3), (0, 4, 2, 5)) * 2.00000000000002 del x233 - x681 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x681 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x681 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x681 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x681 += einsum(x232, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 @@ -6465,7 +6466,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x681 += einsum(x236, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x236 l3new_babbab += einsum(x681, (0, 1, 2, 3), l3.babbab, (4, 2, 5, 6, 0, 7), (4, 3, 5, 6, 1, 7)) * 2.0 - x682 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x682 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x682 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.4999999999999949 x682 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.4999999999999949 x682 += einsum(x239, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -6473,7 +6474,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x240 l3new_babbab += einsum(x682, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 1, 6, 7, 0), (4, 3, 5, 6, 2, 7)) * 12.000000000000123 del x682 - x683 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x683 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x683 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x683 += einsum(x25, (0, 1, 2, 3), (1, 3, 0, 2)) del x25 @@ -6483,57 +6484,57 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x683 += einsum(x27, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l3new_babbab += einsum(x683, (0, 1, 2, 3), l3.babbab, (4, 5, 6, 2, 7, 0), (4, 5, 6, 1, 7, 3)) * -2.0 del x683 - x684 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x684 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x684 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (2, 4, 3, 5, 6, 7), (5, 7, 0, 1, 6, 4)) x684 += einsum(x134, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x134 l3new_babbab += einsum(v.bbbb.ovov, (0, 1, 2, 3), x684, (4, 5, 2, 0, 6, 7), (1, 7, 3, 5, 6, 4)) * 2.0 del x684 - x685 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x685 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x685 += einsum(l2.aaaa, (0, 1, 2, 3), v.aabb.vvov, (4, 1, 5, 6), (5, 6, 2, 3, 0, 4)) - x686 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x686 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x686 += einsum(f.aa.vv, (0, 1), l3.abaaba, (2, 3, 1, 4, 5, 6), (5, 3, 4, 6, 0, 2)) - x687 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x687 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x687 += einsum(f.aa.ov, (0, 1), x61, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) - x688 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x688 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x688 += einsum(v.aabb.vvvv, (0, 1, 2, 3), l3.abaaba, (4, 3, 1, 5, 6, 7), (6, 2, 5, 7, 4, 0)) - x689 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x689 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x689 += einsum(v.aabb.vvov, (0, 1, 2, 3), x91, (4, 2, 5, 6, 7, 1), (4, 3, 5, 6, 7, 0)) - x690 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x690 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x690 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x61, (4, 5, 6, 7, 0, 3), (4, 5, 6, 7, 1, 2)) * -1.0 - x691 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x691 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x691 += einsum(v.aabb.ovvv, (0, 1, 2, 3), x61, (4, 3, 5, 6, 0, 7), (4, 2, 5, 6, 7, 1)) - x692 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x692 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x692 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.99999999999999 x692 += einsum(x22, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.99999999999999 del x22 x692 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x23 - x693 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x693 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x693 += einsum(x692, (0, 1, 2, 3), l3.abaaba, (4, 5, 2, 6, 0, 7), (1, 5, 6, 7, 4, 3)) * -2.00000000000002 del x692 - x694 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x694 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x694 += einsum(x454, (0, 1), l3.abaaba, (2, 3, 1, 4, 5, 6), (5, 3, 4, 6, 2, 0)) * -2.0 del x454 - x695 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x695 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x695 += einsum(x6, (0, 1, 2, 3), x61, (0, 4, 5, 6, 2, 7), (1, 4, 5, 6, 7, 3)) * 2.0 - x696 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x696 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x696 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 6, 7), (6, 1, 5, 7, 0, 4)) - x697 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x697 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x697 += einsum(x696, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x696 x697 += einsum(x99, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0 del x99 - x698 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x698 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x698 += einsum(v.aabb.ovov, (0, 1, 2, 3), x697, (4, 2, 5, 6, 0, 7), (4, 3, 5, 6, 1, 7)) * 2.0 del x697 - x699 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x699 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x699 += einsum(x361, (0, 1), x61, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 6, 1)) * 2.0 del x361 - x700 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x700 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x700 += einsum(v.aabb.ovov, (0, 1, 2, 3), x289, (4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * 2.0 del x289 - x701 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x701 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x701 += einsum(l1.bb, (0, 1), v.aaaa.ovov, (2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 x701 += einsum(x685, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * -2.0 del x685 @@ -6564,27 +6565,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_abaaba += einsum(x701, (0, 1, 2, 3, 4, 5), (5, 1, 4, 2, 0, 3)) l3new_abaaba += einsum(x701, (0, 1, 2, 3, 4, 5), (4, 1, 5, 2, 0, 3)) * -1.0 del x701 - x702 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x702 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x702 += einsum(l2.aaaa, (0, 1, 2, 3), v.aabb.ooov, (4, 3, 5, 6), (5, 6, 2, 4, 0, 1)) - x703 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x703 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x703 += einsum(x664, (0, 1, 2, 3), l3.abaaba, (4, 0, 5, 6, 7, 2), (7, 1, 6, 3, 4, 5)) * -2.00000000000002 del x664 - x704 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x704 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x704 += einsum(x506, (0, 1, 2, 3), l3.abaaba, (4, 5, 6, 7, 0, 2), (1, 5, 7, 3, 4, 6)) * -2.0 del x506 - x705 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x705 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x705 += einsum(x31, (0, 1, 2, 3), x91, (4, 0, 2, 5, 6, 7), (4, 1, 5, 3, 6, 7)) * 2.0 del x31, x91 - x706 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x706 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x706 += einsum(x413, (0, 1), l3.abaaba, (2, 3, 4, 5, 6, 0), (6, 3, 5, 1, 2, 4)) * -2.0 del x413 - x707 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x707 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x707 += einsum(v.aabb.ovov, (0, 1, 2, 3), x410, (4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) * 2.0 del x410 - x708 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x708 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x708 += einsum(x608, (0, 1), l3.abaaba, (2, 3, 4, 5, 6, 0), (6, 3, 5, 1, 2, 4)) * -2.0 del x608 - x709 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x709 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x709 += einsum(x702, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 del x702 x709 += einsum(x703, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -1.0 @@ -6602,19 +6603,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_abaaba += einsum(x709, (0, 1, 2, 3, 4, 5), (5, 1, 4, 2, 0, 3)) * -1.0 l3new_abaaba += einsum(x709, (0, 1, 2, 3, 4, 5), (5, 1, 4, 3, 0, 2)) del x709 - x710 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x710 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x710 += einsum(l2.abab, (0, 1, 2, 3), v.aabb.ovvv, (4, 5, 6, 1), (3, 6, 2, 4, 0, 5)) - x711 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x711 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x711 += einsum(l2.abab, (0, 1, 2, 3), v.aaaa.ovvv, (4, 5, 6, 0), (3, 1, 2, 4, 5, 6)) - x712 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x712 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x712 += einsum(v.aabb.ovoo, (0, 1, 2, 3), x74, (4, 2, 3, 5, 6, 7), (4, 5, 6, 0, 7, 1)) - x713 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x713 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x713 += einsum(x5, (0, 1, 2, 3), x74, (0, 4, 1, 5, 6, 7), (4, 5, 6, 2, 7, 3)) * -1.0 del x5, x74 - x714 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x714 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x714 += einsum(x681, (0, 1, 2, 3), l3.abaaba, (4, 5, 2, 6, 7, 0), (7, 5, 6, 1, 4, 3)) * 2.0 del x681 - x715 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x715 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x715 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x715 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) del x238 @@ -6622,34 +6623,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x239 x715 += einsum(x592, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x592 - x716 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x716 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x716 += einsum(x715, (0, 1, 2, 3), l3.babbab, (4, 5, 1, 6, 7, 0), (6, 4, 7, 2, 5, 3)) * 2.0 del x715 - x717 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x717 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x717 += einsum(x382, (0, 1, 2, 3), x61, (4, 5, 0, 6, 2, 7), (4, 5, 6, 1, 7, 3)) * 2.0 del x382 - x718 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x718 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x718 += einsum(x348, (0, 1, 2, 3), x61, (4, 5, 0, 6, 2, 7), (4, 5, 6, 1, 7, 3)) * 2.0 del x61, x348 - x719 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x719 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x719 += einsum(v.aabb.ovov, (0, 1, 2, 3), x297, (4, 3, 5, 6), (2, 4, 0, 5, 1, 6)) * 2.0 del x297 - x720 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x720 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x720 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x100, (4, 5, 6, 1), (4, 5, 0, 2, 6, 3)) * 2.0 del x100 - x721 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x721 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x721 += einsum(v.aabb.ovov, (0, 1, 2, 3), x139, (4, 2, 5, 6), (4, 3, 0, 5, 1, 6)) * 2.0 del x139 - x722 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x722 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x722 += einsum(v.aaaa.ovov, (0, 1, 2, 3), x66, (4, 5, 6, 2), (4, 5, 6, 0, 3, 1)) * 2.0 del x66 - x723 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x723 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x723 += einsum(l2.abab, (0, 1, 2, 3), x6, (3, 4, 5, 6), (4, 1, 2, 5, 0, 6)) del x6 - x724 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x724 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x724 += einsum(l2.abab, (0, 1, 2, 3), x386, (2, 4, 5, 6), (3, 1, 4, 5, 0, 6)) del x386 - x725 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x725 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x725 += einsum(l1.aa, (0, 1), v.aabb.ovov, (2, 3, 4, 5), (4, 5, 1, 2, 0, 3)) x725 += einsum(x710, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) del x710 @@ -6684,12 +6685,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_abaaba += einsum(x725, (0, 1, 2, 3, 4, 5), (4, 1, 5, 3, 0, 2)) * -1.0 l3new_abaaba += einsum(x725, (0, 1, 2, 3, 4, 5), (5, 1, 4, 3, 0, 2)) del x725 - x726 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x726 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x726 += einsum(l2.aaaa, (0, 1, 2, 3), x7, (4, 5, 3, 6), (4, 5, 2, 6, 0, 1)) l3new_abaaba += einsum(x726, (0, 1, 2, 3, 4, 5), (5, 1, 4, 2, 0, 3)) * 2.0 l3new_abaaba += einsum(x726, (0, 1, 2, 3, 4, 5), (5, 1, 4, 3, 0, 2)) * -2.0 del x726 - x727 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x727 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x727 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x727 += einsum(x15, (0, 1, 2, 3), (0, 1, 2, 3)) del x15 @@ -6699,7 +6700,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x645 l3new_abaaba += einsum(x727, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 3, 6, 7, 2), (4, 1, 5, 6, 0, 7)) * 6.0 del x727 - x728 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x728 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x728 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x728 += einsum(x251, (0, 1, 2, 3), (1, 3, 2, 0)) del x251 @@ -6710,21 +6711,21 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x253 l3new_abaaba += einsum(x728, (0, 1, 2, 3), l3.abaaba, (4, 5, 6, 3, 7, 0), (4, 5, 6, 2, 7, 1)) * 2.0 del x728 - x729 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x729 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x729 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (2, 4, 3, 5, 6, 7), (6, 4, 5, 7, 0, 1)) x729 += einsum(x323, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) del x323 l3new_abaaba += einsum(v.aaaa.ovov, (0, 1, 2, 3), x729, (4, 5, 6, 7, 2, 0), (1, 5, 3, 7, 4, 6)) * 2.0 del x729 - x730 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x730 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x730 += einsum(v.aabb.ooov, (0, 1, 2, 3), x58, (4, 5, 6, 7, 0, 1), (4, 5, 2, 6, 7, 3)) - x731 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x731 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x731 += einsum(x7, (0, 1, 2, 3), x58, (4, 5, 6, 7, 2, 3), (4, 5, 0, 6, 7, 1)) del x7, x58 - x732 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x732 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x732 += einsum(t2.bbbb, (0, 1, 2, 3), x10, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0000000000000204 del x10 - x733 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x733 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x733 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x733 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x733 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.00000000000001 @@ -6733,22 +6734,22 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x732 x733 += einsum(x13, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x13 - x734 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x734 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x734 += einsum(x733, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 2, 6, 7, 0), (6, 7, 1, 4, 5, 3)) * 6.0 del x733 - x735 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x735 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x735 += einsum(x646, (0, 1, 2, 3), l3.babbab, (4, 3, 5, 6, 2, 7), (6, 7, 0, 4, 5, 1)) * 2.0 del x646 - x736 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x736 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x736 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) x736 += einsum(x3, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x737 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x737 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x737 += einsum(x736, (0, 1, 2, 3), x72, (4, 5, 0, 2, 6, 7), (4, 5, 1, 6, 7, 3)) * 6.0 del x736 - x738 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x738 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x738 += einsum(x208, (0, 1, 2, 3), x72, (4, 5, 0, 1, 6, 7), (4, 5, 2, 6, 7, 3)) * 6.0 del x208 - x739 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x739 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x739 += einsum(x730, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 del x730 x739 += einsum(x731, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 @@ -6771,7 +6772,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x739, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -1.0 l3new_bbbbbb += einsum(x739, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) * -1.0 del x739 - x740 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x740 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x740 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x72, (4, 5, 6, 0, 7, 3), (4, 5, 6, 7, 1, 2)) * -1.0 l3new_bbbbbb += einsum(x740, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) * -6.0 l3new_bbbbbb += einsum(x740, (0, 1, 2, 3, 4, 5), (3, 5, 4, 1, 2, 0)) * 6.0 @@ -6780,13 +6781,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x740, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -6.0 l3new_bbbbbb += einsum(x740, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * 6.0 del x740 - x741 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x741 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x741 += einsum(x579, (0, 1), l3.bbbbbb, (2, 3, 1, 4, 5, 6), (4, 5, 6, 2, 3, 0)) * 6.0 del x579 - x742 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x742 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x742 += einsum(x227, (0, 1), x72, (2, 3, 4, 0, 5, 6), (2, 3, 4, 5, 6, 1)) * 6.0 del x227 - x743 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x743 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x743 += einsum(x741, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) del x741 x743 += einsum(x742, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 @@ -6795,13 +6796,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x743, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) * -1.0 l3new_bbbbbb += einsum(x743, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 del x743 - x744 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x744 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x744 += einsum(x586, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 6, 7, 0, 3), (7, 1, 2, 4, 5, 6)) * -6.0 del x586 - x745 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x745 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x745 += einsum(x635, (0, 1), l3.bbbbbb, (2, 3, 4, 5, 6, 0), (5, 6, 1, 2, 3, 4)) * 6.0 del x635 - x746 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x746 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x746 += einsum(x744, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) del x744 x746 += einsum(x745, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * -1.0 @@ -6810,7 +6811,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x746, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 0, 2)) * -1.0 l3new_bbbbbb += einsum(x746, (0, 1, 2, 3, 4, 5), (4, 5, 3, 1, 2, 0)) del x746 - x747 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x747 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x747 += einsum(l2.bbbb, (0, 1, 2, 3), x3, (3, 4, 5, 6), (2, 4, 5, 0, 1, 6)) del x3 l3new_bbbbbb += einsum(x747, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * 2.0 @@ -6832,12 +6833,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x747, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) * -2.0 l3new_bbbbbb += einsum(x747, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * 2.0 del x747 - x748 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x748 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x748 += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) - x749 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x749 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x749 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x137, (4, 5, 2, 6), (0, 4, 5, 3, 1, 6)) * 2.0 del x137 - x750 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x750 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x750 += einsum(x748, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 2.0 del x748 x750 += einsum(x749, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -1.0 @@ -6861,14 +6862,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x750, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) l3new_bbbbbb += einsum(x750, (0, 1, 2, 3, 4, 5), (5, 4, 3, 2, 1, 0)) * -1.0 del x750 - x751 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x751 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x751 += einsum(f.bb.vv, (0, 1), l3.bbbbbb, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x752 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x752 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x752 += einsum(f.bb.ov, (0, 1), x72, (2, 3, 4, 0, 5, 6), (2, 3, 4, 1, 5, 6)) del x72 - x753 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x753 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x753 += einsum(v.bbbb.vvvv, (0, 1, 2, 3), l3.bbbbbb, (4, 3, 1, 5, 6, 7), (5, 6, 7, 4, 0, 2)) * -1.0 - x754 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x754 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x754 += einsum(x751, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x751 x754 += einsum(x752, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 @@ -6879,7 +6880,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x754, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) l3new_bbbbbb += einsum(x754, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 del x754 - x755 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x755 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x755 += einsum(x27, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 6, 7, 0, 1), (7, 2, 3, 4, 5, 6)) del x27 l3new_bbbbbb += einsum(x755, (0, 1, 2, 3, 4, 5), (3, 4, 5, 0, 1, 2)) * -6.0 @@ -6889,19 +6890,19 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x755, (0, 1, 2, 3, 4, 5), (3, 4, 5, 1, 2, 0)) * -6.0 l3new_bbbbbb += einsum(x755, (0, 1, 2, 3, 4, 5), (3, 4, 5, 2, 1, 0)) * 6.0 del x755 - x756 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x756 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x756 += einsum(x560, (0, 1), l3.bbbbbb, (2, 3, 4, 5, 6, 0), (5, 6, 1, 2, 3, 4)) * 6.0 del x560 l3new_bbbbbb += einsum(x756, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 0, 2)) l3new_bbbbbb += einsum(x756, (0, 1, 2, 3, 4, 5), (5, 3, 4, 1, 2, 0)) * -1.0 l3new_bbbbbb += einsum(x756, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) del x756 - x757 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x757 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x757 += einsum(l2.bbbb, (0, 1, 2, 3), v.bbbb.ooov, (4, 3, 5, 6), (2, 4, 5, 0, 1, 6)) - x758 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x758 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x758 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x136, (4, 5, 6, 1), (0, 2, 4, 3, 5, 6)) * 6.0 del x136 - x759 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x759 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x759 += einsum(x757, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x757 x759 += einsum(x758, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) @@ -6925,14 +6926,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, l3new_bbbbbb += einsum(x759, (0, 1, 2, 3, 4, 5), (4, 5, 3, 2, 1, 0)) l3new_bbbbbb += einsum(x759, (0, 1, 2, 3, 4, 5), (5, 3, 4, 2, 1, 0)) del x759 - x760 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x760 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x760 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) - x761 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x761 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x761 += einsum(x760, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x760 x761 += einsum(x132, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0 del x132 - x762 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x762 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x762 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x761, (4, 5, 6, 0, 2, 7), (4, 5, 6, 1, 3, 7)) * 6.0 del x761 l3new_bbbbbb += einsum(x762, (0, 1, 2, 3, 4, 5), (5, 4, 3, 1, 2, 0)) * -1.0 @@ -6960,103 +6961,103 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_aa_ov += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) rdm1_f_aa_ov += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 2, 5, 1, 0), (4, 5)) * 2.0 rdm1_f_aa_ov += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 0, 1), (4, 5)) * 3.0 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), (0, 1)) rdm1_f_aa_ov += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_aa_ov += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 0, 5, 1), (4, 5)) - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_bb_ov += einsum(t1.bb, (0, 1), (0, 1)) rdm1_f_bb_ov += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_bb_ov += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 3, 5, 0, 1), (4, 5)) * 2.0 rdm1_f_bb_ov += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) rdm1_f_bb_ov += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 0, 1), (4, 5)) * 3.0 rdm1_f_bb_ov += einsum(l2.aaaa, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 0, 5, 1), (4, 5)) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_aa_vo += einsum(l1.aa, (0, 1), (0, 1)) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_bb_vo += einsum(l1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 0, 6, 2), (1, 6)) * 0.9999999999999601 rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) rdm1_f_aa_vv += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) rdm1_f_aa_vv += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 6, 1, 2), (0, 6)) * 1.9999999999999194 rdm1_f_aa_vv += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (3, 4, 5, 6, 1, 2), (0, 6)) * 2.9999999999998788 rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) rdm1_f_bb_vv += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 6, 1, 2), (0, 6)) * 1.9999999999999194 rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 0, 6, 2), (1, 6)) * 0.9999999999999601 rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_bb_vv += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (3, 4, 5, 6, 1, 2), (0, 6)) * 2.9999999999998788 - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 4, 5, 0, 1, 2), (3, 6)) rdm1_f_aa_oo += einsum(x0, (0, 1), (1, 0)) * -2.9999999999998788 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm1_f_aa_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x2, (0, 1), (1, 0)) * -1.0 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x3, (0, 1), (1, 0)) * -2.0 - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 0, 1, 2), (3, 6)) rdm1_f_aa_oo += einsum(x4, (0, 1), (1, 0)) * -1.9999999999999194 - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 0, 1, 2), (4, 6)) rdm1_f_aa_oo += einsum(x5, (0, 1), (1, 0)) * -0.9999999999999601 - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 0, 1, 2), (4, 6)) rdm1_f_bb_oo += einsum(x6, (0, 1), (1, 0)) * -0.9999999999999601 - x7 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x7 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) rdm1_f_bb_oo += einsum(x7, (0, 1), (1, 0)) * -2.0 - x8 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x8 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm1_f_bb_oo += einsum(x8, (0, 1), (1, 0)) * -1.0 - x9 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x9 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 4, 5, 0, 1, 2), (3, 6)) rdm1_f_bb_oo += einsum(x9, (0, 1), (1, 0)) * -2.9999999999998788 - x10 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x10 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 0, 1, 2), (3, 6)) rdm1_f_bb_oo += einsum(x10, (0, 1), (1, 0)) * -1.9999999999999194 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) rdm1_f_bb_oo += einsum(x11, (0, 1), (1, 0)) * -1.0 - x12 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(t1.aa, (0, 1), l3.aaaaaa, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) rdm1_f_aa_ov += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x12, (0, 1, 2, 6, 4, 5), (6, 3)) * -2.9999999999998788 del x12 - x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x13 += einsum(t1.aa, (0, 1), l3.babbab, (2, 1, 3, 4, 5, 6), (4, 6, 2, 3, 5, 0)) rdm1_f_aa_ov += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x13, (0, 2, 5, 3, 1, 6), (6, 4)) * 0.9999999999999601 del x13 - x14 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x14 += einsum(t1.aa, (0, 1), l3.abaaba, (2, 3, 1, 4, 5, 6), (5, 3, 4, 6, 0, 2)) rdm1_f_aa_ov += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x14, (1, 4, 2, 0, 6, 5), (6, 3)) * -1.9999999999999194 del x14 - x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) x15 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 1, 6), (5, 6, 0, 4)) x15 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) * 3.0 rdm1_f_aa_ov += einsum(t2.aaaa, (0, 1, 2, 3), x15, (0, 1, 4, 3), (4, 2)) * 2.0 del x15 - x16 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) * 0.5 x16 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 6, 1), (5, 4, 6, 0)) x16 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (2, 4, 3, 5, 6, 1), (6, 4, 5, 0)) rdm1_f_aa_ov += einsum(t2.abab, (0, 1, 2, 3), x16, (1, 3, 0, 4), (4, 2)) * -2.0 del x16 - x17 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(x1, (0, 1), (0, 1)) * 0.3333333333333468 del x1 x17 += einsum(x2, (0, 1), (0, 1)) * 0.3333333333333468 @@ -7071,31 +7072,31 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x0 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), x17, (0, 2), (2, 1)) * -2.9999999999998788 del x17 - x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(t1.bb, (0, 1), l3.abaaba, (2, 1, 3, 4, 5, 6), (5, 0, 4, 6, 2, 3)) rdm1_f_bb_ov += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x18, (1, 6, 0, 2, 3, 5), (6, 4)) * -0.9999999999999601 del x18 - x19 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(t1.bb, (0, 1), l3.babbab, (2, 3, 1, 4, 5, 6), (4, 6, 0, 2, 5, 3)) rdm1_f_bb_ov += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x19, (0, 2, 6, 5, 1, 4), (6, 3)) * 1.9999999999999194 del x19 - x20 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum(t1.bb, (0, 1), l3.bbbbbb, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) rdm1_f_bb_ov += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x20, (0, 1, 2, 6, 5, 4), (6, 3)) * 2.9999999999998788 del x20 - x21 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) x21 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (2, 4, 3, 5, 6, 1), (5, 0, 6, 4)) * 2.0 x21 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 6, 0), (6, 1, 5, 4)) * 2.0 rdm1_f_bb_ov += einsum(t2.abab, (0, 1, 2, 3), x21, (1, 4, 0, 2), (4, 3)) * -1.0 del x21 - x22 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x22 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) * 0.3333333333333333 x22 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) x22 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) * 0.3333333333333333 rdm1_f_bb_ov += einsum(t2.bbbb, (0, 1, 2, 3), x22, (0, 1, 4, 3), (4, 2)) * 6.0 del x22 - x23 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x23 += einsum(x8, (0, 1), (0, 1)) * 1.00000000000004 del x8 x23 += einsum(x7, (0, 1), (0, 1)) * 2.00000000000008 @@ -7127,117 +7128,117 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovoo += einsum(delta.aa.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vooo += einsum(delta.bb.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(l1.bb, (0, 1), t3.abaaba, (2, 1, 3, 4, 0, 5), (2, 3, 4, 5)) * 2.0 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_aaaa_oovv += einsum(l1.aa, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) * 6.0 - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(l1.bb, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 0), (3, 2, 5, 4)) * 2.0 rdm2_f_abab_oovv += einsum(l1.aa, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) * 2.0 - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(l1.bb, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 0), (2, 3, 4, 5)) * 6.0 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_bbbb_oovv += einsum(l1.aa, (0, 1), t3.babbab, (2, 1, 3, 4, 0, 5), (2, 3, 4, 5)) * 2.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(l1.bb, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(l1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovvv += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_abab_ovvv += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 5, 6, 1), (4, 0, 6, 5)) * 2.0 rdm2_f_abab_ovvv += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 2, 5, 6, 0), (4, 1, 5, 6)) * 2.0 - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vovv += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 3, 5, 6, 1), (0, 4, 6, 5)) * 2.0 rdm2_f_abab_vovv += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 3, 4), (0, 2, 3, 4)) rdm2_f_abab_vovv += einsum(l2.aaaa, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 5, 6, 1), (0, 4, 5, 6)) * 2.0 - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvov += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 6, 1, 7), (0, 2, 6, 7)) * 2.0000000000000404 rdm2_f_aaaa_vvvv += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 6.000000000000116 rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 6, 7, 2), (1, 0, 7, 6)) * 2.0000000000000404 rdm2_f_abab_vvvv += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 2.0000000000000404 rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 6, 1, 7), (0, 2, 6, 7)) * 2.0000000000000404 rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 rdm2_f_bbbb_vvvv += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (3, 4, 5, 6, 7, 2), (0, 1, 6, 7)) * 6.000000000000116 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_aaaa_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_aaaa_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x3 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 7, 0, 1, 2), (3, 5, 6, 7)) rdm2_f_aaaa_oooo += einsum(x3, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0000000000000404 - x4 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) rdm2_f_aaaa_oooo += einsum(x4, (0, 1, 2, 3), (2, 3, 1, 0)) * -6.000000000000116 - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x7 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x7 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 0, 1, 2), (4, 6)) - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 0, 1, 2), (3, 6)) - x9 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x9 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 4, 5, 0, 1, 2), (3, 6)) - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum(x5, (0, 1), (0, 1)) x10 += einsum(x6, (0, 1), (0, 1)) * 2.0 x10 += einsum(x7, (0, 1), (0, 1)) * 0.9999999999999601 @@ -7248,71 +7249,71 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x10, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -1.0 del x10 - x11 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x11 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x11, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x11, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x11, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x11, (2, 3), (3, 0, 2, 1)) * -1.0 - x12 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 1, 6), (5, 6, 0, 4)) rdm2_f_aaaa_ovoo += einsum(x12, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x12, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x13 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) rdm2_f_aaaa_ovoo += einsum(x13, (0, 1, 2, 3), (2, 3, 1, 0)) * -6.0 rdm2_f_aaaa_vooo += einsum(x13, (0, 1, 2, 3), (3, 2, 1, 0)) * 6.0 - x14 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x14 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x15 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), x14, (2, 3, 4, 1), (0, 2, 3, 4)) * 2.0 rdm2_f_aaaa_oooo += einsum(x15, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_aaaa_oooo += einsum(x15, (0, 1, 2, 3), (3, 0, 2, 1)) del x15 - x16 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 7, 5, 0, 1, 2), (4, 7, 3, 6)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x16, (0, 1, 2, 3), (3, 1, 2, 0)) * 2.0000000000000404 - x17 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 7, 5, 0, 1, 2), (3, 6, 4, 7)) rdm2_f_abab_oooo += einsum(x17, (0, 1, 2, 3), (3, 1, 2, 0)) * 2.0000000000000404 - x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x18 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (3, 5, 2, 4)) rdm2_f_abab_oooo += einsum(x18, (0, 1, 2, 3), (3, 1, 2, 0)) - x19 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (4, 2, 3, 0)) rdm2_f_abab_ovoo += einsum(x19, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - x20 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 6, 1), (5, 4, 6, 0)) rdm2_f_abab_ovoo += einsum(x20, (0, 1, 2, 3), (3, 1, 2, 0)) * -2.0 - x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (2, 4, 3, 5, 6, 1), (6, 4, 5, 0)) rdm2_f_abab_ovoo += einsum(x21, (0, 1, 2, 3), (3, 1, 2, 0)) * -2.0 - x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x22 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) x22 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oooo += einsum(t1.bb, (0, 1), x22, (2, 1, 3, 4), (4, 0, 3, 2)) * 2.0 - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ooov += einsum(t2.bbbb, (0, 1, 2, 3), x22, (1, 3, 4, 5), (5, 0, 4, 2)) * -4.0 - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oovo += einsum(t2.abab, (0, 1, 2, 3), x22, (4, 3, 0, 5), (5, 1, 2, 4)) * 2.0 rdm2_f_abab_ovvo += einsum(t1.aa, (0, 1), x22, (2, 3, 0, 4), (4, 3, 1, 2)) * -2.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x22, (1, 4, 0, 5), (5, 4, 2, 3)) * -2.0 - x23 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (2, 4, 3, 5, 6, 1), (5, 0, 6, 4)) rdm2_f_abab_vooo += einsum(x23, (0, 1, 2, 3), (3, 1, 2, 0)) * -2.0 - x24 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 6, 0), (6, 1, 5, 4)) rdm2_f_abab_vooo += einsum(x24, (0, 1, 2, 3), (3, 1, 2, 0)) * -2.0 - x25 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x25 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) - x26 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x26 += einsum(t1.aa, (0, 1), x25, (2, 3, 4, 1), (2, 3, 0, 4)) * 2.0 rdm2_f_abab_oooo += einsum(x26, (0, 1, 2, 3), (2, 1, 3, 0)) - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(delta.aa.oo, (0, 1), (0, 1)) * -1.0 x27 += einsum(x11, (0, 1), (0, 1)) x27 += einsum(x5, (0, 1), (0, 1)) @@ -7322,23 +7323,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x27 += einsum(x9, (0, 1), (0, 1)) * 2.9999999999998788 rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x27, (2, 3), (3, 0, 2, 1)) * -1.0 del x27 - x28 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x28 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x28, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x28, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x28, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x28, (2, 3), (3, 0, 2, 1)) * -1.0 - x29 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x29 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 4, 5, 0, 1, 2), (3, 6)) - x32 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x32 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 0, 1, 2), (3, 6)) - x33 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x33 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 0, 1, 2), (4, 6)) - x34 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x34 += einsum(x28, (0, 1), (0, 1)) * 0.5 x34 += einsum(x29, (0, 1), (0, 1)) x34 += einsum(x30, (0, 1), (0, 1)) * 0.5 @@ -7348,39 +7349,39 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x34, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x34, (2, 3), (0, 3, 1, 2)) * -2.0 del x34 - x35 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x35 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 7, 5, 0, 1, 2), (3, 4, 6, 7)) rdm2_f_bbbb_oooo += einsum(x35, (0, 1, 2, 3), (2, 3, 1, 0)) * -6.000000000000116 - x36 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x36 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 7, 0, 1, 2), (3, 5, 6, 7)) rdm2_f_bbbb_oooo += einsum(x36, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0000000000000404 - x37 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x37, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x38 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_bbbb_ovoo += einsum(x38, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x38, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x39 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x39 += einsum(t1.bb, (0, 1), x38, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_bbbb_oooo += einsum(x39, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x40 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x40 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 2, 3, 5, 6, 1), (5, 6, 0, 4)) rdm2_f_bbbb_ovoo += einsum(x40, (0, 1, 2, 3), (2, 3, 1, 0)) * -6.0 rdm2_f_bbbb_vooo += einsum(x40, (0, 1, 2, 3), (3, 2, 1, 0)) * 6.0 - x41 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x41 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 0, 6), (5, 6, 1, 4)) rdm2_f_bbbb_ovoo += einsum(x41, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x41, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x42 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x42 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) x42 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 - x43 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x43 += einsum(t1.bb, (0, 1), x42, (2, 3, 4, 1), (0, 2, 3, 4)) * 6.0 rdm2_f_bbbb_oooo += einsum(x43, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 rdm2_f_bbbb_oooo += einsum(x43, (0, 1, 2, 3), (3, 0, 2, 1)) del x43 - x44 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x44 += einsum(x29, (0, 1), (0, 1)) x44 += einsum(x30, (0, 1), (0, 1)) * 0.5 x44 += einsum(x31, (0, 1), (0, 1)) * 1.4999999999999394 @@ -7391,65 +7392,65 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x44, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x44, (2, 3), (3, 0, 2, 1)) * -2.0 del x44 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(t1.aa, (0, 1), l3.aaaaaa, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), x45, (2, 3, 4, 5, 1, 6), (3, 4, 2, 5, 0, 6)) - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x47 += einsum(t2.aaaa, (0, 1, 2, 3), x46, (1, 0, 4, 5, 6, 3), (4, 6, 5, 2)) - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ooov += einsum(x47, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oovo += einsum(x47, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) rdm2_f_aaaa_ooov += einsum(x48, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_aaaa_oovo += einsum(x48, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 5, 6, 1, 0), (2, 4, 5, 6)) rdm2_f_aaaa_ooov += einsum(x49, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_oovo += einsum(x49, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) rdm2_f_aaaa_ooov += einsum(x50, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_oovo += einsum(x50, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x51 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(t1.aa, (0, 1), l3.abaaba, (2, 3, 1, 4, 5, 6), (5, 3, 4, 6, 0, 2)) rdm2_f_abab_ovvv += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x51, (1, 6, 0, 2, 7, 5), (7, 6, 3, 4)) * 2.0000000000000404 - x52 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x52 += einsum(t1.aa, (0, 1), x51, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) * -1.0 - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(t2.abab, (0, 1, 2, 3), x52, (1, 3, 4, 0, 5, 6), (4, 6, 5, 2)) * -1.0 rdm2_f_aaaa_ooov += einsum(x53, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_oovo += einsum(x53, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x54 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x55 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 0, 5, 1), (4, 5)) - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 2, 5, 1, 0), (4, 5)) - x58 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 0, 1), (4, 5)) - x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x59 += einsum(t1.aa, (0, 1), l3.babbab, (2, 1, 3, 4, 5, 6), (4, 6, 2, 3, 5, 0)) rdm2_f_abab_ovvv += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x59, (2, 0, 6, 5, 1, 7), (7, 6, 4, 3)) * 2.0000000000000404 - x60 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x59, (0, 2, 3, 5, 1, 6), (6, 4)) - x61 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x51, (1, 4, 0, 2, 6, 5), (6, 3)) * -1.0 - x62 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x45, (0, 1, 2, 6, 4, 5), (6, 3)) - x63 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x63 += einsum(t2.abab, (0, 1, 2, 3), x22, (1, 3, 0, 4), (4, 2)) * 2.0 - x64 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x64 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x64 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 x64 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) - x65 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x65 += einsum(t2.aaaa, (0, 1, 2, 3), x64, (0, 1, 4, 3), (4, 2)) * -6.0 - x66 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x66 += einsum(x11, (0, 1), (0, 1)) x66 += einsum(x5, (0, 1), (0, 1)) x66 += einsum(x6, (0, 1), (0, 1)) * 2.0 @@ -7457,9 +7458,9 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x66 += einsum(x8, (0, 1), (0, 1)) * 1.9999999999999194 x66 += einsum(x9, (0, 1), (0, 1)) * 2.9999999999998788 rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x66, (2, 3), (3, 0, 2, 1)) * -1.0 - x67 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x67 += einsum(t1.aa, (0, 1), x66, (0, 2), (2, 1)) - x68 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x68 += einsum(x54, (0, 1), (0, 1)) * -1.0 x68 += einsum(x55, (0, 1), (0, 1)) * -2.0 x68 += einsum(x56, (0, 1), (0, 1)) * -1.0 @@ -7475,27 +7476,27 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_ooov += einsum(delta.aa.oo, (0, 1), x68, (2, 3), (2, 0, 1, 3)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x68, (2, 3), (0, 2, 3, 1)) rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x68, (2, 3), (2, 0, 3, 1)) * -1.0 - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.abab, (0, 1, 2, 3), x20, (1, 3, 4, 5), (4, 0, 5, 2)) - x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x70 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x59, (2, 0, 3, 5, 6, 7), (6, 7, 1, 4)) * -1.0 - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x71 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x51, (1, 4, 6, 2, 7, 5), (6, 7, 0, 3)) * -1.0 - x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x72 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x45, (1, 2, 6, 7, 5, 4), (6, 7, 0, 3)) * -1.0 - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), x64, (1, 4, 5, 3), (0, 4, 5, 2)) * 12.0 - x74 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x74 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x74 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) x74 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum(t2.abab, (0, 1, 2, 3), x74, (1, 3, 4, 5), (0, 4, 5, 2)) - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x76 += einsum(t1.aa, (0, 1), x14, (2, 3, 4, 1), (0, 2, 3, 4)) - x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x77 += einsum(t1.aa, (0, 1), x76, (2, 0, 3, 4), (3, 2, 4, 1)) * 2.0 del x76 - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(delta.aa.oo, (0, 1), t1.aa, (2, 3), (0, 1, 2, 3)) x78 += einsum(x69, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 x78 += einsum(x70, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -7514,120 +7515,120 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oovo += einsum(x78, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovo += einsum(x78, (0, 1, 2, 3), (2, 0, 3, 1)) del x78 - x79 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 5, 6, 1, 0), (6, 4, 5, 2)) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvov += einsum(x79, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvvo += einsum(x79, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x80 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) rdm2_f_aaaa_vvov += einsum(x80, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_aaaa_vvvo += einsum(x80, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x81 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum(x79, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 x81 += einsum(x80, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_abab_oovv += einsum(x81, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 1, 6, 2), (4, 5, 3, 6)) * 6.0 - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum(t2.aaaa, (0, 1, 2, 3), x81, (4, 2, 3, 5), (0, 1, 4, 5)) * 6.0 del x81 rdm2_f_aaaa_ooov += einsum(x82, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_oovo += einsum(x82, (0, 1, 2, 3), (1, 0, 3, 2)) del x82 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x83 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.3333333333333269 x83 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.3333333333333269 x83 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.3333333333333336 x83 += einsum(x4, (0, 1, 2, 3), (0, 1, 3, 2)) - x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x84 += einsum(t1.aa, (0, 1), x83, (0, 2, 3, 4), (2, 3, 4, 1)) * 6.000000000000116 del x83 rdm2_f_aaaa_ooov += einsum(x84, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_aaaa_oovo += einsum(x84, (0, 1, 2, 3), (2, 1, 3, 0)) del x84 - x85 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(t1.bb, (0, 1), l3.abaaba, (2, 1, 3, 4, 5, 6), (5, 0, 4, 6, 2, 3)) rdm2_f_abab_vovv += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x85, (1, 6, 0, 2, 7, 5), (7, 6, 3, 4)) * -2.0000000000000404 - x86 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x86 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x86 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x85, (1, 6, 7, 2, 5, 3), (6, 4, 7, 0)) * -1.0 rdm2_f_abab_ooov += einsum(x86, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x87 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x87 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x51, (2, 5, 6, 1, 7, 4), (0, 3, 6, 7)) * -1.0 rdm2_f_abab_ooov += einsum(x87, (0, 1, 2, 3), (3, 0, 2, 1)) * -4.0 - x88 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x88 += einsum(t1.bb, (0, 1), x51, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) - x89 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x89 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x89 += einsum(t2.abab, (0, 1, 2, 3), x88, (1, 4, 5, 0, 6, 2), (4, 3, 5, 6)) * -1.0 rdm2_f_abab_ooov += einsum(x89, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x90 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum(t1.bb, (0, 1), l3.babbab, (2, 3, 1, 4, 5, 6), (4, 6, 0, 2, 5, 3)) rdm2_f_abab_vovv += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x90, (2, 0, 6, 5, 1, 7), (7, 6, 4, 3)) * -2.0000000000000404 - x91 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x91 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x90, (2, 0, 6, 5, 7, 4), (6, 3, 7, 1)) rdm2_f_abab_ooov += einsum(x91, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x92 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x92 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x92 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x59, (1, 2, 4, 5, 6, 7), (0, 3, 6, 7)) rdm2_f_abab_ooov += einsum(x92, (0, 1, 2, 3), (3, 0, 2, 1)) * -3.0 - x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x93 += einsum(t1.bb, (0, 1), x59, (2, 3, 1, 4, 5, 6), (3, 2, 0, 4, 5, 6)) - x94 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x94 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x94 += einsum(t2.bbbb, (0, 1, 2, 3), x93, (1, 0, 4, 3, 5, 6), (4, 2, 5, 6)) rdm2_f_abab_ooov += einsum(x94, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x95 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x95 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x45, (6, 2, 0, 7, 5, 3), (1, 4, 6, 7)) rdm2_f_abab_ooov += einsum(x95, (0, 1, 2, 3), (3, 0, 2, 1)) * -3.0 - x96 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x96 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x96 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (3, 4, 1, 2)) rdm2_f_abab_ooov += einsum(x96, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x97 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x97 += einsum(l2.aaaa, (0, 1, 2, 3), t3.abaaba, (4, 5, 3, 0, 6, 1), (5, 6, 2, 4)) rdm2_f_abab_ooov += einsum(x97, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x98 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x98 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 5, 3, 6, 0, 1), (4, 6, 2, 5)) rdm2_f_abab_ooov += einsum(x98, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x99 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x99 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (4, 5, 3, 0, 6, 1), (4, 2, 6, 5)) rdm2_f_abab_vvov += einsum(x99, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x100 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x100 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 5, 2, 6, 1, 0), (5, 3, 6, 4)) rdm2_f_abab_vvov += einsum(x100, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x101 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x101 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) x101 += einsum(x100, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_ooov += einsum(t2.abab, (0, 1, 2, 3), x101, (3, 4, 5, 2), (0, 1, 5, 4)) * 2.0 rdm2_f_abab_ovvv += einsum(t2.aaaa, (0, 1, 2, 3), x101, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x101, (3, 4, 0, 5), (5, 1, 2, 4)) * -2.0 rdm2_f_abab_vvvv += einsum(t1.aa, (0, 1), x101, (2, 3, 0, 4), (4, 2, 1, 3)) * 2.0 - x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x102 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) x102 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 rdm2_f_abab_ooov += einsum(t2.abab, (0, 1, 2, 3), x102, (0, 4, 5, 2), (5, 1, 4, 3)) * -2.0 rdm2_f_abab_oovv += einsum(x102, (0, 1, 2, 3), t3.abaaba, (0, 4, 1, 5, 6, 3), (2, 4, 5, 6)) * 2.0 - x103 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x103 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (4, 0, 3, 2)) rdm2_f_abab_vooo += einsum(x103, (0, 1, 2, 3), (3, 1, 2, 0)) * -1.0 - x104 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x104 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 x104 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) x104 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_ooov += einsum(t2.abab, (0, 1, 2, 3), x104, (1, 4, 5, 2), (0, 4, 5, 3)) * 2.0 rdm2_f_abab_oovo += einsum(t2.aaaa, (0, 1, 2, 3), x104, (4, 5, 1, 3), (0, 5, 2, 4)) * -4.0 rdm2_f_abab_voov += einsum(t1.bb, (0, 1), x104, (0, 2, 3, 4), (4, 2, 3, 1)) * -2.0 - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(t1.aa, (0, 1), x104, (2, 3, 0, 4), (4, 3, 1, 2)) * -2.0 - x105 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x105 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) x105 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x105 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_abab_oovv += einsum(x105, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 6, 1), (3, 4, 6, 5)) * -2.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(t1.bb, (0, 1), x105, (0, 2, 3, 4), (4, 2, 3, 1)) * -1.0 - x106 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x106 += einsum(t1.bb, (0, 1), x105, (2, 1, 3, 4), (2, 0, 3, 4)) * 0.4999999999999899 - x107 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), x25, (2, 3, 4, 1), (2, 3, 0, 4)) * 0.9999999999999798 - x108 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x108 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x108 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.4999999999999899 x108 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) x108 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -7638,31 +7639,31 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x108, (0, 2, 3, 4), (4, 2, 3, 1)) * 2.0000000000000404 rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x108, (2, 3, 0, 4), (4, 3, 1, 2)) * 2.0000000000000404 del x108 - x109 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x109 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x110 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x110 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x111 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x111 += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 0, 1), (4, 5)) - x112 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x112 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 3, 5, 0, 1), (4, 5)) - x113 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x113 += einsum(l2.aaaa, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 0, 5, 1), (4, 5)) - x114 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(t1.bb, (0, 1), l3.bbbbbb, (2, 3, 1, 4, 5, 6), (4, 5, 6, 0, 2, 3)) - x115 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x115 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x114, (0, 1, 2, 6, 4, 5), (6, 3)) - x116 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x116 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x90, (2, 0, 6, 5, 1, 4), (6, 3)) - x117 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x117 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x85, (1, 6, 0, 2, 3, 5), (6, 4)) - x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x118 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x118 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 x118 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovo += einsum(t2.abab, (0, 1, 2, 3), x118, (1, 4, 5, 3), (0, 5, 2, 4)) * -2.0 rdm2_f_abab_oovv += einsum(x118, (0, 1, 2, 3), t3.babbab, (0, 4, 1, 5, 6, 3), (4, 2, 6, 5)) * 2.0 - x119 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x119 += einsum(x28, (0, 1), (0, 1)) x119 += einsum(x29, (0, 1), (0, 1)) * 2.0 x119 += einsum(x30, (0, 1), (0, 1)) @@ -7670,7 +7671,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x119 += einsum(x32, (0, 1), (0, 1)) * 1.9999999999999194 x119 += einsum(x33, (0, 1), (0, 1)) * 0.9999999999999601 rdm2_f_abab_oovv += einsum(x119, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - x120 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x120 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x120 += einsum(x109, (0, 1), (0, 1)) * -2.0 x120 += einsum(x110, (0, 1), (0, 1)) * -1.0 @@ -7685,40 +7686,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x120 += einsum(t1.bb, (0, 1), x119, (0, 2), (2, 1)) rdm2_f_abab_ooov += einsum(delta.aa.oo, (0, 1), x120, (2, 3), (0, 2, 1, 3)) * -1.0 del x120 - x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x121 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ooov += einsum(x121, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oovo += einsum(x121, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x122 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x122 += einsum(t1.bb, (0, 1), x90, (2, 3, 4, 1, 5, 6), (2, 3, 4, 0, 5, 6)) * -1.0 - x123 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x123 += einsum(t2.abab, (0, 1, 2, 3), x122, (4, 1, 5, 6, 0, 2), (4, 6, 5, 3)) * -1.0 rdm2_f_bbbb_ooov += einsum(x123, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_oovo += einsum(x123, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x124 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x124 += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 3, 6, 0, 1), (2, 4, 5, 6)) rdm2_f_bbbb_ooov += einsum(x124, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_bbbb_oovo += einsum(x124, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x125 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 0, 1), (3, 4, 5, 6)) rdm2_f_bbbb_ooov += einsum(x125, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_oovo += einsum(x125, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x126 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x126 += einsum(t1.bb, (0, 1), x114, (2, 3, 4, 5, 1, 6), (3, 4, 2, 5, 0, 6)) - x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x127 += einsum(t2.bbbb, (0, 1, 2, 3), x126, (0, 1, 4, 5, 6, 3), (4, 6, 5, 2)) * -1.0 rdm2_f_bbbb_ooov += einsum(x127, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_bbbb_oovo += einsum(x127, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x128 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x128 += einsum(t2.bbbb, (0, 1, 2, 3), x118, (0, 1, 4, 3), (4, 2)) * -1.0 - x129 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x129 += einsum(t2.abab, (0, 1, 2, 3), x104, (1, 4, 0, 2), (4, 3)) del x104 - x130 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x130 += einsum(t1.bb, (0, 1), x119, (0, 2), (2, 1)) * 0.5 - x131 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(x109, (0, 1), (0, 1)) * -1.0 del x109 x131 += einsum(x110, (0, 1), (0, 1)) * -0.5 @@ -7746,38 +7747,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x131, (2, 3), (0, 2, 3, 1)) * 2.0 rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x131, (2, 3), (2, 0, 3, 1)) * -2.0 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x131, (2, 3), (0, 2, 1, 3)) * -2.0 - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x114, (6, 1, 2, 7, 4, 5), (6, 7, 0, 3)) - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), x40, (2, 3, 4, 1), (2, 3, 0, 4)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x134 += einsum(t1.bb, (0, 1), x133, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x133 - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x90, (6, 2, 7, 5, 1, 4), (6, 7, 0, 3)) * -1.0 - x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x136 += einsum(t2.abab, (0, 1, 2, 3), x24, (4, 5, 0, 2), (4, 1, 5, 3)) - x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x137 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x85, (6, 7, 0, 2, 5, 3), (6, 7, 1, 4)) * -1.0 - x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x138 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x138 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 - x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x139 += einsum(t2.bbbb, (0, 1, 2, 3), x138, (1, 4, 5, 3), (4, 5, 0, 2)) * 4.0 del x138 - x140 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x140 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) x140 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x141 += einsum(t2.abab, (0, 1, 2, 3), x140, (4, 5, 0, 2), (4, 5, 1, 3)) del x140 - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x142 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - x143 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x143 += einsum(x142, (0, 1, 2, 3), x41, (4, 0, 5, 2), (1, 4, 5, 3)) * 2.0 del x142 - x144 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x144 += einsum(delta.bb.oo, (0, 1), t1.bb, (2, 3), (0, 1, 2, 3)) x144 += einsum(x132, (0, 1, 2, 3), (1, 0, 2, 3)) * -9.0 x144 += einsum(x134, (0, 1, 2, 3), (1, 0, 2, 3)) * 6.0 @@ -7798,82 +7799,82 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovo += einsum(x144, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovo += einsum(x144, (0, 1, 2, 3), (2, 0, 3, 1)) del x144 - x145 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvov += einsum(x145, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvvo += einsum(x145, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 - x146 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 5, 6, 0, 1), (6, 4, 5, 3)) rdm2_f_bbbb_vvov += einsum(x146, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_vvvo += einsum(x146, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 - x147 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum(x145, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 x147 += einsum(x146, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 rdm2_f_abab_oovv += einsum(x147, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 1, 6, 2), (5, 4, 6, 3)) * 2.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x147, (1, 4, 3, 5), (0, 4, 2, 5)) * -2.0 - x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(t2.bbbb, (0, 1, 2, 3), x147, (4, 2, 3, 5), (4, 0, 1, 5)) * 2.0 del x147 rdm2_f_bbbb_ooov += einsum(x148, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_bbbb_oovo += einsum(x148, (0, 1, 2, 3), (2, 1, 3, 0)) del x148 - x149 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x149 += einsum(x37, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.9999999999999798 x149 += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.9999999999999798 x149 += einsum(x35, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.999999999999998 x149 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum(t1.bb, (0, 1), x149, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0000000000000404 del x149 rdm2_f_bbbb_ooov += einsum(x150, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 rdm2_f_bbbb_oovo += einsum(x150, (0, 1, 2, 3), (2, 1, 3, 0)) del x150 - x151 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x151 += einsum(l2.bbbb, (0, 1, 2, 3), t3.babbab, (4, 5, 3, 0, 6, 1), (2, 4, 5, 6)) rdm2_f_abab_oovo += einsum(x151, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x152 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x152 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (1, 3, 2, 4)) rdm2_f_abab_oovo += einsum(x152, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x153 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x153 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x114, (0, 2, 6, 7, 3, 5), (6, 7, 1, 4)) rdm2_f_abab_oovo += einsum(x153, (0, 1, 2, 3), (2, 1, 3, 0)) * -3.0 - x154 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x154 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x59, (2, 6, 3, 5, 1, 7), (6, 0, 7, 4)) * -1.0 rdm2_f_abab_oovo += einsum(x154, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x155 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x155 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x90, (1, 6, 7, 4, 2, 5), (6, 7, 0, 3)) rdm2_f_abab_oovo += einsum(x155, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x156 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x156 += einsum(t2.abab, (0, 1, 2, 3), x93, (1, 4, 5, 3, 0, 6), (4, 5, 6, 2)) rdm2_f_abab_oovo += einsum(x156, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x157 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x157 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x51, (6, 4, 0, 2, 7, 5), (6, 1, 7, 3)) * -1.0 rdm2_f_abab_oovo += einsum(x157, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x158 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x158 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x85, (6, 7, 1, 2, 4, 5), (6, 7, 0, 3)) rdm2_f_abab_oovo += einsum(x158, (0, 1, 2, 3), (2, 1, 3, 0)) * -3.0 - x159 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x159 += einsum(t2.aaaa, (0, 1, 2, 3), x88, (4, 5, 1, 0, 6, 3), (4, 5, 6, 2)) rdm2_f_abab_oovo += einsum(x159, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x160 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x160 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 1, 0), (3, 5, 4, 6)) rdm2_f_abab_oovo += einsum(x160, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x161 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x161 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 5, 3, 6, 0, 1), (6, 4, 5, 2)) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvvo += einsum(x161, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x162 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x162 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (4, 5, 3, 0, 6, 1), (6, 5, 4, 2)) rdm2_f_abab_vvvo += einsum(x162, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x163 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x163 += einsum(x161, (0, 1, 2, 3), (0, 1, 2, 3)) x163 += einsum(x162, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovo += einsum(t2.abab, (0, 1, 2, 3), x163, (4, 3, 2, 5), (0, 1, 5, 4)) * 2.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x163, (1, 4, 2, 5), (0, 4, 5, 3)) * -2.0 rdm2_f_abab_vovv += einsum(t2.bbbb, (0, 1, 2, 3), x163, (1, 3, 4, 5), (4, 0, 5, 2)) * 4.0 - x164 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x164 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x164 += einsum(x54, (0, 1), (0, 1)) * -1.0 del x54 @@ -7900,94 +7901,94 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_abab_oovo += einsum(delta.bb.oo, (0, 1), x164, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x164, (2, 3), (2, 0, 3, 1)) * -1.0 del x164 - x165 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x165 += einsum(t2.abab, (0, 1, 2, 3), x59, (4, 1, 5, 3, 0, 6), (4, 5, 6, 2)) rdm2_f_abab_ovvo += einsum(x165, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum(t2.abab, (0, 1, 2, 3), x165, (1, 3, 4, 5), (4, 0, 2, 5)) - x167 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x167 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (3, 1, 4, 5)) rdm2_f_abab_ovvo += einsum(x167, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x168 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x168 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.babbab, (4, 6, 5, 1, 7, 2), (3, 0, 6, 7)) rdm2_f_abab_ovvo += einsum(x168, (0, 1, 2, 3), (2, 1, 3, 0)) * 3.0 - x169 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x169 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 5, 4, 7, 2, 1), (3, 0, 6, 7)) rdm2_f_abab_ovvo += einsum(x169, (0, 1, 2, 3), (2, 1, 3, 0)) * 4.0 - x170 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x170 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 3, 5, 7, 0, 2), (4, 1, 6, 7)) rdm2_f_abab_ovvo += einsum(x170, (0, 1, 2, 3), (2, 1, 3, 0)) * 3.0 - x171 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x171 += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) x171 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.5 x171 += einsum(x169, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x171 += einsum(x170, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.5 - x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x172 += einsum(t2.abab, (0, 1, 2, 3), x171, (1, 3, 4, 5), (4, 0, 5, 2)) * 2.0 del x171 - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) rdm2_f_aaaa_ovov += einsum(x173, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x173, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x173, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x173, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) rdm2_f_aaaa_ovov += einsum(x174, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x174, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x174, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x174, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x175 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) rdm2_f_aaaa_ovov += einsum(x175, (0, 1, 2, 3), (1, 2, 0, 3)) * -9.0 rdm2_f_aaaa_ovvo += einsum(x175, (0, 1, 2, 3), (1, 2, 3, 0)) * 9.0 rdm2_f_aaaa_voov += einsum(x175, (0, 1, 2, 3), (2, 1, 0, 3)) * 9.0 rdm2_f_aaaa_vovo += einsum(x175, (0, 1, 2, 3), (2, 1, 3, 0)) * -9.0 - x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x176 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) x176 += einsum(x174, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 x176 += einsum(x175, (0, 1, 2, 3), (0, 1, 2, 3)) * 9.0 - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum(t2.aaaa, (0, 1, 2, 3), x176, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x176 - x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x178 += einsum(t2.abab, (0, 1, 2, 3), x51, (1, 3, 4, 0, 5, 6), (4, 5, 6, 2)) rdm2_f_aaaa_ovov += einsum(x178, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x178, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_aaaa_voov += einsum(x178, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vovo += einsum(x178, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x179 += einsum(t2.aaaa, (0, 1, 2, 3), x45, (4, 1, 0, 5, 6, 3), (4, 5, 6, 2)) rdm2_f_aaaa_ovov += einsum(x179, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_aaaa_ovvo += einsum(x179, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 rdm2_f_aaaa_voov += einsum(x179, (0, 1, 2, 3), (2, 1, 0, 3)) * -6.0 rdm2_f_aaaa_vovo += einsum(x179, (0, 1, 2, 3), (2, 1, 3, 0)) * 6.0 - x180 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x180 += einsum(t1.aa, (0, 1), x14, (2, 0, 3, 4), (2, 3, 1, 4)) - x181 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x181 += einsum(x178, (0, 1, 2, 3), (0, 1, 2, 3)) x181 += einsum(x179, (0, 1, 2, 3), (0, 1, 2, 3)) * 3.0 x181 += einsum(x180, (0, 1, 2, 3), (0, 1, 3, 2)) - x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x182 += einsum(t2.aaaa, (0, 1, 2, 3), x181, (1, 4, 3, 5), (4, 0, 5, 2)) * 4.0 del x181 - x183 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x183 += einsum(t2.aaaa, (0, 1, 2, 3), x51, (4, 5, 0, 1, 6, 3), (4, 5, 6, 2)) * -1.0 rdm2_f_abab_ovvo += einsum(x183, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x184 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x184 += einsum(t1.aa, (0, 1), x21, (2, 3, 0, 4), (2, 3, 4, 1)) - x185 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x185 += einsum(x183, (0, 1, 2, 3), (0, 1, 2, 3)) x185 += einsum(x184, (0, 1, 2, 3), (0, 1, 2, 3)) del x184 - x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x186 += einsum(t2.abab, (0, 1, 2, 3), x185, (1, 3, 4, 5), (4, 0, 5, 2)) * 2.0 del x185 - x187 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x187 += einsum(t2.abab, (0, 1, 2, 3), x19, (1, 3, 4, 5), (4, 5, 0, 2)) - x188 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x188 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x188 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x189 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x189 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x189 += einsum(x187, (0, 1, 2, 3), (0, 1, 2, 3)) del x187 x189 += einsum(x188, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -8000,10 +8001,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x71 x189 += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) * 9.0 del x72 - x190 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x190 += einsum(t1.aa, (0, 1), x189, (0, 2, 3, 4), (2, 3, 4, 1)) del x189 - x191 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x191 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x191 += einsum(x166, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x166 x191 += einsum(x172, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -8023,34 +8024,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oovv += einsum(x191, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_aaaa_oovv += einsum(x191, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x191 - x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x192 += einsum(x11, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) - x193 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x193 += einsum(x74, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 1, 6), (4, 3, 5, 6)) * -2.0 del x74 - x194 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x194 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x194 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) - x195 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x195 += einsum(x194, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 1, 5, 6, 3), (2, 4, 5, 6)) * -6.0 del x194 - x196 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x196 += einsum(t1.aa, (0, 1), x14, (2, 3, 4, 1), (0, 2, 3, 4)) * 0.3333333333333333 del x14 - x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x197 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x197 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - x198 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x198 += einsum(x196, (0, 1, 2, 3), x197, (1, 2, 4, 5), (0, 3, 4, 5)) * 6.0 del x196, x197 - x199 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x199 += einsum(x5, (0, 1), (0, 1)) * 0.5000000000000203 x199 += einsum(x6, (0, 1), (0, 1)) * 1.0000000000000406 x199 += einsum(x8, (0, 1), (0, 1)) - x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x200 += einsum(x199, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) * -3.999999999999838 del x199 - x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x201 += einsum(x192, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x192 x201 += einsum(x193, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -8064,46 +8065,46 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oovv += einsum(x201, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x201, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x201 - x202 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x202 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x202, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x202, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x202, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x202, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x203 += einsum(t2.aaaa, (0, 1, 2, 3), x202, (1, 4, 3, 5), (0, 4, 2, 5)) - x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x204 += einsum(x163, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 1, 2), (4, 5, 3, 6)) * -4.0 - x205 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x205 += einsum(x79, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x79 x205 += einsum(x80, (0, 1, 2, 3), (0, 2, 1, 3)) * -3.0 del x80 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x205, (0, 4, 2, 5), (4, 1, 5, 3)) * -2.0 - x206 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x206 += einsum(x205, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 1, 2), (4, 5, 3, 6)) * -6.0 - x207 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x207 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x208 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x208 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x208 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x209 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x209 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x209 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 0, 6, 2), (1, 6)) - x210 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x210 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x210 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 6, 1, 2), (0, 6)) - x211 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x211 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x211 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.aaaaaa, (3, 4, 5, 6, 1, 2), (0, 6)) - x212 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x212 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x212 += einsum(x207, (0, 1), (0, 1)) x212 += einsum(x208, (0, 1), (0, 1)) * 2.0 x212 += einsum(x209, (0, 1), (0, 1)) * 0.9999999999999597 x212 += einsum(x210, (0, 1), (0, 1)) * 1.999999999999919 x212 += einsum(x211, (0, 1), (0, 1)) * 2.999999999999883 - x213 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x213 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x213 += einsum(x212, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x212 - x214 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x214 += einsum(t2.aaaa, (0, 1, 2, 3), x205, (4, 2, 3, 5), (4, 0, 1, 5)) - x215 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x215 += einsum(x50, (0, 1, 2, 3), (0, 2, 1, 3)) del x50 x215 += einsum(x49, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -8116,10 +8117,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x47 x215 += einsum(x214, (0, 1, 2, 3), (0, 2, 1, 3)) del x214 - x216 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x216 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x216 += einsum(t1.aa, (0, 1), x215, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x215 - x217 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x217 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x217 += einsum(x203, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 del x203 x217 += einsum(x204, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -8133,29 +8134,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oovv += einsum(x217, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x217, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x217 - x218 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x218 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x218 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 0, 4, 5)) rdm2_f_abab_ovvo += einsum(x218, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x219 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x219 += einsum(t2.abab, (0, 1, 2, 3), x218, (1, 3, 4, 5), (4, 0, 5, 2)) - x220 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x220 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) x220 += einsum(x219, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x219 rdm2_f_aaaa_oovv += einsum(x220, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_oovv += einsum(x220, (0, 1, 2, 3), (0, 1, 2, 3)) del x220 - x221 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x221 += einsum(x20, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 1, 6), (3, 4, 5, 6)) - x222 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x222 += einsum(x13, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 1, 5, 6, 3), (2, 4, 5, 6)) - x223 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x223 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x223 += einsum(x7, (0, 1), (0, 1)) x223 += einsum(x9, (0, 1), (0, 1)) * 3.000000000000004 - x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x224 += einsum(x223, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) * -1.9999999999999194 del x223 - x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x225 += einsum(x221, (0, 1, 2, 3), (0, 1, 3, 2)) * -4.0 del x221 x225 += einsum(x222, (0, 1, 2, 3), (0, 1, 2, 3)) * -18.0 @@ -8165,26 +8166,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_oovv += einsum(x225, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_oovv += einsum(x225, (0, 1, 2, 3), (1, 0, 3, 2)) del x225 - x226 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x226 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x226 += einsum(t2.aaaa, (0, 1, 2, 3), l3.abaaba, (2, 4, 3, 5, 6, 7), (6, 4, 5, 7, 0, 1)) x226 += einsum(x52, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 5, 4)) * 1.0000000000000606 del x52 rdm2_f_aaaa_oovv += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x226, (1, 4, 0, 2, 6, 7), (6, 7, 3, 5)) * 1.9999999999999194 del x226 - x227 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x227 += einsum(t2.aaaa, (0, 1, 2, 3), l3.aaaaaa, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) x227 += einsum(x46, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0000000000000584 del x46 rdm2_f_aaaa_oovv += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x227, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * 5.999999999999766 del x227 - x228 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x228 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0000000000000404 x228 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 1.0000000000000404 x228 += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) x228 += einsum(x4, (0, 1, 2, 3), (0, 1, 3, 2)) * 3.000000000000004 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x228, (0, 1, 4, 5), (5, 4, 2, 3)) * 1.9999999999999194 del x228 - x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x229 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.9999999999999799 del x0 x229 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.9999999999999799 @@ -8193,62 +8194,62 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x3 x229 += einsum(x4, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.999999999999998 del x4 - x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x230 += einsum(t1.aa, (0, 1), x229, (0, 2, 3, 4), (2, 4, 3, 1)) * -0.3333333333333336 del x229 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), x230, (0, 2, 3, 4), (2, 3, 4, 1)) * -6.000000000000116 del x230 - x231 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x231 += einsum(t2.abab, (0, 1, 2, 3), l3.abaaba, (4, 3, 2, 5, 6, 7), (6, 1, 5, 7, 0, 4)) x231 += einsum(x88, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0000000000000606 del x88 rdm2_f_abab_oovv += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x231, (1, 6, 0, 2, 7, 5), (7, 6, 3, 4)) * -1.9999999999999194 del x231 - x232 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x232 += einsum(t2.abab, (0, 1, 2, 3), l3.babbab, (4, 2, 3, 5, 6, 7), (5, 7, 1, 4, 6, 0)) x232 += einsum(x93, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * 1.0000000000000606 del x93 rdm2_f_abab_oovv += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x232, (0, 2, 6, 5, 1, 7), (7, 6, 4, 3)) * -1.9999999999999194 del x232 - x233 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x233 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x233 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), (1, 4, 0, 2, 3, 5)) x233 += einsum(t1.aa, (0, 1), t2.abab, (2, 3, 4, 5), (3, 5, 0, 2, 4, 1)) * -0.5 rdm2_f_abab_oovv += einsum(x101, (0, 1, 2, 3), x233, (4, 0, 2, 5, 3, 6), (5, 4, 6, 1)) * -4.0 del x233 - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x234 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), (0, 2, 3, 5, 1, 4)) x234 += einsum(t1.bb, (0, 1), t2.abab, (2, 3, 4, 5), (0, 3, 5, 1, 2, 4)) * -0.5 rdm2_f_abab_oovv += einsum(x163, (0, 1, 2, 3), x234, (0, 4, 1, 5, 6, 2), (6, 4, 3, 5)) * -4.0 del x163, x234 - x235 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x235 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) x235 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x235 += einsum(x24, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x24 rdm2_f_abab_oovv += einsum(x235, (0, 1, 2, 3), t3.abaaba, (4, 0, 2, 5, 6, 3), (4, 1, 5, 6)) * -2.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x235, (1, 4, 0, 5), (5, 4, 2, 3)) * -1.0 - x236 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x236 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x236, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x237 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x237 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (4, 5, 2, 0)) rdm2_f_abab_voov += einsum(x237, (0, 1, 2, 3), (3, 0, 2, 1)) * 2.0 - x238 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x238 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 3, 5, 7, 0, 2), (6, 7, 4, 1)) rdm2_f_abab_voov += einsum(x238, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 - x239 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x239 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x239 += einsum(t2.bbbb, (0, 1, 2, 3), x90, (0, 1, 4, 3, 5, 6), (4, 2, 5, 6)) * -1.0 rdm2_f_abab_voov += einsum(x239, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x240 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x240 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 5, 4, 7, 2, 1), (6, 7, 3, 0)) rdm2_f_abab_voov += einsum(x240, (0, 1, 2, 3), (3, 0, 2, 1)) * 4.0 - x241 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x241 += einsum(t2.abab, (0, 1, 2, 3), x85, (1, 4, 5, 0, 6, 2), (4, 3, 5, 6)) rdm2_f_abab_voov += einsum(x241, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x242 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x242 += einsum(l3.aaaaaa, (0, 1, 2, 3, 4, 5), t3.abaaba, (4, 6, 5, 1, 7, 2), (6, 7, 3, 0)) rdm2_f_abab_voov += einsum(x242, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 - x243 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x243 += einsum(x236, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.6666666666666666 x243 += einsum(x237, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.6666666666666666 x243 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8259,49 +8260,49 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x243 += einsum(t1.bb, (0, 1), x25, (0, 2, 3, 4), (2, 1, 3, 4)) * -0.6666666666666666 rdm2_f_abab_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x243, (4, 5, 1, 3), (0, 4, 2, 5)) * 6.0 del x243 - x244 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x244 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_bbbb_ovov += einsum(x244, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x244, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x244, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x244, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x245, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x245, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x245, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x245, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) rdm2_f_bbbb_ovov += einsum(x246, (0, 1, 2, 3), (1, 2, 0, 3)) * -9.0 rdm2_f_bbbb_ovvo += einsum(x246, (0, 1, 2, 3), (1, 2, 3, 0)) * 9.0 rdm2_f_bbbb_voov += einsum(x246, (0, 1, 2, 3), (2, 1, 0, 3)) * 9.0 rdm2_f_bbbb_vovo += einsum(x246, (0, 1, 2, 3), (2, 1, 3, 0)) * -9.0 - x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x247 += einsum(t2.bbbb, (0, 1, 2, 3), x114, (4, 1, 0, 5, 6, 3), (4, 5, 6, 2)) rdm2_f_bbbb_ovov += einsum(x247, (0, 1, 2, 3), (1, 2, 0, 3)) * 6.0 rdm2_f_bbbb_ovvo += einsum(x247, (0, 1, 2, 3), (1, 2, 3, 0)) * -6.0 rdm2_f_bbbb_voov += einsum(x247, (0, 1, 2, 3), (2, 1, 0, 3)) * -6.0 rdm2_f_bbbb_vovo += einsum(x247, (0, 1, 2, 3), (2, 1, 3, 0)) * 6.0 - x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x248 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 7, 1, 2), (3, 6, 0, 7)) rdm2_f_bbbb_ovov += einsum(x248, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x248, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x248, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x248, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x249 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x249 += einsum(t2.abab, (0, 1, 2, 3), x90, (4, 1, 5, 6, 0, 2), (4, 5, 6, 3)) rdm2_f_bbbb_ovov += einsum(x249, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_ovvo += einsum(x249, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_bbbb_voov += einsum(x249, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vovo += einsum(x249, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x250 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 0, 7, 2), (4, 6, 1, 7)) rdm2_f_bbbb_ovov += einsum(x250, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x250, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x250, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x250, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x251 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x251 += einsum(x244, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 x251 += einsum(x245, (0, 1, 2, 3), (0, 1, 2, 3)) x251 += einsum(x246, (0, 1, 2, 3), (0, 1, 2, 3)) * 9.0 @@ -8312,7 +8313,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x251 += einsum(t1.bb, (0, 1), x42, (2, 0, 3, 4), (2, 3, 4, 1)) * -6.0 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x251, (1, 4, 3, 5), (0, 4, 2, 5)) del x251 - x252 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x252 += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x252 += einsum(x174, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x252 += einsum(x178, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8322,12 +8323,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x180 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x252, (0, 4, 2, 5), (4, 1, 5, 3)) * -2.0 del x252 - x253 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x253 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x253 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x253 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 - x254 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x254 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x254 += einsum(x168, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.5 x254 += einsum(x169, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 x254 += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8336,23 +8337,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x254 += einsum(t1.aa, (0, 1), x253, (2, 3, 0, 4), (2, 3, 4, 1)) rdm2_f_abab_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x254, (1, 3, 4, 5), (4, 0, 5, 2)) * -4.0 del x254 - x255 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x255 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_vovo += einsum(x255, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x256 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x256 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (6, 4, 5, 0, 7, 2), (3, 6, 1, 7)) rdm2_f_abab_vovo += einsum(x256, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x257 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x257 += einsum(t2.abab, (0, 1, 2, 3), x90, (4, 1, 5, 3, 0, 6), (4, 5, 6, 2)) * -1.0 rdm2_f_abab_vovo += einsum(x257, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x258 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x258 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x258 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 6, 5, 7, 1, 2), (4, 6, 0, 7)) rdm2_f_abab_vovo += einsum(x258, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x259 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x259 += einsum(t2.aaaa, (0, 1, 2, 3), x85, (4, 5, 0, 1, 6, 3), (4, 5, 6, 2)) del x85 rdm2_f_abab_vovo += einsum(x259, (0, 1, 2, 3), (2, 1, 3, 0)) * -2.0 - x260 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x260 += einsum(x255, (0, 1, 2, 3), (0, 1, 2, 3)) x260 += einsum(x256, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x260 += einsum(x257, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -8361,20 +8362,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x260 += einsum(t1.aa, (0, 1), x25, (2, 3, 0, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x260, (1, 4, 2, 5), (0, 4, 5, 3)) del x260 - x261 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x261 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x261 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 6, 5, 7, 1, 2), (0, 7, 4, 6)) rdm2_f_abab_ovov += einsum(x261, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x262 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x262 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x262 += einsum(t2.bbbb, (0, 1, 2, 3), x59, (0, 1, 4, 3, 5, 6), (4, 2, 5, 6)) del x59 rdm2_f_abab_ovov += einsum(x262, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x263 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x263 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x263 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (6, 4, 5, 0, 7, 2), (1, 7, 3, 6)) rdm2_f_abab_ovov += einsum(x263, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x264 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x264 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x264 += einsum(t2.abab, (0, 1, 2, 3), x51, (1, 4, 5, 0, 6, 2), (4, 3, 5, 6)) * -1.0 rdm2_f_abab_ovov += einsum(x264, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 - x265 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x265 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x265 += einsum(x261, (0, 1, 2, 3), (0, 1, 2, 3)) x265 += einsum(x262, (0, 1, 2, 3), (0, 1, 2, 3)) x265 += einsum(x263, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8383,10 +8384,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x253 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x265, (3, 4, 0, 5), (5, 1, 2, 4)) * 2.0 del x265 - x266 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x266 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x266 += einsum(t1.bb, (0, 1), x105, (2, 1, 3, 4), (2, 0, 3, 4)) del x105 - x267 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x267 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x267 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) x267 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 x267 += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.9999999999999194 @@ -8394,7 +8395,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x267 += einsum(x26, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x267, (1, 4, 0, 5), (5, 4, 2, 3)) del x267 - x268 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x268 += einsum(x18, (0, 1, 2, 3), (0, 1, 2, 3)) del x18 x268 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.000000000000041 @@ -8405,7 +8406,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x266 x268 += einsum(x26, (0, 1, 2, 3), (0, 1, 3, 2)) del x26 - x269 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x269 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x269 += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 del x96 x269 += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.6666666666666666 @@ -8433,7 +8434,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x268 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x269, (2, 3, 0, 4), (4, 2, 1, 3)) * 3.0 del x269 - x270 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x270 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x270 += einsum(x207, (0, 1), (0, 1)) * 0.3333333333333468 x270 += einsum(x208, (0, 1), (0, 1)) * 0.6666666666666936 x270 += einsum(x209, (0, 1), (0, 1)) * 0.33333333333333354 @@ -8441,17 +8442,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x270 += einsum(x211, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x270, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.9999999999998788 del x270 - x271 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x271 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x272 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x272 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x273 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x273 += einsum(l3.bbbbbb, (0, 1, 2, 3, 4, 5), t3.bbbbbb, (3, 4, 5, 6, 1, 2), (0, 6)) - x274 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x274 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x274 += einsum(l3.babbab, (0, 1, 2, 3, 4, 5), t3.babbab, (3, 4, 5, 6, 1, 2), (0, 6)) - x275 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x275 += einsum(l3.abaaba, (0, 1, 2, 3, 4, 5), t3.abaaba, (3, 4, 5, 0, 6, 2), (1, 6)) - x276 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x276 += einsum(x271, (0, 1), (0, 1)) * 2.0 x276 += einsum(x272, (0, 1), (0, 1)) x276 += einsum(x273, (0, 1), (0, 1)) * 2.9999999999998788 @@ -8459,7 +8460,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x276 += einsum(x275, (0, 1), (0, 1)) * 0.9999999999999601 rdm2_f_abab_oovv += einsum(x276, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x276 - x277 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x277 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x277 += einsum(x152, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x152 x277 += einsum(x151, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8486,7 +8487,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x159 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x277, (0, 2, 3, 4), (3, 2, 4, 1)) * -2.0 del x277 - x278 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x278 += einsum(x11, (0, 1), (0, 1)) * 0.3333333333333468 del x11 x278 += einsum(x5, (0, 1), (0, 1)) * 0.3333333333333468 @@ -8501,51 +8502,51 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x9 rdm2_f_abab_oovv += einsum(x278, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.9999999999998788 del x278 - x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x279 += einsum(t2.bbbb, (0, 1, 2, 3), x249, (1, 4, 3, 5), (4, 0, 2, 5)) * -1.0 - x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x280 += einsum(t2.abab, (0, 1, 2, 3), x241, (4, 5, 0, 2), (4, 1, 3, 5)) - x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x281 += einsum(x245, (0, 1, 2, 3), (0, 1, 2, 3)) x281 += einsum(x246, (0, 1, 2, 3), (0, 1, 2, 3)) * 9.0 x281 += einsum(x248, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 x281 += einsum(x250, (0, 1, 2, 3), (0, 1, 2, 3)) - x282 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x282 += einsum(t2.bbbb, (0, 1, 2, 3), x281, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x281 - x283 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x283 += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) x283 += einsum(x240, (0, 1, 2, 3), (0, 1, 2, 3)) * 1.3333333333333333 x283 += einsum(x242, (0, 1, 2, 3), (0, 1, 2, 3)) - x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x284 += einsum(t2.abab, (0, 1, 2, 3), x283, (4, 5, 0, 2), (4, 1, 5, 3)) * 3.0 del x283 - x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x285 += einsum(t1.bb, (0, 1), x40, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 - x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x286 += einsum(x247, (0, 1, 2, 3), (0, 1, 2, 3)) x286 += einsum(x285, (0, 1, 2, 3), (0, 1, 2, 3)) del x285 - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x287 += einsum(t2.bbbb, (0, 1, 2, 3), x286, (1, 4, 3, 5), (4, 0, 5, 2)) * 12.0 del x286 - x288 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x288 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x288 += einsum(t1.bb, (0, 1), x23, (0, 2, 3, 4), (2, 1, 3, 4)) del x23 - x289 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x289 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x289 += einsum(x239, (0, 1, 2, 3), (0, 1, 2, 3)) x289 += einsum(x288, (0, 1, 2, 3), (0, 1, 2, 3)) del x288 - x290 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x290 += einsum(t2.abab, (0, 1, 2, 3), x289, (4, 5, 0, 2), (4, 1, 5, 3)) * 2.0 del x289 - x291 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x291 += einsum(t2.bbbb, (0, 1, 2, 3), x38, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x292 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x292 += einsum(t2.abab, (0, 1, 2, 3), x103, (4, 5, 0, 2), (4, 5, 1, 3)) - x293 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x293 += einsum(t2.bbbb, (0, 1, 2, 3), x41, (1, 4, 5, 3), (4, 0, 5, 2)) * -1.0 - x294 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x294 += einsum(x291, (0, 1, 2, 3), (0, 1, 2, 3)) del x291 x294 += einsum(x292, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 @@ -8560,10 +8561,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x137 x294 += einsum(x136, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 del x136 - x295 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x295 += einsum(t1.bb, (0, 1), x294, (0, 2, 3, 4), (2, 3, 4, 1)) * 4.0 del x294 - x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x296 += einsum(x279, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x279 x296 += einsum(x280, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -8585,22 +8586,22 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovv += einsum(x296, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_bbbb_oovv += einsum(x296, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x296 - x297 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x297 += einsum(x42, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 1, 5, 6, 3), (4, 2, 5, 6)) * -18.0 - x298 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x298 += einsum(x25, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 3, 6), (4, 1, 5, 6)) * -4.0 del x25 - x299 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x299 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x299 += einsum(x31, (0, 1), (0, 1)) * 3.000000000000004 del x31 x299 += einsum(x32, (0, 1), (0, 1)) * 1.9999999999999996 del x32 x299 += einsum(x33, (0, 1), (0, 1)) del x33 - x300 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x300 += einsum(x299, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -1.9999999999999194 del x299 - x301 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x301 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x301 += einsum(x297, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x297 x301 += einsum(x298, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -8610,30 +8611,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovv += einsum(x301, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_bbbb_oovv += einsum(x301, (0, 1, 2, 3), (1, 0, 2, 3)) del x301 - x302 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x302 += einsum(t2.bbbb, (0, 1, 2, 3), x244, (1, 4, 3, 5), (4, 0, 5, 2)) - x303 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x303 += einsum(t2.abab, (0, 1, 2, 3), x237, (4, 5, 0, 2), (4, 1, 5, 3)) - x304 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x304 += einsum(x145, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x304 += einsum(x146, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.3333333333333333 - x305 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x305 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x305 += einsum(x304, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 1, 2), (4, 5, 3, 6)) * -18.0 - x306 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x306 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x306 += einsum(x101, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 3, 0), (4, 5, 1, 6)) * -4.0 del x101 - x307 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x307 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x307 += einsum(x271, (0, 1), (0, 1)) x307 += einsum(x272, (0, 1), (0, 1)) * 0.5 x307 += einsum(x273, (0, 1), (0, 1)) * 1.4999999999999416 x307 += einsum(x274, (0, 1), (0, 1)) * 0.9999999999999595 x307 += einsum(x275, (0, 1), (0, 1)) * 0.49999999999997985 - x308 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x308 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x308 += einsum(x307, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -4.0 del x307 - x309 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x309 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x309 += einsum(t2.bbbb, (0, 1, 2, 3), x304, (4, 2, 3, 5), (4, 0, 1, 5)) * 3.0 - x310 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x310 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x310 += einsum(x121, (0, 1, 2, 3), (0, 2, 1, 3)) del x121 x310 += einsum(x124, (0, 1, 2, 3), (0, 2, 1, 3)) * 3.0 @@ -8646,10 +8647,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x123 x310 += einsum(x309, (0, 1, 2, 3), (0, 2, 1, 3)) del x309 - x311 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x311 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x311 += einsum(t1.bb, (0, 1), x310, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x310 - x312 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x312 += einsum(x302, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 del x302 x312 += einsum(x303, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -8665,37 +8666,37 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovv += einsum(x312, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x312, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x312 - x313 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x313 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x313 += einsum(x28, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) del x28 - x314 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x314 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x314 += einsum(x38, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 0, 5, 6, 3), (2, 4, 5, 6)) - x315 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x315 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x315 += einsum(x103, (0, 1, 2, 3), t3.babbab, (4, 2, 0, 5, 3, 6), (1, 4, 5, 6)) del x103 - x316 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x316 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x316 += einsum(t1.bb, (0, 1), x42, (2, 3, 4, 1), (0, 2, 3, 4)) * 3.0 - x317 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x317 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x317 += einsum(t2.bbbb, (0, 1, 2, 3), x316, (4, 0, 1, 5), (4, 5, 2, 3)) * 2.0 del x316 - x318 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x318 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x318 += einsum(x29, (0, 1), (0, 1)) del x29 x318 += einsum(x30, (0, 1), (0, 1)) * 0.5 del x30 - x319 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x319 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x319 += einsum(x318, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -4.0 del x318 - x320 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x320 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x320 += einsum(t1.bb, (0, 1), x42, (2, 3, 4, 1), (0, 2, 3, 4)) del x42 - x321 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x321 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x321 += einsum(t1.bb, (0, 1), x320, (2, 3, 0, 4), (3, 2, 4, 1)) del x320 - x322 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x322 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x322 += einsum(t1.bb, (0, 1), x321, (0, 2, 3, 4), (2, 3, 4, 1)) * 6.0 del x321 - x323 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x323 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x323 += einsum(x313, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x313 x323 += einsum(x314, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 @@ -8711,26 +8712,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_oovv += einsum(x323, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x323, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x323 - x324 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x324 += einsum(t2.bbbb, (0, 1, 2, 3), l3.babbab, (2, 4, 3, 5, 6, 7), (5, 7, 0, 1, 6, 4)) x324 += einsum(x122, (0, 1, 2, 3, 4, 5), (0, 1, 3, 2, 4, 5)) * -1.0000000000000606 del x122 rdm2_f_bbbb_oovv += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x324, (0, 2, 6, 7, 1, 4), (6, 7, 3, 5)) * 1.9999999999999194 del x324 - x325 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x325 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x325 += einsum(t2.bbbb, (0, 1, 2, 3), l3.bbbbbb, (4, 2, 3, 5, 6, 7), (5, 6, 7, 0, 1, 4)) x325 += einsum(x126, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -1.0000000000000584 del x126 rdm2_f_bbbb_oovv += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x325, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * 5.999999999999766 del x325 - x326 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x326 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x326 += einsum(x37, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x326 += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) x326 += einsum(x35, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.999999999999883 x326 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.9999999999999597 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x326, (0, 1, 4, 5), (5, 4, 2, 3)) * 2.0 del x326 - x327 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x327 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x327 += einsum(x37, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.3333333333333269 del x37 x327 += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.3333333333333269 @@ -8739,26 +8740,26 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x35 x327 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.3333333333333336 del x36 - x328 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x328 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x328 += einsum(t1.bb, (0, 1), x327, (0, 2, 3, 4), (2, 4, 3, 1)) * -1.0 del x327 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), x328, (0, 2, 3, 4), (2, 3, 4, 1)) * -6.000000000000116 del x328 - x329 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x329 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x329 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x329, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x329, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x329, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x329, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x330 += einsum(t1.aa, (0, 1), x64, (0, 2, 3, 4), (2, 3, 1, 4)) * 6.0 del x64 rdm2_f_aaaa_ovov += einsum(x330, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 rdm2_f_aaaa_voov += einsum(x330, (0, 1, 2, 3), (3, 1, 0, 2)) del x330 - x331 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x331 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x331 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x332 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x332 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x332 += einsum(x331, (0, 1), (0, 1)) x332 += einsum(x207, (0, 1), (0, 1)) x332 += einsum(x208, (0, 1), (0, 1)) * 2.0 @@ -8769,12 +8770,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_ovvo += einsum(delta.aa.oo, (0, 1), x332, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_voov += einsum(delta.aa.oo, (0, 1), x332, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x332, (2, 3), (2, 0, 3, 1)) - x333 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x333 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x333 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (1, 5, 2, 4)) rdm2_f_abab_ovov += einsum(x333, (0, 1, 2, 3), (3, 0, 2, 1)) * -1.0 - x334 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x334 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x334 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x335 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x335 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x335 += einsum(x334, (0, 1), (0, 1)) x335 += einsum(x271, (0, 1), (0, 1)) * 2.0 x335 += einsum(x272, (0, 1), (0, 1)) @@ -8783,7 +8784,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x335 += einsum(x275, (0, 1), (0, 1)) * 0.9999999999999601 rdm2_f_abab_ovov += einsum(delta.aa.oo, (0, 1), x335, (2, 3), (0, 2, 1, 3)) rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x335, (2, 3), (0, 2, 1, 3)) - x336 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x336 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x336 += einsum(t1.bb, (0, 1), x118, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x118 rdm2_f_bbbb_ovov += einsum(x336, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 @@ -8791,7 +8792,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_voov += einsum(x336, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x336, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x336 - x337 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x337 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x337 += einsum(x334, (0, 1), (0, 1)) * 0.5000000000000202 del x334 x337 += einsum(x271, (0, 1), (0, 1)) * 1.0000000000000404 @@ -8809,12 +8810,12 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x337, (2, 3), (2, 0, 1, 3)) * -1.9999999999999194 rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x337, (2, 3), (2, 0, 3, 1)) * 1.9999999999999194 del x337 - x338 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x338 += einsum(t1.aa, (0, 1), x102, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x338, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_vovo += einsum(x338, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x338 - x339 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x339 += einsum(x331, (0, 1), (0, 1)) * 1.00000000000004 x339 += einsum(x207, (0, 1), (0, 1)) * 1.00000000000004 x339 += einsum(x208, (0, 1), (0, 1)) * 2.00000000000008 @@ -8823,42 +8824,42 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, x339 += einsum(x211, (0, 1), (0, 1)) * 2.9999999999999982 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x339, (2, 3), (2, 0, 3, 1)) * 0.9999999999999601 del x339 - x340 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x340 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x51, (1, 4, 0, 2, 6, 7), (6, 7, 3, 5)) del x51 - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovvv += einsum(x340, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0000000000000404 - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vovv += einsum(x340, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0000000000000404 del x340 - x341 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x341 += einsum(l2.aaaa, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 6, 1), (4, 0, 5, 6)) rdm2_f_aaaa_ovvv += einsum(x341, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 rdm2_f_aaaa_vovv += einsum(x341, (0, 1, 2, 3), (1, 0, 3, 2)) * 6.0 del x341 - x342 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x342 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_aaaa_ovvv += einsum(x342, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x342, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x342 - x343 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x343 += einsum(l2.abab, (0, 1, 2, 3), t3.abaaba, (4, 3, 2, 5, 1, 6), (4, 0, 5, 6)) rdm2_f_aaaa_ovvv += einsum(x343, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x343, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x343 - x344 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x344 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x45, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * -1.0 del x45 rdm2_f_aaaa_ovvv += einsum(x344, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.000000000000116 rdm2_f_aaaa_vovv += einsum(x344, (0, 1, 2, 3), (1, 0, 3, 2)) * 6.000000000000116 del x344 - x345 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x345 += einsum(t2.abab, (0, 1, 2, 3), x161, (1, 3, 4, 5), (0, 4, 2, 5)) - x346 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x346 += einsum(t2.abab, (0, 1, 2, 3), x162, (1, 3, 4, 5), (0, 4, 5, 2)) - x347 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x347 += einsum(t2.aaaa, (0, 1, 2, 3), x205, (1, 4, 3, 5), (0, 4, 5, 2)) * 4.0 - x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x348 += einsum(x329, (0, 1, 2, 3), (0, 1, 2, 3)) del x329 x348 += einsum(x202, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -8873,10 +8874,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x175 x348 += einsum(x179, (0, 1, 2, 3), (0, 1, 2, 3)) * -6.0 del x179 - x349 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x349 += einsum(t1.aa, (0, 1), x348, (0, 2, 3, 4), (2, 3, 4, 1)) del x348 - x350 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum(x345, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x345 x350 += einsum(x346, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -8892,29 +8893,29 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_aaaa_vovv += einsum(x350, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_vovv += einsum(x350, (0, 1, 2, 3), (1, 0, 3, 2)) del x350 - x351 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x351 += einsum(t2.aaaa, (0, 1, 2, 3), x102, (0, 1, 4, 5), (4, 5, 2, 3)) * 2.0 del x102 rdm2_f_aaaa_ovvv += einsum(x351, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_aaaa_vovv += einsum(x351, (0, 1, 2, 3), (1, 0, 3, 2)) del x351 - x352 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x352 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * 0.3333333333333333 del x1 x352 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.3333333333333333 del x12 x352 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x13 - x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x353 += einsum(t1.aa, (0, 1), x352, (0, 2, 3, 4), (2, 3, 4, 1)) * 3.0 del x352 - x354 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x354 += einsum(t1.aa, (0, 1), x353, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x353 rdm2_f_aaaa_ovvv += einsum(x354, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_aaaa_vovv += einsum(x354, (0, 1, 2, 3), (1, 0, 2, 3)) del x354 - x355 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x355 += einsum(x218, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.6666666666666666 del x218 x355 += einsum(x167, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.6666666666666666 @@ -8933,7 +8934,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x22 rdm2_f_abab_ovvv += einsum(t1.bb, (0, 1), x355, (0, 2, 3, 4), (3, 2, 4, 1)) * 3.0 del x355 - x356 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x356 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x356 += einsum(x333, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x333 x356 += einsum(x261, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -8946,48 +8947,48 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x264 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x356, (2, 3, 0, 4), (4, 2, 1, 3)) * -2.0 del x356 - x357 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x357 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x357 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x90, (0, 2, 6, 7, 1, 4), (6, 7, 3, 5)) del x90 - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovvv += einsum(x357, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0000000000000404 - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vovv += einsum(x357, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0000000000000404 del x357 - x358 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x358 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x358 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x114, (0, 1, 2, 6, 7, 5), (6, 7, 3, 4)) * -1.0 del x114 rdm2_f_bbbb_ovvv += einsum(x358, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.000000000000116 rdm2_f_bbbb_vovv += einsum(x358, (0, 1, 2, 3), (1, 0, 3, 2)) * 6.000000000000116 del x358 - x359 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x359 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x359 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) rdm2_f_bbbb_ovvv += einsum(x359, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x359, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x359 - x360 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x360 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x360 += einsum(l2.bbbb, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 6, 1), (4, 0, 5, 6)) rdm2_f_bbbb_ovvv += einsum(x360, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 rdm2_f_bbbb_vovv += einsum(x360, (0, 1, 2, 3), (1, 0, 3, 2)) * 6.0 del x360 - x361 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x361 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x361 += einsum(l2.abab, (0, 1, 2, 3), t3.babbab, (4, 2, 3, 5, 0, 6), (4, 1, 5, 6)) rdm2_f_bbbb_ovvv += einsum(x361, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x361, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x361 - x362 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x362 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x362 += einsum(t2.bbbb, (0, 1, 2, 3), x145, (1, 4, 3, 5), (0, 4, 5, 2)) * -1.0 del x145 - x363 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x363 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x363 += einsum(t2.bbbb, (0, 1, 2, 3), x146, (1, 4, 3, 5), (0, 4, 2, 5)) del x146 - x364 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x364 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x364 += einsum(t2.abab, (0, 1, 2, 3), x99, (4, 5, 0, 2), (1, 4, 5, 3)) del x99 - x365 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x365 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x365 += einsum(t2.abab, (0, 1, 2, 3), x100, (4, 5, 0, 2), (1, 4, 3, 5)) del x100 - x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x366 += einsum(x244, (0, 1, 2, 3), (0, 1, 2, 3)) del x244 x366 += einsum(x245, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 @@ -9002,10 +9003,10 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x249 x366 += einsum(x250, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x250 - x367 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x367 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x367 += einsum(t1.bb, (0, 1), x366, (0, 2, 3, 4), (2, 3, 4, 1)) * 4.0 del x366 - x368 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x368 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x368 += einsum(x362, (0, 1, 2, 3), (0, 1, 2, 3)) * -12.0 del x362 x368 += einsum(x363, (0, 1, 2, 3), (0, 1, 2, 3)) * -4.0 @@ -9023,28 +9024,28 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, rdm2_f_bbbb_vovv += einsum(x368, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_bbbb_vovv += einsum(x368, (0, 1, 2, 3), (1, 0, 3, 2)) del x368 - x369 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x369 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x369 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) * -0.3333333333333333 x369 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) x369 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.3333333333333333 - x370 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x370 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x370 += einsum(t2.bbbb, (0, 1, 2, 3), x369, (0, 1, 4, 5), (4, 5, 2, 3)) * 6.0 del x369 rdm2_f_bbbb_ovvv += einsum(x370, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_bbbb_vovv += einsum(x370, (0, 1, 2, 3), (1, 0, 3, 2)) del x370 - x371 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x371 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x371 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) del x38 x371 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * -3.0 del x40 x371 += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x41 - x372 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x372 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x372 += einsum(t1.bb, (0, 1), x371, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.3333333333333333 rdm2_f_bbbb_ovvv += einsum(t1.bb, (0, 1), x372, (0, 2, 3, 4), (2, 3, 4, 1)) * -6.0 del x372 - x373 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x373 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x373 += einsum(x236, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x236 x373 += einsum(x237, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 @@ -9063,7 +9064,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x235 rdm2_f_abab_vovv += einsum(t1.aa, (0, 1), x373, (2, 3, 0, 4), (4, 2, 1, 3)) * 4.0 del x373 - x374 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x374 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x374 += einsum(x255, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x255 x374 += einsum(x256, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -9076,7 +9077,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x259 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x374, (0, 2, 3, 4), (3, 2, 4, 1)) * -2.0 del x374 - x375 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x375 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x375 += einsum(x331, (0, 1), (0, 1)) * 0.5000000000000202 del x331 x375 += einsum(x207, (0, 1), (0, 1)) * 0.5000000000000202 @@ -9091,33 +9092,33 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x211 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x375, (2, 3), (2, 0, 3, 1)) * 1.9999999999999194 del x375 - x376 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x376 += einsum(t1.bb, (0, 1), x371, (0, 2, 3, 4), (2, 3, 4, 1)) del x371 rdm2_f_bbbb_vovv += einsum(t1.bb, (0, 1), x376, (0, 2, 3, 4), (3, 2, 1, 4)) * -2.0 del x376 - x377 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x377 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x377 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) rdm2_f_aaaa_vvov += einsum(x377, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vvvo += einsum(x377, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_aaaa_vvvv += einsum(t1.aa, (0, 1), x377, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x377 - x378 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x378 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) rdm2_f_bbbb_vvov += einsum(x378, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vvvo += einsum(x378, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_bbbb_vvvv += einsum(t1.bb, (0, 1), x378, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x378 - x379 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x379 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x379 += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (4, 3, 2, 1)) rdm2_f_abab_vvvo += einsum(x379, (0, 1, 2, 3), (2, 1, 3, 0)) - x380 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x380 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x380 += einsum(t1.aa, (0, 1), x205, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x205 rdm2_f_aaaa_vvvv += einsum(x380, (0, 1, 2, 3), (0, 1, 3, 2)) rdm2_f_aaaa_vvvv += einsum(x380, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x380 - x381 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x381 = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x381 += einsum(x379, (0, 1, 2, 3), (0, 1, 2, 3)) del x379 x381 += einsum(x161, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -9126,7 +9127,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, del x162 rdm2_f_abab_vvvv += einsum(t1.bb, (0, 1), x381, (0, 2, 3, 4), (3, 2, 4, 1)) del x381 - x382 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x382 += einsum(t1.bb, (0, 1), x304, (0, 2, 3, 4), (2, 3, 4, 1)) * 6.0 del x304 rdm2_f_bbbb_vvvv += einsum(x382, (0, 1, 2, 3), (0, 1, 3, 2)) diff --git a/ebcc/codegen/UCCSD_SD_1_1.py b/ebcc/codegen/UCCSD_SD_1_1.py index 37077cf7..00e77ec9 100644 --- a/ebcc/codegen/UCCSD_SD_1_1.py +++ b/ebcc/codegen/UCCSD_SD_1_1.py @@ -2,34 +2,35 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x0 += einsum("iajb->jiba", v.bbbb.ovov) - x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x1 += einsum("ijab->jiba", t2.bbbb) x1 += einsum("ia,jb->ijab", t1.bb, t1.bb) e_cc = 0 e_cc += einsum("ijab,ijba->", x0, x1) * -0.5 del x0 del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iajb->jiab", v.aaaa.ovov) x2 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum("ijab->jiba", t2.aaaa) x3 += einsum("ia,jb->ijba", t1.aa, t1.aa) * -1 e_cc += einsum("ijab,ijab->", x2, x3) * -0.5 del x2 del x3 - x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x4 += einsum("ijab->ijab", t2.abab) x4 += einsum("ia,jb->ijab", t1.aa, t1.bb) e_cc += einsum("iajb,ijab->", v.aabb.ovov, x4) del x4 - x5 = np.zeros((nbos), dtype=np.float64) + x5 = np.zeros((nbos), dtype=types[float]) x5 += einsum("w->w", G) x5 += einsum("ia,wia->w", t1.aa, g.aa.bov) x5 += einsum("ia,wia->w", t1.bb, g.bb.bov) @@ -64,315 +65,315 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2 and U11 amplitudes - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum("ia,jakb->ikjb", t1.aa, v.aaaa.ovov) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum("ijka->ijka", x0) * -1 x1 += einsum("ijka->ikja", x0) - x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x98 -= einsum("ijka->ijka", x0) x98 += einsum("ijka->ikja", x0) - x124 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x124 += einsum("ia,jkla->jilk", t1.aa, x0) - x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x125 += einsum("ia,jkli->jkla", t1.aa, x124) - x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum("ia,jkib->jkab", t1.aa, x125) del x125 - x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x133 += einsum("ijab->ijab", x126) del x126 - x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x141 += einsum("ijab,klji->lkab", t2.aaaa, x124) del x124 - x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum("ijab->ijab", x141) del x141 - x284 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x284 += einsum("ijka->jkia", x0) * -1 x284 += einsum("ijka->kjia", x0) del x0 x1 += einsum("ijka->jika", v.aaaa.ooov) x1 += einsum("ijka->jkia", v.aaaa.ooov) * -1 - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum("ijab,kjia->kb", t2.aaaa, x1) * -1 del x1 - x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iabc->ibac", v.aaaa.ovvv) x2 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x31 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x31 += einsum("ia,ibca->bc", t1.aa, x2) - x32 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x32 += einsum("ab->ab", x31) * -1 - x280 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x280 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x280 += einsum("ab->ab", x31) * -1 - x321 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x321 += einsum("ab->ab", x31) * -1 del x31 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ia,jbac->ijbc", t1.aa, x2) t1new_aa += einsum("ijab,icba->jc", t2.aaaa, x2) * -1 del x2 - x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x4 += einsum("ijka->jika", x3) - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ijab,kljb->kila", t2.abab, x3) del x3 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum("ijka->ikja", x79) del x79 x4 += einsum("ijka->ijka", v.aabb.ooov) - x267 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x267 += einsum("ijab,iklb->kjla", t2.abab, x4) - x274 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x274 += einsum("ijka->ikja", x267) * -1 del x267 t1new_aa += einsum("ijab,ikjb->ka", t2.abab, x4) * -1 - x5 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.aa.bov) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ia->ia", x5) - x102 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x102 += einsum("ia->ia", x5) - x300 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x300 += einsum("ia->ia", x5) - x322 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x322 += einsum("ia->ia", x5) del x5 - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) x9 += einsum("ia->ia", x6) - x61 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x61 += einsum("ia,ja->ij", t1.aa, x6) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum("ij,kjab->ikab", x61, t2.aaaa) del x61 - x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x87 += einsum("ijab->ijab", x62) * -1 del x62 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("ia,jkba->jkib", x6, t2.aaaa) x83 += einsum("ijka->ikja", x80) * -1 del x80 x300 += einsum("ia->ia", x6) - x320 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x320 += einsum("ia->ia", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("iajb->jiab", v.aaaa.ovov) x7 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ia,ijab->jb", t1.aa, x7) x9 += einsum("ia->ia", x8) * -1 x320 += einsum("ia->ia", x8) * -1 del x8 x321 += einsum("ia,ib->ab", t1.aa, x320) * -1 del x320 - x70 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x70 += einsum("ijab,ijac->bc", t2.aaaa, x7) - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum("ab->ab", x70) * -1 del x70 - x279 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x279 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x279 += einsum("ijab,ijca->bc", t2.aaaa, x7) x280 += einsum("ab->ab", x279) * -1 x321 += einsum("ab->ab", x279) * -1 del x279 - x315 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x315 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x315 += einsum("wia,ijab->wjb", u11.aa, x7) - x316 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x316 += einsum("wia->wia", x315) * -1 del x315 x9 += einsum("ia->ia", f.aa.ov) - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum("ia,ja->ij", t1.aa, x9) - x28 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x28 += einsum("ij->ji", x27) del x27 - x288 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x288 += einsum("ia,jkab->jikb", x9, t2.abab) - x291 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x291 += einsum("ijka->jika", x288) del x288 - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum("ia,ijab->jb", x9, t2.abab) - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum("ijab->jiab", t2.aaaa) x10 -= einsum("ijab->jiba", t2.aaaa) - x112 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x112 += einsum("wia,ijab->wjb", g.aa.bov, x10) - x114 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x114 -= einsum("wia->wia", x112) del x112 t1new_aa += einsum("ia,ijab->jb", x9, x10) * -1 del x9 - x11 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("w,wia->ia", s1, g.bb.bov) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum("ia->ia", x11) - x159 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x159 += einsum("ia->ia", x11) - x301 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x301 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x301 += einsum("ia->ia", x11) - x328 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x328 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x328 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x15 += einsum("ia->ia", x12) - x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x201 += einsum("ia,jkab->kjib", x12, t2.bbbb) - x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x205 += einsum("ijka->ikja", x201) * -1 del x201 - x216 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x216 += einsum("ia,ja->ij", t1.bb, x12) - x217 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x217 += einsum("ij->ij", x216) del x216 x301 += einsum("ia->ia", x12) - x326 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x326 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x326 += einsum("ia->ia", x12) del x12 - x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x13 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x13 += einsum("iajb->jiba", v.bbbb.ovov) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum("ia,ijba->jb", t1.bb, x13) x15 += einsum("ia->ia", x14) * -1 x326 += einsum("ia->ia", x14) * -1 del x14 - x327 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x327 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x327 += einsum("ia,ib->ab", t1.bb, x326) * -1 del x326 - x49 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x49 += einsum("ijab,ikba->kj", t2.bbbb, x13) - x53 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x53 += einsum("ij->ij", x49) * -1 del x49 - x237 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x237 += einsum("ijab,jkcb->ikac", t2.abab, x13) - x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x238 += einsum("ijab->ijab", x237) * -1 del x237 - x318 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x318 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x318 += einsum("wia,ijba->wjb", u11.bb, x13) del x13 - x319 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x319 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x319 += einsum("wia->wia", x318) * -1 del x318 x15 += einsum("ia->ia", f.bb.ov) - x52 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x52 += einsum("ia,ja->ij", t1.bb, x15) x53 += einsum("ij->ji", x52) del x52 - x268 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x268 += einsum("ia,jkba->jkib", x15, t2.abab) x274 += einsum("ijka->ikja", x268) del x268 t1new_aa += einsum("ia,jiba->jb", x15, t2.abab) - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum("iabj->ijba", v.aaaa.ovvo) x16 -= einsum("ijab->ijab", v.aaaa.oovv) - x104 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x104 += einsum("ia,jkba->ijkb", t1.aa, x16) - x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x105 -= einsum("ijka->jika", x104) del x104 t1new_aa += einsum("ia,ijba->jb", t1.aa, x16) - u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) u11new_aa += einsum("wia,ijba->wjb", u11.aa, x16) - x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x17 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x18 += einsum("wij->wij", x17) del x17 x18 += einsum("wij->wij", g.aa.boo) - x113 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x113 += einsum("ia,wij->wja", t1.aa, x18) x114 -= einsum("wia->wia", x113) del x113 t1new_aa -= einsum("wia,wij->ja", u11.aa, x18) del x18 - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum("w,wij->ij", s1, g.aa.boo) x28 += einsum("ij->ij", x19) - x108 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x108 += einsum("ij->ji", x19) del x19 - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x28 += einsum("ij->ij", x20) - x121 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x121 += einsum("ij->ij", x20) del x20 - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x28 += einsum("ij->ij", x21) x121 += einsum("ij->ij", x21) del x21 - x122 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum("ij,ikab->kjab", x121, t2.aaaa) del x121 - x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x123 -= einsum("ijab->ijba", x122) del x122 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x28 += einsum("ij->ji", x22) - x85 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x85 += einsum("ij->ji", x22) del x22 - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x23 += einsum("iajb->jiba", v.aaaa.ovov) - x24 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x24 += einsum("ijab,ikba->jk", t2.aaaa, x23) del x23 x28 += einsum("ij->ji", x24) * -1 x85 += einsum("ij->ji", x24) * -1 del x24 - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum("ijka->ikja", v.aaaa.ooov) x25 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x26 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x26 += einsum("ia,ijka->jk", t1.aa, x25) x28 += einsum("ij->ij", x26) * -1 x85 += einsum("ij->ij", x26) * -1 del x26 - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum("ij,ikab->kjab", x85, t2.aaaa) del x85 x87 += einsum("ijab->ijba", x86) del x86 - x323 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x323 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x323 += einsum("wia,ijka->wjk", u11.aa, x25) * -1 del x25 x28 += einsum("ij->ij", f.aa.oo) - x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("ij,ikab->jkab", x28, t2.abab) - t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) t2new_baba += einsum("ijab->jiba", x294) * -1 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum("ijab->ijab", x294) * -1 del x294 t1new_aa += einsum("ia,ij->ja", t1.aa, x28) * -1 u11new_aa += einsum("ij,wia->wja", x28, u11.aa) * -1 del x28 - x29 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x29 += einsum("w,wab->ab", s1, g.aa.bvv) x32 += einsum("ab->ab", x29) - x116 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x116 += einsum("ab->ab", x29) x280 += einsum("ab->ab", x29) x321 += einsum("ab->ab", x29) del x29 - x30 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x30 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x32 += einsum("ab->ab", x30) - x119 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x119 -= einsum("ab->ba", x30) x280 += einsum("ab->ab", x30) x321 += einsum("ab->ab", x30) @@ -380,43 +381,43 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x32 += einsum("ab->ab", f.aa.vv) t1new_aa += einsum("ia,ba->ib", t1.aa, x32) del x32 - x33 = np.zeros((nbos), dtype=np.float64) + x33 = np.zeros((nbos), dtype=types[float]) x33 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x35 = np.zeros((nbos), dtype=np.float64) + x35 = np.zeros((nbos), dtype=types[float]) x35 += einsum("w->w", x33) del x33 - x34 = np.zeros((nbos), dtype=np.float64) + x34 = np.zeros((nbos), dtype=types[float]) x34 += einsum("ia,wia->w", t1.bb, g.bb.bov) x35 += einsum("w->w", x34) del x34 x35 += einsum("w->w", G) t1new_aa += einsum("w,wia->ia", x35, u11.aa) t1new_bb += einsum("w,wia->ia", x35, u11.bb) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("w,wx->x", x35, s2) del x35 - x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x36 += einsum("ia,jakb->ikjb", t1.bb, v.bbbb.ovov) - x37 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x37 += einsum("ijka->ijka", x36) * -1 x37 += einsum("ijka->ikja", x36) - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 -= einsum("ijka->ijka", x36) x155 += einsum("ijka->ikja", x36) - x181 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x181 += einsum("ia,jkla->jilk", t1.bb, x36) - x182 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x182 += einsum("ia,jkli->jkla", t1.bb, x181) - x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum("ia,jkib->jkab", t1.bb, x182) del x182 - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum("ijab->ijab", x183) del x183 - x223 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x223 += einsum("ijkl->ijkl", x181) del x181 - x264 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x264 += einsum("ijka->jkia", x36) x264 += einsum("ijka->kjia", x36) * -1 del x36 @@ -424,125 +425,125 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x37 += einsum("ijka->jkia", v.bbbb.ooov) * -1 t1new_bb += einsum("ijab,kjia->kb", t2.bbbb, x37) * -1 del x37 - x38 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum("iabc->ibac", v.bbbb.ovvv) x38 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x209 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x209 += einsum("ia,ibac->bc", t1.bb, x38) - x210 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("ab->ab", x209) * -1 del x209 t1new_bb += einsum("ijab,icba->jc", t2.bbbb, x38) * -1 del x38 - x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x39 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x40 += einsum("ijka->ikja", x39) - x200 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x200 += einsum("ijab,ikla->kjlb", t2.abab, x39) x205 += einsum("ijka->ikja", x200) del x200 - x255 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x255 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x255 += einsum("ijka->ikja", x39) del x39 x40 += einsum("iajk->ijka", v.aabb.ovoo) - x269 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x269 += einsum("ia,jkla->ijkl", t1.aa, x40) - x270 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x270 += einsum("ijkl->jikl", x269) del x269 - x287 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x287 += einsum("ijab,kjla->iklb", t2.abab, x40) x291 += einsum("ijka->jika", x287) * -1 del x287 t1new_bb += einsum("ijab,ijka->kb", t2.abab, x40) * -1 - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum("ijab->jiab", t2.bbbb) * -1 x41 += einsum("ijab->jiba", t2.bbbb) - x194 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x194 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x41) - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum("ijab,ikac->jkbc", t2.abab, x194) * -1 del x194 - x219 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x219 += einsum("ijab->ijab", x195) * -1 del x195 - x286 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x286 += einsum("ijka,klba->ijlb", x4, x41) del x4 x291 += einsum("ijka->ijka", x286) * -1 del x286 t1new_bb += einsum("ia,ijba->jb", x15, x41) * -1 del x15 - x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x42 += einsum("iabj->ijba", v.bbbb.ovvo) x42 -= einsum("ijab->ijab", v.bbbb.oovv) - x161 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x161 += einsum("ia,jkba->ijkb", t1.bb, x42) - x162 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x162 -= einsum("ijka->jika", x161) del x161 t1new_bb += einsum("ia,ijba->jb", t1.bb, x42) - u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) u11new_bb += einsum("wia,ijba->wjb", u11.bb, x42) - x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x44 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x44 += einsum("wij->wij", x43) del x43 x44 += einsum("wij->wij", g.bb.boo) - x170 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x170 += einsum("ia,wij->wja", t1.bb, x44) - x171 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x171 -= einsum("wia->wia", x170) del x170 t1new_bb -= einsum("wia,wij->ja", u11.bb, x44) del x44 - x45 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x45 += einsum("w,wij->ij", s1, g.bb.boo) x53 += einsum("ij->ij", x45) - x165 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x165 += einsum("ij->ji", x45) del x45 - x46 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x46 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x53 += einsum("ij->ij", x46) - x178 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x178 += einsum("ij->ij", x46) del x46 - x47 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x47 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x53 += einsum("ij->ij", x47) x178 += einsum("ij->ij", x47) del x47 - x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x179 += einsum("ij,ikab->kjab", x178, t2.bbbb) del x178 - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 -= einsum("ijab->ijba", x179) del x179 - x48 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x48 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x53 += einsum("ij->ji", x48) x217 += einsum("ij->ij", x48) del x48 - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum("ij,jkab->ikab", x217, t2.bbbb) del x217 x219 += einsum("ijab->ijba", x218) * -1 del x218 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x50 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x50 += einsum("ijka->kija", v.bbbb.ooov) - x51 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x51 += einsum("ia,jika->jk", t1.bb, x50) x53 += einsum("ij->ij", x51) * -1 del x51 - x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x329 += einsum("wia,jika->wjk", u11.bb, x50) * -1 del x50 x53 += einsum("ij->ij", f.bb.oo) - x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x293 += einsum("ij,kiab->kjab", x53, t2.abab) t2new_baba += einsum("ijab->jiba", x293) * -1 t2new_abab += einsum("ijab->ijab", x293) * -1 @@ -550,37 +551,37 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t1new_bb += einsum("ia,ij->ja", t1.bb, x53) * -1 u11new_bb += einsum("ij,wia->wja", x53, u11.bb) * -1 del x53 - x54 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x54 += einsum("w,wab->ab", s1, g.bb.bvv) - x58 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x58 += einsum("ab->ab", x54) - x173 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x173 += einsum("ab->ab", x54) - x277 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x277 += einsum("ab->ab", x54) x327 += einsum("ab->ab", x54) del x54 - x55 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x58 += einsum("ab->ab", x55) - x176 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x176 -= einsum("ab->ba", x55) x277 += einsum("ab->ab", x55) x327 += einsum("ab->ab", x55) del x55 - x56 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x56 += einsum("iabc->ibca", v.bbbb.ovvv) - x57 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x57 += einsum("ia,ibac->bc", t1.bb, x56) x58 += einsum("ab->ab", x57) * -1 x277 += einsum("ab->ab", x57) * -1 x327 += einsum("ab->ab", x57) * -1 del x57 - x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x192 += einsum("ia,jbca->ijbc", t1.bb, x56) del x56 - x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum("ijab,jkcb->kica", x192, x41) * -1 del x192 x219 += einsum("ijab->jiab", x193) * -1 @@ -588,236 +589,236 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x58 += einsum("ab->ab", f.bb.vv) t1new_bb += einsum("ia,ba->ib", t1.bb, x58) del x58 - x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x59 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum("ijab,kijl->klab", t2.aaaa, x59) x87 += einsum("ijab->ijab", x60) del x60 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum("ia,jkil->jkla", t1.aa, x59) del x59 x83 += einsum("ijka->ijka", x75) del x75 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("ijab->jiab", t2.aaaa) x63 += einsum("ijab->jiba", t2.aaaa) * -1 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("ijab,kica->jkbc", x63, x64) * -1 del x64 x87 += einsum("ijab->jiab", x65) * -1 del x65 - x236 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x236 += einsum("iajb,ikac->kjcb", v.aabb.ovov, x63) x238 += einsum("ijab->ijab", x236) * -1 del x236 - x239 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x239 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x239 += einsum("ijab,ikac->kjcb", x63, x7) del x7 - x241 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x241 += einsum("ijab->ijba", x239) del x239 - x266 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x266 += einsum("ijka,ilab->ljkb", x40, x63) del x40 del x63 x274 += einsum("ijka->ijka", x266) * -1 del x266 - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) x241 += einsum("ijab->jiab", x66) - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum("ijab->jiab", t2.aaaa) * -1 x67 += einsum("ijab->jiba", t2.aaaa) - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum("ijab,jkbc->ikac", x66, x67) del x66 x87 += einsum("ijab->jiba", x68) * -1 del x68 - x69 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x69 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x73 += einsum("ab->ab", x69) x280 += einsum("ab->ab", x69) * -1 x321 += einsum("ab->ab", x69) * -1 del x69 - x71 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x71 += einsum("iabc->ibca", v.aaaa.ovvv) - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum("ia,ibca->bc", t1.aa, x71) x73 += einsum("ab->ab", x72) * -1 del x72 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum("ab,ijbc->ijca", x73, t2.aaaa) del x73 x87 += einsum("ijab->jiab", x74) del x74 - x240 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x240 += einsum("ia,jbca->ijbc", t1.aa, x71) del x71 x241 += einsum("ijab->jiab", x240) * -1 del x240 - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum("ijab,kacb->ijkc", t2.aaaa, v.aaaa.ovvv) x83 += einsum("ijka->ikja", x76) del x76 - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum("ia,jkba->ijkb", t1.aa, x77) del x77 x83 += einsum("ijka->ikja", x78) del x78 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x81 += einsum("ijka->kija", v.aaaa.ooov) - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("ijab,iklb->jkla", x67, x81) del x81 del x67 x83 += einsum("ijka->ijka", x82) del x82 - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum("ia,jikb->jkab", t1.aa, x83) del x83 x87 += einsum("ijab->ijab", x84) del x84 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum("ijab->ijab", x87) * -1 t2new_aaaa += einsum("ijab->ijba", x87) t2new_aaaa += einsum("ijab->jiab", x87) t2new_aaaa += einsum("ijab->jiba", x87) * -1 del x87 - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum("ia,bjca->ijbc", t1.aa, v.aaaa.vovv) x123 -= einsum("ijab->ijab", x88) del x88 - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum("ijab,jbck->ikac", t2.abab, v.bbaa.ovvo) x123 += einsum("ijab->ijab", x89) del x89 - x90 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x90 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum("ijab,kjcb->kiac", t2.abab, x90) x123 -= einsum("ijab->ijab", x91) del x91 x238 += einsum("ijab->ijab", x90) del x90 - x92 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x92 -= einsum("ijab->jiab", t2.aaaa) x92 += einsum("ijab->jiba", t2.aaaa) - x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x93 += einsum("ijab,ikcb->jkac", x16, x92) del x16 x123 -= einsum("ijab->jiba", x93) del x93 - x99 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x99 += einsum("ijab,klib->jkla", x92, x98) del x98 del x92 x105 += einsum("ijka->kjia", x99) del x99 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 -= einsum("iajb->jiab", v.aaaa.ovov) x94 += einsum("iajb->jiba", v.aaaa.ovov) - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum("ijab,ikcb->jkac", t2.aaaa, x94) - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 -= einsum("ijab,kica->jkbc", t2.aaaa, x95) x123 -= einsum("ijab->ijab", x96) del x96 - x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x129 -= einsum("ijab,kicb->jkac", t2.aaaa, x95) del x95 x133 += einsum("ijab->jiba", x129) del x129 - x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x127 += einsum("ijab,ikca->jkbc", t2.aaaa, x94) del x94 - x128 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x128 -= einsum("ijab,kica->jkbc", t2.aaaa, x127) del x127 x133 += einsum("ijab->ijab", x128) del x128 - x97 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x97 += einsum("ijab,kljb->ikla", t2.abab, v.aabb.ooov) x105 += einsum("ijka->jika", x97) del x97 - x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum("iajb->jiab", v.aaaa.ovov) x100 -= einsum("iajb->jiba", v.aaaa.ovov) - x101 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x101 += einsum("ia,ijab->jb", t1.aa, x100) x102 -= einsum("ia->ia", x101) x300 -= einsum("ia->ia", x101) del x101 - x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x229 += einsum("ijab,ikac->kjcb", t2.abab, x100) - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 -= einsum("ijab,ikac->kjcb", t2.abab, x229) del x229 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb -= einsum("ijab->ijba", x230) t2new_bbbb += einsum("ijab->jiba", x230) del x230 - x311 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x311 -= einsum("wia,ijab->wjb", u11.aa, x100) del x100 - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("wia,xia->xw", u11.aa, x311) del x311 x102 += einsum("ia->ia", f.aa.ov) - x103 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x103 += einsum("ia,jkab->jkib", x102, t2.aaaa) x105 += einsum("ijka->kjia", x103) del x103 - x107 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x107 += einsum("ia,ja->ij", t1.aa, x102) del x102 x108 += einsum("ij->ij", x107) del x107 x105 -= einsum("ijak->ijka", v.aaaa.oovo) - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum("ia,ijkb->jkab", t1.aa, x105) del x105 x123 += einsum("ijab->ijab", x106) del x106 x108 += einsum("ij->ji", f.aa.oo) - x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("ij,jkab->kiab", x108, t2.aaaa) del x108 x123 += einsum("ijab->jiba", x109) del x109 - x110 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x110 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) x114 += einsum("wia->wia", x110) del x110 - x111 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x111 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x114 += einsum("wia->wia", x111) del x111 x114 += einsum("wai->wia", g.aa.bvo) - x115 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x115 += einsum("wia,wjb->ijab", u11.aa, x114) x123 += einsum("ijab->jiba", x115) del x115 - x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x296 += einsum("wia,wjb->jiba", u11.bb, x114) del x114 t2new_baba += einsum("ijab->jiba", x296) t2new_abab += einsum("ijab->ijab", x296) del x296 x116 += einsum("ab->ab", f.aa.vv) - x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum("ab,ijbc->ijca", x116, t2.aaaa) del x116 x123 -= einsum("ijab->jiba", x117) del x117 - x118 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x118 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x119 += einsum("ab->ab", x118) - x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum("ab,ijac->ijcb", x119, t2.aaaa) del x119 x123 -= einsum("ijab->jiab", x120) @@ -830,12 +831,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x280 += einsum("ab->ba", x118) * -1 x321 += einsum("ab->ba", x118) * -1 del x118 - x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x130 -= einsum("iajb->jiab", v.bbbb.ovov) x130 += einsum("iajb->jiba", v.bbbb.ovov) - x131 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x131 += einsum("ijab,jkcb->ikac", t2.abab, x130) - x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x132 -= einsum("ijab,kjcb->ikac", t2.abab, x131) del x131 x133 += einsum("ijab->ijab", x132) @@ -843,25 +844,25 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x133) t2new_aaaa -= einsum("ijab->ijba", x133) del x133 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum("ijab,ikcb->jkac", t2.bbbb, x130) - x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x153 -= einsum("ijab,kica->jkbc", t2.bbbb, x152) x180 -= einsum("ijab->ijab", x153) del x153 - x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x186 -= einsum("ijab,kicb->jkac", t2.bbbb, x152) del x152 x187 += einsum("ijab->ijab", x186) del x186 - x158 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x158 += einsum("ia,ijba->jb", t1.bb, x130) x159 -= einsum("ia->ia", x158) x301 -= einsum("ia->ia", x158) del x158 - x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x184 += einsum("ijab,ikca->jkbc", t2.bbbb, x130) - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 -= einsum("ijab,kica->jkbc", t2.bbbb, x184) del x184 x187 += einsum("ijab->jiba", x185) @@ -869,43 +870,43 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x187) t2new_bbbb -= einsum("ijab->ijba", x187) del x187 - x312 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x312 -= einsum("wia,ijba->wjb", u11.bb, x130) del x130 s2new += einsum("wia,xia->xw", u11.bb, x312) del x312 - x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum("ijab,ikjl->klab", t2.aaaa, v.aaaa.oooo) - x136 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x136 += einsum("ijab->jiba", x134) del x134 - x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum("ijab,cadb->ijcd", t2.aaaa, v.aaaa.vvvv) x136 += einsum("ijab->jiba", x135) del x135 t2new_aaaa += einsum("ijab->ijba", x136) * -1 t2new_aaaa += einsum("ijab->ijab", x136) del x136 - x137 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x137 += einsum("ia,jkil->jkla", t1.aa, v.aaaa.oooo) - x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum("ia,ijkb->jkab", t1.aa, x137) del x137 x145 += einsum("ijab->ijab", x138) del x138 - x139 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x139 += einsum("ia,bacd->icbd", t1.aa, v.aaaa.vvvv) - x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x140 += einsum("ia,jbca->ijbc", t1.aa, x139) del x139 x145 += einsum("ijab->ijab", x140) del x140 - x142 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x142 += einsum("ijab,kalb->ijkl", t2.aaaa, v.aaaa.ovov) - x143 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x143 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x143 += einsum("ijab->jiba", t2.aaaa) x143 += einsum("ia,jb->ijab", t1.aa, t1.aa) - x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x144 += einsum("ijkl,klab->ijab", x142, x143) del x142 del x143 @@ -914,101 +915,101 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x145) t2new_aaaa += einsum("ijab->ijba", x145) * -1 del x145 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum("ia,bjca->ijbc", t1.bb, v.bbbb.vovv) x180 -= einsum("ijab->ijab", x146) del x146 - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum("ijab,iack->jkbc", t2.abab, v.aabb.ovvo) x180 += einsum("ijab->ijab", x147) del x147 - x148 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x148 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x149 += einsum("ijab,ikac->kjbc", t2.abab, x148) x180 -= einsum("ijab->ijab", x149) del x149 - x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x243 += einsum("ijab->ijab", x148) - x289 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x289 += einsum("ijab->ijab", x148) del x148 - x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x150 -= einsum("ijab->jiab", t2.bbbb) x150 += einsum("ijab->jiba", t2.bbbb) - x151 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x151 += einsum("ijab,ikcb->kjca", x150, x42) del x42 x180 -= einsum("ijab->jiba", x151) del x151 - x169 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x169 += einsum("wia,ijba->wjb", g.bb.bov, x150) del x150 x171 -= einsum("wia->wia", x169) del x169 - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum("ijab,iakl->jklb", t2.abab, v.aabb.ovoo) x162 += einsum("ijka->jika", x154) del x154 - x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x156 += einsum("ijab->jiab", t2.bbbb) x156 -= einsum("ijab->jiba", t2.bbbb) - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x157 += einsum("ijka,klab->ijlb", x155, x156) del x155 x162 += einsum("ijka->jika", x157) del x157 x159 += einsum("ia->ia", f.bb.ov) - x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x160 += einsum("ia,jkab->jkib", x159, t2.bbbb) x162 += einsum("ijka->kjia", x160) del x160 - x164 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x164 += einsum("ia,ja->ij", t1.bb, x159) del x159 x165 += einsum("ij->ij", x164) del x164 x162 -= einsum("ijak->ijka", v.bbbb.oovo) - x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x163 += einsum("ia,ijkb->jkab", t1.bb, x162) del x162 x180 += einsum("ijab->ijab", x163) del x163 x165 += einsum("ij->ji", f.bb.oo) - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum("ij,jkab->kiab", x165, t2.bbbb) del x165 x180 += einsum("ijab->jiba", x166) del x166 - x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x167 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) x171 += einsum("wia->wia", x167) del x167 - x168 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x168 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x171 += einsum("wia->wia", x168) del x168 x171 += einsum("wai->wia", g.bb.bvo) - x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x172 += einsum("wia,wjb->ijab", u11.bb, x171) x180 += einsum("ijab->jiba", x172) del x172 - x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x295 += einsum("wia,wjb->ijab", u11.aa, x171) del x171 t2new_baba += einsum("ijab->jiba", x295) t2new_abab += einsum("ijab->ijab", x295) del x295 x173 += einsum("ab->ab", f.bb.vv) - x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x174 += einsum("ab,ijbc->ijca", x173, t2.bbbb) del x173 x180 -= einsum("ijab->jiba", x174) del x174 - x175 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x175 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x176 += einsum("ab->ab", x175) - x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x177 += einsum("ab,ijac->ijcb", x176, t2.bbbb) del x176 x180 -= einsum("ijab->jiab", x177) @@ -1021,76 +1022,76 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x277 += einsum("ab->ba", x175) * -1 x327 += einsum("ab->ba", x175) * -1 del x175 - x188 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x188 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum("ijab,kijl->klab", t2.bbbb, x188) x219 += einsum("ijab->ijab", x189) del x189 - x196 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x196 += einsum("ia,jkil->jkla", t1.bb, x188) del x188 x205 += einsum("ijka->ijka", x196) del x196 - x190 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x190 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) - x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ab,ijbc->jiac", x190, t2.bbbb) x219 += einsum("ijab->ijab", x191) * -1 del x191 x277 += einsum("ab->ab", x190) * -1 x327 += einsum("ab->ab", x190) * -1 del x190 - x197 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x197 += einsum("ijab,kbca->jikc", t2.bbbb, v.bbbb.ovvv) x205 += einsum("ijka->ikja", x197) del x197 - x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) - x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x199 += einsum("ia,jkba->ijkb", t1.bb, x198) del x198 x205 += einsum("ijka->ikja", x199) del x199 - x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x202 += einsum("ijka->ikja", v.bbbb.ooov) x202 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x213 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x213 += einsum("ia,jika->jk", t1.bb, x202) - x214 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x214 += einsum("ij->ij", x213) * -1 del x213 - x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x203 += einsum("ijab->jiab", t2.bbbb) x203 += einsum("ijab->jiba", t2.bbbb) * -1 - x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x204 += einsum("ijka,jlab->iklb", x202, x203) del x202 del x203 x205 += einsum("ijka->kija", x204) del x204 - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum("ia,jikb->jkab", t1.bb, x205) del x205 x219 += einsum("ijab->ijab", x206) del x206 - x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x207 += einsum("iajb->jiab", v.bbbb.ovov) x207 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x208 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x208 += einsum("ijab,ijac->bc", t2.bbbb, x207) x210 += einsum("ab->ab", x208) * -1 del x208 - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum("ab,ijbc->ijca", x210, t2.bbbb) del x210 x219 += einsum("ijab->jiab", x211) del x211 - x212 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x212 += einsum("ijab,ikba->jk", t2.bbbb, x207) x214 += einsum("ij->ji", x212) * -1 del x212 - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum("ij,ikab->jkab", x214, t2.bbbb) del x214 x219 += einsum("ijab->jiba", x215) * -1 @@ -1100,36 +1101,36 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->jiab", x219) t2new_bbbb += einsum("ijab->jiba", x219) * -1 del x219 - x276 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x276 += einsum("ijab,ijca->bc", t2.bbbb, x207) del x207 x277 += einsum("ab->ab", x276) * -1 x327 += einsum("ab->ab", x276) * -1 del x276 - x220 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x220 += einsum("ia,bcda->ibdc", t1.bb, v.bbbb.vvvv) - x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum("ia,jbca->ijbc", t1.bb, x220) del x220 - x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x228 += einsum("ijab->ijab", x221) del x221 - x222 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x222 += einsum("ijab,kbla->ijlk", t2.bbbb, v.bbbb.ovov) x223 += einsum("ijkl->jilk", x222) - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 += einsum("ijab,klji->klab", t2.bbbb, x223) del x223 x228 += einsum("ijab->jiab", x224) del x224 - x225 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x225 += einsum("ijkl->lkji", x222) del x222 x225 += einsum("ijkl->kilj", v.bbbb.oooo) - x226 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x226 += einsum("ia,ijkl->jkla", t1.bb, x225) del x225 - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 += einsum("ia,ijkb->kjba", t1.bb, x226) del x226 x228 += einsum("ijab->jiab", x227) @@ -1137,24 +1138,24 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x228) t2new_bbbb += einsum("ijab->ijba", x228) * -1 del x228 - x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x231 += einsum("ijab,ikjl->lkba", t2.bbbb, v.bbbb.oooo) - x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x233 += einsum("ijab->jiba", x231) del x231 - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum("ijab,cadb->ijcd", t2.bbbb, v.bbbb.vvvv) x233 += einsum("ijab->jiba", x232) del x232 t2new_bbbb += einsum("ijab->ijba", x233) * -1 t2new_bbbb += einsum("ijab->ijab", x233) del x233 - x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x234 += einsum("ia,bacj->ijbc", t1.aa, v.aabb.vvvo) t2new_baba += einsum("ijab->jiba", x234) t2new_abab += einsum("ijab->ijab", x234) del x234 - x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x235 += einsum("ijab,cadb->ijcd", t2.abab, v.aabb.vvvv) t2new_baba += einsum("ijab->jiba", x235) t2new_abab += einsum("ijab->ijab", x235) @@ -1166,173 +1167,173 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x238 x241 += einsum("iabj->ijba", v.aaaa.ovvo) x241 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x242 += einsum("ijab,ikca->kjcb", t2.abab, x241) del x241 t2new_baba += einsum("ijab->jiba", x242) t2new_abab += einsum("ijab->ijab", x242) del x242 x243 += einsum("iabj->ijab", v.aabb.ovvo) - x244 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x244 += einsum("ijab,ikac->jkbc", x10, x243) del x243 t2new_baba -= einsum("ijab->jiba", x244) t2new_abab -= einsum("ijab->ijab", x244) del x244 - x245 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum("iabc->ibac", v.bbbb.ovvv) x245 -= einsum("iabc->ibca", v.bbbb.ovvv) - x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum("ia,jbac->jibc", t1.bb, x245) del x245 - x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x247 -= einsum("ijab->ijab", x246) del x246 x247 += einsum("iabj->ijba", v.bbbb.ovvo) x247 -= einsum("ijab->ijab", v.bbbb.oovv) - x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x248 += einsum("ijab,jkcb->ikac", t2.abab, x247) del x247 t2new_baba += einsum("ijab->jiba", x248) t2new_abab += einsum("ijab->ijab", x248) del x248 - x249 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x249 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x251 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x251 += einsum("ijab->jiab", x249) del x249 - x250 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x250 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x251 -= einsum("ijab->jiab", x250) del x250 x251 += einsum("ijab->ijab", v.aabb.oovv) - x252 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x252 += einsum("ijab,ikcb->kjac", t2.abab, x251) del x251 t2new_baba -= einsum("ijab->jiba", x252) t2new_abab -= einsum("ijab->ijab", x252) del x252 - x253 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x253 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x257 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x257 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x257 += einsum("ijkl->ijlk", x253) x270 += einsum("ijkl->ijlk", x253) del x253 - x254 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x254 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x254 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x257 += einsum("ijkl->jilk", x254) x270 += einsum("ijkl->jilk", x254) del x254 x255 += einsum("iajk->ijka", v.aabb.ovoo) - x256 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x256 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x256 += einsum("ia,jkla->jikl", t1.aa, x255) del x255 x257 += einsum("ijkl->ijkl", x256) del x256 x257 += einsum("ijkl->ijkl", v.aabb.oooo) - x258 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x258 += einsum("ijab,ikjl->klab", t2.abab, x257) del x257 t2new_baba += einsum("ijab->jiba", x258) t2new_abab += einsum("ijab->ijab", x258) del x258 - x259 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x259 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x260 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x260 += einsum("ijab->jiab", x259) - x272 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x272 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x272 += einsum("ijab->jiab", x259) del x259 x260 += einsum("ijab->ijab", v.bbaa.oovv) - x261 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x261 += einsum("ijab,jkca->ikcb", t2.abab, x260) del x260 t2new_baba -= einsum("ijab->jiba", x261) t2new_abab -= einsum("ijab->ijab", x261) del x261 - x262 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x262 += einsum("ia,jabk->kijb", t1.bb, v.bbaa.ovvo) x274 += einsum("ijka->ikja", x262) del x262 - x263 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x263 += einsum("ijab,kbca->ijkc", t2.abab, v.bbaa.ovvv) x274 += einsum("ijka->ikja", x263) del x263 x264 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x264 += einsum("ijka->kija", v.bbbb.ooov) - x265 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x265 += einsum("ijab,kjlb->ikla", t2.abab, x264) del x264 x274 += einsum("ijka->ijka", x265) * -1 del x265 x270 += einsum("ijkl->ijkl", v.aabb.oooo) - x271 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x271 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x271 += einsum("ia,ijkl->jkla", t1.aa, x270) del x270 x274 += einsum("ijka->ijka", x271) * -1 del x271 x272 += einsum("ijab->ijab", v.bbaa.oovv) - x273 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x273 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x273 += einsum("ia,jkba->ijkb", t1.aa, x272) del x272 x274 += einsum("ijka->ijka", x273) del x273 x274 += einsum("ijak->kija", v.bbaa.oovo) - x275 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x275 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x275 += einsum("ia,jikb->jkba", t1.bb, x274) del x274 t2new_baba += einsum("ijab->jiba", x275) * -1 t2new_abab += einsum("ijab->ijab", x275) * -1 del x275 x277 += einsum("ab->ab", f.bb.vv) - x278 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x278 += einsum("ab,ijcb->ijca", x277, t2.abab) del x277 t2new_baba += einsum("ijab->jiba", x278) t2new_abab += einsum("ijab->ijab", x278) del x278 x280 += einsum("ab->ab", f.aa.vv) - x281 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x281 += einsum("ab,ijbc->ijac", x280, t2.abab) del x280 t2new_baba += einsum("ijab->jiba", x281) t2new_abab += einsum("ijab->ijab", x281) del x281 - x282 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x282 += einsum("ia,jkba->jkib", t1.bb, v.aabb.oovv) x291 += einsum("ijka->ijka", x282) del x282 - x283 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x283 += einsum("ijab,kacb->ikjc", t2.abab, v.aabb.ovvv) x291 += einsum("ijka->jika", x283) del x283 x284 += einsum("ijka->ikja", v.aaaa.ooov) x284 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x285 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x285 += einsum("ijab,ikla->kljb", t2.abab, x284) del x284 x291 += einsum("ijka->ijka", x285) * -1 del x285 x289 += einsum("iabj->ijab", v.aabb.ovvo) - x290 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x290 += einsum("ia,jkab->jikb", t1.aa, x289) del x289 x291 += einsum("ijka->ijka", x290) del x290 x291 += einsum("ijak->ijka", v.aabb.oovo) - x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("ia,ijkb->jkab", t1.aa, x291) del x291 t2new_baba += einsum("ijab->jiba", x292) * -1 t2new_abab += einsum("ijab->ijab", x292) * -1 del x292 - x297 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x297 += einsum("ia,bacd->ibcd", t1.aa, v.aabb.vvvv) - x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x298 += einsum("iabc->iabc", x297) del x297 x298 += einsum("aibc->iabc", v.aabb.vovv) - x299 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x299 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x299 += einsum("ia,jbca->jibc", t1.bb, x298) del x298 t2new_baba += einsum("ijab->jiba", x299) @@ -1344,34 +1345,34 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x301 += einsum("ia->ia", f.bb.ov) s1new += einsum("ia,wia->w", x301, u11.bb) del x301 - x302 = np.zeros((nbos, nbos), dtype=np.float64) + x302 = np.zeros((nbos, nbos), dtype=types[float]) x302 += einsum("wia,xia->wx", gc.aa.bov, u11.aa) - x310 = np.zeros((nbos, nbos), dtype=np.float64) + x310 = np.zeros((nbos, nbos), dtype=types[float]) x310 += einsum("wx->wx", x302) del x302 - x303 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x303 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) - x304 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x304 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x304 += einsum("wia->wia", x303) x319 += einsum("wia->wia", x303) del x303 x304 += einsum("wia->wia", gc.bb.bov) - x305 = np.zeros((nbos, nbos), dtype=np.float64) + x305 = np.zeros((nbos, nbos), dtype=types[float]) x305 += einsum("wia,xia->xw", u11.bb, x304) del x304 x310 += einsum("wx->wx", x305) del x305 - x306 = np.zeros((nbos, nbos), dtype=np.float64) + x306 = np.zeros((nbos, nbos), dtype=types[float]) x306 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x308 = np.zeros((nbos, nbos), dtype=np.float64) + x308 = np.zeros((nbos, nbos), dtype=types[float]) x308 += einsum("wx->wx", x306) del x306 - x307 = np.zeros((nbos, nbos), dtype=np.float64) + x307 = np.zeros((nbos, nbos), dtype=types[float]) x307 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x308 += einsum("wx->wx", x307) del x307 x308 += einsum("wx->wx", w) - x309 = np.zeros((nbos, nbos), dtype=np.float64) + x309 = np.zeros((nbos, nbos), dtype=types[float]) x309 += einsum("wx,wy->xy", s2, x308) x310 += einsum("wx->wx", x309) del x309 @@ -1381,11 +1382,11 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new_aa += einsum("wx,wia->xia", x308, u11.aa) u11new_bb += einsum("wx,wia->xia", x308, u11.bb) del x308 - x313 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x313 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x313 += einsum("wx,xia->wia", s2, g.aa.bov) x316 += einsum("wia->wia", x313) del x313 - x314 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x314 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x314 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x316 += einsum("wia->wia", x314) del x314 @@ -1395,7 +1396,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x10 u11new_bb += einsum("wia,ijab->wjb", x316, t2.abab) del x316 - x317 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x317 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x317 += einsum("wx,xia->wia", s2, g.bb.bov) x319 += einsum("wia->wia", x317) del x317 @@ -1416,10 +1417,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x323 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) u11new_aa += einsum("ia,wij->wja", t1.aa, x323) * -1 del x323 - x324 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x324 += einsum("iabc->ibac", v.aaaa.ovvv) x324 -= einsum("iabc->ibca", v.aaaa.ovvv) - x325 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x325 -= einsum("wia,ibca->wbc", u11.aa, x324) del x324 x325 += einsum("wab->wab", gc.aa.bvv) @@ -1438,10 +1439,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x329 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) u11new_bb += einsum("ia,wij->wja", t1.bb, x329) * -1 del x329 - x330 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x330 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x330 -= einsum("iabc->ibac", v.bbbb.ovvv) x330 += einsum("iabc->ibca", v.bbbb.ovvv) - x331 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x331 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x331 -= einsum("wia,ibac->wbc", u11.bb, x330) del x330 x331 += einsum("wab->wab", gc.bb.bvv) @@ -1509,56 +1510,56 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 , LS2 and LU11 amplitudes - x0 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum("iabc,jibc->aj", v.aabb.ovvv, x0) * -1 del x0 - x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x3 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x3 += einsum("ia,jkla->jikl", t1.aa, x1) - x68 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x68 += einsum("ijkl->ijkl", x3) - x476 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x476 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x476 += einsum("ijkl->ijkl", x3) l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x3) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x3) del x3 - x55 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x55 += einsum("ia,jikb->jkba", t1.bb, x1) - x69 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x69 += einsum("ijab,kjla->kilb", t2.abab, x1) - x180 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x180 += einsum("ijab,ijka->kb", t2.abab, x1) - x190 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x190 += einsum("ia->ia", x180) del x180 - x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x262 += einsum("ijab,ikla->kjlb", t2.abab, x1) - x303 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x303 += einsum("iajk,lkjb->liba", v.aabb.ovoo, x1) - x342 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x342 -= einsum("ijab->ijab", x303) del x303 - x444 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x444 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x444 += einsum("iabc,jkib->jkca", v.bbaa.ovvv, x1) - l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=np.float64) + l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=types[float]) l2new_baba -= einsum("ijab->baji", x444) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab -= einsum("ijab->abij", x444) del x444 l1new_aa -= einsum("ijab,kjia->bk", v.bbaa.oovv, x1) - x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x2 += einsum("abij,klab->ikjl", l2.abab, t2.abab) x68 += einsum("ijkl->ijkl", x2) x69 += einsum("ia,jkil->jkla", t1.bb, x68) - x267 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x267 += einsum("ia,ijkl->jkla", t1.aa, x68) del x68 x476 += einsum("ijkl->ijkl", x2) - x477 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x477 += einsum("iajb,kilj->klab", v.aabb.ovov, x476) del x476 l2new_baba += einsum("ijab->baji", x477) @@ -1567,105 +1568,105 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x2) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x2) del x2 - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("ai,ja->ij", l1.aa, t1.aa) - x167 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x167 += einsum("ij->ij", x4) - x220 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x220 += einsum("ij->ij", x4) - x335 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x335 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x335 += einsum("ij->ij", x4) - x5 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.aa.bov) - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia->ia", x5) - x38 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x38 += einsum("ia->ia", x5) - x322 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x322 += einsum("ia->ia", x5) - x512 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x512 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x512 += einsum("ia->ia", x5) l1new_aa -= einsum("ij,ja->ai", x4, x5) del x4 del x5 x6 += einsum("ia->ia", f.aa.ov) - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum("ia,jkab->jkib", x6, t2.aaaa) del x6 - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ijka->kjia", x7) del x7 x8 += einsum("ijak->ijka", v.aaaa.oovo) * -1 - x33 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x33 += einsum("ijka->jika", x8) * -1 x33 += einsum("ijka->kija", x8) del x8 - x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ijab,kacb->ijkc", t2.aaaa, v.aaaa.ovvv) - x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum("ijka->ijka", x9) * -1 del x9 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum("ia,jabc->ijbc", t1.aa, v.aaaa.ovvv) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum("ia,jkba->jikb", t1.aa, x10) del x10 x22 += einsum("ijka->ijka", x11) * -1 del x11 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) - x15 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x15 += einsum("ia->ia", x12) x38 += einsum("ia->ia", x12) - x221 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x221 += einsum("ia->ia", x12) - x341 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x341 += einsum("ia->ia", x12) x512 += einsum("ia->ia", x12) del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x13 += einsum("iajb->jiba", v.aaaa.ovov) - x14 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x14 += einsum("ia,ijba->jb", t1.aa, x13) x15 += einsum("ia->ia", x14) * -1 - x16 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x16 += einsum("ia,jkab->jkib", x15, t2.aaaa) x22 += einsum("ijka->jika", x16) del x16 - x351 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x351 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x351 += einsum("ia,ja->ij", t1.aa, x15) - x352 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x352 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x352 += einsum("ij->ij", x351) del x351 x38 += einsum("ia->ia", x14) * -1 x221 += einsum("ia->ia", x14) * -1 del x14 - x198 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x198 += einsum("wia,ijba->wjb", u11.aa, x13) - x199 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x199 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x199 += einsum("wia->wia", x198) * -1 - x211 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x211 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x211 += einsum("wia->wia", x198) * -1 del x198 - x453 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x453 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x453 += einsum("ijab,ikca->kjcb", t2.abab, x13) - x455 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x455 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x455 += einsum("ijab->ijab", x453) * -1 del x453 - x17 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x17 += einsum("ijab,kbla->ijlk", t2.aaaa, v.aaaa.ovov) - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x20 += einsum("ijkl->jilk", x17) - x368 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x368 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x368 += einsum("ijkl->jilk", x17) del x17 - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum("ia,jakb->ikjb", t1.aa, v.aaaa.ovov) - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x19 += einsum("ia,jkla->ijkl", t1.aa, x18) x20 += einsum("ijkl->ijkl", x19) - x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum("ia,jkil->jkla", t1.aa, x20) del x20 x22 += einsum("ijka->jika", x21) @@ -1675,115 +1676,115 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x22 x368 += einsum("ijkl->ijkl", x19) del x19 - x369 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x369 += einsum("abij,ijkl->klab", l2.aaaa, x368) del x368 - x370 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x370 += einsum("ijab->ijab", x369) del x369 - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum("ijka->ijka", x18) * -1 x23 += einsum("ijka->ikja", x18) - x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("ijka->jkia", x18) * -1 x34 += einsum("ijka->kjia", x18) - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ijka->jkia", x18) * -1 - x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum("ijka->jkia", x18) * -1 x86 += einsum("ijka->kjia", x18) - x338 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x338 += einsum("ijka->ijka", x18) - x347 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x347 += einsum("ijka->ijka", x18) x347 += einsum("ijka->ikja", x18) * -1 - x514 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x514 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x514 += einsum("ijka->ijka", x18) * -1 x514 += einsum("ijka->ikja", x18) del x18 x23 += einsum("ijka->jika", v.aaaa.ooov) x23 += einsum("ijka->jkia", v.aaaa.ooov) * -1 - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum("ijab->jiab", t2.aaaa) * -1 x24 += einsum("ijab->jiba", t2.aaaa) - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum("ijka,jlba->iklb", x23, x24) del x23 x33 += einsum("ijka->ijka", x25) - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum("ijka->ijka", x25) del x25 - x60 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x60 += einsum("abij,ikba->jk", l2.aaaa, x24) - x61 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x61 += einsum("ij->ij", x60) * -1 x167 += einsum("ij->ij", x60) * -1 - x209 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x209 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x209 += einsum("ij->ij", x60) * -1 del x60 - x85 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x85 += einsum("iabc,ijca->jb", v.aaaa.ovvv, x24) - x120 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x120 += einsum("ia->ia", x85) * -1 del x85 - x104 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x104 += einsum("iajb,ikba->kj", v.aaaa.ovov, x24) - x108 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x108 += einsum("ij->ji", x104) * -1 del x104 - x448 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x448 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x448 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x24) - x450 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x450 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x450 += einsum("ijab->ijab", x448) * -1 del x448 - x26 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x26 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x27 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x27 += einsum("ijka->jika", x26) - x508 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x508 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x508 += einsum("ijka->jika", x26) x27 += einsum("ijka->ijka", v.aabb.ooov) - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x28 += einsum("ijab,kljb->ikla", t2.abab, x27) x33 += einsum("ijka->kjia", x28) x53 += einsum("ijka->kjia", x28) del x28 - x88 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x88 += einsum("ijab,ikjb->ka", t2.abab, x27) x120 += einsum("ia->ia", x88) * -1 del x88 - x250 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x250 += einsum("ijab,iklb->klja", t2.abab, x27) * -1 - x478 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x478 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x478 += einsum("ijka,likb->ljab", x1, x27) l2new_baba += einsum("ijab->baji", x478) l2new_abab += einsum("ijab->abij", x478) del x478 - x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x29 += einsum("iabj->ijba", v.aaaa.ovvo) x29 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x30 += einsum("ia,jkba->ijkb", t1.aa, x29) x33 += einsum("ijka->ijka", x30) x53 += einsum("ijka->ijka", x30) del x30 - x96 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("ia,ijba->jb", t1.aa, x29) x120 += einsum("ia->ia", x96) del x96 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x31 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x32 += einsum("ijkl->jkil", x31) x32 += einsum("ijkl->kjil", x31) * -1 - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x52 += einsum("ijkl->ijkl", x31) x52 += einsum("ijkl->ikjl", x31) * -1 x53 += einsum("ia,jikl->jkla", t1.aa, x52) * -1 del x52 l1new_aa += einsum("abij,jkib->ak", l2.aaaa, x53) del x53 - x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x301 += einsum("abij,jkli->klba", l2.aaaa, x31) del x31 x342 -= einsum("ijab->ijab", x301) @@ -1796,108 +1797,108 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x33 x34 += einsum("ijka->ikja", v.aaaa.ooov) x34 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x46 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x46 += einsum("ijab,ikla->kljb", t2.abab, x34) * -1 del x34 - x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x35 += einsum("ijab->jiab", t2.bbbb) * -1 x35 += einsum("ijab->jiba", t2.bbbb) x46 += einsum("ijka,klba->ijlb", x27, x35) * -1 del x27 - x128 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x128 += einsum("iabc,ijca->jb", v.bbbb.ovvv, x35) - x158 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x158 += einsum("ia->ia", x128) * -1 del x128 - x187 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x187 += einsum("abij,ikba->jk", l2.bbbb, x35) - x188 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x188 += einsum("ij->ij", x187) * -1 - x261 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x261 += einsum("ij->ij", x187) * -1 - x293 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x293 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x293 += einsum("ij->ij", x187) * -1 del x187 - x194 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x194 += einsum("abij,ijbc->ac", l2.bbbb, x35) - x195 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x195 += einsum("ab->ab", x194) * -1 - x435 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x435 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x435 += einsum("ab->ab", x194) * -1 - x496 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x496 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x496 += einsum("ab->ab", x194) * -1 del x194 - x454 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x454 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x454 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x35) x455 += einsum("ijab->ijab", x454) * -1 del x454 - x36 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x36 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x37 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x37 += einsum("ijka->ikja", x36) - x41 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x41 += einsum("ijka->ikja", x36) - x304 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x304 += einsum("ijka,ljkb->ilab", x1, x36) x342 -= einsum("ijab->ijab", x304) del x304 - x510 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x510 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x510 += einsum("ijka->ikja", x36) x37 += einsum("iajk->ijka", v.aabb.ovoo) x46 += einsum("ijab,kjla->kilb", t2.abab, x37) * -1 - x132 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x132 += einsum("ijab,ijka->kb", t2.abab, x37) x158 += einsum("ia->ia", x132) * -1 del x132 - x242 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x242 += einsum("ijab,ikla->jklb", t2.abab, x37) - x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x246 += einsum("ijka->kjia", x242) - x257 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x257 += einsum("ijka->kjia", x242) del x242 x250 += einsum("ijab,iklb->jkla", x24, x37) * -1 - x473 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x473 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x473 += einsum("ia,jkla->ijkl", t1.aa, x37) - x474 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x474 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x474 += einsum("ijkl->jikl", x473) del x473 x38 += einsum("ia->ia", f.aa.ov) x46 += einsum("ia,jkab->ijkb", x38, t2.abab) - x89 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x89 += einsum("ia,ijba->jb", x38, x24) x120 += einsum("ia->ia", x89) * -1 del x89 - x107 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x107 += einsum("ia,ja->ij", t1.aa, x38) x108 += einsum("ij->ji", x107) del x107 - x134 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x134 += einsum("ia,ijab->jb", x38, t2.abab) x158 += einsum("ia->ia", x134) del x134 - x200 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x200 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x200 += einsum("ia,wja->wij", x38, u11.aa) - x216 = np.zeros((nbos), dtype=np.float64) + x216 = np.zeros((nbos), dtype=types[float]) x216 += einsum("ia,wia->w", x38, u11.aa) - x219 = np.zeros((nbos), dtype=np.float64) + x219 = np.zeros((nbos), dtype=types[float]) x219 += einsum("w->w", x216) del x216 - lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) lu11new_aa += einsum("w,ia->wai", ls1, x38) * 2 - x39 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x39 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x43 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("ijkl->ijlk", x39) x474 += einsum("ijkl->ijlk", x39) del x39 - x40 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x40 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x43 += einsum("ijkl->jilk", x40) x474 += einsum("ijkl->jilk", x40) del x40 x41 += einsum("iajk->ijka", v.aabb.ovoo) - x42 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x42 += einsum("ia,jkla->ijkl", t1.aa, x41) del x41 x43 += einsum("ijkl->jikl", x42) @@ -1906,11 +1907,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x46 += einsum("ia,jkil->jkla", t1.bb, x43) * -1 x250 += einsum("ia,ijkl->jkla", t1.aa, x43) * -1 del x43 - x44 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x44 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x45 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x45 += einsum("ijab->ijab", x44) - x311 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x311 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x311 += einsum("ijab->ijab", x44) x455 += einsum("ijab->ijab", x44) del x44 @@ -1921,113 +1922,113 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x46 += einsum("ijab,kacb->kijc", t2.abab, v.aabb.ovvv) l1new_aa += einsum("abij,kijb->ak", l2.abab, x46) * -1 del x46 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum("ijab->ijab", x47) - x349 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x349 += einsum("ijab,kica->kjcb", x13, x47) del x47 - x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x362 += einsum("ijab->ijab", x349) * -1 del x349 - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum("abij->jiab", l2.aaaa) x48 += einsum("abij->jiba", l2.aaaa) * -1 x55 += einsum("ijab,ikca->kjcb", t2.abab, x48) * -1 - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum("ijab->jiab", t2.aaaa) x49 += einsum("ijab->jiba", t2.aaaa) * -1 x50 += einsum("ijab,ikac->jkbc", x48, x49) - x165 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("ai,ijba->jb", l1.aa, x49) - x169 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x169 += einsum("ia->ia", x165) * -1 del x165 - x174 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x174 += einsum("abij,ijcb->ac", l2.aaaa, x49) - x175 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x175 += einsum("ab->ab", x174) * -1 - x358 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x358 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x358 += einsum("ab->ab", x174) * -1 - x494 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x494 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x494 += einsum("ab->ab", x174) * -1 del x174 - x259 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x259 += einsum("abij,ikca->kjcb", l2.abab, x49) * -1 x267 += einsum("ijka,ilba->ljkb", x1, x49) * -1 - x344 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x344 += einsum("ijab,ikca->jkbc", x13, x49) del x13 - x345 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x345 += einsum("ijab->jiba", x344) del x344 - x350 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x350 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x350 += einsum("iajb,ikab->kj", v.aaaa.ovov, x49) x352 += einsum("ij->ij", x350) * -1 del x350 - x355 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x355 += einsum("iajb,ijac->cb", v.aaaa.ovov, x49) - x356 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x356 += einsum("ab->ab", x355) * -1 del x355 - x486 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x486 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x486 += einsum("iajb,ijca->cb", v.aaaa.ovov, x49) - x487 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x487 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x487 += einsum("ab->ab", x486) * -1 del x486 - x51 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x51 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 x51 += einsum("iabc->ibac", v.aaaa.ovvv) - x458 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x458 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x458 += einsum("ia,jbac->ijbc", t1.aa, x51) - x459 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x459 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x459 += einsum("ijab->jiab", x458) * -1 del x458 l1new_aa += einsum("ijab,jabc->ci", x50, x51) del x50 - x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x54 += einsum("ijab->jiab", t2.bbbb) x54 += einsum("ijab->jiba", t2.bbbb) * -1 x55 += einsum("abij,jkcb->ikac", l2.abab, x54) * -1 l1new_aa += einsum("iabc,jiba->cj", v.bbaa.ovvv, x55) * -1 del x55 - x183 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x183 += einsum("ai,ijba->jb", l1.bb, x54) x190 += einsum("ia->ia", x183) * -1 del x183 - x56 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x56 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum("ijab,kljb->klia", t2.abab, x56) x69 += einsum("ijab,klib->klja", x54, x56) * -1 - x163 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x163 += einsum("ijab,ikjb->ka", t2.abab, x56) x169 += einsum("ia->ia", x163) del x163 x259 += einsum("ia,ijkb->jkab", t1.aa, x56) x267 += einsum("ijab,iklb->klja", t2.abab, x56) - x374 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x374 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x374 += einsum("ijka,jilb->lkba", v.aabb.ooov, x56) - x415 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x415 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x415 -= einsum("ijab->ijab", x374) del x374 - x377 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x377 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x377 += einsum("ijka,ijlb->lkba", x26, x56) x415 -= einsum("ijab->ijab", x377) del x377 - x446 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x446 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x446 += einsum("iabc,jikb->jkac", v.aabb.ovvv, x56) l2new_baba -= einsum("ijab->baji", x446) l2new_abab -= einsum("ijab->abij", x446) del x446 - x479 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x479 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x479 += einsum("ijka,likb->ljab", x37, x56) del x37 l2new_baba += einsum("ijab->baji", x479) l2new_abab += einsum("ijab->abij", x479) del x479 - x500 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x500 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x500 += einsum("ia,jikb->jkab", x38, x56) del x38 l2new_baba += einsum("ijab->baji", x500) * -1 @@ -2039,44 +2040,44 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_baba += einsum("ijka,iklb->balj", x347, x56) * -1 l2new_abab += einsum("ijka,iklb->abjl", x514, x56) del x514 - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum("ijka->ijka", x57) x58 += einsum("ijka->jika", x57) * -1 x62 += einsum("ijab,iklb->klja", x49, x58) - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ia,ijkb->jkba", t1.aa, x58) * -1 l1new_aa += einsum("iabc,jiac->bj", x51, x64) del x64 x69 += einsum("ijab,ikla->kljb", t2.abab, x58) * -1 - x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x348 += einsum("ijka,iljb->lkba", x347, x58) del x58 del x347 x362 += einsum("ijab->ijab", x348) del x348 - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x71 += einsum("ia,jkla->kjli", t1.aa, x57) - x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x72 += einsum("ia,ijkl->jlka", t1.aa, x71) - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("ijka->ijka", x72) del x72 - x122 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum("ijkl->ijkl", x71) x122 += einsum("ijkl->ijlk", x71) * -1 l1new_aa += einsum("ijka,ljki->al", v.aaaa.ooov, x122) del x122 - x367 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x367 += einsum("iajb,klij->klab", v.aaaa.ovov, x71) del x71 x370 += einsum("ijab->ijab", x367) del x367 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum("ijka->ijka", x57) * -1 x75 += einsum("ijka->jika", x57) - x481 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x481 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x481 += einsum("ijka,iljb->lkba", x26, x75) del x26 l2new_baba += einsum("ijab->baji", x481) * -1 @@ -2085,34 +2086,34 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ijab,jkia->bk", x29, x75) del x75 del x29 - x164 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x164 += einsum("ijab,ijka->kb", x49, x57) del x49 x169 += einsum("ia->ia", x164) * -1 del x164 - x302 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x302 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x302 += einsum("iabc,jkib->kjac", v.aaaa.ovvv, x57) x342 -= einsum("ijab->ijab", x302) del x302 - x313 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x313 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x313 += einsum("ijka->ijka", x57) x313 -= einsum("ijka->jika", x57) - x480 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x480 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x480 += einsum("ijka,ljib->lkba", v.aabb.ooov, x313) l2new_baba -= einsum("ijab->baji", x480) l2new_abab -= einsum("ijab->abij", x480) del x480 - x361 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x361 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x361 += einsum("ia,jkib->jkba", x15, x57) del x15 x362 += einsum("ijab->ijab", x361) del x361 - x59 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x59 += einsum("abij,kjab->ik", l2.abab, t2.abab) x61 += einsum("ij->ij", x59) x62 += einsum("ia,jk->jkia", t1.aa, x61) x69 += einsum("ia,jk->jkia", t1.bb, x61) * -1 - x360 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x360 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x360 += einsum("ij,jakb->ikab", x61, v.aaaa.ovov) x362 += einsum("ijab->ijba", x360) * -1 del x360 @@ -2121,17 +2122,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x167 += einsum("ij->ij", x59) x209 += einsum("ij->ij", x59) del x59 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 -= einsum("iajb->jiab", v.aaaa.ovov) x63 += einsum("iajb->jiba", v.aaaa.ovov) - x332 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x332 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x332 += einsum("wia,ijba->wjb", u11.aa, x63) - x333 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x333 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x333 -= einsum("wia->wia", x332) - x502 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x502 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x502 -= einsum("wia->wia", x332) del x332 - x340 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x340 += einsum("ia,ijba->jb", t1.aa, x63) x341 -= einsum("ia->ia", x340) x342 += einsum("ai,jb->ijab", l1.aa, x341) @@ -2141,13 +2142,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ijka,kjab->bi", x62, x63) * -1 del x62 del x63 - x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("ia,bcda->ibdc", t1.aa, v.aaaa.vvvv) - x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("iabc->iabc", x65) * -1 del x65 x66 += einsum("aibc->iabc", v.aaaa.vovv) - x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum("iabc->iabc", x66) x67 += einsum("iabc->ibac", x66) * -1 del x66 @@ -2156,32 +2157,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x69 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) * -1 l1new_aa += einsum("iajb,kijb->ak", v.aabb.ovov, x69) del x69 - x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x70 += einsum("ai,jkab->ikjb", l1.aa, t2.aaaa) x73 += einsum("ijka->ijka", x70) * 0.9999999999999993 del x70 - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum("ijka->ijka", x73) * -1 x74 += einsum("ijka->ikja", x73) del x73 l1new_aa += einsum("iajb,kjia->bk", v.aaaa.ovov, x74) * -1 del x74 - x76 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x76 += einsum("abci->iabc", v.aabb.vvvo) x76 += einsum("ia,bcda->ibcd", t1.bb, v.aabb.vvvv) l1new_aa += einsum("abij,jacb->ci", l2.abab, x76) del x76 - x77 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x77 += einsum("abij,klba->ijlk", l2.aaaa, t2.aaaa) - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x78 += einsum("ijkl->jikl", x77) x78 += einsum("ijkl->jilk", x77) * -1 - x366 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x366 += einsum("iajb,klij->lkba", v.aaaa.ovov, x77) del x77 x370 += einsum("ijab->ijab", x366) del x366 - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum("ijab->abij", x370) l2new_aaaa += einsum("ijab->baij", x370) * -1 del x370 @@ -2189,432 +2190,432 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ijkl,klia->aj", x78, x79) * -1 del x78 del x79 - x80 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("w,wai->ia", s1, g.aa.bvo) x120 += einsum("ia->ia", x80) del x80 - x81 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("wab,wib->ia", g.aa.bvv, u11.aa) x120 += einsum("ia->ia", x81) del x81 - x82 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("ia,iabj->jb", t1.bb, v.bbaa.ovvo) x120 += einsum("ia->ia", x82) del x82 - x83 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x83 += einsum("ijab,ikja->kb", t2.aaaa, v.aaaa.ooov) x120 += einsum("ia->ia", x83) del x83 - x84 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x84 += einsum("ijab,jbca->ic", t2.abab, v.bbaa.ovvv) x120 += einsum("ia->ia", x84) del x84 x86 += einsum("ijka->ikja", v.aaaa.ooov) - x87 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x87 += einsum("ijab,ijkb->ka", t2.aaaa, x86) del x86 x120 += einsum("ia->ia", x87) * -1 del x87 - x90 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x90 += einsum("w,wia->ia", s1, g.bb.bov) - x94 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x94 += einsum("ia->ia", x90) - x227 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x227 += einsum("ia->ia", x90) - x297 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x297 += einsum("ia->ia", x90) - x394 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x394 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x394 += einsum("ia->ia", x90) - x513 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x513 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x513 += einsum("ia->ia", x90) del x90 - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x94 += einsum("ia->ia", x91) - x233 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x233 += einsum("ia->ia", x91) x297 += einsum("ia->ia", x91) - x414 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x414 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x414 += einsum("ia->ia", x91) x513 += einsum("ia->ia", x91) del x91 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x92 += einsum("iajb->jiba", v.bbbb.ovov) - x93 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x93 += einsum("ia,ijba->jb", t1.bb, x92) x94 += einsum("ia->ia", x93) * -1 x233 += einsum("ia->ia", x93) * -1 - x234 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x234 += einsum("ia,jkab->jkib", x233, t2.bbbb) - x239 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x239 += einsum("ijka->jika", x234) del x234 - x428 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x428 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x428 += einsum("ia,ja->ij", t1.bb, x233) - x429 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x429 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x429 += einsum("ij->ij", x428) del x428 x297 += einsum("ia->ia", x93) * -1 del x93 - x283 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x283 += einsum("wia,ijba->wjb", u11.bb, x92) - x284 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x284 += einsum("wia->wia", x283) * -1 - x295 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x295 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x295 += einsum("wia->wia", x283) * -1 del x283 - x427 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x427 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x427 += einsum("ijab,ikba->jk", t2.bbbb, x92) x429 += einsum("ij->ij", x427) * -1 del x427 - x449 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x449 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x449 += einsum("ijab,jkcb->ikac", t2.abab, x92) x450 += einsum("ijab->ijab", x449) * -1 del x449 - x489 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x489 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x489 += einsum("ijab,ijac->bc", t2.bbbb, x92) - x490 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x490 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x490 += einsum("ab->ab", x489) * -1 del x489 x94 += einsum("ia->ia", f.bb.ov) - x95 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x95 += einsum("ia,jiba->jb", x94, t2.abab) x120 += einsum("ia->ia", x95) del x95 - x133 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x133 += einsum("ia,ijba->jb", x94, x35) x158 += einsum("ia->ia", x133) * -1 del x133 - x148 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x148 += einsum("ia,ja->ij", t1.bb, x94) - x149 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x149 += einsum("ij->ji", x148) del x148 - x217 = np.zeros((nbos), dtype=np.float64) + x217 = np.zeros((nbos), dtype=types[float]) x217 += einsum("ia,wia->w", x94, u11.bb) x219 += einsum("w->w", x217) del x217 x250 += einsum("ia,jkba->jikb", x94, t2.abab) - x285 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x285 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x285 += einsum("ia,wja->wij", x94, u11.bb) - x501 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x501 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x501 += einsum("ia,jkib->jkba", x94, x1) l2new_baba += einsum("ijab->baji", x501) * -1 l2new_abab += einsum("ijab->abij", x501) * -1 del x501 - lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) lu11new_bb += einsum("w,ia->wai", ls1, x94) * 2 del x94 - x97 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x97 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x98 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x98 += einsum("wij->wij", x97) - x521 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x521 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x521 += einsum("wij->wij", x97) del x97 x98 += einsum("wij->wij", g.aa.boo) - x99 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x99 += einsum("wia,wij->ja", u11.aa, x98) x120 += einsum("ia->ia", x99) * -1 del x99 - x100 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x100 += einsum("w,wij->ij", s1, g.aa.boo) x108 += einsum("ij->ij", x100) - x324 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x324 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x324 += einsum("ij->ij", x100) del x100 - x101 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x101 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x108 += einsum("ij->ij", x101) x324 += einsum("ij->ij", x101) del x101 - x102 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x102 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x108 += einsum("ij->ij", x102) - x328 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x328 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x328 += einsum("ij->ij", x102) del x102 - x103 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x103 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x108 += einsum("ij->ji", x103) x352 += einsum("ij->ij", x103) del x103 - x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x353 += einsum("ij,abik->kjab", x352, l2.aaaa) del x352 x362 += einsum("ijab->ijba", x353) del x353 - x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x105 += einsum("ijka->ikja", v.aaaa.ooov) x105 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x106 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x106 += einsum("ia,ijka->jk", t1.aa, x105) x108 += einsum("ij->ij", x106) * -1 del x106 x200 += einsum("wia,ijka->wjk", u11.aa, x105) * -1 x108 += einsum("ij->ij", f.aa.oo) - x109 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x109 += einsum("ia,ij->ja", t1.aa, x108) x120 += einsum("ia->ia", x109) * -1 del x109 - x492 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x492 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x492 += einsum("ij,abjk->ikab", x108, l2.abab) l2new_baba += einsum("ijab->baji", x492) * -1 l2new_abab += einsum("ijab->abij", x492) * -1 del x492 l1new_aa += einsum("ai,ji->aj", l1.aa, x108) * -1 del x108 - x110 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("w,wab->ab", s1, g.aa.bvv) - x114 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x114 += einsum("ab->ab", x110) - x317 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x317 += einsum("ab->ab", x110) x487 += einsum("ab->ab", x110) del x110 - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x114 += einsum("ab->ab", x111) - x320 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x320 += einsum("ab->ab", x111) x487 += einsum("ab->ab", x111) del x111 - x112 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x112 += einsum("iabc->ibca", v.aaaa.ovvv) x112 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 - x113 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x113 += einsum("ia,ibac->bc", t1.aa, x112) del x112 x114 += einsum("ab->ab", x113) * -1 x487 += einsum("ab->ab", x113) * -1 del x113 x114 += einsum("ab->ab", f.aa.vv) - x115 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x115 += einsum("ia,ba->ib", t1.aa, x114) x120 += einsum("ia->ia", x115) del x115 l1new_aa += einsum("ai,ab->bi", l1.aa, x114) del x114 - x116 = np.zeros((nbos), dtype=np.float64) + x116 = np.zeros((nbos), dtype=types[float]) x116 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x118 = np.zeros((nbos), dtype=np.float64) + x118 = np.zeros((nbos), dtype=types[float]) x118 += einsum("w->w", x116) - x515 = np.zeros((nbos), dtype=np.float64) + x515 = np.zeros((nbos), dtype=types[float]) x515 += einsum("w->w", x116) del x116 - x117 = np.zeros((nbos), dtype=np.float64) + x117 = np.zeros((nbos), dtype=types[float]) x117 += einsum("ia,wia->w", t1.bb, g.bb.bov) x118 += einsum("w->w", x117) x515 += einsum("w->w", x117) del x117 x118 += einsum("w->w", G) - x119 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x119 += einsum("w,wia->ia", x118, u11.aa) x120 += einsum("ia->ia", x119) del x119 - x157 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x157 += einsum("w,wia->ia", x118, u11.bb) x158 += einsum("ia->ia", x157) del x157 - x218 = np.zeros((nbos), dtype=np.float64) + x218 = np.zeros((nbos), dtype=types[float]) x218 += einsum("w,wx->x", x118, s2) del x118 x219 += einsum("w->w", x218) del x218 x120 += einsum("ai->ia", f.aa.vo) l1new_bb += einsum("ia,abij->bj", x120, l2.abab) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new += einsum("ia,wai->w", x120, lu11.aa) - x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x121 -= einsum("abij->jiab", l2.aaaa) x121 += einsum("abij->jiba", l2.aaaa) - x204 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x204 += einsum("wia,ijba->wjb", u11.aa, x121) - x205 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x205 -= einsum("wia->wia", x204) - x330 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x330 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x330 -= einsum("wia->wia", x204) del x204 l1new_aa += einsum("ia,ijba->bj", x120, x121) * -1 del x120 lu11new_aa -= einsum("wai,ijba->wbj", g.aa.bvo, x121) del x121 - x123 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x123 += einsum("w,wai->ia", s1, g.bb.bvo) x158 += einsum("ia->ia", x123) del x123 - x124 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x124 += einsum("wab,wib->ia", g.bb.bvv, u11.bb) x158 += einsum("ia->ia", x124) del x124 - x125 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x125 += einsum("ia,iabj->jb", t1.aa, v.aabb.ovvo) x158 += einsum("ia->ia", x125) del x125 - x126 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x126 += einsum("ijab,iacb->jc", t2.abab, v.aabb.ovvv) x158 += einsum("ia->ia", x126) del x126 - x127 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x127 += einsum("ijab,jkib->ka", t2.bbbb, v.bbbb.ooov) x158 += einsum("ia->ia", x127) del x127 - x129 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x129 += einsum("ia,jakb->ikjb", t1.bb, v.bbbb.ovov) - x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x130 += einsum("ijka->jkia", x129) * -1 x130 += einsum("ijka->kjia", x129) - x236 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x236 += einsum("ia,jkla->ijkl", t1.bb, x129) - x237 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x237 += einsum("ijkl->ijkl", x236) - x418 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x418 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x418 += einsum("ijkl->ijkl", x236) del x236 - x240 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x240 += einsum("ijka->ijka", x129) * -1 x240 += einsum("ijka->ikja", x129) - x247 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x247 += einsum("ijka->jkia", x129) * -1 x247 += einsum("ijka->kjia", x129) - x276 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x276 += einsum("ijka->jkia", x129) * -1 - x411 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x411 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x411 += einsum("ijka->ijka", x129) - x423 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x423 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x423 += einsum("ijka->ijka", x129) x423 += einsum("ijka->ikja", x129) * -1 - x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x482 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x482 += einsum("ijka->ijka", x129) * -1 x482 += einsum("ijka->ikja", x129) del x129 - x483 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x483 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x483 += einsum("ijka,jklb->ilab", x1, x482) del x482 l2new_baba += einsum("ijab->baji", x483) * -1 l2new_abab += einsum("ijab->abij", x483) * -1 del x483 x130 += einsum("ijka->ikja", v.bbbb.ooov) - x131 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x131 += einsum("ijab,jika->kb", t2.bbbb, x130) del x130 x158 += einsum("ia->ia", x131) * -1 del x131 - x135 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x135 += einsum("iabj->ijba", v.bbbb.ovvo) x135 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x136 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x136 += einsum("ia,ijba->jb", t1.bb, x135) x158 += einsum("ia->ia", x136) del x136 - x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x243 += einsum("ia,jkba->ijkb", t1.bb, x135) x246 += einsum("ijka->ijka", x243) x257 += einsum("ijka->ijka", x243) del x243 - x137 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x137 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x137 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x138 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x138 += einsum("wij->wij", x137) - x528 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x528 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x528 += einsum("wij->wij", x137) del x137 x138 += einsum("wij->wij", g.bb.boo) - x139 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x139 += einsum("wia,wij->ja", u11.bb, x138) x158 += einsum("ia->ia", x139) * -1 del x139 - x140 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x140 += einsum("w,wij->ij", s1, g.bb.boo) x149 += einsum("ij->ij", x140) - x396 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x396 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x396 += einsum("ij->ij", x140) del x140 - x141 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x141 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x149 += einsum("ij->ij", x141) x396 += einsum("ij->ij", x141) del x141 - x142 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x142 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x149 += einsum("ij->ij", x142) - x400 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x400 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x400 += einsum("ij->ij", x142) del x142 - x143 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x143 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x149 += einsum("ij->ji", x143) x429 += einsum("ij->ij", x143) del x143 - x430 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x430 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x430 += einsum("ij,abik->kjab", x429, l2.bbbb) del x429 - x439 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x439 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x439 += einsum("ijab->ijba", x430) del x430 - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum("iajb->jiab", v.bbbb.ovov) x144 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x145 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x145 += einsum("ijab,ikab->jk", t2.bbbb, x144) x149 += einsum("ij->ji", x145) * -1 del x145 - x432 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x432 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x432 += einsum("ijab,ijac->bc", t2.bbbb, x144) - x433 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x433 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x433 += einsum("ab->ab", x432) * -1 del x432 - x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x462 += einsum("ijab,ikcb->kjca", x144, x54) - x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x464 += einsum("ijab->jiab", x462) del x462 - x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x146 += einsum("ijka->ikja", v.bbbb.ooov) x146 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x147 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x147 += einsum("ia,ijka->jk", t1.bb, x146) x149 += einsum("ij->ij", x147) * -1 del x147 x285 += einsum("wia,ijka->wjk", u11.bb, x146) * -1 x149 += einsum("ij->ij", f.bb.oo) - x150 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x150 += einsum("ia,ij->ja", t1.bb, x149) x158 += einsum("ia->ia", x150) * -1 del x150 - x493 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x493 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x493 += einsum("ij,abkj->kiab", x149, l2.abab) l2new_baba += einsum("ijab->baji", x493) * -1 l2new_abab += einsum("ijab->abij", x493) * -1 del x493 l1new_bb += einsum("ai,ji->aj", l1.bb, x149) * -1 del x149 - x151 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x151 += einsum("w,wab->ab", s1, g.bb.bvv) - x155 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x155 += einsum("ab->ab", x151) - x389 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x389 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x389 += einsum("ab->ab", x151) x490 += einsum("ab->ab", x151) del x151 - x152 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x152 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x155 += einsum("ab->ab", x152) - x392 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x392 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x392 += einsum("ab->ab", x152) x490 += einsum("ab->ab", x152) del x152 - x153 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x153 += einsum("iabc->ibca", v.bbbb.ovvv) x153 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 - x154 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x154 += einsum("ia,ibac->bc", t1.bb, x153) x155 += einsum("ab->ab", x154) * -1 x490 += einsum("ab->ab", x154) * -1 del x154 x155 += einsum("ab->ab", f.bb.vv) - x156 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x156 += einsum("ia,ba->ib", t1.bb, x155) x158 += einsum("ia->ia", x156) del x156 @@ -2623,28 +2624,28 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x158 += einsum("ai->ia", f.bb.vo) l1new_aa += einsum("ia,baji->bj", x158, l2.abab) ls1new += einsum("ia,wai->w", x158, lu11.bb) - x159 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x159 += einsum("w,wia->ia", ls1, u11.aa) x169 += einsum("ia->ia", x159) * -1 del x159 - x160 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x160 += einsum("ai,jiba->jb", l1.bb, t2.abab) x169 += einsum("ia->ia", x160) * -1 del x160 - x161 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x161 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x161 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x162 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x162 += einsum("wia,wij->ja", u11.aa, x161) x169 += einsum("ia->ia", x162) del x162 - x166 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x166 += einsum("wai,wja->ij", lu11.aa, u11.aa) x167 += einsum("ij->ij", x166) - x168 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x168 += einsum("ia,ij->ja", t1.aa, x167) x169 += einsum("ia->ia", x168) del x168 - x498 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x498 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x498 += einsum("ij,jakb->ikab", x167, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x498) * -1 l2new_abab += einsum("ijab->abij", x498) * -1 @@ -2655,13 +2656,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ij,wji->w", x167, g.aa.boo) * -1 del x167 x209 += einsum("ij->ij", x166) - x210 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x210 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x210 += einsum("w,ij->wij", s1, x209) del x209 x220 += einsum("ij->ij", x166) x335 += einsum("ij->ij", x166) del x166 - x336 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x336 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x336 += einsum("ij,jakb->ikab", x335, v.aaaa.ovov) del x335 x342 += einsum("ijab->ijba", x336) @@ -2669,26 +2670,26 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x169 += einsum("ia->ia", t1.aa) * -1 l1new_bb += einsum("ia,iajb->bj", x169, v.aabb.ovov) * -1 ls1new += einsum("ia,wia->w", x169, g.aa.bov) * -1 - x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x170 += einsum("iajb->jiab", v.aaaa.ovov) x170 -= einsum("iajb->jiba", v.aaaa.ovov) l1new_aa += einsum("ia,ijba->bj", x169, x170) * -1 del x169 del x170 - x171 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x171 += einsum("ai,ib->ab", l1.aa, t1.aa) x175 += einsum("ab->ab", x171) del x171 - x172 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x172 += einsum("wai,wib->ab", lu11.aa, u11.aa) x175 += einsum("ab->ab", x172) - x300 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x300 += einsum("ab,icjb->ijac", x172, v.aaaa.ovov) x342 += einsum("ijab->ijab", x300) del x300 x494 += einsum("ab->ab", x172) del x172 - x173 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x173 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x175 += einsum("ab->ab", x173) l1new_aa += einsum("ab,iabc->ci", x175, x51) * -1 @@ -2697,80 +2698,80 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ab,wab->w", x175, g.aa.bvv) del x175 x358 += einsum("ab->ab", x173) - x359 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x359 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x359 += einsum("ab,ibjc->ijac", x358, v.aaaa.ovov) del x358 x362 += einsum("ijab->jiab", x359) * -1 del x359 x494 += einsum("ab->ab", x173) del x173 - x495 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x495 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x495 += einsum("ab,ibjc->ijac", x494, v.aabb.ovov) del x494 l2new_baba += einsum("ijab->baji", x495) * -1 l2new_abab += einsum("ijab->abij", x495) * -1 del x495 - x176 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x176 += einsum("w,wia->ia", ls1, u11.bb) x190 += einsum("ia->ia", x176) * -1 del x176 - x177 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x177 += einsum("ai,ijab->jb", l1.aa, t2.abab) x190 += einsum("ia->ia", x177) * -1 del x177 - x178 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x178 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x178 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x179 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x179 += einsum("wia,wij->ja", u11.bb, x178) x190 += einsum("ia->ia", x179) del x179 - x181 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x181 += einsum("ia,abjk->kjib", t1.bb, l2.bbbb) - x182 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x182 += einsum("ijka,jiba->kb", x181, x54) x190 += einsum("ia->ia", x182) * -1 del x182 - x260 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x260 += einsum("ijka->ijka", x181) x260 += einsum("ijka->jika", x181) * -1 x262 += einsum("ijka,ilab->jlkb", x260, x35) - x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x263 += einsum("ia,ijkb->jkba", t1.bb, x260) * -1 x267 += einsum("ijab,jklb->ikla", t2.abab, x260) * -1 l1new_bb += einsum("ijab,jkia->bk", x135, x260) * -1 del x135 l2new_baba += einsum("ijka,likb->abjl", x260, x36) del x260 - x269 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x269 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x269 += einsum("ia,jkla->kjli", t1.bb, x181) - x270 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x270 += einsum("ia,ijkl->jlka", t1.bb, x269) - x271 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x271 += einsum("ijka->ijka", x270) del x270 - x280 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x280 += einsum("ijkl->ijkl", x269) * -1 x280 += einsum("ijkl->ijlk", x269) l1new_bb += einsum("ijka,ljki->al", v.bbbb.ooov, x280) * -1 del x280 - x417 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x417 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x417 += einsum("iajb,klij->klab", v.bbbb.ovov, x269) del x269 - x420 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x420 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x420 += einsum("ijab->ijab", x417) del x417 - x376 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x376 += einsum("iabc,jkib->kjac", v.bbbb.ovvv, x181) x415 -= einsum("ijab->ijab", x376) del x376 - x385 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x385 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x385 -= einsum("ijka->ijka", x181) x385 += einsum("ijka->jika", x181) l2new_abab -= einsum("iajk,kljb->abil", v.aabb.ovoo, x385) - x422 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x422 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x422 += einsum("ijka->ijka", x181) * -1 x422 += einsum("ijka->jika", x181) - x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x424 += einsum("ijka,jklb->ilab", x422, x423) del x423 x439 += einsum("ijab->ijab", x424) @@ -2778,29 +2779,29 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_abab += einsum("ijka,jlkb->abil", x36, x422) * -1 del x36 del x422 - x438 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x438 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x438 += einsum("ia,jkib->jkba", x233, x181) x439 += einsum("ijab->ijab", x438) del x438 - x485 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x485 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x485 += einsum("ijka->ijka", x181) x485 -= einsum("ijka->jika", x181) l2new_baba += einsum("iajk,kljb->bali", v.aabb.ovoo, x485) del x485 - x184 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x184 += einsum("ai,ja->ij", l1.bb, t1.bb) x188 += einsum("ij->ij", x184) - x408 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x408 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x408 += einsum("ij->ij", x184) l1new_bb += einsum("ij,ja->ai", x184, x297) * -1 del x184 del x297 - x185 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x185 += einsum("wai,wja->ij", lu11.bb, u11.bb) x188 += einsum("ij->ij", x185) x293 += einsum("ij->ij", x185) x408 += einsum("ij->ij", x185) - x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x409 += einsum("ij,jakb->kiab", x408, v.bbbb.ovov) del x408 x415 += einsum("ijab->jiba", x409) @@ -2808,14 +2809,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ij,ja->ai", x185, x233) * -1 del x233 del x185 - x186 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x186 += einsum("abij,ikab->jk", l2.abab, t2.abab) x188 += einsum("ij->ij", x186) - x189 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x189 += einsum("ia,ij->ja", t1.bb, x188) x190 += einsum("ia->ia", x189) del x189 - x499 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x499 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x499 += einsum("ij,kajb->kiab", x188, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x499) * -1 l2new_abab += einsum("ijab->abij", x499) * -1 @@ -2831,14 +2832,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ijka,jkba->bi", x262, x92) del x262 x267 += einsum("ia,jk->ijka", t1.aa, x261) * -1 - x437 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x437 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x437 += einsum("ij,jakb->kiab", x261, v.bbbb.ovov) del x261 x439 += einsum("ijab->jiba", x437) * -1 del x437 x293 += einsum("ij->ij", x186) del x186 - x294 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x294 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x294 += einsum("w,ij->wij", s1, x293) del x293 x190 += einsum("ia->ia", t1.bb) * -1 @@ -2847,20 +2848,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x144 ls1new += einsum("ia,wia->w", x190, g.bb.bov) * -1 del x190 - x191 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ai,ib->ab", l1.bb, t1.bb) x195 += einsum("ab->ab", x191) del x191 - x192 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x192 += einsum("wai,wib->ab", lu11.bb, u11.bb) x195 += einsum("ab->ab", x192) - x373 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x373 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x373 += einsum("ab,icjb->ijac", x192, v.bbbb.ovov) x415 += einsum("ijab->ijab", x373) del x373 x496 += einsum("ab->ab", x192) del x192 - x193 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x193 += einsum("abij,ijac->bc", l2.abab, t2.abab) x195 += einsum("ab->ab", x193) l1new_aa += einsum("ab,icab->ci", x195, v.aabb.ovvv) @@ -2869,30 +2870,30 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ab,wab->w", x195, g.bb.bvv) del x195 x435 += einsum("ab->ab", x193) - x436 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x436 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x436 += einsum("ab,ibjc->ijca", x435, v.bbbb.ovov) del x435 x439 += einsum("ijab->jiba", x436) * -1 del x436 x496 += einsum("ab->ab", x193) del x193 - x497 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x497 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x497 += einsum("ab,icjb->ijca", x496, v.aabb.ovov) del x496 l2new_baba += einsum("ijab->baji", x497) * -1 l2new_abab += einsum("ijab->abij", x497) * -1 del x497 - x196 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x196 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x196 += einsum("wx,wia->xia", s2, g.aa.bov) x199 += einsum("wia->wia", x196) x502 += einsum("wia->wia", x196) del x196 - x197 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x197 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x199 += einsum("wia->wia", x197) x211 += einsum("wia->wia", x197) x333 += einsum("wia->wia", x197) - x334 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x334 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x334 += einsum("wai,wjb->ijab", lu11.aa, x333) del x333 x342 += einsum("ijab->ijab", x334) @@ -2907,22 +2908,22 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x200 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) l1new_aa += einsum("wai,wji->aj", lu11.aa, x200) * -1 del x200 - x201 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x201 += einsum("iabc->ibca", v.aaaa.ovvv) x201 -= einsum("iabc->ibac", v.aaaa.ovvv) - x202 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x202 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x202 -= einsum("wia,ibac->wbc", u11.aa, x201) - x306 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x306 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x306 += einsum("ia,jbac->ijbc", t1.aa, x201) - x307 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x307 -= einsum("ijab->ijab", x306) del x306 - x319 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x319 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x319 += einsum("ia,ibac->bc", t1.aa, x201) del x201 x320 -= einsum("ab->ab", x319) del x319 - x321 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x321 += einsum("ab,acij->ijcb", x320, l2.aaaa) del x320 x342 += einsum("ijab->jiab", x321) @@ -2932,10 +2933,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x202 += einsum("wia,iabc->wbc", u11.bb, v.bbaa.ovvv) l1new_aa += einsum("wai,wab->bi", lu11.aa, x202) del x202 - x203 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x203 += einsum("wia,baji->wjb", u11.bb, l2.abab) x205 += einsum("wia->wia", x203) - x507 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x507 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x507 += einsum("wia,wjb->jiba", g.bb.bov, x205) l2new_baba += einsum("ijab->baji", x507) l2new_abab += einsum("ijab->abij", x507) @@ -2944,21 +2945,21 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("wia,wji->aj", x205, x98) * -1 del x98 del x205 - x208 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x208 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x208 += einsum("wia->wia", x203) x330 += einsum("wia->wia", x203) del x203 - x206 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x206 += einsum("wx,xai->wia", s2, lu11.aa) x208 += einsum("wia->wia", x206) x330 += einsum("wia->wia", x206) del x206 - x331 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x331 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x331 += einsum("wia,wjb->ijab", g.aa.bov, x330) del x330 x342 += einsum("ijab->ijab", x331) del x331 - x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x207 += einsum("abij->jiab", l2.aaaa) * -1 x207 += einsum("abij->jiba", l2.aaaa) x208 += einsum("wia,ijba->wjb", u11.aa, x207) * -1 @@ -2971,24 +2972,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("wij,wja->ai", x161, x211) * -1 del x161 del x211 - x212 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x212 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x212 += einsum("iabj->ijba", v.aaaa.ovvo) x212 -= einsum("ijab->ijab", v.aaaa.oovv) l1new_aa += einsum("ai,jiab->bj", l1.aa, x212) lu11new_aa += einsum("wai,jiab->wbj", lu11.aa, x212) del x212 - x213 = np.zeros((nbos), dtype=np.float64) + x213 = np.zeros((nbos), dtype=types[float]) x213 += einsum("w,wx->x", s1, w) x219 += einsum("w->w", x213) - x516 = np.zeros((nbos), dtype=np.float64) + x516 = np.zeros((nbos), dtype=types[float]) x516 += einsum("w->w", x213) del x213 - x214 = np.zeros((nbos), dtype=np.float64) + x214 = np.zeros((nbos), dtype=types[float]) x214 += einsum("ia,wia->w", t1.aa, gc.aa.bov) x219 += einsum("w->w", x214) x516 += einsum("w->w", x214) del x214 - x215 = np.zeros((nbos), dtype=np.float64) + x215 = np.zeros((nbos), dtype=types[float]) x215 += einsum("ia,wia->w", t1.bb, gc.bb.bov) x219 += einsum("w->w", x215) x516 += einsum("w->w", x215) @@ -3001,16 +3002,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ij,ja->ai", x220, x221) * -1 del x220 del x221 - x222 = np.zeros((nbos), dtype=np.float64) + x222 = np.zeros((nbos), dtype=types[float]) x222 += einsum("w,xw->x", ls1, s2) - x225 = np.zeros((nbos), dtype=np.float64) + x225 = np.zeros((nbos), dtype=types[float]) x225 += einsum("w->w", x222) del x222 - x223 = np.zeros((nbos), dtype=np.float64) + x223 = np.zeros((nbos), dtype=types[float]) x223 += einsum("ai,wia->w", l1.aa, u11.aa) x225 += einsum("w->w", x223) del x223 - x224 = np.zeros((nbos), dtype=np.float64) + x224 = np.zeros((nbos), dtype=types[float]) x224 += einsum("ai,wia->w", l1.bb, u11.bb) x225 += einsum("w->w", x224) del x224 @@ -3018,36 +3019,36 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("w,wia->ai", x225, g.aa.bov) l1new_bb += einsum("w,wia->ai", x225, g.bb.bov) del x225 - x226 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x226 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) l1new_bb += einsum("iabc,jibc->aj", v.bbaa.ovvv, x226) * -1 del x226 x227 += einsum("ia->ia", f.bb.ov) - x228 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x228 += einsum("ia,jkab->jkib", x227, t2.bbbb) del x227 - x229 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x229 += einsum("ijka->kjia", x228) del x228 x229 += einsum("ijak->ijka", v.bbbb.oovo) * -1 x246 += einsum("ijka->jika", x229) * -1 x246 += einsum("ijka->kija", x229) del x229 - x230 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x230 += einsum("ijab,kacb->ijkc", t2.bbbb, v.bbbb.ovvv) x239 += einsum("ijka->ijka", x230) * -1 del x230 - x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x231 += einsum("ia,jabc->ijbc", t1.bb, v.bbbb.ovvv) - x232 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x232 += einsum("ia,jkba->jikb", t1.bb, x231) del x231 x239 += einsum("ijka->ijka", x232) * -1 del x232 - x235 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x235 += einsum("ijab,kbla->ijlk", t2.bbbb, v.bbbb.ovov) x237 += einsum("ijkl->jilk", x235) - x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x238 += einsum("ia,jkil->jkla", t1.bb, x237) del x237 x239 += einsum("ijka->jika", x238) @@ -3057,33 +3058,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x239 x418 += einsum("ijkl->jilk", x235) del x235 - x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x419 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x419 += einsum("abij,ijkl->klab", l2.bbbb, x418) del x418 x420 += einsum("ijab->ijab", x419) del x419 x240 += einsum("ijka->jika", v.bbbb.ooov) x240 += einsum("ijka->jkia", v.bbbb.ooov) * -1 - x241 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x241 += einsum("ijka,jlba->likb", x240, x35) del x240 del x35 x246 += einsum("ijka->jkia", x241) x257 += einsum("ijka->jkia", x241) del x241 - x244 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x244 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x245 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x245 += einsum("ijkl->jkli", x244) x245 += einsum("ijkl->kjli", x244) * -1 - x256 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x256 += einsum("ijkl->ijkl", x244) * -1 x256 += einsum("ijkl->ikjl", x244) x257 += einsum("ia,jkil->jkla", t1.bb, x256) * -1 del x256 l1new_bb += einsum("abij,jkib->ak", l2.bbbb, x257) del x257 - x375 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x375 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x375 += einsum("abij,jkli->klba", l2.bbbb, x244) del x244 x415 -= einsum("ijab->ijab", x375) @@ -3098,11 +3099,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x247 += einsum("ijka->kija", v.bbbb.ooov) * -1 x250 += einsum("ijab,jklb->ikla", t2.abab, x247) * -1 del x247 - x248 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x248 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x249 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x249 += einsum("ijab->jiab", x248) - x471 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x471 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x471 += einsum("ijab->jiab", x248) del x248 x249 += einsum("ijab->ijab", v.bbaa.oovv) @@ -3113,37 +3114,37 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x250 += einsum("ijab,kbca->ikjc", t2.abab, v.bbaa.ovvv) l1new_bb += einsum("abij,ikja->bk", l2.abab, x250) * -1 del x250 - x251 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x251 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x254 += einsum("ijab->ijab", x251) del x251 - x252 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x252 += einsum("abij->jiab", l2.bbbb) * -1 x252 += einsum("abij->jiba", l2.bbbb) - x253 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x253 += einsum("ijab,ikbc->kjca", x252, x54) del x54 x254 += einsum("ijab->jiba", x253) del x253 - x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x421 += einsum("ijab,jkbc->kica", x254, x92) del x92 x439 += einsum("ijab->jiba", x421) * -1 del x421 - x292 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x292 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x292 += einsum("wia,ijba->wjb", u11.bb, x252) * -1 - x425 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x425 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x425 += einsum("ijab,jkcb->ikac", t2.abab, x252) - x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x426 += einsum("iajb,ikac->jkbc", v.aabb.ovov, x425) * -1 del x425 x439 += einsum("ijab->jiba", x426) * -1 del x426 - x255 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x255 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 x255 += einsum("iabc->ibac", v.bbbb.ovvv) - x463 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x463 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x463 += einsum("ia,jbac->ijbc", t1.bb, x255) x464 += einsum("ijab->jiab", x463) * -1 del x463 @@ -3152,20 +3153,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("iabc,jiac->bj", x255, x263) del x255 del x263 - x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x258 += einsum("abij->jiab", l2.bbbb) x258 += einsum("abij->jiba", l2.bbbb) * -1 x259 += einsum("ijab,jkcb->ikac", t2.abab, x258) * -1 del x258 l1new_bb += einsum("iabc,ijab->cj", v.aabb.ovvv, x259) * -1 del x259 - x264 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x264 += einsum("ia,bacd->icbd", t1.bb, v.bbbb.vvvv) - x265 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x265 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x265 += einsum("iabc->iabc", x264) * -1 del x264 x265 += einsum("aibc->iabc", v.bbbb.vovv) - x266 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x266 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x266 += einsum("iabc->iabc", x265) * -1 x266 += einsum("iabc->ibac", x265) del x265 @@ -3174,32 +3175,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x267 += einsum("ai,jkba->jikb", l1.bb, t2.abab) * -1 l1new_bb += einsum("iajb,ikja->bk", v.aabb.ovov, x267) del x267 - x268 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("ai,jkab->ikjb", l1.bb, t2.bbbb) x271 += einsum("ijka->ijka", x268) * 0.9999999999999993 del x268 - x272 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x272 += einsum("ijka->ijka", x271) * -1 x272 += einsum("ijka->ikja", x271) del x271 l1new_bb += einsum("iajb,kija->bk", v.bbbb.ovov, x272) del x272 - x273 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x273 += einsum("aibc->iabc", v.aabb.vovv) x273 += einsum("ia,bacd->ibcd", t1.aa, v.aabb.vvvv) l1new_bb += einsum("abij,iabc->cj", l2.abab, x273) del x273 - x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x274 += einsum("abij,klab->ijkl", l2.bbbb, t2.bbbb) - x275 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x275 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x275 += einsum("ijkl->jikl", x274) x275 += einsum("ijkl->jilk", x274) * -1 - x416 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x416 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x416 += einsum("iajb,klij->lkba", v.bbbb.ovov, x274) del x274 x420 += einsum("ijab->ijab", x416) del x416 - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum("ijab->abij", x420) l2new_bbbb += einsum("ijab->baij", x420) * -1 del x420 @@ -3207,41 +3208,41 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ijkl,klia->aj", x275, x276) * -1 del x275 del x276 - x277 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x277 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x278 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x278 += einsum("ijab->ijab", x277) - x383 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x383 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x383 += einsum("ijab->ijab", x277) x450 += einsum("ijab->ijab", x277) del x277 x278 += einsum("iabj->jiba", v.bbaa.ovvo) l1new_bb += einsum("ijka,ikab->bj", x1, x278) * -1 del x278 - x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x279 -= einsum("abij->jiab", l2.bbbb) x279 += einsum("abij->jiba", l2.bbbb) - x289 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x289 += einsum("wia,ijba->wjb", u11.bb, x279) - x290 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x290 -= einsum("wia->wia", x289) - x402 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x402 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x402 -= einsum("wia->wia", x289) del x289 l1new_bb += einsum("ia,ijba->bj", x158, x279) * -1 del x158 lu11new_bb -= einsum("wai,ijba->wbj", g.bb.bvo, x279) - x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x281 += einsum("wx,wia->xia", s2, g.bb.bov) x284 += einsum("wia->wia", x281) - x504 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x504 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x504 += einsum("wia->wia", x281) del x281 - x282 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x282 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) x284 += einsum("wia->wia", x282) x295 += einsum("wia->wia", x282) - x406 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x406 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x406 += einsum("wia->wia", x282) x504 += einsum("wia->wia", x282) del x282 @@ -3253,22 +3254,22 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x285 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) l1new_bb += einsum("wai,wji->aj", lu11.bb, x285) * -1 del x285 - x286 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x286 += einsum("iabc->ibca", v.bbbb.ovvv) x286 -= einsum("iabc->ibac", v.bbbb.ovvv) - x287 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x287 -= einsum("wia,ibac->wbc", u11.bb, x286) - x378 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x378 += einsum("ia,jbac->ijbc", t1.bb, x286) - x379 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x379 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x379 -= einsum("ijab->ijab", x378) del x378 - x391 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x391 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x391 += einsum("ia,ibac->bc", t1.bb, x286) del x286 x392 -= einsum("ab->ab", x391) del x391 - x393 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x393 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x393 += einsum("ab,acij->ijcb", x392, l2.bbbb) del x392 x415 += einsum("ijab->jiab", x393) @@ -3278,10 +3279,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x287 += einsum("wia,iabc->wbc", u11.aa, v.aabb.ovvv) l1new_bb += einsum("wai,wab->bi", lu11.bb, x287) del x287 - x288 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x288 += einsum("wia,abij->wjb", u11.aa, l2.abab) x290 += einsum("wia->wia", x288) - x506 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x506 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x506 += einsum("wia,wjb->ijab", g.aa.bov, x290) l2new_baba += einsum("ijab->baji", x506) l2new_abab += einsum("ijab->abij", x506) @@ -3293,14 +3294,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x292 += einsum("wia->wia", x288) x402 += einsum("wia->wia", x288) del x288 - x291 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x291 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x291 += einsum("wx,xai->wia", s2, lu11.bb) x292 += einsum("wia->wia", x291) x294 += einsum("ia,wja->wji", t1.bb, x292) del x292 x402 += einsum("wia->wia", x291) del x291 - x403 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x403 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x403 += einsum("wia,wjb->ijab", g.bb.bov, x402) del x402 x415 += einsum("ijab->ijab", x403) @@ -3312,77 +3313,77 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("wij,wja->ai", x178, x295) * -1 del x178 del x295 - x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x296 += einsum("iabj->ijba", v.bbbb.ovvo) x296 -= einsum("ijab->ijab", v.bbbb.oovv) l1new_bb += einsum("ai,jiab->bj", l1.bb, x296) lu11new_bb += einsum("wai,jiab->wbj", lu11.bb, x296) del x296 - x298 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x298 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x298 += einsum("wia,wbj->ijab", gc.aa.bov, lu11.aa) x342 += einsum("ijab->ijab", x298) del x298 - x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x299 += einsum("ai,jbac->ijbc", l1.aa, v.aaaa.ovvv) x342 -= einsum("ijab->ijab", x299) del x299 - x305 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x305 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x305 += einsum("abij->jiab", l2.aaaa) x305 -= einsum("abij->jiba", l2.aaaa) x307 += einsum("ijab->jiab", v.aaaa.oovv) x307 -= einsum("iabj->jiba", v.aaaa.ovvo) - x308 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x308 += einsum("ijab,ikac->jkbc", x305, x307) del x305 del x307 x342 += einsum("ijab->ijab", x308) del x308 - x309 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x309 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x309 -= einsum("ijab->jiab", t2.bbbb) x309 += einsum("ijab->jiba", t2.bbbb) - x310 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x310 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x310 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x309) x311 -= einsum("ijab->ijab", x310) del x310 - x527 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x527 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x527 += einsum("wia,ijba->wjb", g.bb.bov, x309) del x309 - x530 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x530 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x530 -= einsum("wia->wia", x527) del x527 x311 += einsum("iabj->ijab", v.aabb.ovvo) - x312 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x312 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x312 += einsum("abij,kjcb->ikac", l2.abab, x311) del x311 x342 += einsum("ijab->ijab", x312) del x312 - x314 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x314 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x314 -= einsum("ijka->ikja", v.aaaa.ooov) x314 += einsum("ijka->kija", v.aaaa.ooov) - x315 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x315 += einsum("ijka,lkib->jlab", x313, x314) del x313 x342 += einsum("ijab->ijab", x315) del x315 l2new_abab += einsum("ijka,kilb->abjl", x314, x56) del x314 - x316 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x316 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x317 -= einsum("ab->ba", x316) x487 += einsum("ab->ba", x316) * -1 del x316 x317 += einsum("ab->ab", f.aa.vv) - x318 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x318 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x318 += einsum("ab,acij->ijcb", x317, l2.aaaa) del x317 x342 -= einsum("ijab->jiba", x318) del x318 x322 += einsum("ia->ia", f.aa.ov) - x323 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x323 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x323 += einsum("ia,ja->ij", t1.aa, x322) x324 += einsum("ij->ji", x323) del x323 - x337 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x337 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x337 += einsum("ia,jkib->jkba", x322, x57) del x57 x342 += einsum("ijab->ijba", x337) @@ -3390,19 +3391,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x342 += einsum("ai,jb->jiba", l1.aa, x322) del x322 x324 += einsum("ij->ij", f.aa.oo) - x325 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x325 += einsum("ij,abjk->kiab", x324, l2.aaaa) del x324 x342 += einsum("ijab->jiba", x325) del x325 - x326 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x326 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x326 += einsum("ijka->ikja", v.aaaa.ooov) x326 -= einsum("ijka->kija", v.aaaa.ooov) - x327 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x327 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x327 += einsum("ia,ijka->jk", t1.aa, x326) x328 -= einsum("ij->ij", x327) del x327 - x329 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x329 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x329 += einsum("ij,abjk->kiab", x328, l2.aaaa) del x328 x342 -= einsum("ijab->ijba", x329) @@ -3411,7 +3412,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x56 del x326 x338 -= einsum("ijka->jika", v.aaaa.ooov) - x339 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x339 += einsum("ai,ijkb->jkab", l1.aa, x338) del x338 x342 += einsum("ijab->ijab", x339) @@ -3421,10 +3422,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_aaaa -= einsum("ijab->abji", x342) l2new_aaaa += einsum("ijab->baji", x342) del x342 - x343 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x343 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) x345 += einsum("ijab->ijab", x343) - x346 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x346 += einsum("ijab,ikac->kjcb", x345, x48) del x48 del x345 @@ -3432,10 +3433,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x346 x459 += einsum("ijab->jiab", x343) del x343 - x354 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x354 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x356 += einsum("ab->ab", x354) - x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x357 += einsum("ab,acij->ijcb", x356, l2.aaaa) del x356 x362 += einsum("ijab->jiab", x357) @@ -3447,79 +3448,79 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x362 x487 += einsum("ab->ab", x354) * -1 del x354 - x363 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x363 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x363 += einsum("abij,kjli->klba", l2.aaaa, v.aaaa.oooo) - x365 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x365 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x365 += einsum("ijab->jiba", x363) del x363 - x364 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x364 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x364 += einsum("abij,acbd->ijcd", l2.aaaa, v.aaaa.vvvv) x365 += einsum("ijab->jiba", x364) del x364 l2new_aaaa += einsum("ijab->baij", x365) * -1 l2new_aaaa += einsum("ijab->abij", x365) del x365 - x371 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x371 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x371 += einsum("wia,wbj->ijab", gc.bb.bov, lu11.bb) x415 += einsum("ijab->ijab", x371) del x371 - x372 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x372 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x372 += einsum("ai,jbac->ijbc", l1.bb, v.bbbb.ovvv) x415 -= einsum("ijab->ijab", x372) del x372 x379 += einsum("ijab->jiab", v.bbbb.oovv) x379 -= einsum("iabj->jiba", v.bbbb.ovvo) - x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x380 += einsum("ijab,ikbc->jkac", x279, x379) del x379 del x279 x415 += einsum("ijab->ijab", x380) del x380 - x381 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x381 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x381 -= einsum("ijab->jiab", t2.aaaa) x381 += einsum("ijab->jiba", t2.aaaa) - x382 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x382 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x382 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x381) x383 -= einsum("ijab->ijab", x382) del x382 - x520 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x520 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x520 += einsum("wia,ijba->wjb", g.aa.bov, x381) del x381 - x523 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x523 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x523 -= einsum("wia->wia", x520) del x520 x383 += einsum("iabj->jiba", v.bbaa.ovvo) - x384 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x384 += einsum("abij,ikac->jkbc", l2.abab, x383) del x383 x415 += einsum("ijab->ijab", x384) del x384 - x386 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x386 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x386 -= einsum("ijka->ikja", v.bbbb.ooov) x386 += einsum("ijka->kija", v.bbbb.ooov) - x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x387 += einsum("ijka,lkjb->ilab", x385, x386) del x385 del x386 x415 += einsum("ijab->ijab", x387) del x387 - x388 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x388 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x388 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x389 -= einsum("ab->ba", x388) x490 += einsum("ab->ba", x388) * -1 del x388 x389 += einsum("ab->ab", f.bb.vv) - x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x390 += einsum("ab,acij->ijcb", x389, l2.bbbb) del x389 x415 -= einsum("ijab->jiba", x390) del x390 x394 += einsum("ia->ia", f.bb.ov) - x395 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x395 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x395 += einsum("ia,ja->ij", t1.bb, x394) x396 += einsum("ij->ji", x395) del x395 - x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x410 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x410 += einsum("ia,jkib->jkba", x394, x181) del x181 x415 += einsum("ijab->ijba", x410) @@ -3527,44 +3528,44 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x415 += einsum("ai,jb->jiba", l1.bb, x394) del x394 x396 += einsum("ij->ij", f.bb.oo) - x397 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x397 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x397 += einsum("ij,abjk->kiab", x396, l2.bbbb) del x396 x415 += einsum("ijab->jiba", x397) del x397 - x398 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x398 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x398 += einsum("ijka->ikja", v.bbbb.ooov) x398 -= einsum("ijka->kija", v.bbbb.ooov) - x399 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x399 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x399 += einsum("ia,ijka->jk", t1.bb, x398) x400 -= einsum("ij->ij", x399) del x399 - x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x401 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x401 += einsum("ij,abjk->kiab", x400, l2.bbbb) del x400 x415 -= einsum("ijab->ijba", x401) del x401 - x484 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x484 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x484 += einsum("ijka,kljb->ilab", x1, x398) del x1 del x398 l2new_baba -= einsum("ijab->baji", x484) l2new_abab -= einsum("ijab->abij", x484) del x484 - x404 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x404 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x404 -= einsum("iajb->jiab", v.bbbb.ovov) x404 += einsum("iajb->jiba", v.bbbb.ovov) - x405 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x405 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x405 += einsum("wia,ijba->wjb", u11.bb, x404) x406 -= einsum("wia->wia", x405) - x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x407 += einsum("wai,wjb->ijab", lu11.bb, x406) del x406 x415 += einsum("ijab->ijab", x407) del x407 x504 -= einsum("wia->wia", x405) del x405 - x413 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x413 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x413 += einsum("ia,ijba->jb", t1.bb, x404) del x404 x414 -= einsum("ia->ia", x413) @@ -3573,7 +3574,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x513 -= einsum("ia->ia", x413) del x413 x411 -= einsum("ijka->jika", v.bbbb.ooov) - x412 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x412 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x412 += einsum("ai,ijkb->jkab", l1.bb, x411) del x411 x415 += einsum("ijab->ijab", x412) @@ -3583,10 +3584,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_bbbb -= einsum("ijab->abji", x415) l2new_bbbb += einsum("ijab->baji", x415) del x415 - x431 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x431 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x431 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) x433 += einsum("ab->ab", x431) - x434 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x434 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x434 += einsum("ab,acij->ijcb", x433, l2.bbbb) del x433 x439 += einsum("ijab->jiab", x434) @@ -3598,42 +3599,42 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x439 x490 += einsum("ab->ab", x431) * -1 del x431 - x440 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x440 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x440 += einsum("abij,kjli->klba", l2.bbbb, v.bbbb.oooo) - x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x442 += einsum("ijab->jiba", x440) del x440 - x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x441 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x441 += einsum("abij,bcad->ijdc", l2.bbbb, v.bbbb.vvvv) x442 += einsum("ijab->jiba", x441) del x441 l2new_bbbb += einsum("ijab->baij", x442) * -1 l2new_bbbb += einsum("ijab->abij", x442) del x442 - x443 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x443 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x443 += einsum("ai,jbac->ijcb", l1.aa, v.bbaa.ovvv) l2new_baba += einsum("ijab->baji", x443) l2new_abab += einsum("ijab->abij", x443) del x443 - x445 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x445 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x445 += einsum("abij,acbd->ijcd", l2.abab, v.aabb.vvvv) l2new_baba += einsum("ijab->baji", x445) l2new_abab += einsum("ijab->abij", x445) del x445 - x447 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x447 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x447 += einsum("ai,jbac->jibc", l1.bb, v.aabb.ovvv) l2new_baba += einsum("ijab->baji", x447) l2new_abab += einsum("ijab->abij", x447) del x447 x450 += einsum("iabj->jiba", v.bbaa.ovvo) - x451 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x451 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x451 += einsum("ijab,ikbc->jkac", x207, x450) del x450 del x207 l2new_baba += einsum("ijab->baji", x451) * -1 l2new_abab += einsum("ijab->abij", x451) * -1 del x451 - x452 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x452 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x452 += einsum("abij->jiab", l2.bbbb) x452 -= einsum("abij->jiba", l2.bbbb) x455 += einsum("iabj->ijab", v.aabb.ovvo) @@ -3642,10 +3643,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_abab += einsum("ijab,kicb->cakj", x252, x455) * -1 del x252 del x455 - x456 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x456 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x456 += einsum("iajb->jiab", v.aaaa.ovov) x456 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x457 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x457 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x457 += einsum("ijab,ikca->jkbc", x24, x456) del x24 del x456 @@ -3653,95 +3654,95 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x457 x459 += einsum("iabj->ijba", v.aaaa.ovvo) x459 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x460 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x460 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x460 += einsum("abij,kiac->kjcb", l2.abab, x459) del x459 l2new_baba += einsum("ijab->baji", x460) l2new_abab += einsum("ijab->abij", x460) del x460 - x461 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x461 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x461 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) x464 += einsum("ijab->jiab", x461) del x461 x464 += einsum("iabj->ijba", v.bbbb.ovvo) x464 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x465 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x465 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x465 += einsum("abij,kjbc->ikac", l2.abab, x464) del x464 l2new_baba += einsum("ijab->baji", x465) l2new_abab += einsum("ijab->abij", x465) del x465 - x466 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x466 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x466 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x468 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x468 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x468 += einsum("ijab->jiab", x466) del x466 - x467 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x467 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x467 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x468 += einsum("ijab->jiab", x467) * -1 del x467 x468 += einsum("ijab->ijab", v.aabb.oovv) - x469 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x469 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x469 += einsum("abij,kibc->kjac", l2.abab, x468) del x468 l2new_baba += einsum("ijab->baji", x469) * -1 l2new_abab += einsum("ijab->abij", x469) * -1 del x469 - x470 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x470 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x470 += einsum("ijab,ickb->jkac", t2.abab, v.aabb.ovov) x471 += einsum("ijab->jiab", x470) * -1 del x470 x471 += einsum("ijab->ijab", v.bbaa.oovv) - x472 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x472 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x472 += einsum("abij,kjac->ikcb", l2.abab, x471) del x471 l2new_baba += einsum("ijab->baji", x472) * -1 l2new_abab += einsum("ijab->abij", x472) * -1 del x472 x474 += einsum("ijkl->ijkl", v.aabb.oooo) - x475 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x475 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x475 += einsum("abij,kilj->klab", l2.abab, x474) del x474 l2new_baba += einsum("ijab->baji", x475) l2new_abab += einsum("ijab->abij", x475) del x475 x487 += einsum("ab->ab", f.aa.vv) - x488 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x488 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x488 += einsum("ab,acij->ijbc", x487, l2.abab) del x487 l2new_baba += einsum("ijab->baji", x488) l2new_abab += einsum("ijab->abij", x488) del x488 x490 += einsum("ab->ab", f.bb.vv) - x491 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x491 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x491 += einsum("ab,caij->ijcb", x490, l2.abab) del x490 l2new_baba += einsum("ijab->baji", x491) l2new_abab += einsum("ijab->abij", x491) del x491 x502 += einsum("wia->wia", gc.aa.bov) - x503 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x503 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x503 += einsum("wai,wjb->jiba", lu11.bb, x502) del x502 l2new_baba += einsum("ijab->baji", x503) l2new_abab += einsum("ijab->abij", x503) del x503 x504 += einsum("wia->wia", gc.bb.bov) - x505 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x505 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x505 += einsum("wai,wjb->ijab", lu11.aa, x504) del x504 l2new_baba += einsum("ijab->baji", x505) l2new_abab += einsum("ijab->abij", x505) del x505 x508 += einsum("ijka->ijka", v.aabb.ooov) - x509 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x509 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x509 += einsum("ai,jikb->jkab", l1.aa, x508) del x508 l2new_baba -= einsum("ijab->baji", x509) l2new_abab -= einsum("ijab->abij", x509) del x509 x510 += einsum("iajk->ijka", v.aabb.ovoo) - x511 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x511 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x511 += einsum("ai,jkib->jkba", l1.bb, x510) del x510 l2new_baba -= einsum("ijab->baji", x511) @@ -3759,71 +3760,71 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x513 x515 += einsum("w->w", G) x516 += einsum("w,wx->x", x515, s2) - x536 = np.zeros((nbos, nbos), dtype=np.float64) + x536 = np.zeros((nbos, nbos), dtype=types[float]) x536 += einsum("w,x->xw", ls1, x515) del x515 x516 += einsum("w->w", G) ls1new += einsum("w,wx->x", x516, ls2) del x516 - x517 = np.zeros((nbos, nbos), dtype=np.float64) + x517 = np.zeros((nbos, nbos), dtype=types[float]) x517 += einsum("wx,yx->wy", ls2, w) x536 += einsum("wx->wx", x517) del x517 - x518 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x518 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x518 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) x523 += einsum("wia->wia", x518) del x518 - x519 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x519 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x519 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x523 += einsum("wia->wia", x519) del x519 x521 += einsum("wij->wij", g.aa.boo) - x522 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x522 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x522 += einsum("ia,wij->wja", t1.aa, x521) del x521 x523 -= einsum("wia->wia", x522) del x522 x523 += einsum("wai->wia", g.aa.bvo) - x524 = np.zeros((nbos, nbos), dtype=np.float64) + x524 = np.zeros((nbos, nbos), dtype=types[float]) x524 += einsum("wai,xia->wx", lu11.aa, x523) del x523 x536 += einsum("wx->xw", x524) del x524 - x525 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x525 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x525 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) x530 += einsum("wia->wia", x525) del x525 - x526 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x526 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x526 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x530 += einsum("wia->wia", x526) del x526 x528 += einsum("wij->wij", g.bb.boo) - x529 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x529 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x529 += einsum("ia,wij->wja", t1.bb, x528) del x528 x530 -= einsum("wia->wia", x529) del x529 x530 += einsum("wai->wia", g.bb.bvo) - x531 = np.zeros((nbos, nbos), dtype=np.float64) + x531 = np.zeros((nbos, nbos), dtype=types[float]) x531 += einsum("wai,xia->wx", lu11.bb, x530) del x530 x536 += einsum("wx->xw", x531) del x531 - x532 = np.zeros((nbos, nbos), dtype=np.float64) + x532 = np.zeros((nbos, nbos), dtype=types[float]) x532 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x534 = np.zeros((nbos, nbos), dtype=np.float64) + x534 = np.zeros((nbos, nbos), dtype=types[float]) x534 += einsum("wx->wx", x532) del x532 - x533 = np.zeros((nbos, nbos), dtype=np.float64) + x533 = np.zeros((nbos, nbos), dtype=types[float]) x533 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x534 += einsum("wx->wx", x533) del x533 - x535 = np.zeros((nbos, nbos), dtype=np.float64) + x535 = np.zeros((nbos, nbos), dtype=types[float]) x535 += einsum("wx,yw->xy", ls2, x534) del x534 x536 += einsum("wx->xw", x535) del x535 - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("wx->wx", x536) ls2new += einsum("wx->xw", x536) del x536 @@ -3900,125 +3901,125 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 1RDM - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("abij,kjab->ik", l2.abab, t2.abab) - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("ij->ij", x0) - rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_oo_aa += einsum("ij->ij", x0) * -1 del x0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("ai,ja->ij", l1.aa, t1.aa) x14 += einsum("ij->ij", x1) rdm1_f_oo_aa -= einsum("ij->ij", x1) del x1 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum("wai,wja->ij", lu11.aa, u11.aa) x14 += einsum("ij->ij", x2) rdm1_f_oo_aa -= einsum("ij->ij", x2) del x2 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum("ijab->jiab", t2.aaaa) x3 += einsum("ijab->jiba", t2.aaaa) * -1 rdm1_f_oo_aa += einsum("abij,ikba->jk", l2.aaaa, x3) * -1 del x3 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum("wai,wja->ij", lu11.bb, u11.bb) - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum("ij->ij", x4) - rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_oo_bb -= einsum("ij->ij", x4) del x4 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum("abij,ikab->jk", l2.abab, t2.abab) x21 += einsum("ij->ij", x5) rdm1_f_oo_bb += einsum("ij->ij", x5) * -1 del x5 - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum("ai,ja->ij", l1.bb, t1.bb) x21 += einsum("ij->ij", x6) rdm1_f_oo_bb -= einsum("ij->ij", x6) del x6 - x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x7 += einsum("ijab->jiab", t2.bbbb) x7 += einsum("ijab->jiba", t2.bbbb) * -1 rdm1_f_oo_bb += einsum("abij,ikba->jk", l2.bbbb, x7) * -1 del x7 - x8 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x8 += einsum("ia,waj->wji", t1.aa, lu11.aa) - rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_vo_aa -= einsum("wia,wij->aj", u11.aa, x8) del x8 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum("ia,abjk->jikb", t1.aa, l2.abab) rdm1_f_vo_aa += einsum("ijab,ikjb->ak", t2.abab, x9) * -1 del x9 - x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum("ijka->ijka", x10) * -1 x11 += einsum("ijka->jika", x10) del x10 rdm1_f_vo_aa += einsum("ijab,ijkb->ak", t2.aaaa, x11) * -1 del x11 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 -= einsum("ijab->jiab", t2.aaaa) x12 += einsum("ijab->jiba", t2.aaaa) rdm1_f_vo_aa -= einsum("ai,ijba->bj", l1.aa, x12) del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum("ijab->jiab", t2.aaaa) * -1 x13 += einsum("ijab->jiba", t2.aaaa) x14 += einsum("abij,ikba->jk", l2.aaaa, x13) * -1 del x13 rdm1_f_vo_aa += einsum("ia,ij->aj", t1.aa, x14) * -1 del x14 - x15 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x15 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_vo_bb += einsum("ijab,ijka->bk", t2.abab, x15) * -1 del x15 - x16 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x16 += einsum("ia,waj->wji", t1.bb, lu11.bb) rdm1_f_vo_bb -= einsum("wia,wij->aj", u11.bb, x16) del x16 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x17 += einsum("ia,abjk->kjib", t1.bb, l2.bbbb) - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum("ijka->ijka", x17) x18 += einsum("ijka->jika", x17) * -1 del x17 rdm1_f_vo_bb += einsum("ijab,ijka->bk", t2.bbbb, x18) * -1 del x18 - x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x19 += einsum("ijab->jiab", t2.bbbb) x19 -= einsum("ijab->jiba", t2.bbbb) rdm1_f_vo_bb -= einsum("ai,ijab->bj", l1.bb, x19) del x19 - x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum("ijab->jiab", t2.bbbb) * -1 x20 += einsum("ijab->jiba", t2.bbbb) x21 += einsum("abij,ikba->jk", l2.bbbb, x20) * -1 del x20 rdm1_f_vo_bb += einsum("ia,ij->aj", t1.bb, x21) * -1 del x21 - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum("abij->jiab", l2.aaaa) x22 += einsum("abij->jiba", l2.aaaa) * -1 - rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_vv_aa += einsum("ijab,ijcb->ac", t2.aaaa, x22) * -1 del x22 - x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x23 += einsum("abij->jiab", l2.bbbb) * -1 x23 += einsum("abij->jiba", l2.bbbb) - rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_vv_bb += einsum("ijab,ijca->bc", t2.bbbb, x23) * -1 del x23 rdm1_f_oo_aa += einsum("ij->ji", delta_oo.aa) rdm1_f_oo_bb += einsum("ij->ji", delta_oo.bb) - rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_ov_aa += einsum("ai->ia", l1.aa) - rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_ov_bb += einsum("ai->ia", l1.bb) rdm1_f_vo_aa += einsum("ai,jiba->bj", l1.bb, t2.abab) rdm1_f_vo_aa += einsum("w,wia->ai", ls1, u11.aa) @@ -4068,58 +4069,58 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 2RDM - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("ai,ja->ij", l1.aa, t1.aa) - x12 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x12 += einsum("ij->ji", x0) - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum("ij->ij", x0) - x47 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x47 += einsum("ia,ij->ja", t1.aa, x0) - x48 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x48 -= einsum("ia->ia", x47) del x47 - x85 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x85 += einsum("ij->ij", x0) - x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x153 += einsum("ij,kiab->jkab", x0, t2.aaaa) - x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x171 += einsum("ijab->ijab", x153) del x153 - x258 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x258 += einsum("ij->ij", x0) - rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_aaaa -= einsum("ij,kl->jikl", delta_oo.aa, x0) rdm2_f_oooo_aaaa += einsum("ij,kl->kijl", delta_oo.aa, x0) rdm2_f_oooo_aaaa += einsum("ij,kl->jlki", delta_oo.aa, x0) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x0) del x0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("abij,kjab->ik", l2.abab, t2.abab) - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("ij->ij", x1) x12 += einsum("ij->ji", x1) x85 += einsum("ij->ij", x1) x258 += einsum("ij->ij", x1) del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("ijab->jiab", t2.aaaa) x2 += einsum("ijab->jiba", t2.aaaa) * -1 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum("abij,ikab->jk", l2.aaaa, x2) x4 += einsum("ij->ij", x3) * -1 - x43 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x43 += einsum("ia,ij->ja", t1.aa, x4) - x44 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x44 += einsum("ia->ia", x43) del x43 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia,jk->jika", t1.aa, x4) - x96 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("ia,jk->jika", t1.aa, x4) - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum("ij,ikab->kjab", x4, t2.aaaa) - x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x175 += einsum("ijab->ijba", x174) del x174 rdm2_f_oooo_aaaa += einsum("ij,kl->jikl", delta_oo.aa, x4) * -1 @@ -4130,61 +4131,61 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x12 += einsum("ij->ji", x3) * -1 x85 += einsum("ij->ij", x3) * -1 del x3 - x92 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x92 += einsum("ai,ijba->jb", l1.aa, x2) - x94 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x94 += einsum("ia->ia", x92) * -1 - x259 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x259 += einsum("ia->ia", x92) * -1 del x92 - x257 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x257 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x257 += einsum("abij,ikab->jk", l2.aaaa, x2) x258 += einsum("ij->ij", x257) * -1 del x257 - x260 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x260 += einsum("ai,ijba->jb", l1.aa, x2) * -0.9999999999999993 - x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x302 += einsum("abij,ikca->kjcb", l2.abab, x2) - x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x304 += einsum("ijab->ijab", x302) * -1 del x302 - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum("wai,wja->ij", lu11.aa, u11.aa) x12 += einsum("ij->ji", x5) - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum("ia,ij->ja", t1.aa, x5) - x32 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ia->ia", x29) del x29 x33 += einsum("ij->ij", x5) - x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("ia,jk->jika", t1.aa, x33) - x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x95 += einsum("ia,jk->jika", t1.aa, x33) - x183 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x183 += einsum("ia,ij->ja", t1.aa, x33) del x33 - x184 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x184 += einsum("ia->ia", x183) - x185 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x185 += einsum("ia->ia", x183) del x183 x85 += einsum("ij->ij", x5) - x93 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x93 += einsum("ia,ij->ja", t1.aa, x85) x94 += einsum("ia->ia", x93) del x93 - x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x248 += einsum("ij,ikab->jkab", x85, t2.abab) - rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x248) * -1 - rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_aabb += einsum("ijab->aibj", x248) * -1 del x248 - rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_aabb += einsum("ia,jk->jkai", t1.bb, x85) * -1 del x85 - x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x155 += einsum("ij,kiab->kjab", x5, t2.aaaa) x171 -= einsum("ijab->ijab", x155) del x155 @@ -4197,18 +4198,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ij,kl->kijl", delta_oo.aa, x5) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x5) del x5 - x6 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x6 += einsum("abij,klba->ijlk", l2.aaaa, t2.aaaa) - x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x39 += einsum("ijkl->jilk", x6) - x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x176 += einsum("ijab,ijkl->klab", t2.aaaa, x6) - x180 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x180 += einsum("ijab->ijab", x176) del x176 - x178 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x178 += einsum("ia,jikl->jkla", t1.aa, x6) - x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x179 += einsum("ia,ijkb->jkab", t1.aa, x178) del x178 x180 += einsum("ijab->ijab", x179) @@ -4216,204 +4217,204 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ijkl->jkil", x6) * -1 rdm2_f_oooo_aaaa += einsum("ijkl->jlik", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x8 += einsum("ia,jkla->jkil", t1.aa, x7) x39 += einsum("ijkl->ijkl", x8) - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum("ia,ijkl->jkla", t1.aa, x39) del x39 x45 += einsum("ijka->ikja", x40) x96 += einsum("ijka->ikja", x40) del x40 - x144 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x144 += einsum("ia,ijkl->jlka", t1.aa, x8) - x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum("ia,ijkb->jkab", t1.aa, x144) del x144 - x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x152 += einsum("ijab->ijab", x145) del x145 - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum("ijab,jikl->klba", t2.aaaa, x8) x180 += einsum("ijab->ijab", x177) del x177 - rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_aaaa += einsum("ijab->ajbi", x180) * -1 rdm2_f_vovo_aaaa += einsum("ijab->bjai", x180) del x180 rdm2_f_oooo_aaaa += einsum("ijkl->ikjl", x8) rdm2_f_oooo_aaaa += einsum("ijkl->iljk", x8) * -1 del x8 - x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum("ijka->ijka", x7) x36 += einsum("ijka->jika", x7) * -1 - x42 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x42 += einsum("ijab,jika->kb", t2.aaaa, x36) x44 += einsum("ia->ia", x42) * -1 x94 += einsum("ia->ia", x42) * -1 x260 += einsum("ia->ia", x42) * -1 del x42 - x78 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x78 += einsum("ijab,ikla->kljb", t2.abab, x36) rdm2_f_oovo_aabb += einsum("ijka->ijak", x78) * -1 - rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_bbaa += einsum("ijka->akij", x78) * -1 del x78 x259 += einsum("ijab,jika->kb", t2.aaaa, x36) * -1 - x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x105 -= einsum("ijka->ijka", x7) x105 += einsum("ijka->jika", x7) - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum("ia,jikb->jkab", t1.aa, x105) - rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_aaaa -= einsum("ijab->ijab", x106) - rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_aaaa -= einsum("ijab->abij", x106) del x106 - x243 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x243 += einsum("ijab,ikla->kljb", t2.abab, x105) del x105 - x245 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x245 -= einsum("ijka->ijka", x243) del x243 - x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x130 += einsum("ijka->ijka", x7) x130 -= einsum("ijka->jika", x7) - x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum("ia,jikb->jkab", t1.aa, x130) - rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_aaaa -= einsum("ijab->ibaj", x131) - rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_aaaa -= einsum("ijab->ajib", x131) del x131 - x266 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x266 += einsum("ijab,jikc->kcba", t2.aaaa, x7) - x271 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x271 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x271 += einsum("iabc->iabc", x266) del x266 - x267 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x267 += einsum("ia,jikb->jkba", t1.aa, x7) - x269 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x269 += einsum("ijab->ijab", x267) * -1 del x267 - rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_aaaa += einsum("ijka->ikja", x7) rdm2_f_ooov_aaaa -= einsum("ijka->jkia", x7) - rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_aaaa -= einsum("ijka->iajk", x7) rdm2_f_ovoo_aaaa += einsum("ijka->jaik", x7) del x7 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x9 += einsum("abij,klab->ikjl", l2.abab, t2.abab) - x80 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x80 += einsum("ijkl->ijkl", x9) - x233 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x233 += einsum("ijkl->ijkl", x9) - x239 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x239 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x239 += einsum("ijkl->ijkl", x9) - rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x9) - rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x9) del x9 - x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x10 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x11 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x11 += einsum("ia,jkla->jikl", t1.aa, x10) x80 += einsum("ijkl->ijkl", x11) - x81 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x81 += einsum("ia,jkil->jkla", t1.bb, x80) rdm2_f_oovo_aabb += einsum("ijka->ijak", x81) rdm2_f_vooo_bbaa += einsum("ijka->akij", x81) del x81 - x91 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x91 += einsum("ia,ijkl->jkla", t1.aa, x80) del x80 - rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x91) - rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_aabb += einsum("ijka->aijk", x91) del x91 x233 += einsum("ijkl->ijkl", x11) - x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x234 += einsum("ijab,ikjl->klab", t2.abab, x233) del x233 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x234) rdm2_f_vovo_aabb += einsum("ijab->aibj", x234) del x234 x239 += einsum("ijkl->ijkl", x11) * 0.9999999999999993 - x240 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x240 += einsum("ia,ijkl->jkla", t1.aa, x239) del x239 - x241 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x241 += einsum("ijka->ijka", x240) del x240 rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x11) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x11) del x11 - x60 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x60 += einsum("ijab,ikla->kljb", t2.abab, x10) - x71 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x71 += einsum("ijka->ijka", x60) * -1 - x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x99 += einsum("ijka->ijka", x60) * -1 - x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x204 -= einsum("ijka->ijka", x60) del x60 - x66 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x66 += einsum("ijab,ijka->kb", t2.abab, x10) - x70 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x70 += einsum("ia->ia", x66) - x84 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x84 += einsum("ia->ia", x66) - x97 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x97 += einsum("ia->ia", x66) - x256 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x256 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x256 += einsum("ia->ia", x66) - x261 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x261 += einsum("ia->ia", x66) del x66 - x77 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x77 += einsum("ijab,kjla->kilb", t2.abab, x10) x245 -= einsum("ijka->ijka", x77) rdm2_f_oovo_aabb += einsum("ijka->ijak", x77) rdm2_f_vooo_bbaa += einsum("ijka->akij", x77) del x77 - x90 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x90 += einsum("ijka,ilba->ljkb", x10, x2) del x2 x241 += einsum("ijka->ijka", x90) * -1 rdm2_f_oovo_bbaa += einsum("ijka->jkai", x90) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x90) * -1 del x90 - x126 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum("ia,ijkb->jkba", t1.aa, x10) - rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x126) - rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x126) del x126 - x133 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x133 += einsum("ia,jikb->jkba", t1.bb, x10) - x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x296 += einsum("ijab->ijab", x133) - rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x133) - rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x133) del x133 - x292 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("ijab,ijkc->kcab", t2.abab, x10) - rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x292) * -1 - rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_aabb += einsum("iabc->baci", x292) * -1 del x292 - rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_bbaa -= einsum("ijka->jkia", x10) - rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_aabb -= einsum("ijka->iajk", x10) del x10 x12 += einsum("ij->ji", delta_oo.aa) * -1 @@ -4421,52 +4422,52 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbaa += einsum("ij,kl->jilk", delta_oo.bb, x12) * -1 rdm2_f_vooo_bbaa += einsum("ia,jk->aikj", t1.bb, x12) * -1 del x12 - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum("ai,ja->ij", l1.bb, t1.bb) - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum("ij->ij", x13) - x58 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x58 += einsum("ij->ij", x13) - x73 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x73 += einsum("ia,ij->ja", t1.bb, x13) - x74 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x74 -= einsum("ia->ia", x73) del x73 - x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("ij,kiab->jkab", x13, t2.bbbb) - x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x213 += einsum("ijab->ijab", x198) del x198 - x254 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x254 += einsum("ij->ij", x13) - rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_bbbb -= einsum("ij,kl->jikl", delta_oo.bb, x13) rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x13) rdm2_f_oooo_bbbb += einsum("ij,kl->jlki", delta_oo.bb, x13) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x13) del x13 - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum("wai,wja->ij", lu11.bb, u11.bb) x18 += einsum("ij->ij", x14) - x54 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x54 += einsum("ia,ij->ja", t1.bb, x14) - x57 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x57 += einsum("ia->ia", x54) del x54 x58 += einsum("ij->ij", x14) - x59 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x59 += einsum("ia,jk->jika", t1.bb, x58) - x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x98 += einsum("ia,jk->jika", t1.bb, x58) - x224 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x224 += einsum("ia,ij->ja", t1.bb, x58) del x58 - x225 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x225 += einsum("ia->ia", x224) - x226 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x226 += einsum("ia->ia", x224) del x224 - x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x200 += einsum("ij,kiab->kjab", x14, t2.bbbb) x213 -= einsum("ijab->ijab", x200) del x200 @@ -4476,30 +4477,30 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x14) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x14) del x14 - x15 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x15 += einsum("abij,ikab->jk", l2.abab, t2.abab) x18 += einsum("ij->ij", x15) - x22 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x22 += einsum("ij->ij", x15) - x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x214 += einsum("ij,kiab->jkab", x15, t2.bbbb) - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum("ijab->ijab", x214) * -1 del x214 x254 += einsum("ij->ij", x15) del x15 - x16 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x16 += einsum("ijab->jiab", t2.bbbb) x16 += einsum("ijab->jiba", t2.bbbb) * -1 - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum("abij,ikab->jk", l2.bbbb, x16) x18 += einsum("ij->ij", x17) * -1 - x83 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x83 += einsum("ia,ij->ja", t1.bb, x18) x84 += einsum("ia->ia", x83) x97 += einsum("ia->ia", x83) del x83 - x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x247 += einsum("ij,kiab->kjab", x18, t2.abab) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x247) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x247) * -1 @@ -4510,7 +4511,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aabb += einsum("ia,jk->aijk", t1.aa, x18) * -1 del x18 x22 += einsum("ij->ij", x17) * -1 - x69 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x69 += einsum("ia,ij->ja", t1.bb, x22) x70 += einsum("ia->ia", x69) del x69 @@ -4521,103 +4522,103 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->kjil", delta_oo.bb, x22) rdm2_f_oooo_bbbb += einsum("ij,kl->klij", delta_oo.bb, x22) * -1 del x22 - x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x217 += einsum("ij,ikab->kjab", x17, t2.bbbb) * -1 del x17 x218 += einsum("ijab->ijba", x217) del x217 - x82 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x82 += einsum("ai,ijba->jb", l1.bb, x16) x84 += einsum("ia->ia", x82) * -1 x97 += einsum("ia->ia", x82) * -1 del x82 - x252 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x252 += einsum("ai,ijba->jb", l1.bb, x16) * 0.9999999999999993 x256 += einsum("ia->ia", x252) * -1 x261 += einsum("ia->ia", x252) * -1 del x252 - x253 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x253 += einsum("abij,ikab->jk", l2.bbbb, x16) x254 += einsum("ij->ij", x253) * -1 del x253 - x255 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x255 += einsum("ia,ij->ja", t1.bb, x254) * 0.9999999999999993 del x254 x256 += einsum("ia->ia", x255) x261 += einsum("ia->ia", x255) del x255 - x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x295 += einsum("abij,jkcb->ikac", l2.abab, x16) x296 += einsum("ijab->ijab", x295) * -1 del x295 - x19 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x19 += einsum("abij,klab->ijkl", l2.bbbb, t2.bbbb) - x64 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x64 += einsum("ijkl->jilk", x19) - x219 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x219 += einsum("ia,jikl->jkla", t1.bb, x19) - x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x220 += einsum("ia,ijkb->kjba", t1.bb, x219) del x219 - x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x223 += einsum("ijab->ijab", x220) del x220 - x221 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x221 += einsum("ijkl->jilk", x19) rdm2_f_oooo_bbbb += einsum("ijkl->jkil", x19) * -1 rdm2_f_oooo_bbbb += einsum("ijkl->jlik", x19) del x19 - x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x20 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x21 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x21 += einsum("ia,jkla->kjli", t1.bb, x20) x64 += einsum("ijkl->ijkl", x21) - x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x65 += einsum("ia,ijkl->jkla", t1.bb, x64) del x64 x71 += einsum("ijka->ikja", x65) x99 += einsum("ijka->ikja", x65) del x65 - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x190 += einsum("ia,ijkl->jlka", t1.bb, x21) - x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ia,ijkb->jkab", t1.bb, x190) del x190 - x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum("ijab->ijab", x191) del x191 x221 += einsum("ijkl->ijkl", x21) - x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x222 += einsum("ijab,ijkl->klab", t2.bbbb, x221) del x221 x223 += einsum("ijab->jiba", x222) del x222 - rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_bbbb += einsum("ijab->ajbi", x223) * -1 rdm2_f_vovo_bbbb += einsum("ijab->bjai", x223) del x223 rdm2_f_oooo_bbbb += einsum("ijkl->ikjl", x21) rdm2_f_oooo_bbbb += einsum("ijkl->iljk", x21) * -1 del x21 - x61 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x61 += einsum("ijka->ijka", x20) x61 += einsum("ijka->jika", x20) * -1 - x89 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x89 += einsum("ijab,jklb->ikla", t2.abab, x61) x241 += einsum("ijka->ijka", x89) * -1 rdm2_f_oovo_bbaa += einsum("ijka->jkai", x89) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x89) * -1 del x89 - x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x67 += einsum("ijka->ijka", x20) * -1 x67 += einsum("ijka->jika", x20) - x68 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x68 += einsum("ijab,jikb->ka", t2.bbbb, x67) del x67 x70 += einsum("ia->ia", x68) * -1 x71 += einsum("ij,ka->jika", delta_oo.bb, x70) * -1 x218 += einsum("ia,jb->ijab", t1.bb, x70) - rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_bbbb += einsum("ij,ka->ajik", delta_oo.bb, x70) rdm2_f_vooo_bbbb += einsum("ij,ka->akij", delta_oo.bb, x70) * -1 del x70 @@ -4626,59 +4627,59 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x256 += einsum("ia->ia", x68) * -1 x261 += einsum("ia->ia", x68) * -1 del x68 - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x117 -= einsum("ijka->ijka", x20) x117 += einsum("ijka->jika", x20) - x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x118 += einsum("ia,jikb->jkab", t1.bb, x117) del x117 - rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_bbbb -= einsum("ijab->ijab", x118) - rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_bbbb -= einsum("ijab->abij", x118) del x118 - x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x142 += einsum("ijka->ijka", x20) x142 -= einsum("ijka->jika", x20) - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum("ia,jikb->jkab", t1.bb, x142) - rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_bbbb -= einsum("ijab->ibaj", x143) - rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_bbbb -= einsum("ijab->ajib", x143) del x143 - x282 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x282 += einsum("ijab,jikc->kcba", t2.bbbb, x20) - x289 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x289 += einsum("iabc->iabc", x282) del x282 - x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x283 += einsum("ia,jikb->jkba", t1.bb, x20) - x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x286 += einsum("ijab->ijab", x283) * -1 del x283 - rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_bbbb += einsum("ijka->ikja", x20) rdm2_f_ooov_bbbb -= einsum("ijka->jkia", x20) - rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_bbbb -= einsum("ijka->iajk", x20) rdm2_f_ovoo_bbbb += einsum("ijka->jaik", x20) del x20 - x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x35 += einsum("ijab,kljb->klia", t2.abab, x23) x45 += einsum("ijka->ijka", x35) * -1 x96 += einsum("ijka->ijka", x35) * -1 - x162 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x162 -= einsum("ijka->ijka", x35) del x35 - x41 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x41 += einsum("ijab,ikjb->ka", t2.abab, x23) x44 += einsum("ia->ia", x41) x45 += einsum("ij,ka->jika", delta_oo.aa, x44) * -1 x175 += einsum("ia,jb->ijab", t1.aa, x44) - rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_aaaa += einsum("ij,ka->ajik", delta_oo.aa, x44) rdm2_f_vooo_aaaa += einsum("ij,ka->akij", delta_oo.aa, x44) * -1 del x44 @@ -4686,52 +4687,52 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x259 += einsum("ia->ia", x41) x260 += einsum("ia->ia", x41) del x41 - x79 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x79 += einsum("ijab,klib->klja", x16, x23) rdm2_f_oovo_aabb += einsum("ijka->ijak", x79) * -1 rdm2_f_vooo_bbaa += einsum("ijka->akij", x79) * -1 del x79 - x87 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x87 += einsum("ijab,iklb->klja", t2.abab, x23) x241 += einsum("ijka->ijka", x87) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x87) rdm2_f_vooo_aabb += einsum("ijka->aijk", x87) del x87 - x128 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum("ia,jkib->jkba", t1.bb, x23) - rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_aabb -= einsum("ijab->ijba", x128) - rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x128) del x128 - x138 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x138 += einsum("ia,ijkb->jkab", t1.aa, x23) x304 += einsum("ijab->ijab", x138) - rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x138) - rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_aabb -= einsum("ijab->aijb", x138) del x138 - x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x298 += einsum("ijab,ikjc->kacb", t2.abab, x23) - rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_aabb += einsum("iabc->aicb", x298) * -1 - rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x298) * -1 del x298 - rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_aabb -= einsum("ijka->ijka", x23) - rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_bbaa -= einsum("ijka->kaij", x23) - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum("ai,jkba->ijkb", l1.aa, t2.aaaa) x34 += einsum("ijka->ijka", x24) x95 += einsum("ijka->ijka", x24) x162 += einsum("ijka->ijka", x24) del x24 - x25 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum("wia,wjk->jkia", u11.aa, x25) x34 -= einsum("ijka->ijka", x26) x95 -= einsum("ijka->ijka", x26) @@ -4739,7 +4740,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa -= einsum("ijka->ajik", x95) rdm2_f_vooo_aaaa += einsum("ijka->akij", x95) del x95 - x28 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x28 += einsum("wia,wij->ja", u11.aa, x25) x32 += einsum("ia->ia", x28) x94 += einsum("ia->ia", x28) @@ -4748,45 +4749,45 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x259 += einsum("ia->ia", x28) x260 += einsum("ia->ia", x28) * 0.9999999999999993 del x28 - x76 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x76 += einsum("wia,wjk->jkia", u11.bb, x25) rdm2_f_oovo_aabb -= einsum("ijka->ijak", x76) rdm2_f_vooo_bbaa -= einsum("ijka->akij", x76) del x76 - x164 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x164 += einsum("ia,wij->wja", t1.aa, x25) del x25 - x167 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x167 -= einsum("wia->wia", x164) del x164 - x27 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x27 += einsum("ai,jiba->jb", l1.bb, t2.abab) x32 -= einsum("ia->ia", x27) x94 += einsum("ia->ia", x27) * -1 - x170 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x170 += einsum("ia->ia", x27) x259 += einsum("ia->ia", x27) * -1 x260 += einsum("ia->ia", x27) * -0.9999999999999993 del x27 - x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x30 += einsum("ijab->jiab", t2.aaaa) x30 -= einsum("ijab->jiba", t2.aaaa) - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("ai,ijba->jb", l1.aa, x30) x32 -= einsum("ia->ia", x31) del x31 x34 -= einsum("ij,ka->jika", delta_oo.aa, x32) - rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_aaaa += einsum("ijka->ijak", x34) rdm2_f_oovo_aaaa -= einsum("ijka->ikaj", x34) del x34 rdm2_f_vooo_aaaa += einsum("ij,ka->ajik", delta_oo.aa, x32) rdm2_f_vooo_aaaa -= einsum("ij,ka->akij", delta_oo.aa, x32) del x32 - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum("ijab->jiab", t2.aaaa) * -1 x37 += einsum("ijab->jiba", t2.aaaa) - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x38 += einsum("ijka,jlab->iklb", x36, x37) del x36 x45 += einsum("ijka->ijka", x38) @@ -4798,7 +4799,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa += einsum("ijka->ajik", x96) * -1 rdm2_f_vooo_aaaa += einsum("ijka->akij", x96) del x96 - x46 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x46 += einsum("w,wia->ia", ls1, u11.aa) x48 += einsum("ia->ia", x46) x94 += einsum("ia->ia", x46) * -1 @@ -4818,15 +4819,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa -= einsum("ij,ka->aijk", delta_oo.aa, x48) rdm2_f_vooo_aaaa += einsum("ij,ka->akji", delta_oo.aa, x48) del x48 - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum("ai,jkab->ikjb", l1.bb, t2.bbbb) x59 += einsum("ijka->ijka", x49) x98 += einsum("ijka->ijka", x49) x204 += einsum("ijka->ijka", x49) del x49 - x50 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x50 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum("wia,wjk->jkia", u11.bb, x50) x59 -= einsum("ijka->ijka", x51) x98 -= einsum("ijka->ijka", x51) @@ -4834,7 +4835,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb -= einsum("ijka->ajik", x98) rdm2_f_vooo_bbbb += einsum("ijka->akij", x98) del x98 - x53 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x53 += einsum("wia,wij->ja", u11.bb, x50) x57 += einsum("ia->ia", x53) x84 += einsum("ia->ia", x53) @@ -4844,48 +4845,48 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x256 += einsum("ia->ia", x53) * 0.9999999999999993 x261 += einsum("ia->ia", x53) * 0.9999999999999993 del x53 - x86 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x86 += einsum("wia,wjk->ijka", u11.aa, x50) rdm2_f_oovo_bbaa -= einsum("ijka->jkai", x86) rdm2_f_vooo_aabb -= einsum("ijka->aijk", x86) del x86 - x207 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x207 += einsum("ia,wij->wja", t1.bb, x50) del x50 - x209 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x209 -= einsum("wia->wia", x207) - x249 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x249 -= einsum("wia->wia", x207) del x207 - x52 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x52 += einsum("ai,ijab->jb", l1.aa, t2.abab) x57 -= einsum("ia->ia", x52) x84 += einsum("ia->ia", x52) * -1 x97 += einsum("ia->ia", x52) * -1 - x212 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x212 += einsum("ia->ia", x52) x256 += einsum("ia->ia", x52) * -0.9999999999999993 x261 += einsum("ia->ia", x52) * -0.9999999999999993 del x52 - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("ijab->jiab", t2.bbbb) x55 -= einsum("ijab->jiba", t2.bbbb) - x56 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x56 += einsum("ai,ijba->jb", l1.bb, x55) x57 -= einsum("ia->ia", x56) del x56 x59 -= einsum("ij,ka->jika", delta_oo.bb, x57) - rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_bbbb += einsum("ijka->ijak", x59) rdm2_f_oovo_bbbb -= einsum("ijka->ikaj", x59) del x59 rdm2_f_vooo_bbbb += einsum("ij,ka->ajik", delta_oo.bb, x57) rdm2_f_vooo_bbbb -= einsum("ij,ka->akij", delta_oo.bb, x57) del x57 - x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x62 += einsum("ijab->jiab", t2.bbbb) * -1 x62 += einsum("ijab->jiba", t2.bbbb) - x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x63 += einsum("ijka,jlab->iklb", x61, x62) del x61 del x62 @@ -4898,7 +4899,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ijka->ajik", x99) * -1 rdm2_f_vooo_bbbb += einsum("ijka->akij", x99) del x99 - x72 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x72 += einsum("w,wia->ia", ls1, u11.bb) x74 += einsum("ia->ia", x72) x84 += einsum("ia->ia", x72) * -1 @@ -4921,7 +4922,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb -= einsum("ij,ka->aijk", delta_oo.bb, x74) rdm2_f_vooo_bbbb += einsum("ij,ka->akji", delta_oo.bb, x74) del x74 - x75 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x75 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) x245 += einsum("ijka->ijka", x75) rdm2_f_oovo_aabb -= einsum("ijka->ijak", x75) @@ -4930,10 +4931,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x84 += einsum("ia->ia", t1.bb) * -1 rdm2_f_oovo_aabb += einsum("ij,ka->jiak", delta_oo.aa, x84) * -1 del x84 - x88 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x88 += einsum("ai,jkba->jikb", l1.bb, t2.abab) x241 += einsum("ijka->ijka", x88) * -1 - x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x242 += einsum("ia,jikb->jkba", t1.bb, x241) del x241 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x242) @@ -4946,18 +4947,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_bbaa += einsum("ij,ka->jiak", delta_oo.bb, x94) * -1 rdm2_f_vooo_aabb += einsum("ij,ka->akji", delta_oo.bb, x94) * -1 del x94 - x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum("wai,wjb->ijab", lu11.aa, u11.aa) rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x100) rdm2_f_ovvo_aaaa += einsum("ijab->iabj", x100) rdm2_f_voov_aaaa += einsum("ijab->bjia", x100) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x100) del x100 - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x159 += einsum("ijab->ijab", x101) - x231 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x231 += einsum("ijab->ijab", x101) x269 += einsum("ijab->ijab", x101) rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x101) @@ -4965,102 +4966,102 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_aaaa += einsum("ijab->bjia", x101) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x101) del x101 - x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x102 -= einsum("ijab->jiab", t2.aaaa) x102 += einsum("ijab->jiba", t2.aaaa) - x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x139 += einsum("abij,ikca->kjcb", l2.abab, x102) - x228 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x228 -= einsum("ijab->ijab", x139) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x139) rdm2_f_voov_aabb -= einsum("ijab->aijb", x139) del x139 - x161 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x161 += einsum("ijab,kila->jklb", x102, x130) del x130 x162 += einsum("ijka->jkia", x161) del x161 - x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x163 += einsum("ia,ijkb->jkab", t1.aa, x162) del x162 x171 += einsum("ijab->ijab", x163) del x163 - x166 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x166 += einsum("wai,ijba->wjb", lu11.aa, x102) x167 -= einsum("wia->wia", x166) del x166 - x169 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x169 += einsum("ai,ijba->jb", l1.aa, x102) x170 -= einsum("ia->ia", x169) del x169 x171 += einsum("ia,jb->ijab", t1.aa, x170) del x170 - x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x103 -= einsum("abij->jiab", l2.aaaa) x103 += einsum("abij->jiba", l2.aaaa) - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum("ijab,ikca->jkbc", x102, x103) rdm2_f_oovv_aaaa += einsum("ijab->jiab", x104) rdm2_f_vvoo_aaaa += einsum("ijab->abji", x104) del x104 - x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum("ijab,ikbc->kjca", x103, x30) del x30 rdm2_f_ovvo_aaaa += einsum("ijab->jbai", x129) rdm2_f_voov_aaaa += einsum("ijab->aijb", x129) del x129 - x134 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x134 += einsum("ijab,ikca->kjcb", t2.abab, x103) - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 -= einsum("ijab,ikac->jkbc", t2.abab, x134) - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum("ijab->ijab", x188) del x188 rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x134) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x134) del x134 - x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x158 += einsum("ijab,ikbc->jkac", t2.aaaa, x103) del x103 x159 -= einsum("ijab->jiba", x158) del x158 - x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x160 += einsum("ijab,ikac->jkbc", t2.aaaa, x159) del x159 x171 += einsum("ijab->ijab", x160) del x160 - x107 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("ai,ib->ab", l1.aa, t1.aa) - x112 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x112 += einsum("ab->ab", x107) - x275 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x275 += einsum("ab->ab", x107) del x107 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("wai,wib->ab", lu11.aa, u11.aa) x112 += einsum("ab->ab", x108) - x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x154 += einsum("ab,ijca->ijcb", x108, t2.aaaa) x171 -= einsum("ijab->ijab", x154) del x154 - x237 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x237 += einsum("ab->ab", x108) x275 += einsum("ab->ab", x108) del x108 - x276 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x276 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x276 += einsum("ia,bc->ibac", t1.aa, x275) del x275 - x109 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x112 += einsum("ab->ab", x109) - x172 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x172 += einsum("ab->ab", x109) x237 += einsum("ab->ab", x109) del x109 - x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("abij->jiab", l2.aaaa) x110 += einsum("abij->jiba", l2.aaaa) * -1 - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("ijab,ijac->bc", t2.aaaa, x110) x112 += einsum("ab->ba", x111) * -1 rdm2_f_oovv_aaaa += einsum("ij,ab->jiba", delta_oo.aa, x112) @@ -5073,7 +5074,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_aabb += einsum("ia,bc->cbai", t1.bb, x112) del x112 x172 += einsum("ab->ba", x111) * -1 - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum("ab,ijac->ijcb", x172, t2.aaaa) x175 += einsum("ijab->jiab", x173) del x173 @@ -5086,50 +5087,50 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x172 x237 += einsum("ab->ba", x111) * -1 del x111 - x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x238 += einsum("ab,ijac->ijbc", x237, t2.abab) del x237 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x238) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x238) * -1 del x238 - x268 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x268 += einsum("ijab,ikca->kjcb", x110, x37) del x37 x269 += einsum("ijab->jiba", x268) del x268 - x270 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x270 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x270 += einsum("ia,ijbc->jabc", t1.aa, x269) del x269 x271 += einsum("iabc->ibac", x270) * -1 del x270 - rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_aaaa += einsum("iabc->bica", x271) rdm2_f_vovv_aaaa += einsum("iabc->ciba", x271) * -1 - rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_aaaa += einsum("iabc->baci", x271) * -1 rdm2_f_vvvo_aaaa += einsum("iabc->cabi", x271) del x271 - x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("ijab,ikca->kjcb", t2.abab, x110) del x110 x296 += einsum("ijab->ijab", x294) * -1 del x294 - x297 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x297 += einsum("ia,ijbc->jabc", t1.aa, x296) del x296 rdm2_f_vovv_bbaa += einsum("iabc->ciab", x297) * -1 rdm2_f_vvvo_aabb += einsum("iabc->abci", x297) * -1 del x297 - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum("wai,wjb->ijab", lu11.bb, u11.bb) rdm2_f_oovv_bbbb -= einsum("ijab->ijba", x113) rdm2_f_ovvo_bbbb += einsum("ijab->iabj", x113) rdm2_f_voov_bbbb += einsum("ijab->bjia", x113) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x113) del x113 - x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x202 += einsum("ijab,ikac->jkbc", x114, x55) x213 -= einsum("ijab->ijab", x202) del x202 @@ -5139,17 +5140,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_bbbb += einsum("ijab->bjia", x114) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x114) del x114 - x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x115 -= einsum("abij->jiab", l2.bbbb) x115 += einsum("abij->jiba", l2.bbbb) - x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum("ijab,ikcb->kjca", x115, x55) rdm2_f_oovv_bbbb += einsum("ijab->jiab", x116) rdm2_f_vvoo_bbbb += einsum("ijab->abji", x116) del x116 - x140 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x140 += einsum("ijab,jkcb->ikac", t2.abab, x115) - x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x151 -= einsum("ijab,kjcb->ikac", t2.abab, x140) x152 += einsum("ijab->jiba", x151) del x151 @@ -5157,49 +5158,49 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x140) rdm2_f_voov_aabb -= einsum("ijab->aijb", x140) del x140 - x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum("ijab,ikbc->kjca", x115, x55) del x115 del x55 rdm2_f_ovvo_bbbb += einsum("ijab->jbai", x141) rdm2_f_voov_bbbb += einsum("ijab->aijb", x141) del x141 - x119 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x119 += einsum("ai,ib->ab", l1.bb, t1.bb) - x124 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x124 += einsum("ab->ab", x119) - x280 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x280 += einsum("ab->ab", x119) del x119 - x120 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x120 += einsum("wai,wib->ab", lu11.bb, u11.bb) x124 += einsum("ab->ab", x120) - x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x199 += einsum("ab,ijac->jicb", x120, t2.bbbb) x213 -= einsum("ijab->ijab", x199) del x199 - x235 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x235 += einsum("ab->ab", x120) x280 += einsum("ab->ab", x120) del x120 - x281 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x281 += einsum("ia,bc->ibac", t1.bb, x280) del x280 - x121 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x121 += einsum("abij,ijac->bc", l2.abab, t2.abab) x124 += einsum("ab->ab", x121) - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum("ab,ijac->jibc", x121, t2.bbbb) x218 += einsum("ijab->ijab", x215) * -1 del x215 x235 += einsum("ab->ab", x121) - x288 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x288 += einsum("ab->ab", x121) del x121 - x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x122 += einsum("abij->jiab", l2.bbbb) * -1 x122 += einsum("abij->jiba", l2.bbbb) - x123 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x123 += einsum("ijab,ijbc->ac", t2.bbbb, x122) del x122 x124 += einsum("ab->ba", x123) * -1 @@ -5212,7 +5213,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovv_aabb += einsum("ia,bc->aicb", t1.aa, x124) rdm2_f_vvvo_bbaa += einsum("ia,bc->cbai", t1.aa, x124) del x124 - x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x216 += einsum("ab,ijbc->ijca", x123, t2.bbbb) * -1 x218 += einsum("ijab->jiab", x216) del x216 @@ -5222,7 +5223,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_bbbb += einsum("ijab->bjai", x218) * -1 del x218 x235 += einsum("ab->ba", x123) * -1 - x236 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x236 += einsum("ab,ijca->ijcb", x235, t2.abab) del x235 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x236) * -1 @@ -5232,9 +5233,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x123 x289 += einsum("ia,bc->ibac", t1.bb, x288) del x288 - x125 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x125 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) - x293 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x293 += einsum("ia,ijbc->jbca", t1.bb, x125) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x293) * -1 rdm2_f_vvvo_aabb += einsum("iabc->baci", x293) * -1 @@ -5242,14 +5243,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x125) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x125) del x125 - x127 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) - x227 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x227 += einsum("ijab,ikbc->kjac", t2.abab, x127) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x227) rdm2_f_vovo_aabb += einsum("ijab->aibj", x227) del x227 - x299 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x299 += einsum("ia,ijbc->jabc", t1.aa, x127) rdm2_f_vovv_aabb += einsum("iabc->aicb", x299) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x299) * -1 @@ -5257,87 +5258,87 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_aabb -= einsum("ijab->ijba", x127) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x127) del x127 - x132 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x132 += einsum("wai,wjb->ijab", lu11.aa, u11.bb) rdm2_f_ovvo_aabb += einsum("ijab->iabj", x132) rdm2_f_voov_bbaa += einsum("ijab->bjia", x132) del x132 - x135 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x135 -= einsum("ijab->jiab", t2.bbbb) x135 += einsum("ijab->jiba", t2.bbbb) - x136 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x136 += einsum("abij,jkcb->ikac", l2.abab, x135) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x136) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x136) del x136 - x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x203 += einsum("ijab,kila->jklb", x135, x142) del x142 x204 += einsum("ijka->jkia", x203) del x203 - x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x205 += einsum("ia,ijkb->jkab", t1.bb, x204) del x204 x213 += einsum("ijab->ijab", x205) del x205 - x208 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x208 += einsum("wai,ijba->wjb", lu11.bb, x135) x209 -= einsum("wia->wia", x208) x249 -= einsum("wia->wia", x208) del x208 - x211 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x211 += einsum("ai,ijba->jb", l1.bb, x135) x212 -= einsum("ia->ia", x211) del x211 x213 += einsum("ia,jb->ijab", t1.bb, x212) del x212 - x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x229 += einsum("ijab,kicb->kjca", x135, x228) del x228 rdm2_f_vovo_bbaa -= einsum("ijab->bjai", x229) rdm2_f_vovo_aabb -= einsum("ijab->aibj", x229) del x229 - x244 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x244 += einsum("ijab,klib->klja", x135, x23) del x135 del x23 x245 -= einsum("ijka->ijka", x244) del x244 - x246 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x246 += einsum("ia,ijkb->jkab", t1.aa, x245) del x245 rdm2_f_vovo_bbaa -= einsum("ijab->bjai", x246) rdm2_f_vovo_aabb -= einsum("ijab->aibj", x246) del x246 - x137 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x137 += einsum("wai,wjb->jiba", lu11.bb, u11.aa) rdm2_f_ovvo_bbaa += einsum("ijab->jbai", x137) rdm2_f_voov_aabb += einsum("ijab->aijb", x137) del x137 - x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x146 += einsum("abij->jiab", l2.aaaa) x146 -= einsum("abij->jiba", l2.aaaa) - x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x147 += einsum("ijab,ikac->jkbc", t2.aaaa, x146) - x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x148 -= einsum("ijab,kica->jkbc", t2.aaaa, x147) del x147 x152 += einsum("ijab->jiba", x148) del x148 - x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x149 += einsum("ijab,ikbc->jkac", t2.aaaa, x146) - x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x150 -= einsum("ijab,kicb->jkac", t2.aaaa, x149) del x149 x152 += einsum("ijab->ijab", x150) del x150 - x230 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x230 += einsum("ijab,ikbc->jkac", x102, x146) del x146 del x102 x231 += einsum("ijab->jiba", x230) del x230 - x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x232 += einsum("ijab,ikac->kjcb", t2.abab, x231) del x231 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x232) @@ -5347,18 +5348,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ijab->biaj", x152) rdm2_f_vovo_aaaa += einsum("ijab->aibj", x152) del x152 - x156 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x156 += einsum("abij,kiac->kjcb", l2.abab, t2.aaaa) - x157 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x157 += einsum("ijab,kjcb->kica", t2.abab, x156) del x156 x171 -= einsum("ijab->ijab", x157) del x157 - x165 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("wai,jiba->wjb", lu11.bb, t2.abab) x167 += einsum("wia->wia", x165) del x165 - x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x168 += einsum("wia,wjb->ijab", u11.aa, x167) x171 += einsum("ijab->jiba", x168) del x168 @@ -5367,15 +5368,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ijab->ajbi", x171) rdm2_f_vovo_aaaa += einsum("ijab->bjai", x171) del x171 - x251 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x251 += einsum("wia,wjb->jiba", u11.bb, x167) del x167 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x251) rdm2_f_vovo_aabb += einsum("ijab->aibj", x251) del x251 - x181 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x181 += einsum("wx,xia->wia", ls2, u11.aa) - x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x182 += einsum("wia,wjb->jiba", u11.aa, x181) del x181 rdm2_f_vovo_aaaa -= einsum("ijab->biaj", x182) @@ -5385,9 +5386,9 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ia,jb->bjai", t1.aa, x184) rdm2_f_vovo_aaaa += einsum("ia,jb->ajbi", t1.aa, x184) del x184 - x186 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x186 += einsum("wx,xia->wia", ls2, u11.bb) - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum("wia,wjb->jiba", u11.bb, x186) x189 += einsum("ijab->jiba", x187) del x187 @@ -5396,24 +5397,24 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x189 x249 += einsum("wia->wia", x186) del x186 - x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x192 += einsum("abij->jiab", l2.bbbb) x192 -= einsum("abij->jiba", l2.bbbb) - x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum("ijab,ikac->jkbc", t2.bbbb, x192) - x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x194 -= einsum("ijab,kica->jkbc", t2.bbbb, x193) del x193 x197 += einsum("ijab->jiba", x194) del x194 - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum("ijab,ikbc->jkac", t2.bbbb, x192) del x192 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 -= einsum("ijab,kicb->jkac", t2.bbbb, x195) x197 += einsum("ijab->ijab", x196) del x196 - x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 -= einsum("ijab,kica->jkbc", t2.bbbb, x195) del x195 x213 -= einsum("ijab->ijab", x201) @@ -5422,10 +5423,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_bbbb -= einsum("ijab->biaj", x197) rdm2_f_vovo_bbbb += einsum("ijab->aibj", x197) del x197 - x206 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x206 += einsum("wai,ijab->wjb", lu11.aa, t2.abab) x209 += einsum("wia->wia", x206) - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("wia,wjb->ijab", u11.bb, x209) del x209 x213 += einsum("ijab->jiba", x210) @@ -5437,7 +5438,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x213 x249 += einsum("wia->wia", x206) del x206 - x250 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x250 += einsum("wia,wjb->ijab", u11.aa, x249) del x249 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x250) @@ -5453,62 +5454,62 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x260 += einsum("ia->ia", t1.aa) * -0.9999999999999993 rdm2_f_vovo_aabb += einsum("ia,jb->bjai", t1.bb, x260) * -1 del x260 - x262 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x262 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x262 += einsum("ia,bcji->jbca", t1.aa, l2.aaaa) - x307 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x307 += einsum("ia,ibcd->cbda", t1.aa, x262) - x308 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x308 += einsum("abcd->badc", x307) del x307 - rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_aaaa += einsum("iabc->iacb", x262) rdm2_f_ovvv_aaaa -= einsum("iabc->ibca", x262) - rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_aaaa -= einsum("iabc->caib", x262) rdm2_f_vvov_aaaa += einsum("iabc->cbia", x262) del x262 - x263 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x263 += einsum("ia,bcji->jbca", t1.bb, l2.bbbb) - x312 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x312 += einsum("ia,ibcd->cbda", t1.bb, x263) - x313 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x313 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x313 += einsum("abcd->badc", x312) del x312 - rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_bbbb += einsum("iabc->iacb", x263) rdm2_f_ovvv_bbbb -= einsum("iabc->ibca", x263) - rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_bbbb -= einsum("iabc->caib", x263) rdm2_f_vvov_bbbb += einsum("iabc->cbia", x263) del x263 - x264 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x264 += einsum("ia,bcij->jbac", t1.aa, l2.abab) - rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_bbaa += einsum("iabc->icba", x264) - rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_aabb += einsum("iabc->baic", x264) del x264 - x265 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x265 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x265 += einsum("ia,bcji->jbca", t1.bb, l2.abab) - x310 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x310 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x310 += einsum("ia,ibcd->bacd", t1.aa, x265) - rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x310) - rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_aabb += einsum("abcd->badc", x310) del x310 - rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_aabb += einsum("iabc->iacb", x265) - rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_bbaa += einsum("iabc->cbia", x265) del x265 - x272 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x272 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x272 += einsum("ai,jibc->jabc", l1.aa, t2.aaaa) x276 += einsum("iabc->iabc", x272) del x272 - x273 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x273 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x273 += einsum("ia,wbi->wba", t1.aa, lu11.aa) - x274 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x274 += einsum("wia,wbc->ibca", u11.aa, x273) x276 -= einsum("iabc->iabc", x274) del x274 @@ -5517,44 +5518,44 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_aaaa -= einsum("iabc->baci", x276) rdm2_f_vvvo_aaaa += einsum("iabc->cabi", x276) del x276 - x290 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x290 += einsum("wia,wbc->ibca", u11.bb, x273) del x273 rdm2_f_vovv_bbaa += einsum("iabc->ciba", x290) rdm2_f_vvvo_aabb += einsum("iabc->baci", x290) del x290 - x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x277 += einsum("ai,jibc->jabc", l1.bb, t2.bbbb) x281 += einsum("iabc->iabc", x277) del x277 - x278 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x278 += einsum("ia,wbi->wba", t1.bb, lu11.bb) - x279 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x279 += einsum("wia,wbc->ibca", u11.bb, x278) x281 -= einsum("iabc->iabc", x279) del x279 - rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_bbbb += einsum("iabc->bica", x281) rdm2_f_vovv_bbbb -= einsum("iabc->ciba", x281) - rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_bbbb -= einsum("iabc->baci", x281) rdm2_f_vvvo_bbbb += einsum("iabc->cabi", x281) del x281 - x300 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x300 += einsum("wia,wbc->iabc", u11.aa, x278) del x278 rdm2_f_vovv_aabb += einsum("iabc->aicb", x300) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x300) del x300 - x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x284 += einsum("abij->jiab", l2.bbbb) x284 += einsum("abij->jiba", l2.bbbb) * -1 - x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x285 += einsum("ijab,ikac->jkbc", x16, x284) del x16 x286 += einsum("ijab->jiba", x285) del x285 - x287 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x287 += einsum("ia,ijbc->jabc", t1.bb, x286) del x286 x289 += einsum("iabc->ibac", x287) * -1 @@ -5564,45 +5565,45 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_bbbb += einsum("iabc->baci", x289) * -1 rdm2_f_vvvo_bbbb += einsum("iabc->cabi", x289) del x289 - x303 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x303 += einsum("ijab,jkcb->ikac", t2.abab, x284) del x284 x304 += einsum("ijab->ijab", x303) * -1 del x303 - x305 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x305 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x305 += einsum("ia,jibc->jbac", t1.bb, x304) del x304 rdm2_f_vovv_aabb += einsum("iabc->aibc", x305) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->bcai", x305) * -1 del x305 - x291 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x291 += einsum("ai,ijbc->jabc", l1.aa, t2.abab) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x291) rdm2_f_vvvo_aabb += einsum("iabc->baci", x291) del x291 - x301 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x301 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x301 += einsum("ai,jibc->jbac", l1.bb, t2.abab) rdm2_f_vovv_aabb += einsum("iabc->aicb", x301) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x301) del x301 - x306 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x306 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x306 += einsum("abij,ijcd->abcd", l2.aaaa, t2.aaaa) x308 += einsum("abcd->badc", x306) del x306 - rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_aaaa += einsum("abcd->dacb", x308) * -1 rdm2_f_vvvv_aaaa += einsum("abcd->cadb", x308) del x308 - x309 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x309 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x309 += einsum("abij,ijcd->acbd", l2.abab, t2.abab) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x309) rdm2_f_vvvv_aabb += einsum("abcd->badc", x309) del x309 - x311 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x311 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x311 += einsum("abij,ijcd->abcd", l2.bbbb, t2.bbbb) x313 += einsum("abcd->badc", x311) del x311 - rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_bbbb += einsum("abcd->dacb", x313) * -1 rdm2_f_vvvv_bbbb += einsum("abcd->cadb", x313) del x313 @@ -5622,15 +5623,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovoo_aabb += einsum("ij,ak->kaji", delta_oo.bb, l1.aa) rdm2_f_ovoo_bbbb -= einsum("ij,ak->jaki", delta_oo.bb, l1.bb) rdm2_f_ovoo_bbbb += einsum("ij,ak->kaji", delta_oo.bb, l1.bb) - rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_aaaa -= einsum("abij->jaib", l2.aaaa) rdm2_f_ovov_aaaa += einsum("abij->jbia", l2.aaaa) - rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_bbbb -= einsum("abij->jaib", l2.bbbb) rdm2_f_ovov_bbbb += einsum("abij->jbia", l2.bbbb) - rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_bbaa += einsum("abij->jbia", l2.abab) - rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_aabb += einsum("abij->iajb", l2.abab) rdm2_f_oovv_aaaa -= einsum("ai,jb->ijba", l1.aa, t1.aa) rdm2_f_oovv_bbbb -= einsum("ai,jb->ijba", l1.bb, t1.bb) @@ -5677,9 +5678,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("w->w", s1) dm_b_des += einsum("ai,wia->w", l1.bb, u11.bb) dm_b_des += einsum("ai,wia->w", l1.aa, u11.aa) @@ -5707,7 +5708,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("wx,yx->wy", ls2, s2) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wai,xia->wx", lu11.bb, u11.bb) @@ -5742,103 +5743,103 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv.bb = np.eye(nvir[1]) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x53 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x53 += einsum("wia,wij->ja", u11.aa, x0) - rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_cre_oo_aa -= einsum("wij->wji", x0) - rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_cre_ov_aa -= einsum("ia,wij->wja", t1.aa, x0) del x0 - x1 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x1 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x1 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x65 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x65 += einsum("wia,wij->ja", u11.bb, x1) - rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_cre_oo_bb -= einsum("wij->wji", x1) - rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_cre_ov_bb -= einsum("ia,wij->wja", t1.bb, x1) del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 -= einsum("ijab->jiab", t2.aaaa) x2 += einsum("ijab->jiba", t2.aaaa) rdm_eb_cre_ov_aa -= einsum("wai,ijba->wjb", lu11.aa, x2) - x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum("ijab->jiab", t2.bbbb) x3 -= einsum("ijab->jiba", t2.bbbb) rdm_eb_cre_ov_bb -= einsum("wai,ijab->wjb", lu11.bb, x3) - x4 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("ai,wja->wij", l1.aa, u11.aa) - x43 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x43 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x43 += einsum("wij->wij", x4) - rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_des_oo_aa -= einsum("wij->wji", x4) del x4 - x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("wx,xai->wia", s2, lu11.aa) - x9 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("wia->wia", x5) - x34 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("wia->wia", x5) - rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_des_vo_aa += einsum("wia->wai", x5) del x5 - x6 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("wia,baji->wjb", u11.bb, l2.abab) x9 += einsum("wia->wia", x6) x34 += einsum("wia->wia", x6) rdm_eb_des_vo_aa += einsum("wia->wai", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("abij->jiab", l2.aaaa) * -1 x7 += einsum("abij->jiba", l2.aaaa) - x8 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("wia,ijba->wjb", u11.aa, x7) x9 += einsum("wia->wia", x8) * -1 del x8 rdm_eb_des_oo_aa += einsum("ia,wja->wij", t1.aa, x9) * -1 - rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_des_vv_aa += einsum("ia,wib->wba", t1.aa, x9) del x9 - x40 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x40 += einsum("ijab,ijbc->ac", t2.aaaa, x7) del x7 - x41 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x41 += einsum("ab->ba", x40) * -1 - x66 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("ab->ba", x40) * -1 del x40 - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum("ai,ja->ij", l1.aa, t1.aa) - x15 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x15 += einsum("ij->ij", x10) - x42 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x42 += einsum("ij->ij", x10) - x52 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x52 += einsum("ij->ij", x10) del x10 - x11 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x11 += einsum("wai,wja->ij", lu11.aa, u11.aa) x15 += einsum("ij->ij", x11) x42 += einsum("ij->ij", x11) x52 += einsum("ij->ij", x11) del x11 - x12 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x12 += einsum("abij,kjab->ik", l2.abab, t2.abab) x15 += einsum("ij->ij", x12) x42 += einsum("ij->ij", x12) x52 += einsum("ij->ij", x12) del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum("ijab->jiab", t2.aaaa) * -1 x13 += einsum("ijab->jiba", t2.aaaa) - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("abij,ikba->jk", l2.aaaa, x13) x15 += einsum("ij->ij", x14) * -1 x42 += einsum("ij->ij", x14) * -1 del x14 - rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_des_ov_aa += einsum("ij,wia->wja", x42, u11.aa) * -1 del x42 x52 += einsum("abij,ikba->jk", l2.aaaa, x13) * -1 @@ -5848,84 +5849,84 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x15 += einsum("ij->ji", delta_oo.aa) * -1 rdm_eb_des_oo_aa += einsum("w,ij->wji", s1, x15) * -1 del x15 - x16 = np.zeros((nbos), dtype=np.float64) + x16 = np.zeros((nbos), dtype=types[float]) x16 += einsum("w,xw->x", ls1, s2) - x19 = np.zeros((nbos), dtype=np.float64) + x19 = np.zeros((nbos), dtype=types[float]) x19 += einsum("w->w", x16) del x16 - x17 = np.zeros((nbos), dtype=np.float64) + x17 = np.zeros((nbos), dtype=types[float]) x17 += einsum("ai,wia->w", l1.aa, u11.aa) x19 += einsum("w->w", x17) del x17 - x18 = np.zeros((nbos), dtype=np.float64) + x18 = np.zeros((nbos), dtype=types[float]) x18 += einsum("ai,wia->w", l1.bb, u11.bb) x19 += einsum("w->w", x18) del x18 rdm_eb_des_oo_aa += einsum("w,ij->wji", x19, delta_oo.aa) - rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_des_oo_bb += einsum("w,ij->wji", x19, delta_oo.bb) rdm_eb_des_ov_aa += einsum("w,ia->wia", x19, t1.aa) - rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_des_ov_bb += einsum("w,ia->wia", x19, t1.bb) del x19 - x20 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x20 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x20 += einsum("ai,wja->wij", l1.bb, u11.bb) - x60 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x60 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x60 += einsum("wij->wij", x20) rdm_eb_des_oo_bb -= einsum("wij->wji", x20) del x20 - x21 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x21 += einsum("wx,xai->wia", s2, lu11.bb) - x25 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x25 += einsum("wia->wia", x21) - x37 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x37 += einsum("wia->wia", x21) - rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_des_vo_bb += einsum("wia->wai", x21) del x21 - x22 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x22 += einsum("wia,abij->wjb", u11.aa, l2.abab) x25 += einsum("wia->wia", x22) x37 += einsum("wia->wia", x22) rdm_eb_des_vo_bb += einsum("wia->wai", x22) del x22 - x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x23 += einsum("abij->jiab", l2.bbbb) x23 += einsum("abij->jiba", l2.bbbb) * -1 - x24 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x24 += einsum("wia,ijab->wjb", u11.bb, x23) del x23 x25 += einsum("wia->wia", x24) * -1 del x24 rdm_eb_des_oo_bb += einsum("ia,wja->wij", t1.bb, x25) * -1 - rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_des_vv_bb += einsum("ia,wib->wba", t1.bb, x25) del x25 - x26 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x26 += einsum("ai,ja->ij", l1.bb, t1.bb) - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum("ij->ij", x26) - x59 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x59 += einsum("ij->ij", x26) - x64 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x64 += einsum("ij->ij", x26) del x26 - x27 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x27 += einsum("wai,wja->ij", lu11.bb, u11.bb) x31 += einsum("ij->ij", x27) x59 += einsum("ij->ij", x27) x64 += einsum("ij->ij", x27) del x27 - x28 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x28 += einsum("abij,ikab->jk", l2.abab, t2.abab) x31 += einsum("ij->ij", x28) x59 += einsum("ij->ij", x28) x64 += einsum("ij->ij", x28) del x28 - x29 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x29 += einsum("ijab->jiab", t2.bbbb) * -1 x29 += einsum("ijab->jiba", t2.bbbb) - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum("abij,ikba->jk", l2.bbbb, x29) x31 += einsum("ij->ij", x30) * -1 x59 += einsum("ij->ij", x30) * -1 @@ -5940,10 +5941,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x31 += einsum("ij->ji", delta_oo.bb) * -1 rdm_eb_des_oo_bb += einsum("w,ij->wji", s1, x31) * -1 del x31 - x32 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x32 -= einsum("abij->jiab", l2.aaaa) x32 += einsum("abij->jiba", l2.aaaa) - x33 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x33 += einsum("wia,ijba->wjb", u11.aa, x32) del x32 x34 -= einsum("wia->wia", x33) @@ -5956,10 +5957,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x34 rdm_eb_des_vo_aa -= einsum("wia->wai", x33) del x33 - x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x35 += einsum("abij->jiab", l2.bbbb) x35 -= einsum("abij->jiba", l2.bbbb) - x36 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x36 += einsum("wia,ijab->wjb", u11.bb, x35) del x35 x37 -= einsum("wia->wia", x36) @@ -5972,47 +5973,47 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x37 rdm_eb_des_vo_bb -= einsum("wia->wai", x36) del x36 - x38 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x38 += einsum("wai,wib->ab", lu11.aa, u11.aa) x41 += einsum("ab->ab", x38) x66 += einsum("ab->ab", x38) del x38 - x39 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x39 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x41 += einsum("ab->ab", x39) rdm_eb_des_ov_aa += einsum("ab,wia->wib", x41, u11.aa) * -1 del x41 x66 += einsum("ab->ab", x39) del x39 - x44 = np.zeros((nbos, nbos), dtype=np.float64) + x44 = np.zeros((nbos, nbos), dtype=types[float]) x44 += einsum("wx,yw->xy", ls2, s2) - x47 = np.zeros((nbos, nbos), dtype=np.float64) + x47 = np.zeros((nbos, nbos), dtype=types[float]) x47 += einsum("wx->wx", x44) del x44 - x45 = np.zeros((nbos, nbos), dtype=np.float64) + x45 = np.zeros((nbos, nbos), dtype=types[float]) x45 += einsum("wai,xia->wx", lu11.aa, u11.aa) x47 += einsum("wx->wx", x45) del x45 - x46 = np.zeros((nbos, nbos), dtype=np.float64) + x46 = np.zeros((nbos, nbos), dtype=types[float]) x46 += einsum("wai,xia->wx", lu11.bb, u11.bb) x47 += einsum("wx->wx", x46) del x46 rdm_eb_des_ov_aa += einsum("wx,wia->xia", x47, u11.aa) rdm_eb_des_ov_bb += einsum("wx,wia->xia", x47, u11.bb) del x47 - x48 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x48 += einsum("ia,abjk->jikb", t1.aa, l2.abab) x53 += einsum("ijab,ikjb->ka", t2.abab, x48) del x48 - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum("ijka->ijka", x49) x50 += einsum("ijka->jika", x49) * -1 del x49 x53 += einsum("ijab,ijkb->ka", t2.aaaa, x50) * -1 del x50 - x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x51 += einsum("ijab->jiab", t2.aaaa) x51 += einsum("ijab->jiba", t2.aaaa) * -1 x53 += einsum("ai,ijba->jb", l1.aa, x51) * -1 @@ -6022,22 +6023,22 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x53 += einsum("ai,jiba->jb", l1.bb, t2.abab) * -1 rdm_eb_des_ov_aa += einsum("w,ia->wia", s1, x53) * -1 del x53 - x54 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x54 += einsum("wai,wib->ab", lu11.bb, u11.bb) - x58 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x58 += einsum("ab->ab", x54) - x67 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x67 += einsum("ab->ab", x54) del x54 - x55 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("abij,ijac->bc", l2.abab, t2.abab) x58 += einsum("ab->ab", x55) x67 += einsum("ab->ab", x55) del x55 - x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum("abij->jiab", l2.bbbb) * -1 x56 += einsum("abij->jiba", l2.bbbb) - x57 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x57 += einsum("ijab,ijca->bc", t2.bbbb, x56) del x56 x58 += einsum("ab->ba", x57) * -1 @@ -6045,13 +6046,13 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x58 x67 += einsum("ab->ba", x57) * -1 del x57 - x61 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x61 += einsum("ia,bajk->jkib", t1.bb, l2.abab) x65 += einsum("ijab,ijka->kb", t2.abab, x61) del x61 - x62 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x62 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x63 += einsum("ijka->ijka", x62) * -1 x63 += einsum("ijka->jika", x62) del x62 @@ -6076,13 +6077,13 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_ov_bb += einsum("wai,ijab->wjb", lu11.aa, t2.abab) rdm_eb_cre_ov_bb += einsum("w,ia->wia", ls1, t1.bb) rdm_eb_cre_ov_bb += einsum("wx,xia->wia", ls2, u11.bb) - rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_cre_vo_aa += einsum("wai->wai", lu11.aa) - rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_cre_vo_bb += einsum("wai->wai", lu11.bb) - rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_cre_vv_aa += einsum("ia,wbi->wba", t1.aa, lu11.aa) - rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_cre_vv_bb += einsum("ia,wbi->wba", t1.bb, lu11.bb) rdm_eb_des_ov_aa += einsum("wia->wia", u11.aa) rdm_eb_des_ov_bb += einsum("wia->wia", u11.bb) diff --git a/ebcc/codegen/UCCSD_SD_1_2.py b/ebcc/codegen/UCCSD_SD_1_2.py index c9063289..9886ef63 100644 --- a/ebcc/codegen/UCCSD_SD_1_2.py +++ b/ebcc/codegen/UCCSD_SD_1_2.py @@ -2,34 +2,35 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, s2=None, u11=None, u12=None, **kwargs): # Energy - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x0 += einsum("iajb->jiba", v.aaaa.ovov) - x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum("ijab->jiba", t2.aaaa) x1 += einsum("ia,jb->ijab", t1.aa, t1.aa) e_cc = 0 e_cc += einsum("ijab,ijba->", x0, x1) * -0.5 del x0 del x1 - x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x2 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x2 += einsum("iajb->jiba", v.bbbb.ovov) - x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum("ijab->jiba", t2.bbbb) x3 += einsum("ia,jb->ijab", t1.bb, t1.bb) e_cc += einsum("ijab,ijba->", x2, x3) * -0.5 del x2 del x3 - x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x4 += einsum("ijab->ijab", t2.abab) x4 += einsum("ia,jb->ijab", t1.aa, t1.bb) e_cc += einsum("iajb,ijab->", v.aabb.ovov, x4) del x4 - x5 = np.zeros((nbos), dtype=np.float64) + x5 = np.zeros((nbos), dtype=types[float]) x5 += einsum("w->w", G) x5 += einsum("ia,wia->w", t1.aa, g.aa.bov) x5 += einsum("ia,wia->w", t1.bb, g.bb.bov) @@ -65,370 +66,370 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1, S2, U11 and U12 amplitudes - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum("ia,jbka->ijkb", t1.aa, v.aaaa.ovov) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum("ijka->ijka", x0) x1 += einsum("ijka->ikja", x0) * -1 - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum("ijka->ijka", x0) x69 -= einsum("ijka->ikja", x0) - x127 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x127 += einsum("ia,jkla->jilk", t1.aa, x0) - x128 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x128 += einsum("ijab,klij->lkba", t2.aaaa, x127) - x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum("ijab->ijab", x128) del x128 - x133 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x133 += einsum("ia,jkli->jkla", t1.aa, x127) del x127 - x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum("ia,jkib->jkab", t1.aa, x133) del x133 - x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x141 += einsum("ijab->ijab", x134) del x134 - x259 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x259 += einsum("ijka->jkia", x0) * -1 x259 += einsum("ijka->kjia", x0) del x0 x1 += einsum("ijka->jika", v.aaaa.ooov) * -1 x1 += einsum("ijka->jkia", v.aaaa.ooov) - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum("ijab,kjib->ka", t2.aaaa, x1) * -1 del x1 - x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x2 += einsum("iabc->ibca", v.aaaa.ovvv) - x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x99 += einsum("ia,jbca->ijbc", t1.aa, x2) - x105 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x105 += einsum("ia,ibca->bc", t1.aa, x2) - x106 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x106 += einsum("ab->ab", x105) * -1 del x105 t1new_aa += einsum("ijab,icab->jc", t2.aaaa, x2) * -1 del x2 - x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x4 += einsum("ijka->jika", x3) - x112 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x112 += einsum("ijab,kljb->kila", t2.abab, x3) del x3 - x115 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x115 += einsum("ijka->ikja", x112) del x112 x4 += einsum("ijka->ijka", v.aabb.ooov) - x283 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x283 += einsum("ijab,iklb->kjla", t2.abab, x4) - x287 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x287 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x287 += einsum("ijka->ikja", x283) * -1 del x283 - x374 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x374 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x374 += einsum("wxia,jkia->xwjk", u12.bb, x4) t1new_aa += einsum("ijab,ikjb->ka", t2.abab, x4) * -1 - x5 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.aa.bov) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ia->ia", x5) - x73 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("ia->ia", x5) - x297 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x297 += einsum("ia->ia", x5) - x321 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x321 += einsum("ia->ia", x5) - x343 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x343 += einsum("ia->ia", x5) del x5 - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) x9 += einsum("ia->ia", x6) - x97 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x97 += einsum("ia,ja->ij", t1.aa, x6) - x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x98 += einsum("ij,kjab->ikab", x97, t2.aaaa) del x97 - x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum("ijab->ijab", x98) * -1 del x98 - x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x113 += einsum("ia,jkba->jkib", x6, t2.aaaa) x115 += einsum("ijka->ikja", x113) * -1 del x113 x297 += einsum("ia->ia", x6) - x316 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x316 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x316 += einsum("ia->ia", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("iajb->jiab", v.aaaa.ovov) x7 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ia,ijab->jb", t1.aa, x7) x9 += einsum("ia->ia", x8) * -1 x316 += einsum("ia->ia", x8) * -1 del x8 - x317 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x317 += einsum("ia,ib->ab", t1.aa, x316) * -1 - x365 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x365 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x365 += einsum("ia,wja->wij", x316, u11.aa) del x316 - x366 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x366 += einsum("wia,xij->xwja", u11.aa, x365) del x365 - x367 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x367 += einsum("wxia->wxia", x366) del x366 - x23 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x23 += einsum("ijab,ikab->jk", t2.aaaa, x7) - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum("ij->ji", x23) * -1 - x117 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x117 += einsum("ij->ji", x23) * -1 del x23 - x104 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x104 += einsum("ijab,ijcb->ac", t2.aaaa, x7) x106 += einsum("ab->ab", x104) * -1 del x104 - x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x231 += einsum("ijab,ikac->kjcb", t2.abab, x7) - x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x232 += einsum("ijab->ijab", x231) * -1 del x231 - x311 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x311 += einsum("wia,ijab->wjb", u11.aa, x7) - x312 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x312 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x312 += einsum("wia->wia", x311) * -1 - x360 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x360 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x360 += einsum("wia->wia", x311) * -1 del x311 - x369 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x369 += einsum("wxia,ijab->wxjb", u12.aa, x7) del x7 - x370 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x370 += einsum("wxia->xwia", x369) * -1 del x369 x9 += einsum("ia->ia", f.aa.ov) - x26 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x26 += einsum("ia,ja->ij", t1.aa, x9) x27 += einsum("ij->ji", x26) del x26 - x263 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x263 += einsum("ia,jkab->jikb", x9, t2.abab) - x269 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x269 += einsum("ijka->jika", x263) del x263 x374 += einsum("ia,wxja->xwij", x9, u12.aa) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum("ia,ijab->jb", x9, t2.abab) - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum("ijab->jiab", t2.aaaa) x10 += einsum("ijab->jiba", t2.aaaa) * -1 - x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum("ijab,kica->kjcb", x10, x99) * -1 del x99 x119 += einsum("ijab->ijba", x100) * -1 del x100 t1new_aa += einsum("ia,ijab->jb", x9, x10) * -1 del x9 - x11 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("w,wia->ia", s1, g.bb.bov) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum("ia->ia", x11) - x154 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x154 += einsum("ia->ia", x11) - x296 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x296 += einsum("ia->ia", x11) - x332 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x332 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x332 += einsum("ia->ia", x11) - x379 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x379 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x379 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x15 += einsum("ia->ia", x12) - x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum("ia,jkab->kjib", x12, t2.bbbb) - x196 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x196 += einsum("ijka->ikja", x193) * -1 del x193 - x206 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x206 += einsum("ia,ja->ij", t1.bb, x12) - x207 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x207 += einsum("ij->ij", x206) del x206 x296 += einsum("ia->ia", x12) - x327 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x327 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x327 += einsum("ia->ia", x12) del x12 - x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x13 += einsum("iajb->jiab", v.bbbb.ovov) x13 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum("ia,ijab->jb", t1.bb, x13) x15 += einsum("ia->ia", x14) * -1 x327 += einsum("ia->ia", x14) * -1 del x14 - x328 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x328 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x328 += einsum("ia,ib->ab", t1.bb, x327) * -1 - x401 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x401 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x401 += einsum("ia,wja->wij", x327, u11.bb) del x327 - x402 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x402 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x402 += einsum("wij->wji", x401) del x401 - x271 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x271 += einsum("ijab,ijbc->ca", t2.bbbb, x13) - x272 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x272 += einsum("ab->ba", x271) * -1 x328 += einsum("ab->ba", x271) * -1 del x271 - x314 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x314 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x314 += einsum("wia,ijab->wjb", u11.bb, x13) - x315 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x315 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x315 += einsum("wia->wia", x314) * -1 - x405 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x405 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x405 += einsum("wia,xja->xwji", u11.bb, x314) * -1 - x406 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x406 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x406 += einsum("wxij->xwji", x405) del x405 - x408 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x408 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x408 += einsum("ia,wja->wji", t1.bb, x314) * -1 del x314 - x409 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x409 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x409 += einsum("wia,xij->xwja", u11.bb, x408) del x408 - x410 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x410 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x410 += einsum("wxia->xwia", x409) del x409 - x372 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x372 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x372 += einsum("wxia,ijab->wxjb", u12.bb, x13) del x13 - x373 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x373 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x373 += einsum("wxia->xwia", x372) * -1 del x372 x15 += einsum("ia->ia", f.bb.ov) - x53 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x53 += einsum("ia,ja->ij", t1.bb, x15) - x54 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x54 += einsum("ij->ji", x53) del x53 - x284 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x284 += einsum("ia,jkba->jkib", x15, t2.abab) x287 += einsum("ijka->ikja", x284) del x284 - x413 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x413 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x413 += einsum("ia,wxja->xwij", x15, u12.bb) t1new_aa += einsum("ia,jiba->jb", x15, t2.abab) - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum("iabj->ijba", v.aaaa.ovvo) x16 -= einsum("ijab->ijab", v.aaaa.oovv) - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum("ia,jkba->ijkb", t1.aa, x16) - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 -= einsum("ijka->jika", x75) del x75 t1new_aa += einsum("ia,ijba->jb", t1.aa, x16) - u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) u11new_aa += einsum("wia,ijba->wjb", u11.aa, x16) - x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x17 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x18 += einsum("wij->wij", x17) del x17 x18 += einsum("wij->wij", g.aa.boo) - x84 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x84 += einsum("ia,wij->wja", t1.aa, x18) - x85 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x85 -= einsum("wia->wia", x84) del x84 t1new_aa -= einsum("wia,wij->ja", u11.aa, x18) u11new_aa -= einsum("wij,wxia->xja", x18, u12.aa) del x18 - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum("w,wij->ij", s1, g.aa.boo) x27 += einsum("ij->ij", x19) - x79 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x79 += einsum("ij->ji", x19) del x19 - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x27 += einsum("ij->ij", x20) - x92 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x92 += einsum("ij->ij", x20) del x20 - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x27 += einsum("ij->ij", x21) x92 += einsum("ij->ij", x21) del x21 - x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x93 += einsum("ij,ikab->jkab", x92, t2.aaaa) del x92 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 -= einsum("ijab->jiba", x93) del x93 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x27 += einsum("ij->ji", x22) x117 += einsum("ij->ji", x22) del x22 - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum("ijka->ikja", v.aaaa.ooov) x24 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x25 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("ia,ijka->jk", t1.aa, x24) x27 += einsum("ij->ij", x25) * -1 x117 += einsum("ij->ij", x25) * -1 del x25 - x118 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum("ij,ikab->jkab", x117, t2.aaaa) del x117 x119 += einsum("ijab->jiba", x118) del x118 - x114 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x114 += einsum("ijab,kila->jklb", x10, x24) x115 += einsum("ijka->ijka", x114) del x114 - x322 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x322 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x322 += einsum("wia,ijka->wjk", u11.aa, x24) * -1 del x24 x27 += einsum("ij->ij", f.aa.oo) - x290 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x290 += einsum("ij,ikab->jkab", x27, t2.abab) - t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) t2new_baba += einsum("ijab->jiba", x290) * -1 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum("ijab->ijab", x290) * -1 del x290 t1new_aa += einsum("ia,ij->ja", t1.aa, x27) * -1 u11new_aa += einsum("ij,wia->wja", x27, u11.aa) * -1 - u12new_aa = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + u12new_aa = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) u12new_aa += einsum("ij,wxia->xwja", x27, u12.aa) * -1 del x27 - x28 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x28 += einsum("w,wab->ab", s1, g.aa.bvv) - x32 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x32 += einsum("ab->ab", x28) - x87 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x87 += einsum("ab->ab", x28) - x276 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x276 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x276 += einsum("ab->ab", x28) x317 += einsum("ab->ab", x28) del x28 - x29 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x29 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x32 += einsum("ab->ab", x29) - x90 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x90 -= einsum("ab->ba", x29) x276 += einsum("ab->ab", x29) x317 += einsum("ab->ab", x29) del x29 - x30 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x30 += einsum("iabc->ibac", v.aaaa.ovvv) x30 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x31 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x31 += einsum("ia,ibca->bc", t1.aa, x30) del x30 x32 += einsum("ab->ab", x31) * -1 @@ -438,46 +439,46 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x32 += einsum("ab->ab", f.aa.vv) t1new_aa += einsum("ia,ba->ib", t1.aa, x32) del x32 - x33 = np.zeros((nbos), dtype=np.float64) + x33 = np.zeros((nbos), dtype=types[float]) x33 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x35 = np.zeros((nbos), dtype=np.float64) + x35 = np.zeros((nbos), dtype=types[float]) x35 += einsum("w->w", x33) del x33 - x34 = np.zeros((nbos), dtype=np.float64) + x34 = np.zeros((nbos), dtype=types[float]) x34 += einsum("ia,wia->w", t1.bb, g.bb.bov) x35 += einsum("w->w", x34) del x34 x35 += einsum("w->w", G) t1new_aa += einsum("w,wia->ia", x35, u11.aa) t1new_bb += einsum("w,wia->ia", x35, u11.bb) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("w,wx->x", x35, s2) u11new_aa += einsum("w,wxia->xia", x35, u12.aa) - u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) u11new_bb += einsum("w,wxia->xia", x35, u12.bb) del x35 - x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x36 += einsum("ia,jbka->ijkb", t1.bb, v.bbbb.ovov) - x37 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x37 += einsum("ijka->ijka", x36) * -1 x37 += einsum("ijka->ikja", x36) - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 -= einsum("ijka->ijka", x36) x151 += einsum("ijka->ikja", x36) - x216 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x216 += einsum("ia,jkla->jilk", t1.bb, x36) - x217 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x217 += einsum("ijkl->ijkl", x216) - x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x223 += einsum("ia,jkli->jkla", t1.bb, x216) del x216 - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 += einsum("ia,jkib->jkab", t1.bb, x223) del x223 - x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x228 += einsum("ijab->ijab", x224) del x224 - x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x280 += einsum("ijka->jkia", x36) * -1 x280 += einsum("ijka->kjia", x36) del x36 @@ -485,178 +486,178 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x37 += einsum("ijka->jkia", v.bbbb.ooov) * -1 t1new_bb += einsum("ijab,kijb->ka", t2.bbbb, x37) * -1 del x37 - x38 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x38 += einsum("iabc->ibca", v.bbbb.ovvv) - x57 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x57 += einsum("ia,ibac->bc", t1.bb, x38) - x58 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x58 += einsum("ab->ab", x57) * -1 x272 += einsum("ab->ab", x57) * -1 x328 += einsum("ab->ab", x57) * -1 del x57 t1new_bb += einsum("ijab,icab->jc", t2.bbbb, x38) * -1 del x38 - x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x39 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x40 += einsum("ijka->ikja", x39) - x192 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x192 += einsum("ijab,ikla->kjlb", t2.abab, x39) x196 += einsum("ijka->ikja", x192) del x192 - x250 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x250 += einsum("ijka->ikja", x39) del x39 x40 += einsum("iajk->ijka", v.aabb.ovoo) - x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x262 += einsum("ijab,kjla->iklb", t2.abab, x40) x269 += einsum("ijka->jika", x262) * -1 del x262 - x264 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x264 += einsum("ia,jkla->ijkl", t1.aa, x40) - x265 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x265 += einsum("ijkl->jikl", x264) del x264 - x282 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x282 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x282 += einsum("ijab,ikla->jklb", x10, x40) x287 += einsum("ijka->ijka", x282) * -1 del x282 x413 += einsum("wxia,ijka->xwjk", u12.aa, x40) t1new_bb += einsum("ijab,ijka->kb", t2.abab, x40) * -1 del x40 - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum("ijab->jiab", t2.bbbb) x41 += einsum("ijab->jiba", t2.bbbb) * -1 - x186 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x186 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x41) - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 += einsum("ijab,ikac->kjcb", t2.abab, x186) * -1 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum("ijab->jiba", x187) * -1 del x187 x232 += einsum("ijab->ijab", x186) * -1 del x186 - x261 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x261 += einsum("ijka,klab->ijlb", x4, x41) del x4 x269 += einsum("ijka->ijka", x261) * -1 del x261 t1new_bb += einsum("ia,ijab->jb", x15, x41) * -1 del x15 - x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x42 += einsum("iabj->ijba", v.bbbb.ovvo) x42 -= einsum("ijab->ijab", v.bbbb.oovv) - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum("ia,jkba->ijkb", t1.bb, x42) - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x157 -= einsum("ijka->jika", x156) del x156 t1new_bb += einsum("ia,ijba->jb", t1.bb, x42) u11new_bb += einsum("wia,ijba->wjb", u11.bb, x42) - x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x44 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x44 += einsum("wij->wij", x43) del x43 x44 += einsum("wij->wij", g.bb.boo) - x166 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x166 += einsum("ia,wij->wja", t1.bb, x44) - x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x167 -= einsum("wia->wia", x166) del x166 t1new_bb -= einsum("wia,wij->ja", u11.bb, x44) u11new_bb -= einsum("wij,wxia->xja", x44, u12.bb) del x44 - x45 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x45 += einsum("w,wij->ij", s1, g.bb.boo) x54 += einsum("ij->ij", x45) - x160 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x160 += einsum("ij->ji", x45) del x45 - x46 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x46 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x54 += einsum("ij->ij", x46) - x174 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x174 += einsum("ij->ij", x46) del x46 - x47 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x47 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x54 += einsum("ij->ij", x47) x174 += einsum("ij->ij", x47) del x47 - x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x175 += einsum("ij,ikab->jkab", x174, t2.bbbb) del x174 - x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 -= einsum("ijab->jiba", x175) del x175 - x48 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x48 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x54 += einsum("ij->ji", x48) x207 += einsum("ij->ij", x48) del x48 - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum("ij,jkab->ikab", x207, t2.bbbb) del x207 x209 += einsum("ijab->ijba", x208) * -1 del x208 - x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x49 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x49 += einsum("iajb->jiba", v.bbbb.ovov) - x50 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x50 += einsum("ijab,ikba->jk", t2.bbbb, x49) x54 += einsum("ij->ji", x50) * -1 del x50 - x198 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("ijab,ijbc->ac", t2.bbbb, x49) - x200 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x200 += einsum("ab->ab", x198) * -1 del x198 - x202 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x202 += einsum("ijab,ikab->jk", t2.bbbb, x49) - x204 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x204 += einsum("ij->ji", x202) * -1 del x202 - x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x235 += einsum("ijab,ikca->jkbc", x41, x49) del x49 - x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x236 += einsum("ijab->jiab", x235) del x235 - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum("ijka->ikja", v.bbbb.ooov) x51 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x52 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x52 += einsum("ia,ijka->jk", t1.bb, x51) x54 += einsum("ij->ij", x52) * -1 del x52 - x333 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x333 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x333 += einsum("wia,ijka->wjk", u11.bb, x51) * -1 del x51 x54 += einsum("ij->ij", f.bb.oo) - x289 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x289 += einsum("ij,kiab->kjab", x54, t2.abab) t2new_baba += einsum("ijab->jiba", x289) * -1 t2new_abab += einsum("ijab->ijab", x289) * -1 del x289 t1new_bb += einsum("ia,ij->ja", t1.bb, x54) * -1 u11new_bb += einsum("ij,wia->wja", x54, u11.bb) * -1 - u12new_bb = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + u12new_bb = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) u12new_bb += einsum("ij,wxia->xwja", x54, u12.bb) * -1 del x54 - x55 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("w,wab->ab", s1, g.bb.bvv) x58 += einsum("ab->ab", x55) - x169 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x169 += einsum("ab->ab", x55) x272 += einsum("ab->ab", x55) x328 += einsum("ab->ab", x55) del x55 - x56 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x56 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x58 += einsum("ab->ab", x56) - x172 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x172 -= einsum("ab->ba", x56) x272 += einsum("ab->ab", x56) x328 += einsum("ab->ab", x56) @@ -664,145 +665,145 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x58 += einsum("ab->ab", f.bb.vv) t1new_bb += einsum("ia,ba->ib", t1.bb, x58) del x58 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum("ia,bjca->ijbc", t1.aa, v.aaaa.vovv) x94 -= einsum("ijab->ijab", x59) del x59 - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum("ijab,jbck->ikac", t2.abab, v.bbaa.ovvo) x94 += einsum("ijab->ijab", x60) del x60 - x61 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x61 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum("ijab,kjcb->kiac", t2.abab, x61) x94 -= einsum("ijab->ijab", x62) del x62 - x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x238 += einsum("ijab->ijab", x61) del x61 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 -= einsum("ijab->jiab", t2.aaaa) x63 += einsum("ijab->jiba", t2.aaaa) - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ijab,ikcb->kjca", x16, x63) del x16 x94 -= einsum("ijab->ijab", x64) del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("iajb->jiab", v.aaaa.ovov) x65 -= einsum("iajb->jiba", v.aaaa.ovov) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("ijab,ikbc->kjca", t2.aaaa, x65) - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 -= einsum("ijab,ikac->kjcb", t2.aaaa, x66) x94 -= einsum("ijab->jiba", x67) del x67 - x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x137 -= einsum("ijab,ikbc->kjca", t2.aaaa, x66) del x66 x141 += einsum("ijab->jiba", x137) del x137 - x72 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x72 += einsum("ia,ijab->jb", t1.aa, x65) x73 -= einsum("ia->ia", x72) x297 -= einsum("ia->ia", x72) del x72 - x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum("ijab,ikac->kjcb", t2.aaaa, x65) - x136 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x136 -= einsum("ijab,ikac->kjcb", t2.aaaa, x135) del x135 x141 += einsum("ijab->ijab", x136) del x136 - x177 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x177 += einsum("ijab,ikac->kjcb", t2.abab, x65) - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 -= einsum("ijab,ikac->kjcb", t2.abab, x177) del x177 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb -= einsum("ijab->ijba", x178) t2new_bbbb += einsum("ijab->jiba", x178) del x178 - x308 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x308 -= einsum("wia,ijab->wjb", u11.aa, x65) del x65 - s2new = np.zeros((nbos, nbos), dtype=np.float64) + s2new = np.zeros((nbos, nbos), dtype=types[float]) s2new += einsum("wia,xia->wx", u11.aa, x308) del x308 - x68 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x68 += einsum("ijab,kljb->ikla", t2.abab, v.aabb.ooov) x76 += einsum("ijka->jika", x68) del x68 - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum("ijab->jiab", t2.aaaa) x70 -= einsum("ijab->jiba", t2.aaaa) - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x71 += einsum("ijka,jlab->iklb", x69, x70) del x69 x76 += einsum("ijka->jika", x71) del x71 - x83 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x83 += einsum("wia,ijab->wjb", g.aa.bov, x70) del x70 x85 -= einsum("wia->wia", x83) del x83 x73 += einsum("ia->ia", f.aa.ov) - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum("ia,jkab->ijkb", x73, t2.aaaa) x76 += einsum("ijka->ikja", x74) del x74 - x78 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x78 += einsum("ia,ja->ji", t1.aa, x73) del x73 x79 += einsum("ij->ji", x78) del x78 x76 -= einsum("ijak->ijka", v.aaaa.oovo) - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum("ia,ijkb->jkba", t1.aa, x76) del x76 x94 += einsum("ijab->ijba", x77) del x77 x79 += einsum("ij->ji", f.aa.oo) - x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x80 += einsum("ij,jkab->ikab", x79, t2.aaaa) del x79 x94 += einsum("ijab->ijba", x80) del x80 - x81 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) x85 += einsum("wia->wia", x81) del x81 - x82 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x85 += einsum("wia->wia", x82) del x82 x85 += einsum("wai->wia", g.aa.bvo) - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum("wia,wjb->jiba", u11.aa, x85) x94 += einsum("ijab->ijab", x86) del x86 - x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("wia,wjb->jiba", u11.bb, x85) del x85 t2new_baba += einsum("ijab->jiba", x292) t2new_abab += einsum("ijab->ijab", x292) del x292 x87 += einsum("ab->ab", f.aa.vv) - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum("ab,ijbc->ijac", x87, t2.aaaa) del x87 x94 -= einsum("ijab->jiab", x88) del x88 - x89 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x89 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x90 += einsum("ab->ab", x89) - x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum("ab,ijac->ijbc", x90, t2.aaaa) del x90 x94 -= einsum("ijab->jiba", x91) del x91 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum("ijab->ijab", x94) t2new_aaaa -= einsum("ijab->ijba", x94) t2new_aaaa -= einsum("ijab->jiab", x94) @@ -811,28 +812,28 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x276 += einsum("ab->ba", x89) * -1 x317 += einsum("ab->ba", x89) * -1 del x89 - x95 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x95 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum("ijab,kjil->klba", t2.aaaa, x95) x119 += einsum("ijab->ijab", x96) del x96 - x108 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x108 += einsum("ia,jkil->jkla", t1.aa, x95) del x95 x115 += einsum("ijka->ijka", x108) del x108 - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) - x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x102 += einsum("ijab,kicb->kjca", x10, x101) del x101 x119 += einsum("ijab->jiba", x102) * -1 del x102 - x103 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x103 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x106 += einsum("ab->ab", x103) - x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("ab,ijbc->ijac", x106, t2.aaaa) del x106 x119 += einsum("ijab->jiba", x107) @@ -840,18 +841,18 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x276 += einsum("ab->ab", x103) * -1 x317 += einsum("ab->ab", x103) * -1 del x103 - x109 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x109 += einsum("ijab,kacb->ijkc", t2.aaaa, v.aaaa.ovvv) x115 += einsum("ijka->ikja", x109) del x109 - x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) - x111 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x111 += einsum("ia,jkba->ijkb", t1.aa, x110) del x110 x115 += einsum("ijka->ikja", x111) del x111 - x116 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x116 += einsum("ia,jikb->jkba", t1.aa, x115) del x115 x119 += einsum("ijab->ijba", x116) @@ -861,39 +862,39 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->jiab", x119) t2new_aaaa += einsum("ijab->jiba", x119) * -1 del x119 - x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum("ijab,ikjl->lkba", t2.aaaa, v.aaaa.oooo) - x122 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum("ijab->jiba", x120) del x120 - x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum("ijab,cadb->ijcd", t2.aaaa, v.aaaa.vvvv) x122 += einsum("ijab->jiba", x121) del x121 t2new_aaaa += einsum("ijab->ijba", x122) * -1 t2new_aaaa += einsum("ijab->ijab", x122) del x122 - x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x123 += einsum("ia,bacd->icbd", t1.aa, v.aaaa.vvvv) - x124 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x124 += einsum("ia,jbca->ijbc", t1.aa, x123) del x123 x132 += einsum("ijab->ijab", x124) del x124 - x125 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x125 += einsum("ijab,kbla->ijlk", t2.aaaa, v.aaaa.ovov) - x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum("ijab,klji->lkab", t2.aaaa, x125) x132 += einsum("ijab->ijab", x126) del x126 - x129 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x129 += einsum("ijkl->lkji", x125) del x125 x129 += einsum("ijkl->kilj", v.aaaa.oooo) - x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x130 += einsum("ia,ijkl->jkla", t1.aa, x129) del x129 - x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum("ia,ijkb->kjba", t1.aa, x130) del x130 x132 += einsum("ijab->ijba", x131) @@ -901,12 +902,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x132) t2new_aaaa += einsum("ijab->ijba", x132) * -1 del x132 - x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x138 += einsum("iajb->jiab", v.bbbb.ovov) x138 -= einsum("iajb->jiba", v.bbbb.ovov) - x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x139 += einsum("ijab,jkbc->ikac", t2.abab, x138) - x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x140 -= einsum("ijab,kjcb->kica", t2.abab, x139) del x139 x141 += einsum("ijab->ijab", x140) @@ -914,25 +915,25 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x141) t2new_aaaa -= einsum("ijab->ijba", x141) del x141 - x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x148 += einsum("ijab,ikbc->kjca", t2.bbbb, x138) - x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x149 -= einsum("ijab,ikac->kjcb", t2.bbbb, x148) x176 -= einsum("ijab->jiba", x149) del x149 - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 -= einsum("ijab,ikbc->kjca", t2.bbbb, x148) del x148 x228 += einsum("ijab->ijab", x227) del x227 - x153 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x153 += einsum("ia,ijab->jb", t1.bb, x138) x154 -= einsum("ia->ia", x153) x296 -= einsum("ia->ia", x153) del x153 - x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x225 += einsum("ijab,ikac->kjcb", t2.bbbb, x138) - x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x226 -= einsum("ijab,ikac->kjcb", t2.bbbb, x225) del x225 x228 += einsum("ijab->jiba", x226) @@ -940,107 +941,107 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x228) t2new_bbbb -= einsum("ijab->ijba", x228) del x228 - x307 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x307 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x307 -= einsum("wia,ijab->wjb", u11.bb, x138) del x138 s2new += einsum("wia,xia->wx", u11.bb, x307) del x307 - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum("ia,bjca->ijbc", t1.bb, v.bbbb.vovv) x176 -= einsum("ijab->ijab", x142) del x142 - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum("ijab,iack->jkbc", t2.abab, v.aabb.ovvo) x176 += einsum("ijab->ijab", x143) del x143 - x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x144 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum("ijab,ikac->kjbc", t2.abab, x144) x176 -= einsum("ijab->ijab", x145) del x145 x232 += einsum("ijab->ijab", x144) - x267 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x267 += einsum("ijab->ijab", x144) - x412 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x412 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x412 += einsum("ijab->ijab", x144) del x144 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 -= einsum("ijab->jiab", t2.bbbb) x146 += einsum("ijab->jiba", t2.bbbb) - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum("ijab,ikcb->jkac", x146, x42) del x42 x176 -= einsum("ijab->ijab", x147) del x147 - x152 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x152 += einsum("ijab,klib->jkla", x146, x151) del x146 del x151 x157 += einsum("ijka->kjia", x152) del x152 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum("ijab,iakl->jklb", t2.abab, v.aabb.ovoo) x157 += einsum("ijka->jika", x150) del x150 x154 += einsum("ia->ia", f.bb.ov) - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 += einsum("ia,jkab->ijkb", x154, t2.bbbb) x157 += einsum("ijka->ikja", x155) del x155 - x159 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x159 += einsum("ia,ja->ji", t1.bb, x154) del x154 x160 += einsum("ij->ji", x159) del x159 x157 -= einsum("ijak->ijka", v.bbbb.oovo) - x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum("ia,ijkb->jkba", t1.bb, x157) del x157 x176 += einsum("ijab->ijba", x158) del x158 x160 += einsum("ij->ji", f.bb.oo) - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum("ij,jkab->ikab", x160, t2.bbbb) del x160 x176 += einsum("ijab->ijba", x161) del x161 - x162 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x162 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) x167 += einsum("wia->wia", x162) del x162 - x163 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x163 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x167 += einsum("wia->wia", x163) del x163 - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum("ijab->jiab", t2.bbbb) x164 -= einsum("ijab->jiba", t2.bbbb) - x165 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x165 += einsum("wia,ijab->wjb", g.bb.bov, x164) x167 -= einsum("wia->wia", x165) del x165 x167 += einsum("wai->wia", g.bb.bvo) - x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x168 += einsum("wia,wjb->jiba", u11.bb, x167) x176 += einsum("ijab->ijab", x168) del x168 - x291 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x291 += einsum("wia,wjb->ijab", u11.aa, x167) del x167 t2new_baba += einsum("ijab->jiba", x291) t2new_abab += einsum("ijab->ijab", x291) del x291 x169 += einsum("ab->ab", f.bb.vv) - x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x170 += einsum("ab,ijbc->ijac", x169, t2.bbbb) del x169 x176 -= einsum("ijab->jiab", x170) del x170 - x171 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x171 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x172 += einsum("ab->ab", x171) - x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x173 += einsum("ab,ijac->ijbc", x172, t2.bbbb) del x172 x176 -= einsum("ijab->jiba", x173) @@ -1053,76 +1054,76 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x272 += einsum("ab->ba", x171) * -1 x328 += einsum("ab->ba", x171) * -1 del x171 - x179 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x179 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum("ijab,kijl->klab", t2.bbbb, x179) x209 += einsum("ijab->ijab", x180) del x180 - x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum("ia,jkil->jkla", t1.bb, x179) del x179 x196 += einsum("ijka->ijka", x188) del x188 - x181 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x181 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum("ab,ijbc->jiac", x181, t2.bbbb) x209 += einsum("ijab->ijab", x182) * -1 del x182 x272 += einsum("ab->ab", x181) * -1 x328 += einsum("ab->ab", x181) * -1 del x181 - x183 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum("iabc->ibac", v.bbbb.ovvv) x183 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x184 += einsum("ia,jbac->jibc", t1.bb, x183) - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum("ijab,ikbc->jkac", x184, x41) * -1 x209 += einsum("ijab->ijba", x185) * -1 del x185 x236 += einsum("ijab->ijab", x184) * -1 del x184 - x199 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x199 += einsum("ia,ibac->bc", t1.bb, x183) del x183 x200 += einsum("ab->ab", x199) * -1 del x199 - x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 += einsum("ab,ijbc->ijac", x200, t2.bbbb) del x200 x209 += einsum("ijab->jiba", x201) del x201 - x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum("ijab,kbca->jikc", t2.bbbb, v.bbbb.ovvv) x196 += einsum("ijka->ikja", x189) del x189 - x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x190 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) - x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x191 += einsum("ia,jkba->ijkb", t1.bb, x190) del x190 x196 += einsum("ijka->ikja", x191) del x191 - x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x194 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x194 += einsum("ijka->kija", v.bbbb.ooov) - x195 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x195 += einsum("ijka,ilab->jklb", x194, x41) x196 += einsum("ijka->kija", x195) del x195 - x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum("ia,jikb->jkba", t1.bb, x196) del x196 x209 += einsum("ijab->ijba", x197) del x197 - x203 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x203 += einsum("ia,ijka->jk", t1.bb, x194) del x194 x204 += einsum("ij->ij", x203) * -1 del x203 - x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x205 += einsum("ij,ikab->jkab", x204, t2.bbbb) del x204 x209 += einsum("ijab->jiba", x205) * -1 @@ -1132,42 +1133,42 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->jiab", x209) t2new_bbbb += einsum("ijab->jiba", x209) * -1 del x209 - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("ijab,ikjl->lkba", t2.bbbb, v.bbbb.oooo) - x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x212 += einsum("ijab->jiba", x210) del x210 - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum("ijab,cbda->ijdc", t2.bbbb, v.bbbb.vvvv) x212 += einsum("ijab->jiba", x211) del x211 t2new_bbbb += einsum("ijab->ijba", x212) * -1 t2new_bbbb += einsum("ijab->ijab", x212) del x212 - x213 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x213 += einsum("ia,bacd->icbd", t1.bb, v.bbbb.vvvv) - x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x214 += einsum("ia,jbca->ijbc", t1.bb, x213) del x213 - x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x222 += einsum("ijab->ijab", x214) del x214 - x215 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x215 += einsum("ijab,kbla->ijlk", t2.bbbb, v.bbbb.ovov) x217 += einsum("ijkl->jilk", x215) - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum("ijab,klji->klab", t2.bbbb, x217) del x217 x222 += einsum("ijab->jiab", x218) del x218 - x219 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x219 += einsum("ijkl->lkji", x215) del x215 x219 += einsum("ijkl->kilj", v.bbbb.oooo) - x220 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x220 += einsum("ia,ijkl->jkla", t1.bb, x219) del x219 - x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum("ia,ijkb->kjba", t1.bb, x220) del x220 x222 += einsum("ijab->jiab", x221) @@ -1175,132 +1176,132 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x222) t2new_bbbb += einsum("ijab->ijba", x222) * -1 del x222 - x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x229 += einsum("ijab,cadb->ijcd", t2.abab, v.aabb.vvvv) t2new_baba += einsum("ijab->jiba", x229) t2new_abab += einsum("ijab->ijab", x229) del x229 - x230 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x230 += einsum("ia,bjca->jibc", t1.bb, v.aabb.vovv) t2new_baba += einsum("ijab->jiba", x230) t2new_abab += einsum("ijab->ijab", x230) del x230 x232 += einsum("iabj->ijab", v.aabb.ovvo) - x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x233 += einsum("ijab,ikac->kjcb", x232, x63) del x232 del x63 t2new_baba += einsum("ijab->jiba", x233) t2new_abab += einsum("ijab->ijab", x233) del x233 - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x234 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) x236 += einsum("ijab->jiab", x234) del x234 x236 += einsum("iabj->ijba", v.bbbb.ovvo) x236 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x237 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x237 += einsum("ijab,jkcb->ikac", t2.abab, x236) del x236 t2new_baba += einsum("ijab->jiba", x237) t2new_abab += einsum("ijab->ijab", x237) del x237 x238 += einsum("iabj->jiba", v.bbaa.ovvo) - x239 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x239 += einsum("ijab,kicb->kjca", x164, x238) t2new_baba += einsum("ijab->jiba", x239) t2new_abab += einsum("ijab->ijab", x239) del x239 u12new_aa += einsum("wxia,jiba->xwjb", u12.bb, x238) del x238 - x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x240 -= einsum("iabc->ibac", v.aaaa.ovvv) x240 += einsum("iabc->ibca", v.aaaa.ovvv) - x241 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x241 += einsum("ia,jbca->jibc", t1.aa, x240) - x242 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x242 -= einsum("ijab->ijab", x241) del x241 - x340 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x340 += einsum("wia,ibca->wbc", u11.aa, x240) del x240 - x341 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x341 -= einsum("wab->wba", x340) del x340 x242 += einsum("iabj->ijba", v.aaaa.ovvo) x242 -= einsum("ijab->ijab", v.aaaa.oovv) - x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x243 += einsum("ijab,ikca->kjcb", t2.abab, x242) t2new_baba += einsum("ijab->jiba", x243) t2new_abab += einsum("ijab->ijab", x243) del x243 u12new_aa += einsum("wxia,ijba->xwjb", u12.aa, x242) del x242 - x244 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x244 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum("ijab->jiab", x244) del x244 - x245 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x246 -= einsum("ijab->jiab", x245) del x245 x246 += einsum("ijab->ijab", v.aabb.oovv) - x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x247 += einsum("ijab,ikcb->kjac", t2.abab, x246) del x246 t2new_baba -= einsum("ijab->jiba", x247) t2new_abab -= einsum("ijab->ijab", x247) del x247 - x248 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x248 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x252 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x252 += einsum("ijkl->ijlk", x248) x265 += einsum("ijkl->ijlk", x248) del x248 - x249 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x249 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x252 += einsum("ijkl->jilk", x249) x265 += einsum("ijkl->jilk", x249) del x249 x250 += einsum("iajk->ijka", v.aabb.ovoo) - x251 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x251 += einsum("ia,jkla->jikl", t1.aa, x250) del x250 x252 += einsum("ijkl->ijkl", x251) del x251 x252 += einsum("ijkl->ijkl", v.aabb.oooo) - x253 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x253 += einsum("ijab,ikjl->klab", t2.abab, x252) del x252 t2new_baba += einsum("ijab->jiba", x253) t2new_abab += einsum("ijab->ijab", x253) del x253 - x254 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x254 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x255 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x255 += einsum("ijab->jiab", x254) - x285 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x285 += einsum("ijab->jiab", x254) del x254 x255 += einsum("ijab->ijab", v.bbaa.oovv) - x256 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x256 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x256 += einsum("ijab,jkca->ikcb", t2.abab, x255) del x255 t2new_baba -= einsum("ijab->jiba", x256) t2new_abab -= einsum("ijab->ijab", x256) del x256 - x257 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x257 += einsum("ia,jkba->jkib", t1.bb, v.aabb.oovv) x269 += einsum("ijka->ijka", x257) del x257 - x258 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x258 += einsum("ijab,kacb->ikjc", t2.abab, v.aabb.ovvv) x269 += einsum("ijka->jika", x258) del x258 x259 += einsum("ijka->ikja", v.aaaa.ooov) x259 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x260 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x260 += einsum("ijab,ikla->kljb", t2.abab, x259) x269 += einsum("ijka->ijka", x260) * -1 del x260 @@ -1309,60 +1310,60 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u12new_aa += einsum("ia,wxij->xwja", t1.aa, x374) * -1 del x374 x265 += einsum("ijkl->ijkl", v.aabb.oooo) - x266 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x266 += einsum("ia,jkil->jkla", t1.bb, x265) del x265 x269 += einsum("ijka->ijka", x266) * -1 del x266 x267 += einsum("iabj->ijab", v.aabb.ovvo) - x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("ia,jkab->jikb", t1.aa, x267) del x267 x269 += einsum("ijka->ijka", x268) del x268 x269 += einsum("ijak->ijka", v.aabb.oovo) - x270 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x270 += einsum("ia,ijkb->jkab", t1.aa, x269) del x269 t2new_baba += einsum("ijab->jiba", x270) * -1 t2new_abab += einsum("ijab->ijab", x270) * -1 del x270 x272 += einsum("ab->ab", f.bb.vv) - x273 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x273 += einsum("ab,ijcb->ijca", x272, t2.abab) t2new_baba += einsum("ijab->jiba", x273) t2new_abab += einsum("ijab->ijab", x273) del x273 u12new_bb += einsum("ab,wxib->xwia", x272, u12.bb) del x272 - x274 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x274 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x274 += einsum("iajb->jiba", v.aaaa.ovov) - x275 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x275 += einsum("ijab,ijcb->ca", t2.aaaa, x274) del x274 x276 += einsum("ab->ba", x275) * -1 x317 += einsum("ab->ba", x275) * -1 del x275 x276 += einsum("ab->ab", f.aa.vv) - x277 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x277 += einsum("ab,ijbc->ijac", x276, t2.abab) t2new_baba += einsum("ijab->jiba", x277) t2new_abab += einsum("ijab->ijab", x277) del x277 u12new_aa += einsum("ab,wxib->xwia", x276, u12.aa) del x276 - x278 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x278 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x278 += einsum("ia,jabk->kijb", t1.bb, v.bbaa.ovvo) x287 += einsum("ijka->ikja", x278) del x278 - x279 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x279 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x279 += einsum("ijab,kbca->ijkc", t2.abab, v.bbaa.ovvv) x287 += einsum("ijka->ikja", x279) del x279 x280 += einsum("ijka->ikja", v.bbbb.ooov) x280 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x281 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x281 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x281 += einsum("ijab,jklb->ikla", t2.abab, x280) x287 += einsum("ijka->ijka", x281) * -1 del x281 @@ -1371,25 +1372,25 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u12new_bb += einsum("ia,wxij->xwja", t1.bb, x413) * -1 del x413 x285 += einsum("ijab->ijab", v.bbaa.oovv) - x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x286 += einsum("ia,jkba->ijkb", t1.aa, x285) del x285 x287 += einsum("ijka->ijka", x286) del x286 x287 += einsum("ijak->kija", v.bbaa.oovo) - x288 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x288 += einsum("ia,jikb->jkba", t1.bb, x287) del x287 t2new_baba += einsum("ijab->jiba", x288) * -1 t2new_abab += einsum("ijab->ijab", x288) * -1 del x288 - x293 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x293 += einsum("ia,bcda->ibcd", t1.bb, v.aabb.vvvv) - x294 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("iabc->iabc", x293) del x293 x294 += einsum("abci->iabc", v.aabb.vvvo) - x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x295 += einsum("ia,jbac->ijbc", t1.aa, x294) del x294 t2new_baba += einsum("ijab->jiba", x295) @@ -1403,31 +1404,31 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb s1new += einsum("ia,wia->w", x297, u11.aa) s2new += einsum("ia,wxia->xw", x297, u12.aa) del x297 - x298 = np.zeros((nbos, nbos), dtype=np.float64) + x298 = np.zeros((nbos, nbos), dtype=types[float]) x298 += einsum("wia,xia->wx", gc.aa.bov, u11.aa) - x306 = np.zeros((nbos, nbos), dtype=np.float64) + x306 = np.zeros((nbos, nbos), dtype=types[float]) x306 += einsum("wx->wx", x298) del x298 - x299 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x299 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) - x300 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x300 += einsum("wia->wia", x299) x315 += einsum("wia->wia", x299) - x400 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x400 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x400 += einsum("ia,wja->wij", t1.bb, x299) x402 += einsum("wij->wij", x400) del x400 - x403 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x403 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x403 += einsum("wia,xji->xwja", u11.bb, x402) del x402 x410 += einsum("wxia->wxia", x403) del x403 - x404 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x404 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x404 += einsum("wia,xja->xwij", u11.bb, x299) del x299 x406 += einsum("wxij->wxij", x404) del x404 - x407 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x407 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x407 += einsum("ia,wxji->wxja", t1.bb, x406) del x406 x410 += einsum("wxia->wxia", x407) @@ -1436,36 +1437,36 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u12new_bb += einsum("wxia->xwia", x410) * -1 del x410 x300 += einsum("wia->wia", gc.bb.bov) - x301 = np.zeros((nbos, nbos), dtype=np.float64) + x301 = np.zeros((nbos, nbos), dtype=types[float]) x301 += einsum("wia,xia->xw", u11.bb, x300) del x300 x306 += einsum("wx->wx", x301) del x301 - x302 = np.zeros((nbos, nbos), dtype=np.float64) + x302 = np.zeros((nbos, nbos), dtype=types[float]) x302 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x304 = np.zeros((nbos, nbos), dtype=np.float64) + x304 = np.zeros((nbos, nbos), dtype=types[float]) x304 += einsum("wx->wx", x302) - x357 = np.zeros((nbos, nbos), dtype=np.float64) + x357 = np.zeros((nbos, nbos), dtype=types[float]) x357 += einsum("wx->wx", x302) del x302 - x303 = np.zeros((nbos, nbos), dtype=np.float64) + x303 = np.zeros((nbos, nbos), dtype=types[float]) x303 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x304 += einsum("wx->wx", x303) x357 += einsum("wx->wx", x303) del x303 - x358 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x358 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x358 += einsum("wx,wyia->yxia", x357, u12.aa) - x359 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x359 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x359 -= einsum("wxia->xwia", x358) del x358 - x398 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x398 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x398 += einsum("wx,wyia->yxia", x357, u12.bb) del x357 - x399 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x399 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x399 -= einsum("wxia->xwia", x398) del x398 x304 += einsum("wx->wx", w) - x305 = np.zeros((nbos, nbos), dtype=np.float64) + x305 = np.zeros((nbos, nbos), dtype=types[float]) x305 += einsum("wx,wy->xy", s2, x304) x306 += einsum("wx->wx", x305) del x305 @@ -1475,28 +1476,28 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new_aa += einsum("wx,wia->xia", x304, u11.aa) u11new_bb += einsum("wx,wia->xia", x304, u11.bb) del x304 - x309 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x309 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x309 += einsum("wx,xia->wia", s2, g.aa.bov) x312 += einsum("wia->wia", x309) - x345 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x345 += einsum("wia->wia", x309) del x309 - x310 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x310 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x310 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x312 += einsum("wia->wia", x310) x360 += einsum("wia->wia", x310) del x310 - x361 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x361 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x361 += einsum("ia,wib->wba", t1.aa, x360) - x362 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x362 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x362 += einsum("wia,xab->xwib", u11.aa, x361) del x361 x367 += einsum("wxia->xwia", x362) del x362 - x363 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x363 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x363 += einsum("ia,wja->wji", t1.aa, x360) del x360 - x364 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x364 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x364 += einsum("wia,xij->xwja", u11.aa, x363) del x363 x367 += einsum("wxia->xwia", x364) @@ -1509,10 +1510,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u11new_aa += einsum("wia,ijab->wjb", x312, x10) * -1 u11new_bb += einsum("wia,ijab->wjb", x312, t2.abab) del x312 - x313 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x313 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x313 += einsum("wx,xia->wia", s2, g.bb.bov) x315 += einsum("wia->wia", x313) - x381 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x381 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x381 += einsum("wia->wia", x313) del x313 x315 += einsum("wia->wia", gc.bb.bov) @@ -1524,19 +1525,19 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x317 += einsum("ab->ab", f.aa.vv) u11new_aa += einsum("ab,wib->wia", x317, u11.aa) del x317 - x318 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x318 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x318 += einsum("wx,xij->wij", s2, g.aa.boo) x322 += einsum("wij->wij", x318) - x347 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x347 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x347 += einsum("wij->wij", x318) del x318 - x319 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x319 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x319 += einsum("wia,xwja->xij", g.aa.bov, u12.aa) x322 += einsum("wij->wij", x319) - x351 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x351 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x351 += einsum("wij->wij", x319) del x319 - x320 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x320 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x320 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) x322 += einsum("wij->wij", x320) x351 += einsum("wij->wij", x320) @@ -1547,19 +1548,19 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x322 += einsum("wij->wij", gc.aa.boo) u11new_aa += einsum("ia,wij->wja", t1.aa, x322) * -1 del x322 - x323 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x323 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x323 += einsum("wx,xab->wab", s2, g.aa.bvv) - x326 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x326 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x326 += einsum("wab->wab", x323) - x353 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x353 += einsum("wab->wab", x323) del x323 - x324 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x324 += einsum("wia,iabc->wbc", u11.bb, v.bbaa.ovvv) x326 += einsum("wab->wab", x324) x341 -= einsum("wab->wba", x324) del x324 - x325 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x325 += einsum("iabc->ibac", v.aaaa.ovvv) x325 -= einsum("iabc->ibca", v.aaaa.ovvv) x326 -= einsum("wia,ibca->wbc", u11.aa, x325) @@ -1570,19 +1571,19 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x328 += einsum("ab->ab", f.bb.vv) u11new_bb += einsum("ab,wib->wia", x328, u11.bb) del x328 - x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x329 += einsum("wx,xij->wij", s2, g.bb.boo) x333 += einsum("wij->wij", x329) - x383 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x383 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x383 += einsum("wij->wij", x329) del x329 - x330 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x330 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x330 += einsum("wia,xwja->xij", g.bb.bov, u12.bb) x333 += einsum("wij->wij", x330) - x394 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x394 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x394 += einsum("wij->wij", x330) del x330 - x331 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x331 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x331 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) x333 += einsum("wij->wij", x331) x383 += einsum("wij->wij", x331) @@ -1593,19 +1594,19 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x333 += einsum("wij->wij", gc.bb.boo) u11new_bb += einsum("ia,wij->wja", t1.bb, x333) * -1 del x333 - x334 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x334 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x334 += einsum("wx,xab->wab", s2, g.bb.bvv) - x337 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x337 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x337 += einsum("wab->wab", x334) - x385 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x385 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x385 += einsum("wab->wab", x334) del x334 - x335 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x335 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x335 += einsum("wia,iabc->wbc", u11.aa, v.aabb.ovvv) x337 += einsum("wab->wab", x335) x385 += einsum("wab->wab", x335) del x335 - x336 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x336 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x336 -= einsum("iabc->ibac", v.bbbb.ovvv) x336 += einsum("iabc->ibca", v.bbbb.ovvv) x337 -= einsum("wia,ibac->wbc", u11.bb, x336) @@ -1613,59 +1614,59 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x337 += einsum("wab->wab", gc.bb.bvv) u11new_bb += einsum("ia,wba->wib", t1.bb, x337) del x337 - x338 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x338 += einsum("wx,ywia->yxia", w, u12.aa) x359 -= einsum("wxia->wxia", x338) del x338 - x339 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x339 += einsum("wia,xwib->xab", g.aa.bov, u12.aa) x341 += einsum("wab->wab", x339) del x339 - x342 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x342 += einsum("wia,xab->xwib", u11.aa, x341) del x341 x359 += einsum("wxia->xwia", x342) del x342 x343 += einsum("ia->ia", f.aa.ov) - x344 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x344 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x344 += einsum("ia,wja->wij", x343, u11.aa) del x343 x347 += einsum("wij->wij", x344) del x344 x345 += einsum("wia->wia", gc.aa.bov) - x346 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x346 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x346 += einsum("ia,wja->wji", t1.aa, x345) x347 += einsum("wij->wij", x346) del x346 - x355 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x355 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x355 += einsum("wia,xja->xwji", u11.aa, x345) del x345 - x356 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x356 += einsum("ia,wxij->wxja", t1.aa, x355) del x355 x359 += einsum("wxia->wxia", x356) del x356 x347 += einsum("wij->wij", gc.aa.boo) - x348 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x348 += einsum("wia,xij->xwja", u11.aa, x347) del x347 x359 += einsum("wxia->wxia", x348) del x348 - x349 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x349 += einsum("ijka->ikja", v.aaaa.ooov) x349 -= einsum("ijka->kija", v.aaaa.ooov) - x350 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x350 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x350 += einsum("wia,ijka->wjk", u11.aa, x349) del x349 x351 -= einsum("wij->wij", x350) del x350 - x352 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x352 += einsum("wia,xij->xwja", u11.aa, x351) del x351 x359 += einsum("wxia->xwia", x352) del x352 x353 += einsum("wab->wab", gc.aa.bvv) - x354 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x354 += einsum("wia,xba->xwib", u11.aa, x353) del x353 x359 -= einsum("wxia->wxia", x354) @@ -1673,7 +1674,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u12new_aa -= einsum("wxia->wxia", x359) u12new_aa -= einsum("wxia->xwia", x359) del x359 - x368 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x368 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x368 += einsum("wxia,jbia->wxjb", u12.bb, v.aabb.ovov) x370 += einsum("wxia->xwia", x368) del x368 @@ -1681,7 +1682,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x10 u12new_bb += einsum("ijab,wxia->xwjb", t2.abab, x370) del x370 - x371 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x371 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x371 += einsum("wxia,iajb->wxjb", u12.aa, v.aabb.ovov) x373 += einsum("wxia->xwia", x371) del x371 @@ -1689,82 +1690,82 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb u12new_bb += einsum("wxia,ijba->xwjb", x373, x41) del x41 del x373 - x375 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x375 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x375 += einsum("wia,xyia->wxy", g.aa.bov, u12.aa) - x377 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x377 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x377 += einsum("wxy->wyx", x375) del x375 - x376 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x376 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x376 += einsum("wia,xyia->wxy", g.bb.bov, u12.bb) x377 += einsum("wxy->wyx", x376) del x376 u12new_aa += einsum("wia,wxy->yxia", u11.aa, x377) u12new_bb += einsum("wia,wxy->yxia", u11.bb, x377) del x377 - x378 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x378 += einsum("wx,ywia->yxia", w, u12.bb) x399 -= einsum("wxia->wxia", x378) del x378 x379 += einsum("ia->ia", f.bb.ov) - x380 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x380 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x380 += einsum("ia,wja->wij", x379, u11.bb) del x379 x383 += einsum("wij->wij", x380) del x380 x381 += einsum("wia->wia", gc.bb.bov) - x382 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x382 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x382 += einsum("ia,wja->wji", t1.bb, x381) x383 += einsum("wij->wij", x382) del x382 - x396 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x396 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x396 += einsum("wia,xja->xwji", u11.bb, x381) del x381 - x397 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x397 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x397 += einsum("ia,wxij->wxja", t1.bb, x396) del x396 x399 += einsum("wxia->wxia", x397) del x397 x383 += einsum("wij->wij", gc.bb.boo) - x384 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x384 += einsum("wia,xij->xwja", u11.bb, x383) del x383 x399 += einsum("wxia->wxia", x384) del x384 x385 += einsum("wab->wab", gc.bb.bvv) - x386 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x386 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x386 += einsum("wia,xba->xwib", u11.bb, x385) del x385 x399 -= einsum("wxia->wxia", x386) del x386 - x387 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x387 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x387 += einsum("wia,xwib->xab", g.bb.bov, u12.bb) - x390 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x390 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x390 += einsum("wab->wab", x387) del x387 - x388 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x388 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x388 += einsum("iabc->ibac", v.bbbb.ovvv) x388 -= einsum("iabc->ibca", v.bbbb.ovvv) - x389 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x389 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x389 += einsum("wia,ibac->wbc", u11.bb, x388) x390 -= einsum("wab->wba", x389) del x389 - x391 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x391 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x391 += einsum("wia,xab->xwib", u11.bb, x390) del x390 x399 += einsum("wxia->xwia", x391) del x391 - x411 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x411 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x411 -= einsum("ia,jbac->jibc", t1.bb, x388) del x388 - x392 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x392 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x392 += einsum("ijka->ikja", v.bbbb.ooov) x392 -= einsum("ijka->kija", v.bbbb.ooov) - x393 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x393 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x393 += einsum("wia,ijka->wjk", u11.bb, x392) del x392 x394 -= einsum("wij->wij", x393) del x393 - x395 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x395 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x395 += einsum("wia,xij->xwja", u11.bb, x394) del x394 x399 += einsum("wxia->xwia", x395) @@ -1846,157 +1847,157 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1, LS2, LU11 and LU12 amplitudes - x0 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x0 += einsum("abij,klab->ikjl", l2.abab, t2.abab) - x61 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x61 += einsum("ijkl->ijkl", x0) - x531 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x531 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x531 += einsum("ijkl->ijkl", x0) - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x0) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x0) del x0 - x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x1 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x2 += einsum("ia,jkla->jikl", t1.aa, x1) x61 += einsum("ijkl->ijkl", x2) - x62 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x62 += einsum("ia,jkil->jkla", t1.bb, x61) - x301 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x301 += einsum("ia,ijkl->jkla", t1.aa, x61) del x61 x531 += einsum("ijkl->ijkl", x2) - x532 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x532 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x532 += einsum("iajb,kilj->klab", v.aabb.ovov, x531) del x531 - l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=np.float64) + l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=types[float]) l2new_baba += einsum("ijab->baji", x532) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum("ijab->abij", x532) del x532 l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x2) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x2) del x2 - x53 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x53 += einsum("ia,jikb->jkba", t1.bb, x1) x62 += einsum("ijab,kjla->kilb", t2.abab, x1) - x192 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x192 += einsum("ijab,ijka->kb", t2.abab, x1) - x207 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x207 += einsum("ia->ia", x192) del x192 - x299 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x299 += einsum("ijab,ikla->kljb", t2.abab, x1) - x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x353 += einsum("iajk,lkjb->liba", v.aabb.ovoo, x1) - x390 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x390 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x390 -= einsum("ijab->ijab", x353) del x353 - x503 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x503 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x503 += einsum("iabc,jkib->jkca", v.bbaa.ovvv, x1) l2new_baba -= einsum("ijab->baji", x503) l2new_abab -= einsum("ijab->abij", x503) del x503 l1new_aa -= einsum("ijab,kjia->bk", v.bbaa.oovv, x1) - x3 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) l1new_aa += einsum("iabc,jibc->aj", v.aabb.ovvv, x3) * -1 del x3 - x4 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x4 += einsum("w,wia->ia", s1, g.aa.bov) - x5 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("ia->ia", x4) - x41 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x41 += einsum("ia->ia", x4) - x372 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x372 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x372 += einsum("ia->ia", x4) - x564 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x564 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x564 += einsum("ia->ia", x4) del x4 x5 += einsum("ia->ia", f.aa.ov) - x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jkab->jkib", x5, t2.aaaa) del x5 - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum("ijka->kjia", x6) del x6 x7 += einsum("ijak->ijka", v.aaaa.oovo) * -1 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ijka->kija", x7) x32 += einsum("ijka->jika", x7) * -1 del x7 - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ijab,kbca->jikc", t2.aaaa, v.aaaa.ovvv) - x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum("ijka->ijka", x8) * -1 del x8 - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) - x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum("ia,jkba->ijkb", t1.aa, x9) del x9 x21 += einsum("ijka->ijka", x10) * -1 del x10 - x11 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x11 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) - x14 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x14 += einsum("ia->ia", x11) x41 += einsum("ia->ia", x11) - x389 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x389 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x389 += einsum("ia->ia", x11) x564 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum("iajb->jiab", v.aaaa.ovov) x12 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum("ia,ijab->jb", t1.aa, x12) x14 += einsum("ia->ia", x13) * -1 - x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x15 += einsum("ia,jkab->jkib", x14, t2.aaaa) x21 += einsum("ijka->jika", x15) del x15 - x404 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x404 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x404 += einsum("ia,ja->ij", t1.aa, x14) - x405 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x405 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x405 += einsum("ij->ij", x404) del x404 x41 += einsum("ia->ia", x13) * -1 del x13 - x75 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x75 += einsum("wia,ijab->wjb", u11.aa, x12) - x76 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x76 += einsum("wia->wia", x75) * -1 - x220 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x220 += einsum("wia->wia", x75) * -1 - x229 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x229 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x229 += einsum("wia->wia", x75) * -1 del x75 - x399 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x399 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x399 += einsum("wxia,ijab->wxjb", u12.aa, x12) - x400 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x400 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x400 += einsum("wxia->xwia", x399) * -1 del x399 - x509 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x509 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x509 += einsum("ijab,ikac->kjcb", t2.abab, x12) - x511 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x511 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x511 += einsum("ijab->ijab", x509) * -1 del x509 - x16 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x16 += einsum("ijab,kalb->ijkl", t2.aaaa, v.aaaa.ovov) - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x19 += einsum("ijkl->jilk", x16) - x418 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x418 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x418 += einsum("ijkl->jilk", x16) del x16 - x17 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x17 += einsum("ia,jbka->ijkb", t1.aa, v.aaaa.ovov) - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x18 += einsum("ia,jkla->ijkl", t1.aa, x17) x19 += einsum("ijkl->ijkl", x18) - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum("ia,jkil->jkla", t1.aa, x19) del x19 x21 += einsum("ijka->jika", x20) @@ -2006,146 +2007,146 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x21 x418 += einsum("ijkl->ijkl", x18) del x18 - x419 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x419 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x419 += einsum("abij,ijkl->klab", l2.aaaa, x418) del x418 - x422 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x422 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x422 += einsum("ijab->jiba", x419) del x419 - x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum("ijka->ikja", x17) * -1 x22 += einsum("ijka->ijka", x17) - x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x37 += einsum("ijka->jkia", x17) x37 += einsum("ijka->kjia", x17) * -1 - x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum("ijka->jkia", x17) * -1 x86 += einsum("ijka->kjia", x17) - x386 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x386 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x386 += einsum("ijka->ijka", x17) - x395 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x395 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x395 += einsum("ijka->ikja", x17) x395 += einsum("ijka->ijka", x17) * -1 - x535 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x535 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x535 += einsum("ijka->ikja", x17) * -1 x535 += einsum("ijka->ijka", x17) del x17 x22 += einsum("ijka->jkia", v.aaaa.ooov) x22 += einsum("ijka->jika", v.aaaa.ooov) * -1 - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum("ijab->jiab", t2.aaaa) * -1 x23 += einsum("ijab->jiba", t2.aaaa) - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum("ijka,klba->ijlb", x22, x23) del x22 x32 += einsum("ijka->ijka", x24) - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum("ijka->ijka", x24) del x24 - x85 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x85 += einsum("iabc,ijca->jb", v.aaaa.ovvv, x23) - x121 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x121 += einsum("ia->ia", x85) * -1 del x85 - x105 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x105 += einsum("iajb,ikba->jk", v.aaaa.ovov, x23) - x109 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x109 += einsum("ij->ij", x105) * -1 x405 += einsum("ij->ji", x105) * -1 del x105 - x166 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x166 += einsum("ai,ijab->jb", l1.aa, x23) - x178 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x178 += einsum("ia->ia", x166) * -1 del x166 - x175 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x175 += einsum("abij,ikba->jk", l2.aaaa, x23) - x176 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x176 += einsum("ij->ij", x175) * -1 - x411 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x411 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x411 += einsum("ij->ij", x175) * -1 del x175 - x184 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x184 += einsum("abij,ijbc->ac", l2.aaaa, x23) - x185 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x185 += einsum("ab->ab", x184) * -1 - x402 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x402 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x402 += einsum("ab->ab", x184) * -1 - x548 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x548 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x548 += einsum("ab->ab", x184) * -1 del x184 - x214 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x214 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x214 += einsum("abij,ikba->jk", l2.aaaa, x23) * 2 - x215 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x215 += einsum("ij->ij", x214) * -1 del x214 - x297 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x297 += einsum("abij,ikac->kjcb", l2.abab, x23) * -2 x301 += einsum("ijka,ilab->ljkb", x1, x23) * -1 - x324 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x324 += einsum("abij,ijbc->ac", l2.aaaa, x23) * 2 - x325 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x325 += einsum("ab->ab", x324) * -1 - x567 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x567 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x567 += einsum("ab->ab", x324) * -1 del x324 - x408 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x408 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x408 += einsum("iajb,ijbc->ac", v.aaaa.ovov, x23) - x409 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x409 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x409 += einsum("ab->ba", x408) * -1 del x408 - x25 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x25 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x26 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x26 += einsum("ijka->jika", x25) - x559 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x559 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x559 += einsum("ijka->jika", x25) x26 += einsum("ijka->ijka", v.aabb.ooov) - x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x27 += einsum("ijab,kljb->ikla", t2.abab, x26) x32 += einsum("ijka->kjia", x27) x51 += einsum("ijka->kjia", x27) del x27 - x77 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x77 += einsum("wxia,jkia->xwjk", u12.bb, x26) - x88 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x88 += einsum("ijab,ikjb->ka", t2.abab, x26) x121 += einsum("ia->ia", x88) * -1 del x88 - x293 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x293 += einsum("ijab,iklb->klja", t2.abab, x26) * -1 - x534 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x534 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x534 += einsum("ijka,likb->ljab", x1, x26) l2new_baba += einsum("ijab->baji", x534) l2new_abab += einsum("ijab->abij", x534) del x534 - x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum("iabj->ijba", v.aaaa.ovvo) x28 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x29 += einsum("ia,jkba->ijkb", t1.aa, x28) x32 += einsum("ijka->ijka", x29) x51 += einsum("ijka->ijka", x29) del x29 - x97 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x97 += einsum("ia,ijba->jb", t1.aa, x28) x121 += einsum("ia->ia", x97) del x97 - x575 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x575 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x575 += einsum("wia,ijba->wjb", u11.aa, x28) * -1 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x31 += einsum("ijkl->jkil", x30) x31 += einsum("ijkl->kjil", x30) * -1 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x50 += einsum("ijkl->ikjl", x30) * -1 x50 += einsum("ijkl->ijkl", x30) x51 += einsum("ia,jikl->jkla", t1.aa, x50) * -1 del x50 l1new_aa += einsum("abij,ikjb->ak", l2.aaaa, x51) * -1 del x51 - x351 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x351 += einsum("abij,jkli->klba", l2.aaaa, x30) del x30 x390 -= einsum("ijab->ijab", x351) @@ -2156,145 +2157,145 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x31 l1new_aa += einsum("abij,ikja->bk", l2.aaaa, x32) del x32 - x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x33 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum("ijab->ijab", x33) - x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum("abij->jiab", l2.aaaa) * -1 x34 += einsum("abij->jiba", l2.aaaa) x35 += einsum("ijab,ikac->kjcb", x23, x34) x53 += einsum("ijab,ikac->kjcb", t2.abab, x34) * -1 x35 += einsum("wxai,wxjb->ijab", lu12.aa, u12.aa) * 0.5 - x36 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum("iabc->ibac", v.aaaa.ovvv) x36 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x512 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x512 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x512 += einsum("ia,jbac->ijbc", t1.aa, x36) - x513 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x513 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x513 += einsum("ijab->jiab", x512) * -1 del x512 l1new_aa += einsum("ijab,jacb->ci", x35, x36) * -1 del x35 x37 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x37 += einsum("ijka->kija", v.aaaa.ooov) - x49 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum("ijab,kila->kljb", t2.abab, x37) * -1 x77 += einsum("wxia,jika->xwjk", u12.aa, x37) * -1 del x37 - x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum("ijab->jiab", t2.bbbb) * -1 x38 += einsum("ijab->jiba", t2.bbbb) x49 += einsum("ijka,klba->ijlb", x26, x38) * -1 - x204 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x204 += einsum("abij,ikba->jk", l2.bbbb, x38) - x205 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x205 += einsum("ij->ij", x204) * -1 - x488 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x488 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x488 += einsum("ij->ij", x204) * -1 - x576 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x576 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x576 += einsum("ij->ij", x204) * -1 del x204 - x212 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x212 += einsum("abij,ijbc->ac", l2.bbbb, x38) - x213 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x213 += einsum("ab->ab", x212) * -1 - x478 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x478 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x478 += einsum("ab->ab", x212) * -1 - x547 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x547 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x547 += einsum("ab->ab", x212) * -1 del x212 - x224 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x224 += einsum("abij,ikba->jk", l2.bbbb, x38) * 2 - x225 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x225 += einsum("ij->ij", x224) * -1 del x224 - x510 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x510 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x510 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x38) x511 += einsum("ijab->ijab", x510) * -1 del x510 - x566 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x566 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x566 += einsum("abij,ijbc->ac", l2.bbbb, x38) * -2 - x618 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x618 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x618 += einsum("wxai,ijba->wxjb", lu12.bb, x38) - x619 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x619 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x619 += einsum("wxia->xwia", x618) * -1 del x618 - x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x39 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x40 += einsum("ijka->ikja", x39) - x44 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x44 += einsum("ijka->ikja", x39) - x354 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x354 += einsum("ijka,ljkb->ilab", x1, x39) x390 -= einsum("ijab->ijab", x354) del x354 - x561 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x561 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x561 += einsum("ijka->ikja", x39) x40 += einsum("iajk->ijka", v.aabb.ovoo) x49 += einsum("ijab,kjla->kilb", t2.abab, x40) * -1 - x133 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x133 += einsum("ijab,ijka->kb", t2.abab, x40) - x159 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x159 += einsum("ia->ia", x133) * -1 del x133 - x281 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x281 += einsum("ijab,ikla->jklb", t2.abab, x40) - x285 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x285 += einsum("ijka->kjia", x281) - x295 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x295 += einsum("ijka->kjia", x281) del x281 - x317 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x317 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x317 += einsum("wxia,ijka->xwjk", u12.aa, x40) * 0.5 - x527 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x527 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x527 += einsum("ia,jkla->ijkl", t1.aa, x40) - x528 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x528 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x528 += einsum("ijkl->jikl", x527) del x527 x41 += einsum("ia->ia", f.aa.ov) x49 += einsum("ia,jkab->ijkb", x41, t2.abab) x77 += einsum("ia,wxja->xwij", x41, u12.aa) - x108 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x108 += einsum("ia,ja->ij", t1.aa, x41) x109 += einsum("ij->ji", x108) del x108 - x135 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x135 += einsum("ia,ijab->jb", x41, t2.abab) x159 += einsum("ia->ia", x135) del x135 - x219 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x219 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x219 += einsum("ia,wja->wji", x41, u11.aa) - x223 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x223 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x223 += einsum("wij->wji", x219) del x219 - x233 = np.zeros((nbos, nbos), dtype=np.float64) + x233 = np.zeros((nbos, nbos), dtype=types[float]) x233 += einsum("ia,wxia->xw", x41, u12.aa) * 0.5 - x255 = np.zeros((nbos), dtype=np.float64) + x255 = np.zeros((nbos), dtype=types[float]) x255 += einsum("ia,wia->w", x41, u11.aa) - x258 = np.zeros((nbos), dtype=np.float64) + x258 = np.zeros((nbos), dtype=types[float]) x258 += einsum("w->w", x255) del x255 - x334 = np.zeros((nbos, nbos), dtype=np.float64) + x334 = np.zeros((nbos, nbos), dtype=types[float]) x334 += einsum("ia,wxia->xw", x41, u12.aa) - lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) lu11new_aa += einsum("w,ia->wai", ls1, x41) * 2 - lu12new_aa = np.zeros((nbos, nbos, nvir[0], nocc[0]), dtype=np.float64) + lu12new_aa = np.zeros((nbos, nbos, nvir[0], nocc[0]), dtype=types[float]) lu12new_aa += einsum("wx,ia->xwai", ls2, x41) * 2 - x42 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x42 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x46 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x46 += einsum("ijkl->ijlk", x42) x528 += einsum("ijkl->ijlk", x42) del x42 - x43 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x46 += einsum("ijkl->jilk", x43) x528 += einsum("ijkl->jilk", x43) del x43 x44 += einsum("iajk->ijka", v.aabb.ovoo) - x45 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x45 += einsum("ia,jkla->ijkl", t1.aa, x44) del x44 x46 += einsum("ijkl->jikl", x45) @@ -2303,14 +2304,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x49 += einsum("ia,jkil->jkla", t1.bb, x46) * -1 x293 += einsum("ia,ijkl->jkla", t1.aa, x46) * -1 del x46 - x47 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x47 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x48 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x48 += einsum("ijab->ijab", x47) - x361 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x361 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x361 += einsum("ijab->ijab", x47) x511 += einsum("ijab->ijab", x47) - x620 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x620 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x620 += einsum("ijab->ijab", x47) del x47 x48 += einsum("iabj->ijab", v.aabb.ovvo) @@ -2320,74 +2321,74 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x49 += einsum("ijab,kacb->kijc", t2.abab, v.aabb.ovvv) l1new_aa += einsum("abij,kijb->ak", l2.abab, x49) * -1 del x49 - x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x52 += einsum("ijab->jiab", t2.bbbb) x52 += einsum("ijab->jiba", t2.bbbb) * -1 x53 += einsum("abij,jkcb->ikac", l2.abab, x52) * -1 - x129 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x129 += einsum("iabc,ijac->jb", v.bbbb.ovvv, x52) x159 += einsum("ia->ia", x129) * -1 del x129 - x195 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x195 += einsum("ai,ijba->jb", l1.bb, x52) x207 += einsum("ia->ia", x195) * -1 del x195 x53 += einsum("wxai,wxjb->ijab", lu12.aa, u12.bb) * -0.5 l1new_aa += einsum("iabc,jiba->cj", v.bbaa.ovvv, x53) * -1 del x53 - x54 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x54 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x54 += einsum("ia,wxaj->wxji", t1.aa, lu12.aa) - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum("wxia,wxjk->jkia", u12.aa, x54) * 0.5 x62 += einsum("wxia,wxjk->jkia", u12.bb, x54) * -0.5 - x163 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x163 += einsum("wxia,wxij->ja", u12.aa, x54) x178 += einsum("ia->ia", x163) * 0.5 del x163 - x585 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x585 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x585 += einsum("wia,xwij->xja", u11.aa, x54) - x586 = np.zeros((nbos, nbos), dtype=np.float64) + x586 = np.zeros((nbos, nbos), dtype=types[float]) x586 += einsum("wia,xia->wx", g.aa.bov, x585) del x585 - x605 = np.zeros((nbos, nbos), dtype=np.float64) + x605 = np.zeros((nbos, nbos), dtype=types[float]) x605 -= einsum("wx->wx", x586) del x586 lu12new_aa += einsum("ijka,wxik->xwaj", x535, x54) * -1 lu12new_aa += einsum("ia,wxji->xwaj", x41, x54) * -1 - lu12new_bb = np.zeros((nbos, nbos, nvir[1], nocc[1]), dtype=np.float64) + lu12new_bb = np.zeros((nbos, nbos, nvir[1], nocc[1]), dtype=types[float]) lu12new_bb -= einsum("ijka,wxji->xwak", v.aabb.ooov, x54) lu12new_bb -= einsum("ijka,wxij->xwak", x25, x54) - x55 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x55 += einsum("ia,abjk->jikb", t1.aa, l2.abab) x58 += einsum("ijab,kljb->klia", t2.abab, x55) x62 += einsum("ijab,klib->klja", x52, x55) * -1 - x164 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x164 += einsum("ijab,ikjb->ka", t2.abab, x55) x178 += einsum("ia->ia", x164) del x164 x297 += einsum("ia,ijkb->jkab", t1.aa, x55) * 2 x301 += einsum("ijab,iklb->klja", t2.abab, x55) - x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x426 += einsum("ijka,jilb->lkba", v.aabb.ooov, x55) - x467 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x467 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x467 -= einsum("ijab->ijab", x426) del x426 - x429 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x429 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x429 += einsum("ijka,ijlb->lkba", x25, x55) del x25 x467 -= einsum("ijab->ijab", x429) del x429 - x500 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x500 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x500 += einsum("iabc,jikb->jkac", v.aabb.ovvv, x55) l2new_baba -= einsum("ijab->baji", x500) l2new_abab -= einsum("ijab->abij", x500) del x500 - x533 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x533 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x533 += einsum("ijka,likb->ljab", x40, x55) l2new_baba += einsum("ijab->baji", x533) l2new_abab += einsum("ijab->abij", x533) del x533 - x551 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x551 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x551 += einsum("ia,jikb->jkab", x41, x55) l2new_baba += einsum("ijab->baji", x551) * -1 l2new_abab += einsum("ijab->abij", x551) * -1 @@ -2398,71 +2399,71 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_baba += einsum("ijka,iklb->balj", x535, x55) * -1 del x535 l2new_abab += einsum("ijka,iklb->abjl", x395, x55) - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum("ijka->ijka", x56) x57 += einsum("ijka->jika", x56) * -1 x58 += einsum("ijab,kilb->klja", x23, x57) del x57 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum("ijka->ijka", x56) * -1 x60 += einsum("ijka->jika", x56) x62 += einsum("ijab,kila->kljb", t2.abab, x60) * -1 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("ia,ijkb->jkba", t1.aa, x60) * -1 l1new_aa += einsum("iabc,jiab->cj", x36, x63) del x36 del x63 - x396 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x396 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x396 += einsum("ijka,ilkb->ljba", x395, x60) del x395 - x414 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x414 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x414 += einsum("ijab->ijab", x396) del x396 l1new_aa += einsum("ijab,jkia->bk", x28, x60) del x28 l2new_baba += einsum("ijka,jlib->abkl", x26, x60) * -1 del x60 - x68 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x68 += einsum("ia,jkla->kjli", t1.aa, x56) - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x69 += einsum("ijkl->ijkl", x68) - x122 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum("ijkl->ijkl", x68) x122 += einsum("ijkl->ijlk", x68) * -1 l1new_aa += einsum("ijka,ljki->al", v.aaaa.ooov, x122) del x122 - x420 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x420 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x420 += einsum("ijkl->ijkl", x68) del x68 - x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x352 += einsum("iabc,jkib->kjac", v.aaaa.ovvv, x56) x390 -= einsum("ijab->ijab", x352) del x352 - x363 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x363 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x363 -= einsum("ijka->ijka", x56) x363 += einsum("ijka->jika", x56) l2new_abab += einsum("ijka,jlib->balk", x26, x363) * -1 del x26 - x413 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x413 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x413 += einsum("ia,jkib->jkba", x14, x56) del x14 x414 += einsum("ijab->ijab", x413) * -1 del x413 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum("iajb->jiab", v.aaaa.ovov) x59 -= einsum("iajb->jiba", v.aaaa.ovov) - x243 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x243 += einsum("wia,ijab->wjb", u11.aa, x59) - x244 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x244 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x244 -= einsum("wia->wia", x243) - x381 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x381 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x381 -= einsum("wia->wia", x243) - x553 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x553 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x553 -= einsum("wia->wia", x243) del x243 - x388 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x388 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x388 += einsum("ia,ijab->jb", t1.aa, x59) x389 -= einsum("ia->ia", x388) x390 += einsum("ai,jb->ijab", l1.aa, x389) @@ -2475,63 +2476,63 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x62 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) * -1 l1new_aa += einsum("iajb,kijb->ak", v.aabb.ovov, x62) del x62 - x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ia,bacd->icbd", t1.aa, v.aaaa.vvvv) - x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("iabc->iabc", x64) * -1 del x64 x65 += einsum("aibc->iabc", v.aaaa.vovv) - x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("iabc->iabc", x65) x66 += einsum("iabc->ibac", x65) * -1 del x65 l1new_aa += einsum("abij,ibac->cj", l2.aaaa, x66) * -1 del x66 - x67 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x67 += einsum("abij,klab->ijkl", l2.aaaa, t2.aaaa) x69 += einsum("ijkl->jilk", x67) - x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x70 += einsum("ia,ijkl->jkla", t1.aa, x69) del x69 - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x71 += einsum("ijka->ijka", x70) x71 += einsum("ijka->ikja", x70) * -1 del x70 l1new_aa += einsum("iajb,kjib->ak", v.aaaa.ovov, x71) del x71 - x123 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x123 += einsum("ijkl->jikl", x67) * -1 x123 += einsum("ijkl->jilk", x67) l1new_aa += einsum("ijka,jlki->al", v.aaaa.ooov, x123) * -1 del x123 x420 += einsum("ijkl->jilk", x67) del x67 - x421 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x421 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x421 += einsum("iajb,klji->klab", v.aaaa.ovov, x420) del x420 x422 += einsum("ijab->jiab", x421) del x421 - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum("ijab->abij", x422) l2new_aaaa += einsum("ijab->baij", x422) * -1 del x422 - x72 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x72 += einsum("abci->iabc", v.aabb.vvvo) x72 += einsum("ia,bcda->ibcd", t1.bb, v.aabb.vvvv) l1new_aa += einsum("abij,jacb->ci", l2.abab, x72) del x72 - x73 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("wx,wia->xia", s2, g.aa.bov) x76 += einsum("wia->wia", x73) x553 += einsum("wia->wia", x73) del x73 - x74 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x74 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x76 += einsum("wia->wia", x74) x220 += einsum("wia->wia", x74) x244 += einsum("wia->wia", x74) x381 += einsum("wia->wia", x74) - x382 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x382 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x382 += einsum("wai,wjb->ijab", lu11.aa, x381) del x381 x390 += einsum("ijab->ijab", x382) @@ -2542,243 +2543,243 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x77 += einsum("wia,xja->wxji", u11.aa, x76) * 2 l1new_aa += einsum("wxai,wxji->aj", lu12.aa, x77) * -0.5 del x77 - x571 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x571 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x571 += einsum("wia,ijab->wjb", x76, t2.abab) * -1 x575 += einsum("wia,ijab->wjb", x76, x23) * -1 del x76 del x23 - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum("ai,jkba->ijkb", l1.aa, t2.aaaa) - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ijka->ikja", x78) x79 += einsum("ijka->ijka", x78) * -1 del x78 l1new_aa += einsum("iajb,kjia->bk", v.aaaa.ovov, x79) * -1 del x79 - x80 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("w,wai->ia", s1, g.aa.bvo) x121 += einsum("ia->ia", x80) del x80 - x81 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("wab,wib->ia", g.aa.bvv, u11.aa) x121 += einsum("ia->ia", x81) del x81 - x82 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("ia,iabj->jb", t1.bb, v.bbaa.ovvo) x121 += einsum("ia->ia", x82) del x82 - x83 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x83 += einsum("ijab,jkib->ka", t2.aaaa, v.aaaa.ooov) x121 += einsum("ia->ia", x83) del x83 - x84 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x84 += einsum("ijab,jbca->ic", t2.abab, v.bbaa.ovvv) x121 += einsum("ia->ia", x84) del x84 x86 += einsum("ijka->ikja", v.aaaa.ooov) - x87 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x87 += einsum("ijab,ijkb->ka", t2.aaaa, x86) del x86 x121 += einsum("ia->ia", x87) * -1 del x87 - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum("ijab->jiab", t2.aaaa) x89 += einsum("ijab->jiba", t2.aaaa) * -1 - x90 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x90 += einsum("ia,ijab->jb", x41, x89) x121 += einsum("ia->ia", x90) * -1 del x90 - x165 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("ijka,ijab->kb", x56, x89) x178 += einsum("ia->ia", x165) * -1 del x165 x293 += einsum("ijka,ilab->ljkb", x40, x89) * -1 - x392 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x392 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x392 += einsum("ijab,ikac->jkbc", x12, x89) - x393 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x393 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x393 += einsum("ijab->jiba", x392) x513 += einsum("ijab->ijba", x392) del x392 - x505 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x505 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x505 += einsum("iajb,ikac->kjcb", v.aabb.ovov, x89) - x507 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x507 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x507 += einsum("ijab->ijab", x505) * -1 del x505 - x542 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x542 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x542 += einsum("iajb,ijbc->ac", v.aaaa.ovov, x89) - x543 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x543 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x543 += einsum("ab->ba", x542) * -1 del x542 - x614 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x614 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x614 += einsum("wxai,ijab->wxjb", lu12.aa, x89) del x89 - x615 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x615 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x615 += einsum("wxia->xwia", x614) * -1 del x614 - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum("w,wia->ia", s1, g.bb.bov) - x95 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x95 += einsum("ia->ia", x91) - x266 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x266 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x266 += einsum("ia->ia", x91) - x447 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x447 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x447 += einsum("ia->ia", x91) - x563 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x563 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x563 += einsum("ia->ia", x91) del x91 - x92 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x92 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x95 += einsum("ia->ia", x92) - x272 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x272 += einsum("ia->ia", x92) - x466 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x466 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x466 += einsum("ia->ia", x92) x563 += einsum("ia->ia", x92) del x92 - x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x93 += einsum("iajb->jiba", v.bbbb.ovov) - x94 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x94 += einsum("ia,ijba->jb", t1.bb, x93) x95 += einsum("ia->ia", x94) * -1 x272 += einsum("ia->ia", x94) * -1 del x94 - x273 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x273 += einsum("ia,jkab->jkib", x272, t2.bbbb) - x278 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x278 += einsum("ijka->jika", x273) del x273 - x481 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x481 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x481 += einsum("ia,ja->ij", t1.bb, x272) - x482 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x482 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x482 += einsum("ij->ij", x481) del x481 - x227 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x227 += einsum("wia,ijba->wjb", u11.bb, x93) * 0.5 - x228 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x228 += einsum("wia->wia", x227) * -1 del x227 - x315 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x315 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x315 += einsum("wia,ijba->wjb", u11.bb, x93) - x316 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x316 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x316 += einsum("wia->wia", x315) * -1 - x330 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x330 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x330 += einsum("wia->wia", x315) * -1 del x315 - x475 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x475 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x475 += einsum("wxia,ijba->wxjb", u12.bb, x93) - x476 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x476 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x476 += einsum("wxia->xwia", x475) * -1 del x475 - x480 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x480 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x480 += einsum("ijab,ikba->jk", t2.bbbb, x93) x482 += einsum("ij->ij", x480) * -1 del x480 - x485 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x485 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x485 += einsum("ijab,ijbc->ac", t2.bbbb, x93) - x486 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x486 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x486 += einsum("ab->ab", x485) * -1 del x485 - x506 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x506 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x506 += einsum("ijab,jkcb->ikac", t2.abab, x93) x507 += einsum("ijab->ijab", x506) * -1 del x506 x95 += einsum("ia->ia", f.bb.ov) - x96 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("ia,jiba->jb", x95, t2.abab) x121 += einsum("ia->ia", x96) del x96 - x134 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x134 += einsum("ia,ijba->jb", x95, x38) x159 += einsum("ia->ia", x134) * -1 del x134 - x149 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x149 += einsum("ia,ja->ij", t1.bb, x95) - x150 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x150 += einsum("ij->ji", x149) del x149 x233 += einsum("ia,wxia->xw", x95, u12.bb) * 0.5 - x256 = np.zeros((nbos), dtype=np.float64) + x256 = np.zeros((nbos), dtype=types[float]) x256 += einsum("ia,wia->w", x95, u11.bb) x258 += einsum("w->w", x256) del x256 x293 += einsum("ia,jkba->jikb", x95, t2.abab) x317 += einsum("ia,wxja->xwij", x95, u12.bb) * 0.5 - x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x329 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x329 += einsum("ia,wja->wji", x95, u11.bb) - x333 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x333 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x333 += einsum("wij->wji", x329) del x329 x334 += einsum("ia,wxia->xw", x95, u12.bb) - x552 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x552 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x552 += einsum("ia,jkib->jkba", x95, x1) l2new_baba += einsum("ijab->baji", x552) * -1 l2new_abab += einsum("ijab->abij", x552) * -1 del x552 - lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) lu11new_bb += einsum("w,ia->wai", ls1, x95) * 2 lu12new_bb += einsum("wx,ia->xwai", ls2, x95) * 2 - x98 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x98 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x99 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x99 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x99 += einsum("wij->wij", x98) - x598 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x598 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x598 += einsum("wij->wij", x98) del x98 x99 += einsum("wij->wij", g.aa.boo) - x100 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x100 += einsum("wia,wij->ja", u11.aa, x99) x121 += einsum("ia->ia", x100) * -1 del x100 - x222 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x222 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x222 += einsum("wx,wij->xij", s2, x99) x223 += einsum("wij->wij", x222) del x222 x575 += einsum("wij,wxia->xja", x99, u12.aa) - x101 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x101 += einsum("w,wij->ij", s1, g.aa.boo) x109 += einsum("ij->ij", x101) - x374 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x374 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x374 += einsum("ij->ij", x101) del x101 - x102 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x102 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x109 += einsum("ij->ij", x102) x374 += einsum("ij->ij", x102) del x102 - x103 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x103 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x109 += einsum("ij->ij", x103) - x378 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x378 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x378 += einsum("ij->ij", x103) del x103 - x104 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x104 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x109 += einsum("ij->ji", x104) x405 += einsum("ij->ij", x104) del x104 - x406 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x406 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x406 += einsum("ij,abik->kjab", x405, l2.aaaa) del x405 x414 += einsum("ijab->ijba", x406) * -1 del x406 - x106 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x106 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x106 += einsum("ijka->kija", v.aaaa.ooov) - x107 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x107 += einsum("ia,jika->jk", t1.aa, x106) x109 += einsum("ij->ij", x107) * -1 del x107 - x218 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x218 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x218 += einsum("wia,jika->wjk", u11.aa, x106) x223 += einsum("wij->wij", x218) * -1 del x218 x109 += einsum("ij->ij", f.aa.oo) - x110 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x110 += einsum("ia,ij->ja", t1.aa, x109) x121 += einsum("ia->ia", x110) * -1 del x110 - x545 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x545 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x545 += einsum("ij,abjk->ikab", x109, l2.abab) l2new_baba += einsum("ijab->baji", x545) * -1 l2new_abab += einsum("ijab->abij", x545) * -1 @@ -2787,61 +2788,61 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ai,ji->aj", l1.aa, x109) * -1 lu12new_aa += einsum("ij,wxaj->xwai", x109, lu12.aa) * -1 del x109 - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("w,wab->ab", s1, g.aa.bvv) - x115 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x115 += einsum("ab->ab", x111) - x367 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x367 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x367 += einsum("ab->ab", x111) x543 += einsum("ab->ab", x111) del x111 - x112 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x112 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x115 += einsum("ab->ab", x112) - x370 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x370 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x370 += einsum("ab->ab", x112) x543 += einsum("ab->ab", x112) del x112 - x113 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x113 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x113 += einsum("iabc->ibca", v.aaaa.ovvv) - x114 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x114 += einsum("ia,ibac->bc", t1.aa, x113) x115 += einsum("ab->ab", x114) * -1 x543 += einsum("ab->ab", x114) * -1 del x114 - x572 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x572 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x572 += einsum("wia,ibac->wbc", u11.aa, x113) * -1 del x113 x115 += einsum("ab->ab", f.aa.vv) - x116 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x116 += einsum("ia,ba->ib", t1.aa, x115) x121 += einsum("ia->ia", x116) del x116 l1new_aa += einsum("ai,ab->bi", l1.aa, x115) del x115 - x117 = np.zeros((nbos), dtype=np.float64) + x117 = np.zeros((nbos), dtype=types[float]) x117 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x119 = np.zeros((nbos), dtype=np.float64) + x119 = np.zeros((nbos), dtype=types[float]) x119 += einsum("w->w", x117) - x577 = np.zeros((nbos), dtype=np.float64) + x577 = np.zeros((nbos), dtype=types[float]) x577 += einsum("w->w", x117) del x117 - x118 = np.zeros((nbos), dtype=np.float64) + x118 = np.zeros((nbos), dtype=types[float]) x118 += einsum("ia,wia->w", t1.bb, g.bb.bov) x119 += einsum("w->w", x118) x577 += einsum("w->w", x118) del x118 x119 += einsum("w->w", G) - x120 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x120 += einsum("w,wia->ia", x119, u11.aa) x121 += einsum("ia->ia", x120) del x120 - x158 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x158 += einsum("w,wia->ia", x119, u11.bb) x159 += einsum("ia->ia", x158) del x158 - x257 = np.zeros((nbos), dtype=np.float64) + x257 = np.zeros((nbos), dtype=types[float]) x257 += einsum("w,wx->x", x119, s2) x258 += einsum("w->w", x257) del x257 @@ -2851,157 +2852,157 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x121 += einsum("ai->ia", f.aa.vo) l1new_aa += einsum("ia,ijab->bj", x121, x34) l1new_bb += einsum("ia,abij->bj", x121, l2.abab) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new += einsum("ia,wai->w", x121, lu11.aa) - ls2new = np.zeros((nbos, nbos), dtype=np.float64) + ls2new = np.zeros((nbos, nbos), dtype=types[float]) ls2new += einsum("ia,wxai->xw", x121, lu12.aa) del x121 - x124 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x124 += einsum("w,wai->ia", s1, g.bb.bvo) x159 += einsum("ia->ia", x124) del x124 - x125 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x125 += einsum("wab,wib->ia", g.bb.bvv, u11.bb) x159 += einsum("ia->ia", x125) del x125 - x126 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x126 += einsum("ia,iabj->jb", t1.aa, v.aabb.ovvo) x159 += einsum("ia->ia", x126) del x126 - x127 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x127 += einsum("ijab,iacb->jc", t2.abab, v.aabb.ovvv) x159 += einsum("ia->ia", x127) del x127 - x128 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x128 += einsum("ijab,ikja->kb", t2.bbbb, v.bbbb.ooov) x159 += einsum("ia->ia", x128) del x128 - x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x130 += einsum("ia,jbka->ijkb", t1.bb, v.bbbb.ovov) - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum("ijka->jkia", x130) * -1 x131 += einsum("ijka->kjia", x130) - x275 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x275 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x275 += einsum("ia,jkla->ijkl", t1.bb, x130) - x276 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x276 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x276 += einsum("ijkl->ijkl", x275) - x495 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x495 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x495 += einsum("ijkl->ijkl", x275) del x275 - x279 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x279 += einsum("ijka->ikja", x130) x279 += einsum("ijka->ijka", x130) * -1 - x290 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x290 += einsum("ijka->jkia", x130) x290 += einsum("ijka->kjia", x130) * -1 - x463 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x463 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x463 += einsum("ijka->ijka", x130) - x470 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x470 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x470 += einsum("ijka->ikja", x130) * -1 x470 += einsum("ijka->ijka", x130) l2new_baba += einsum("ijka,jklb->bali", x1, x470) - x565 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x565 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x565 += einsum("ijka->ikja", x130) x565 += einsum("ijka->ijka", x130) * -1 del x130 l2new_abab += einsum("ijka,jklb->abil", x1, x565) * -1 x131 += einsum("ijka->ikja", v.bbbb.ooov) - x132 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x132 += einsum("ijab,jika->kb", t2.bbbb, x131) del x131 x159 += einsum("ia->ia", x132) * -1 del x132 - x136 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x136 += einsum("iabj->ijba", v.bbbb.ovvo) x136 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x137 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x137 += einsum("ia,ijba->jb", t1.bb, x136) x159 += einsum("ia->ia", x137) del x137 - x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x282 += einsum("ia,jkba->ijkb", t1.bb, x136) x285 += einsum("ijka->ijka", x282) x295 += einsum("ijka->ijka", x282) del x282 x571 += einsum("wia,ijba->wjb", u11.bb, x136) * -1 - x138 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x138 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x139 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x139 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x139 += einsum("wij->wij", x138) - x601 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x601 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x601 += einsum("wij->wij", x138) x139 += einsum("wij->wij", g.bb.boo) - x140 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x140 += einsum("wia,wij->ja", u11.bb, x139) x159 += einsum("ia->ia", x140) * -1 del x140 - x332 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x332 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x332 += einsum("wx,wij->xij", s2, x139) x333 += einsum("wij->wij", x332) del x332 x571 += einsum("wij,wxia->xja", x139, u12.bb) - x141 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x141 += einsum("w,wij->ij", s1, g.bb.boo) x150 += einsum("ij->ij", x141) - x449 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x449 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x449 += einsum("ij->ij", x141) del x141 - x142 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x142 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x150 += einsum("ij->ij", x142) x449 += einsum("ij->ij", x142) del x142 - x143 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x143 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x150 += einsum("ij->ij", x143) - x453 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x453 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x453 += einsum("ij->ij", x143) del x143 - x144 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x144 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x150 += einsum("ij->ji", x144) x482 += einsum("ij->ij", x144) del x144 - x483 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x483 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x483 += einsum("ij,abik->kjab", x482, l2.bbbb) del x482 - x491 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x491 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x491 += einsum("ijab->ijba", x483) * -1 del x483 - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum("iajb->jiab", v.bbbb.ovov) x145 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x146 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x146 += einsum("ijab,ikab->jk", t2.bbbb, x145) x150 += einsum("ij->ji", x146) * -1 del x146 - x516 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x516 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x516 += einsum("ijab,ikac->kjcb", x145, x52) - x518 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x518 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x518 += einsum("ijab->jiab", x516) del x516 - x539 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x539 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x539 += einsum("ijab,ijbc->ac", t2.bbbb, x145) - x540 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x540 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x540 += einsum("ab->ab", x539) * -1 del x539 - x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x147 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x147 += einsum("ijka->kija", v.bbbb.ooov) - x148 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x148 += einsum("ia,jika->jk", t1.bb, x147) x150 += einsum("ij->ij", x148) * -1 del x148 - x328 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x328 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x328 += einsum("wia,jika->wjk", u11.bb, x147) x333 += einsum("wij->wij", x328) * -1 del x328 x150 += einsum("ij->ij", f.bb.oo) - x151 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x151 += einsum("ia,ij->ja", t1.bb, x150) x159 += einsum("ia->ia", x151) * -1 del x151 - x546 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x546 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x546 += einsum("ij,abkj->kiab", x150, l2.abab) l2new_baba += einsum("ijab->baji", x546) * -1 l2new_abab += einsum("ijab->abij", x546) * -1 @@ -3010,33 +3011,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ai,ji->aj", l1.bb, x150) * -1 lu12new_bb += einsum("ij,wxaj->xwai", x150, lu12.bb) * -1 del x150 - x152 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x152 += einsum("w,wab->ab", s1, g.bb.bvv) - x156 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x156 += einsum("ab->ab", x152) - x442 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x442 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x442 += einsum("ab->ab", x152) x540 += einsum("ab->ab", x152) del x152 - x153 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x153 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x156 += einsum("ab->ab", x153) - x445 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x445 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x445 += einsum("ab->ab", x153) x540 += einsum("ab->ab", x153) del x153 - x154 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x154 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x154 += einsum("iabc->ibca", v.bbbb.ovvv) - x155 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x155 += einsum("ia,ibac->bc", t1.bb, x154) x156 += einsum("ab->ab", x155) * -1 x540 += einsum("ab->ab", x155) * -1 del x155 - x568 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x568 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x568 += einsum("wia,ibac->wbc", u11.bb, x154) * -1 x156 += einsum("ab->ab", f.bb.vv) - x157 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x157 += einsum("ia,ba->ib", t1.bb, x156) x159 += einsum("ia->ia", x157) del x157 @@ -3046,72 +3047,72 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ia,baji->bj", x159, l2.abab) ls1new += einsum("ia,wai->w", x159, lu11.bb) ls2new += einsum("ia,wxai->xw", x159, lu12.bb) - x160 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x160 += einsum("w,wia->ia", ls1, u11.aa) x178 += einsum("ia->ia", x160) * -1 del x160 - x161 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x161 += einsum("wx,wxia->ia", ls2, u12.aa) x178 += einsum("ia->ia", x161) * -0.5 del x161 - x162 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x162 += einsum("ai,jiba->jb", l1.bb, t2.abab) x178 += einsum("ia->ia", x162) * -1 del x162 - x167 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x167 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x167 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x169 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x169 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x169 += einsum("wij->wij", x167) - x242 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x242 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x242 += einsum("wij->wij", x167) - x168 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x168 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x168 += einsum("wia,wxaj->xji", u11.aa, lu12.aa) x169 += einsum("wij->wij", x168) - x170 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x170 += einsum("wia,wij->ja", u11.aa, x169) x178 += einsum("ia->ia", x170) del x170 - x247 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x247 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x247 += einsum("wx,wij->xij", s2, x169) del x169 x242 += einsum("wij->wij", x168) - x610 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x610 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x610 += einsum("wia,xji->wxja", g.aa.bov, x242) - x612 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x612 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x612 += einsum("wxia->wxia", x610) del x610 - x171 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x171 += einsum("ai,ja->ij", l1.aa, t1.aa) x176 += einsum("ij->ij", x171) x215 += einsum("ij->ij", x171) * 2 - x383 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x383 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x383 += einsum("ij->ij", x171) del x171 - x172 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x172 += einsum("wai,wja->ij", lu11.aa, u11.aa) x176 += einsum("ij->ij", x172) x215 += einsum("ij->ij", x172) * 2 x383 += einsum("ij->ij", x172) del x172 - x384 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x384 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x384 += einsum("ij,jakb->kiab", x383, v.aaaa.ovov) del x383 x390 += einsum("ijab->jiba", x384) del x384 - x173 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x173 += einsum("wxai,wxja->ij", lu12.aa, u12.aa) x176 += einsum("ij->ij", x173) * 0.5 x215 += einsum("ij->ij", x173) x411 += einsum("ij->ij", x173) * 0.5 del x173 - x174 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x174 += einsum("abij,kjab->ik", l2.abab, t2.abab) x176 += einsum("ij->ij", x174) - x177 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x177 += einsum("ia,ij->ja", t1.aa, x176) x178 += einsum("ia->ia", x177) del x177 - x549 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x549 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x549 += einsum("ij,jakb->ikab", x176, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x549) * -1 l2new_abab += einsum("ijab->abij", x549) * -1 @@ -3127,7 +3128,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x215 x411 += einsum("ij->ij", x174) del x174 - x412 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x412 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x412 += einsum("ij,jakb->kiab", x411, v.aaaa.ovov) del x411 x414 += einsum("ijab->jiba", x412) @@ -3135,10 +3136,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x178 += einsum("ia->ia", t1.aa) * -1 l1new_bb += einsum("ia,iajb->bj", x178, v.aabb.ovov) * -1 ls1new += einsum("ia,wia->w", x178, g.aa.bov) * -1 - x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x179 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x179 += einsum("iajb->jiba", v.aaaa.ovov) - x397 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x397 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x397 += einsum("ijab,kica->kjcb", x179, x33) del x33 x414 += einsum("ijab->ijab", x397) @@ -3146,23 +3147,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ia,ijab->bj", x178, x179) * -1 del x178 del x179 - x180 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x180 += einsum("ai,ib->ab", l1.aa, t1.aa) x185 += einsum("ab->ab", x180) x325 += einsum("ab->ab", x180) * 2 del x180 - x181 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x181 += einsum("wai,wib->ab", lu11.aa, u11.aa) x185 += einsum("ab->ab", x181) x325 += einsum("ab->ab", x181) * 2 - x350 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum("ab,icjb->ijac", x181, v.aaaa.ovov) x390 += einsum("ijab->ijab", x350) del x350 x548 += einsum("ab->ab", x181) x567 += einsum("ab->ab", x181) * 2 del x181 - x182 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x182 += einsum("wxai,wxib->ab", lu12.aa, u12.aa) x185 += einsum("ab->ab", x182) * 0.5 x325 += einsum("ab->ab", x182) @@ -3170,7 +3171,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x548 += einsum("ab->ab", x182) * 0.5 x567 += einsum("ab->ab", x182) del x182 - x183 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x183 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x185 += einsum("ab->ab", x183) ls1new += einsum("ab,wab->w", x185, g.aa.bvv) @@ -3178,7 +3179,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ab,icab->ci", x325, v.bbaa.ovvv) * 0.5 del x325 x402 += einsum("ab->ab", x183) - x403 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x403 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x403 += einsum("ab,ibjc->ijca", x402, v.aaaa.ovov) del x402 x414 += einsum("ijab->jiba", x403) @@ -3190,37 +3191,37 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x183 l2new_abab += einsum("ab,ibjc->acij", x567, v.aabb.ovov) * -0.5 del x567 - x186 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x186 += einsum("iabc->ibac", v.aaaa.ovvv) x186 -= einsum("iabc->ibca", v.aaaa.ovvv) - x616 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x616 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x616 -= einsum("ia,jbac->jibc", t1.aa, x186) l1new_aa += einsum("ab,iabc->ci", x185, x186) * -1 del x185 del x186 - x187 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x187 += einsum("w,wia->ia", ls1, u11.bb) x207 += einsum("ia->ia", x187) * -1 del x187 - x188 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x188 += einsum("wx,wxia->ia", ls2, u12.bb) x207 += einsum("ia->ia", x188) * -0.5 del x188 - x189 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x189 += einsum("ai,ijab->jb", l1.aa, t2.abab) x207 += einsum("ia->ia", x189) * -1 del x189 - x190 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x190 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x190 += einsum("ia,wxaj->wxji", t1.bb, lu12.bb) - x191 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x191 += einsum("wxia,wxij->ja", u12.bb, x190) x207 += einsum("ia->ia", x191) * 0.5 del x191 x299 += einsum("wxia,wxjk->jkia", u12.bb, x190) * 0.5 x301 += einsum("wxia,wxjk->ijka", u12.aa, x190) * -0.5 - x587 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x587 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x587 += einsum("wia,xwij->xja", u11.bb, x190) - x588 = np.zeros((nbos, nbos), dtype=np.float64) + x588 = np.zeros((nbos, nbos), dtype=types[float]) x588 += einsum("wia,xia->wx", g.bb.bov, x587) del x587 x605 -= einsum("wx->wx", x588) @@ -3231,13 +3232,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu12new_bb += einsum("wxij,ijka->xwak", x190, x565) * -1 del x565 lu12new_bb += einsum("ia,wxji->xwaj", x95, x190) * -1 - x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum("ia,abjk->kjib", t1.bb, l2.bbbb) - x194 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x194 += einsum("ijka,ijab->kb", x193, x52) x207 += einsum("ia->ia", x194) * -1 del x194 - x298 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x298 += einsum("ijka->ijka", x193) * -1 x298 += einsum("ijka->jika", x193) x299 += einsum("ijka,ilba->jklb", x298, x38) @@ -3245,115 +3246,115 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ijab,kjia->bk", x136, x298) * -1 del x136 del x298 - x302 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x302 += einsum("ijka->ijka", x193) x302 += einsum("ijka->jika", x193) * -1 - x303 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x303 += einsum("ia,jikb->jkba", t1.bb, x302) * -1 - x471 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x471 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x471 += einsum("ijka,jklb->ilab", x302, x470) del x302 del x470 x491 += einsum("ijab->ijab", x471) del x471 - x309 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x309 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x309 += einsum("ia,jkla->jkil", t1.bb, x193) - x310 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x310 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x310 += einsum("ijkl->ijkl", x309) - x323 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x323 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x323 += einsum("ijkl->ijkl", x309) x323 += einsum("ijkl->ijlk", x309) * -1 l1new_bb += einsum("ijka,ljki->al", v.bbbb.ooov, x323) del x323 - x497 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x497 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x497 += einsum("ijkl->ijkl", x309) del x309 - x428 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x428 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x428 += einsum("iabc,jkib->kjac", v.bbbb.ovvv, x193) x467 -= einsum("ijab->ijab", x428) del x428 - x438 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x438 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x438 += einsum("ijka->ijka", x193) x438 -= einsum("ijka->jika", x193) l2new_abab += einsum("ijka,lkjb->abil", x40, x438) * -1 - x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x490 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x490 += einsum("ia,jkib->jkba", x272, x193) del x272 x491 += einsum("ijab->ijab", x490) * -1 del x490 - x530 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x530 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x530 -= einsum("ijka->ijka", x193) x530 += einsum("ijka->jika", x193) l2new_baba += einsum("ijka,lkjb->bali", x40, x530) del x40 del x530 - x196 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x196 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x196 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x198 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x198 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x198 += einsum("wij->wij", x196) - x343 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x343 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x343 += einsum("wij->wij", x196) - x197 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x197 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x197 += einsum("wia,wxaj->xji", u11.bb, lu12.bb) x198 += einsum("wij->wij", x197) - x199 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x199 += einsum("wia,wij->ja", u11.bb, x198) x207 += einsum("ia->ia", x199) del x199 - x345 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x345 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x345 += einsum("wx,wij->xij", s2, x198) del x198 x343 += einsum("wij->wij", x197) - x628 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x628 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x628 += einsum("wia,xji->wxja", g.bb.bov, x343) - x630 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x630 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x630 += einsum("wxia->wxia", x628) del x628 - x582 = np.zeros((nbos, nbos), dtype=np.float64) + x582 = np.zeros((nbos, nbos), dtype=types[float]) x582 += einsum("wij,xji->wx", g.bb.boo, x197) x605 -= einsum("wx->wx", x582) del x582 - x589 = np.zeros((nbos, nbos), dtype=np.float64) + x589 = np.zeros((nbos, nbos), dtype=types[float]) x589 += einsum("wij,xji->wx", x138, x197) del x138 del x197 x605 -= einsum("wx->wx", x589) del x589 - x200 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x200 += einsum("ai,ja->ij", l1.bb, t1.bb) x205 += einsum("ij->ij", x200) x225 += einsum("ij->ij", x200) * 2 - x460 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x460 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x460 += einsum("ij->ij", x200) ls1new -= einsum("ij,wji->w", x200, g.bb.boo) del x200 - x201 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x201 += einsum("wai,wja->ij", lu11.bb, u11.bb) x205 += einsum("ij->ij", x201) x225 += einsum("ij->ij", x201) * 2 x460 += einsum("ij->ij", x201) - x461 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x461 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x461 += einsum("ij,jakb->kiab", x460, v.bbbb.ovov) del x460 x467 += einsum("ijab->jiba", x461) del x461 x576 += einsum("ij->ij", x201) del x201 - x202 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x202 += einsum("wxai,wxja->ij", lu12.bb, u12.bb) x205 += einsum("ij->ij", x202) * 0.5 x225 += einsum("ij->ij", x202) x488 += einsum("ij->ij", x202) * 0.5 x576 += einsum("ij->ij", x202) * 0.5 del x202 - x203 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x203 += einsum("abij,ikab->jk", l2.abab, t2.abab) x205 += einsum("ij->ij", x203) - x206 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x206 += einsum("ia,ij->ja", t1.bb, x205) x207 += einsum("ia->ia", x206) del x206 - x550 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x550 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x550 += einsum("ij,kajb->kiab", x205, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x550) * -1 l2new_abab += einsum("ijab->abij", x550) * -1 @@ -3367,7 +3368,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x225 del x147 x488 += einsum("ij->ij", x203) - x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x489 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x489 += einsum("ij,jakb->kiab", x488, v.bbbb.ovov) del x488 x491 += einsum("ijab->jiba", x489) @@ -3381,36 +3382,36 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ia,ijba->bj", x207, x93) ls1new += einsum("ia,wia->w", x207, g.bb.bov) * -1 del x207 - x208 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x208 += einsum("ai,ib->ab", l1.bb, t1.bb) x213 += einsum("ab->ab", x208) ls1new += einsum("ab,wab->w", x208, g.bb.bvv) del x208 - x209 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x209 += einsum("wai,wib->ab", lu11.bb, u11.bb) x213 += einsum("ab->ab", x209) - x425 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x425 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x425 += einsum("ab,icjb->ijac", x209, v.bbbb.ovov) x467 += einsum("ijab->ijab", x425) del x425 x547 += einsum("ab->ab", x209) x566 += einsum("ab->ab", x209) * 2 del x209 - x210 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("wxai,wxib->ab", lu12.bb, u12.bb) x213 += einsum("ab->ab", x210) * 0.5 x478 += einsum("ab->ab", x210) * 0.5 x547 += einsum("ab->ab", x210) * 0.5 x566 += einsum("ab->ab", x210) del x210 - x211 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x211 += einsum("abij,ijac->bc", l2.abab, t2.abab) x213 += einsum("ab->ab", x211) l1new_aa += einsum("ab,icab->ci", x213, v.aabb.ovvv) l1new_bb += einsum("ab,iabc->ci", x213, x154) del x213 x478 += einsum("ab->ab", x211) - x479 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x479 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x479 += einsum("ab,ibjc->ijca", x478, v.bbbb.ovov) del x478 x491 += einsum("ijab->jiba", x479) @@ -3423,16 +3424,16 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x211 l2new_abab += einsum("ab,icjb->caij", x566, v.aabb.ovov) * -0.5 del x566 - x216 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x216 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x216 += einsum("wia,wxja->xij", g.aa.bov, u12.aa) x223 += einsum("wij->wij", x216) del x216 - x217 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x217 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x217 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) x223 += einsum("wij->wij", x217) del x217 x220 += einsum("wia->wia", gc.aa.bov) - x221 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x221 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x221 += einsum("ia,wja->wij", t1.aa, x220) del x220 x223 += einsum("wij->wji", x221) @@ -3441,14 +3442,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x575 += einsum("ia,wij->wja", t1.aa, x223) l1new_aa += einsum("wai,wji->aj", lu11.aa, x223) * -1 del x223 - x226 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x226 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) x228 += einsum("wia->wia", x226) x316 += einsum("wia->wia", x226) x330 += einsum("wia->wia", x226) - x458 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x458 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x458 += einsum("wia->wia", x226) - x555 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x555 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x555 += einsum("wia->wia", x226) del x226 x228 += einsum("wia->wia", gc.bb.bov) @@ -3459,27 +3460,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x233 += einsum("wia,xia->xw", u11.aa, x229) * 0.5 x334 += einsum("wia,xia->xw", u11.aa, x229) del x229 - x230 = np.zeros((nbos, nbos), dtype=np.float64) + x230 = np.zeros((nbos, nbos), dtype=types[float]) x230 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x232 = np.zeros((nbos, nbos), dtype=np.float64) + x232 = np.zeros((nbos, nbos), dtype=types[float]) x232 += einsum("wx->wx", x230) - x603 = np.zeros((nbos, nbos), dtype=np.float64) + x603 = np.zeros((nbos, nbos), dtype=types[float]) x603 += einsum("wx->wx", x230) del x230 - x231 = np.zeros((nbos, nbos), dtype=np.float64) + x231 = np.zeros((nbos, nbos), dtype=types[float]) x231 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x232 += einsum("wx->wx", x231) x603 += einsum("wx->wx", x231) del x231 - x604 = np.zeros((nbos, nbos), dtype=np.float64) + x604 = np.zeros((nbos, nbos), dtype=types[float]) x604 += einsum("wx,yw->xy", ls2, x603) x605 += einsum("wx->xw", x604) del x604 - x611 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x611 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x611 += einsum("wx,xyai->ywia", x603, lu12.aa) x612 -= einsum("wxia->xwia", x611) del x611 - x629 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x629 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x629 += einsum("wx,xyai->ywia", x603, lu12.bb) del x603 x630 -= einsum("wxia->xwia", x629) @@ -3494,26 +3495,26 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x571 += einsum("wx,wia->xia", x232, u11.bb) * -1 x575 += einsum("wx,wia->xia", x232, u11.aa) * -1 del x232 - x234 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x234 += einsum("wx,wai->xia", s2, lu11.aa) - x238 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x238 += einsum("wia->wia", x234) del x234 - x235 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x235 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x235 += einsum("wia,baji->wjb", u11.bb, l2.abab) x238 += einsum("wia->wia", x235) - x246 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x246 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x246 += einsum("wia->wia", x235) - x248 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x248 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x248 += einsum("wia->wia", x235) del x235 - x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x236 += einsum("abij->jiab", l2.aaaa) x236 -= einsum("abij->jiba", l2.aaaa) - x237 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x237 += einsum("wia,ijab->wjb", u11.aa, x236) x238 -= einsum("wia->wia", x237) - x380 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x380 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x380 += einsum("wia,wjb->ijab", g.aa.bov, x238) x390 += einsum("ijab->ijab", x380) del x380 @@ -3521,7 +3522,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x238 x248 -= einsum("wia->wia", x237) del x237 - x558 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x558 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x558 += einsum("wia,wjb->jiba", g.bb.bov, x248) l2new_baba += einsum("ijab->baji", x558) l2new_abab += einsum("ijab->abij", x558) @@ -3531,27 +3532,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x99 lu11new_aa -= einsum("wai,ijab->wbj", g.aa.bvo, x236) del x236 - x239 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x239 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x239 += einsum("wia,iabc->wbc", u11.bb, v.bbaa.ovvv) - x241 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x241 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x241 += einsum("wab->wab", x239) x572 += einsum("wab->wab", x239) del x239 - x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x240 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x240 -= einsum("iabc->ibac", v.aaaa.ovvv) x240 += einsum("iabc->ibca", v.aaaa.ovvv) x241 -= einsum("wia,ibac->wbc", u11.aa, x240) - x356 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x356 += einsum("ia,jbca->ijbc", t1.aa, x240) - x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x357 -= einsum("ijab->ijab", x356) del x356 - x369 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x369 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x369 += einsum("ia,ibac->bc", t1.aa, x240) del x240 x370 -= einsum("ab->ab", x369) del x369 - x371 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x371 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x371 += einsum("ab,acij->ijcb", x370, l2.aaaa) del x370 x390 += einsum("ijab->jiab", x371) @@ -3563,7 +3564,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa -= einsum("wij,wja->ai", x242, x244) del x242 del x244 - x245 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x245 += einsum("abij->jiab", l2.aaaa) x245 += einsum("abij->jiba", l2.aaaa) * -1 x246 += einsum("wia,ijab->wjb", u11.aa, x245) * -1 @@ -3573,34 +3574,34 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x247 += einsum("wai,wxja->xij", lu11.aa, u12.aa) l1new_aa += einsum("wia,wji->aj", g.aa.bov, x247) * -1 del x247 - x249 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x249 += einsum("iabj->ijba", v.aaaa.ovvo) x249 -= einsum("ijab->ijab", v.aaaa.oovv) l1new_aa += einsum("ai,jiab->bj", l1.aa, x249) lu11new_aa += einsum("wai,jiab->wbj", lu11.aa, x249) del x249 - x250 = np.zeros((nbos), dtype=np.float64) + x250 = np.zeros((nbos), dtype=types[float]) x250 += einsum("w,wx->x", s1, w) x258 += einsum("w->w", x250) - x578 = np.zeros((nbos), dtype=np.float64) + x578 = np.zeros((nbos), dtype=types[float]) x578 += einsum("w->w", x250) del x250 - x251 = np.zeros((nbos), dtype=np.float64) + x251 = np.zeros((nbos), dtype=types[float]) x251 += einsum("ia,wia->w", t1.aa, gc.aa.bov) x258 += einsum("w->w", x251) x578 += einsum("w->w", x251) del x251 - x252 = np.zeros((nbos), dtype=np.float64) + x252 = np.zeros((nbos), dtype=types[float]) x252 += einsum("ia,wia->w", t1.bb, gc.bb.bov) x258 += einsum("w->w", x252) x578 += einsum("w->w", x252) del x252 - x253 = np.zeros((nbos), dtype=np.float64) + x253 = np.zeros((nbos), dtype=types[float]) x253 += einsum("wia,wxia->x", g.aa.bov, u12.aa) x258 += einsum("w->w", x253) x578 += einsum("w->w", x253) del x253 - x254 = np.zeros((nbos), dtype=np.float64) + x254 = np.zeros((nbos), dtype=types[float]) x254 += einsum("wia,wxia->x", g.bb.bov, u12.bb) x258 += einsum("w->w", x254) x578 += einsum("w->w", x254) @@ -3609,24 +3610,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("w,wai->ai", x258, lu11.aa) l1new_bb += einsum("w,wai->ai", x258, lu11.bb) del x258 - x259 = np.zeros((nbos), dtype=np.float64) + x259 = np.zeros((nbos), dtype=types[float]) x259 += einsum("w,xw->x", ls1, s2) - x264 = np.zeros((nbos), dtype=np.float64) + x264 = np.zeros((nbos), dtype=types[float]) x264 += einsum("w->w", x259) del x259 - x260 = np.zeros((nbos), dtype=np.float64) + x260 = np.zeros((nbos), dtype=types[float]) x260 += einsum("ai,wia->w", l1.aa, u11.aa) x264 += einsum("w->w", x260) del x260 - x261 = np.zeros((nbos), dtype=np.float64) + x261 = np.zeros((nbos), dtype=types[float]) x261 += einsum("ai,wia->w", l1.bb, u11.bb) x264 += einsum("w->w", x261) del x261 - x262 = np.zeros((nbos), dtype=np.float64) + x262 = np.zeros((nbos), dtype=types[float]) x262 += einsum("wai,wxia->x", lu11.aa, u12.aa) x264 += einsum("w->w", x262) del x262 - x263 = np.zeros((nbos), dtype=np.float64) + x263 = np.zeros((nbos), dtype=types[float]) x263 += einsum("wai,wxia->x", lu11.bb, u12.bb) x264 += einsum("w->w", x263) del x263 @@ -3634,36 +3635,36 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("w,wia->ai", x264, g.aa.bov) l1new_bb += einsum("w,wia->ai", x264, g.bb.bov) del x264 - x265 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x265 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) l1new_bb += einsum("iabc,jibc->aj", v.bbaa.ovvv, x265) * -1 del x265 x266 += einsum("ia->ia", f.bb.ov) - x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x267 += einsum("ia,jkab->jkib", x266, t2.bbbb) del x266 - x268 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("ijka->kjia", x267) del x267 x268 += einsum("ijak->ijka", v.bbbb.oovo) * -1 x285 += einsum("ijka->kija", x268) x285 += einsum("ijka->jika", x268) * -1 del x268 - x269 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x269 += einsum("ijab,kbca->jikc", t2.bbbb, v.bbbb.ovvv) x278 += einsum("ijka->ijka", x269) * -1 del x269 - x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x270 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) - x271 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x271 += einsum("ia,jkba->ijkb", t1.bb, x270) del x270 x278 += einsum("ijka->ijka", x271) * -1 del x271 - x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x274 += einsum("ijab,kalb->ijkl", t2.bbbb, v.bbbb.ovov) x276 += einsum("ijkl->jilk", x274) - x277 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x277 += einsum("ia,jkil->jkla", t1.bb, x276) del x276 x278 += einsum("ijka->jika", x277) @@ -3673,33 +3674,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x278 x495 += einsum("ijkl->jilk", x274) del x274 - x496 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x496 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x496 += einsum("abij,ijkl->klab", l2.bbbb, x495) del x495 - x499 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x499 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x499 += einsum("ijab->jiba", x496) del x496 x279 += einsum("ijka->jkia", v.bbbb.ooov) * -1 x279 += einsum("ijka->jika", v.bbbb.ooov) - x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x280 += einsum("ijka,jlba->likb", x279, x38) del x279 x285 += einsum("ijka->jkia", x280) x295 += einsum("ijka->jkia", x280) del x280 - x283 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x283 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x283 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x284 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x284 += einsum("ijkl->jkli", x283) x284 += einsum("ijkl->kjli", x283) * -1 - x294 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x294 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x294 += einsum("ijkl->ikjl", x283) * -1 x294 += einsum("ijkl->ijkl", x283) x295 += einsum("ia,jikl->jkla", t1.bb, x294) * -1 del x294 l1new_bb += einsum("abij,ikjb->ak", l2.bbbb, x295) * -1 del x295 - x427 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x427 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x427 += einsum("abij,jkli->klba", l2.bbbb, x283) del x283 x467 -= einsum("ijab->ijab", x427) @@ -3710,33 +3711,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x284 l1new_bb += einsum("abij,ikja->bk", l2.bbbb, x285) del x285 - x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x286 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x289 += einsum("ijab->ijab", x286) - x468 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x468 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x468 += einsum("ijab->ijab", x286) del x286 - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x287 += einsum("abij->jiab", l2.bbbb) * -1 x287 += einsum("abij->jiba", l2.bbbb) - x288 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x288 += einsum("ijab,ikac->kjcb", x287, x38) del x38 x289 += einsum("ijab->jiba", x288) x468 += einsum("ijab->jiba", x288) del x288 - x469 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x469 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x469 += einsum("ijab,kica->jkbc", x145, x468) del x145 del x468 x491 += einsum("ijab->jiba", x469) * -1 del x469 - x344 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x344 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x344 += einsum("wia,ijba->wjb", u11.bb, x287) * -1 - x472 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x472 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x472 += einsum("ijab,jkcb->ikac", t2.abab, x287) - x473 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x473 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x473 += einsum("iajb,ikac->jkbc", v.aabb.ovov, x472) * -1 del x472 x491 += einsum("ijab->jiba", x473) @@ -3752,11 +3753,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x293 += einsum("ijab,kjlb->ikla", t2.abab, x290) * -1 x317 += einsum("wxia,jika->xwjk", u12.bb, x290) * -0.5 del x290 - x291 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x291 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x291 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x292 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x292 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x292 += einsum("ijab->jiab", x291) - x525 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x525 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x525 += einsum("ijab->jiab", x291) del x291 x292 += einsum("ijab->ijab", v.bbaa.oovv) @@ -3767,14 +3768,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x293 += einsum("ijab,kbca->ikjc", t2.abab, v.bbaa.ovvv) l1new_bb += einsum("abij,ikja->bk", l2.abab, x293) * -1 del x293 - x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x296 += einsum("abij->jiab", l2.bbbb) x296 += einsum("abij->jiba", l2.bbbb) * -1 x297 += einsum("ijab,jkcb->ikac", t2.abab, x296) * -2 x297 += einsum("wxai,wxjb->jiba", lu12.bb, u12.aa) * -1 l1new_bb += einsum("iabc,ijab->cj", v.aabb.ovvv, x297) * -0.5 del x297 - x300 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x300 += einsum("iajb->jiab", v.bbbb.ovov) x300 -= einsum("iajb->jiba", v.bbbb.ovov) l1new_bb += einsum("ijka,jkab->bi", x299, x300) * -1 @@ -3783,62 +3784,62 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x301 += einsum("ai,jkba->jikb", l1.bb, t2.abab) * -1 l1new_bb += einsum("iajb,ikja->bk", v.aabb.ovov, x301) del x301 - x304 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x304 += einsum("iabc->ibac", v.bbbb.ovvv) x304 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x517 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x517 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x517 += einsum("ia,jbac->ijbc", t1.bb, x304) x518 += einsum("ijab->jiab", x517) * -1 del x517 l1new_bb += einsum("ijab,jabc->ci", x303, x304) del x304 del x303 - x305 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x305 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x305 += einsum("ia,bacd->icbd", t1.bb, v.bbbb.vvvv) - x306 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x306 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x306 += einsum("iabc->iabc", x305) * -1 del x305 x306 += einsum("aibc->iabc", v.bbbb.vovv) - x307 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x307 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x307 += einsum("iabc->iabc", x306) * -1 x307 += einsum("iabc->ibac", x306) del x306 l1new_bb += einsum("abij,iabc->cj", l2.bbbb, x307) * -1 del x307 - x308 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x308 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x308 += einsum("abij,klba->ijlk", l2.bbbb, t2.bbbb) x310 += einsum("ijkl->jilk", x308) - x311 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x311 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x311 += einsum("ia,ijkl->jkla", t1.bb, x310) del x310 - x312 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x312 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x312 += einsum("ijka->ijka", x311) x312 += einsum("ijka->ikja", x311) * -1 del x311 l1new_bb += einsum("iajb,kijb->ak", v.bbbb.ovov, x312) * -1 del x312 - x322 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x322 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x322 += einsum("ijkl->jikl", x308) * -1 x322 += einsum("ijkl->jilk", x308) l1new_bb += einsum("ijka,jlik->al", v.bbbb.ooov, x322) del x322 x497 += einsum("ijkl->jilk", x308) del x308 - x498 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x498 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x498 += einsum("iajb,klji->klab", v.bbbb.ovov, x497) del x497 x499 += einsum("ijab->jiab", x498) del x498 - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum("ijab->abij", x499) l2new_bbbb += einsum("ijab->baij", x499) * -1 del x499 - x313 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x313 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x313 += einsum("aibc->iabc", v.aabb.vovv) x313 += einsum("ia,bacd->ibcd", t1.aa, v.aabb.vvvv) l1new_bb += einsum("abij,iabc->cj", l2.abab, x313) del x313 - x314 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x314 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x314 += einsum("wx,xia->wia", s2, g.bb.bov) x316 += einsum("wia->wia", x314) x555 += einsum("wia->wia", x314) @@ -3851,37 +3852,37 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x52 x575 += einsum("wia,jiba->wjb", x316, t2.abab) * -1 del x316 - x318 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x318 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x318 += einsum("ai,jkba->ijkb", l1.bb, t2.bbbb) - x319 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x319 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x319 += einsum("ijka->ikja", x318) x319 += einsum("ijka->ijka", x318) * -1 del x318 l1new_bb += einsum("iajb,kija->bk", v.bbbb.ovov, x319) del x319 - x320 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x320 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x320 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x321 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x321 += einsum("ijab->ijab", x320) - x436 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x436 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x436 += einsum("ijab->ijab", x320) x507 += einsum("ijab->ijab", x320) - x632 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x632 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x632 += einsum("ijab->ijab", x320) del x320 x321 += einsum("iabj->jiba", v.bbaa.ovvo) l1new_bb += einsum("ijka,ikab->bj", x1, x321) * -1 del x321 - x326 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x326 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x326 += einsum("wia,wxja->xij", g.bb.bov, u12.bb) x333 += einsum("wij->wij", x326) del x326 - x327 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x327 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x327 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) x333 += einsum("wij->wij", x327) del x327 x330 += einsum("wia->wia", gc.bb.bov) - x331 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x331 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x331 += einsum("ia,wja->wij", t1.bb, x330) x333 += einsum("wij->wji", x331) del x331 @@ -3892,27 +3893,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x571 += einsum("ia,wij->wja", t1.bb, x333) l1new_bb += einsum("wai,wji->aj", lu11.bb, x333) * -1 del x333 - x335 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x335 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x335 += einsum("wx,wai->xia", s2, lu11.bb) - x339 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x339 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x339 += einsum("wia->wia", x335) del x335 - x336 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x336 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x336 += einsum("wia,abij->wjb", u11.aa, l2.abab) x339 += einsum("wia->wia", x336) x344 += einsum("wia->wia", x336) x345 += einsum("ia,wja->wji", t1.bb, x344) del x344 - x346 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x346 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x346 += einsum("wia->wia", x336) del x336 - x337 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x337 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x337 -= einsum("abij->jiab", l2.bbbb) x337 += einsum("abij->jiba", l2.bbbb) - x338 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x338 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x338 += einsum("wia,ijba->wjb", u11.bb, x337) x339 -= einsum("wia->wia", x338) - x455 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x455 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x455 += einsum("wia,wjb->ijab", g.bb.bov, x339) x467 += einsum("ijab->ijab", x455) del x455 @@ -3920,7 +3921,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x339 x346 -= einsum("wia->wia", x338) del x338 - x557 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x557 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x557 += einsum("wia,wjb->ijab", g.aa.bov, x346) l2new_baba += einsum("ijab->baji", x557) l2new_abab += einsum("ijab->abij", x557) @@ -3929,22 +3930,22 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x346 del x139 lu11new_bb -= einsum("wai,ijba->wbj", g.bb.bvo, x337) - x340 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x340 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x340 += einsum("wia,iabc->wbc", u11.aa, v.aabb.ovvv) - x342 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x342 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x342 += einsum("wab->wab", x340) x568 += einsum("wab->wab", x340) del x340 - x341 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x341 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x341 -= einsum("iabc->ibac", v.bbbb.ovvv) x341 += einsum("iabc->ibca", v.bbbb.ovvv) x342 -= einsum("wia,ibac->wbc", u11.bb, x341) - x444 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x444 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x444 += einsum("ia,ibac->bc", t1.bb, x341) del x341 x445 -= einsum("ab->ab", x444) del x444 - x446 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x446 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x446 += einsum("ab,acij->ijcb", x445, l2.bbbb) del x445 x467 += einsum("ijab->jiab", x446) @@ -3956,77 +3957,77 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x345 += einsum("wai,wxja->xij", lu11.bb, u12.bb) l1new_bb += einsum("wia,wji->aj", g.bb.bov, x345) * -1 del x345 - x347 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x347 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x347 += einsum("iabj->ijba", v.bbbb.ovvo) x347 -= einsum("ijab->ijab", v.bbbb.oovv) l1new_bb += einsum("ai,jiab->bj", l1.bb, x347) lu11new_bb += einsum("wai,jiab->wbj", lu11.bb, x347) del x347 - x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x348 += einsum("wia,wbj->ijab", gc.aa.bov, lu11.aa) x390 += einsum("ijab->ijab", x348) del x348 - x349 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x349 += einsum("ai,jbac->ijbc", l1.aa, v.aaaa.ovvv) x390 -= einsum("ijab->ijab", x349) del x349 - x355 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x355 -= einsum("abij->jiab", l2.aaaa) x355 += einsum("abij->jiba", l2.aaaa) x357 += einsum("iabj->jiba", v.aaaa.ovvo) x357 -= einsum("ijab->jiab", v.aaaa.oovv) - x358 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x358 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x358 += einsum("ijab,ikac->jkbc", x355, x357) del x355 del x357 x390 += einsum("ijab->ijab", x358) del x358 - x359 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x359 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x359 -= einsum("ijab->jiab", t2.bbbb) x359 += einsum("ijab->jiba", t2.bbbb) - x360 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x360 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x360 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x359) x361 -= einsum("ijab->ijab", x360) del x360 - x595 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x595 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x595 += einsum("wia,ijba->wjb", g.bb.bov, x359) del x359 - x596 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x596 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x596 -= einsum("wia->wia", x595) del x595 x361 += einsum("iabj->ijab", v.aabb.ovvo) - x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x362 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x362 += einsum("abij,kjcb->ikac", l2.abab, x361) del x361 x390 += einsum("ijab->ijab", x362) del x362 - x364 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x364 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x364 += einsum("ijka->ikja", v.aaaa.ooov) x364 -= einsum("ijka->kija", v.aaaa.ooov) - x365 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x365 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x365 += einsum("ijka,lkib->jlab", x363, x364) del x363 x390 += einsum("ijab->ijab", x365) del x365 l2new_abab += einsum("ijka,kjlb->abil", x364, x55) del x364 - x366 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x366 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x366 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x367 -= einsum("ab->ba", x366) x543 += einsum("ab->ba", x366) * -1 del x366 x367 += einsum("ab->ab", f.aa.vv) - x368 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x368 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x368 += einsum("ab,acij->ijcb", x367, l2.aaaa) del x367 x390 -= einsum("ijab->jiba", x368) del x368 x372 += einsum("ia->ia", f.aa.ov) - x373 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x373 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x373 += einsum("ia,ja->ij", t1.aa, x372) x374 += einsum("ij->ji", x373) del x373 - x385 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x385 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x385 += einsum("ia,jkib->jkba", x372, x56) del x56 x390 += einsum("ijab->ijba", x385) @@ -4034,19 +4035,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x390 += einsum("ai,jb->jiba", l1.aa, x372) del x372 x374 += einsum("ij->ij", f.aa.oo) - x375 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x375 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x375 += einsum("ij,abjk->kiab", x374, l2.aaaa) del x374 x390 += einsum("ijab->jiba", x375) del x375 - x376 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x376 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x376 -= einsum("ijka->ikja", v.aaaa.ooov) x376 += einsum("ijka->kija", v.aaaa.ooov) - x377 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x377 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x377 += einsum("ia,jika->jk", t1.aa, x376) x378 -= einsum("ij->ij", x377) del x377 - x379 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x379 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x379 += einsum("ij,abjk->kiab", x378, l2.aaaa) del x378 x390 -= einsum("ijab->ijba", x379) @@ -4057,7 +4058,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x376 del x54 x386 -= einsum("ijka->jika", v.aaaa.ooov) - x387 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x387 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x387 += einsum("ai,ijkb->jkab", l1.aa, x386) del x386 x390 += einsum("ijab->ijab", x387) @@ -4067,10 +4068,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_aaaa -= einsum("ijab->abji", x390) l2new_aaaa += einsum("ijab->baji", x390) del x390 - x391 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x391 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x391 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) x393 += einsum("ijab->ijab", x391) - x394 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x394 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x394 += einsum("ijab,ikac->jkbc", x34, x393) del x393 del x34 @@ -4078,24 +4079,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x394 x513 += einsum("ijab->jiab", x391) del x391 - x398 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x398 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x398 += einsum("wxia,jbia->wxjb", u12.bb, v.aabb.ovov) x400 += einsum("wxia->xwia", x398) del x398 - x401 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x401 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x401 += einsum("wxai,wxjb->ijab", lu12.aa, x400) * 0.5 x414 += einsum("ijab->ijab", x401) del x401 - x538 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x538 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x538 += einsum("wxai,wxjb->jiba", lu12.bb, x400) * 0.5 del x400 l2new_baba += einsum("ijab->baji", x538) l2new_abab += einsum("ijab->abij", x538) del x538 - x407 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x407 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x407 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x409 += einsum("ab->ab", x407) - x410 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x410 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x410 += einsum("ab,acij->ijcb", x409, l2.aaaa) del x409 x414 += einsum("ijab->jiab", x410) * -1 @@ -4107,90 +4108,90 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x414 x543 += einsum("ab->ab", x407) * -1 del x407 - x415 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x415 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x415 += einsum("abij,kilj->klab", l2.aaaa, v.aaaa.oooo) - x417 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x417 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x417 += einsum("ijab->jiba", x415) del x415 - x416 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x416 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x416 += einsum("abij,bcad->ijdc", l2.aaaa, v.aaaa.vvvv) x417 += einsum("ijab->jiba", x416) del x416 l2new_aaaa += einsum("ijab->baij", x417) * -1 l2new_aaaa += einsum("ijab->abij", x417) del x417 - x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x423 += einsum("wia,wbj->ijab", gc.bb.bov, lu11.bb) x467 += einsum("ijab->ijab", x423) del x423 - x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x424 += einsum("ai,jbac->ijbc", l1.bb, v.bbbb.ovvv) x467 -= einsum("ijab->ijab", x424) del x424 - x430 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x430 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x430 += einsum("iabc->ibac", v.bbbb.ovvv) x430 -= einsum("iabc->ibca", v.bbbb.ovvv) - x431 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x431 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x431 += einsum("ia,jbac->ijbc", t1.bb, x430) del x430 - x432 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x432 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x432 -= einsum("ijab->ijab", x431) - x631 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x631 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x631 -= einsum("ijab->jiab", x431) del x431 x432 += einsum("iabj->jiba", v.bbbb.ovvo) x432 -= einsum("ijab->jiab", v.bbbb.oovv) - x433 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x433 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x433 += einsum("ijab,ikac->jkbc", x337, x432) del x432 del x337 x467 += einsum("ijab->ijab", x433) del x433 - x434 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x434 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x434 += einsum("ijab->jiab", t2.aaaa) x434 -= einsum("ijab->jiba", t2.aaaa) - x435 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x435 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x435 += einsum("iajb,ikac->kjcb", v.aabb.ovov, x434) x436 -= einsum("ijab->ijab", x435) del x435 - x591 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x591 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x591 += einsum("wia,ijab->wjb", g.aa.bov, x434) del x434 - x592 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x592 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x592 -= einsum("wia->wia", x591) del x591 x436 += einsum("iabj->jiba", v.bbaa.ovvo) - x437 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x437 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x437 += einsum("abij,ikac->jkbc", l2.abab, x436) del x436 x467 += einsum("ijab->ijab", x437) del x437 - x439 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x439 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x439 += einsum("ijka->ikja", v.bbbb.ooov) x439 -= einsum("ijka->kija", v.bbbb.ooov) - x440 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x440 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x440 += einsum("ijka,lkjb->ilab", x438, x439) del x438 del x439 x467 += einsum("ijab->ijab", x440) del x440 - x441 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x441 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x441 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x442 -= einsum("ab->ba", x441) x540 += einsum("ab->ba", x441) * -1 del x441 x442 += einsum("ab->ab", f.bb.vv) - x443 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x443 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x443 += einsum("ab,acij->ijcb", x442, l2.bbbb) del x442 x467 -= einsum("ijab->jiba", x443) del x443 x447 += einsum("ia->ia", f.bb.ov) - x448 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x448 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x448 += einsum("ia,ja->ij", t1.bb, x447) x449 += einsum("ij->ji", x448) del x448 - x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x462 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x462 += einsum("ia,jkib->jkba", x447, x193) del x193 x467 += einsum("ijab->ijba", x462) @@ -4198,24 +4199,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x467 += einsum("ai,jb->jiba", l1.bb, x447) del x447 x449 += einsum("ij->ij", f.bb.oo) - x450 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x450 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x450 += einsum("ij,abjk->kiab", x449, l2.bbbb) del x449 x467 += einsum("ijab->jiba", x450) del x450 - x451 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x451 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x451 -= einsum("ijka->ikja", v.bbbb.ooov) x451 += einsum("ijka->kija", v.bbbb.ooov) - x452 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x452 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x452 += einsum("ia,jika->jk", t1.bb, x451) x453 -= einsum("ij->ij", x452) del x452 - x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x454 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x454 += einsum("ij,abjk->kiab", x453, l2.bbbb) del x453 x467 -= einsum("ijab->ijba", x454) del x454 - x536 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x536 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x536 += einsum("ijka,lkjb->ilab", x1, x451) del x1 l2new_baba -= einsum("ijab->baji", x536) @@ -4224,20 +4225,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu12new_bb -= einsum("wxij,kjia->xwak", x190, x451) del x451 del x190 - x456 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x456 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x456 -= einsum("iajb->jiab", v.bbbb.ovov) x456 += einsum("iajb->jiba", v.bbbb.ovov) - x457 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x457 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x457 += einsum("wia,ijba->wjb", u11.bb, x456) x458 -= einsum("wia->wia", x457) - x459 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x459 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x459 += einsum("wai,wjb->ijab", lu11.bb, x458) del x458 x467 += einsum("ijab->ijab", x459) del x459 x555 -= einsum("wia->wia", x457) del x457 - x465 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x465 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x465 += einsum("ia,ijba->jb", t1.bb, x456) del x456 x466 -= einsum("ia->ia", x465) @@ -4246,7 +4247,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x563 -= einsum("ia->ia", x465) del x465 x463 -= einsum("ijka->jika", v.bbbb.ooov) - x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x464 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x464 += einsum("ai,ijkb->jkab", l1.bb, x463) del x463 x467 += einsum("ijab->ijab", x464) @@ -4256,24 +4257,24 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_bbbb -= einsum("ijab->abji", x467) l2new_bbbb += einsum("ijab->baji", x467) del x467 - x474 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x474 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x474 += einsum("wxia,iajb->wxjb", u12.aa, v.aabb.ovov) x476 += einsum("wxia->xwia", x474) del x474 - x477 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x477 += einsum("wxai,wxjb->ijab", lu12.bb, x476) * 0.5 x491 += einsum("ijab->ijab", x477) del x477 - x537 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x537 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x537 += einsum("wxai,wxjb->ijab", lu12.aa, x476) * 0.5 del x476 l2new_baba += einsum("ijab->baji", x537) l2new_abab += einsum("ijab->abij", x537) del x537 - x484 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x484 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x484 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) x486 += einsum("ab->ab", x484) - x487 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x487 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x487 += einsum("ab,acij->ijcb", x486, l2.bbbb) del x486 x491 += einsum("ijab->jiab", x487) * -1 @@ -4285,35 +4286,35 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x491 x540 += einsum("ab->ab", x484) * -1 del x484 - x492 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x492 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x492 += einsum("abij,kilj->klab", l2.bbbb, v.bbbb.oooo) - x494 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x494 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x494 += einsum("ijab->jiba", x492) del x492 - x493 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x493 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x493 += einsum("abij,bcad->ijdc", l2.bbbb, v.bbbb.vvvv) x494 += einsum("ijab->jiba", x493) del x493 l2new_bbbb += einsum("ijab->baij", x494) * -1 l2new_bbbb += einsum("ijab->abij", x494) del x494 - x501 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x501 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x501 += einsum("abij,acbd->ijcd", l2.abab, v.aabb.vvvv) l2new_baba += einsum("ijab->baji", x501) l2new_abab += einsum("ijab->abij", x501) del x501 - x502 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x502 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x502 += einsum("ai,jbac->ijcb", l1.aa, v.bbaa.ovvv) l2new_baba += einsum("ijab->baji", x502) l2new_abab += einsum("ijab->abij", x502) del x502 - x504 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x504 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x504 += einsum("ai,jbac->jibc", l1.bb, v.aabb.ovvv) l2new_baba += einsum("ijab->baji", x504) l2new_abab += einsum("ijab->abij", x504) del x504 x507 += einsum("iabj->jiba", v.bbaa.ovvo) - x508 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x508 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x508 += einsum("ijab,ikac->jkbc", x245, x507) del x507 del x245 @@ -4328,60 +4329,60 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x287 x513 += einsum("iabj->ijba", v.aaaa.ovvo) x513 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x514 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x514 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x514 += einsum("abij,kiac->kjcb", l2.abab, x513) del x513 l2new_baba += einsum("ijab->baji", x514) l2new_abab += einsum("ijab->abij", x514) del x514 - x515 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x515 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x515 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) x518 += einsum("ijab->jiab", x515) del x515 x518 += einsum("iabj->ijba", v.bbbb.ovvo) x518 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x519 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x519 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x519 += einsum("abij,kjbc->ikac", l2.abab, x518) del x518 l2new_baba += einsum("ijab->baji", x519) l2new_abab += einsum("ijab->abij", x519) del x519 - x520 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x520 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x520 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x522 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x522 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x522 += einsum("ijab->jiab", x520) del x520 - x521 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x521 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x521 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x522 += einsum("ijab->jiab", x521) * -1 del x521 x522 += einsum("ijab->ijab", v.aabb.oovv) - x523 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x523 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x523 += einsum("abij,kibc->kjac", l2.abab, x522) del x522 l2new_baba += einsum("ijab->baji", x523) * -1 l2new_abab += einsum("ijab->abij", x523) * -1 del x523 - x524 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x524 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x524 += einsum("ijab,ickb->jkac", t2.abab, v.aabb.ovov) x525 += einsum("ijab->jiab", x524) * -1 del x524 x525 += einsum("ijab->ijab", v.bbaa.oovv) - x526 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x526 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x526 += einsum("abij,kjac->ikcb", l2.abab, x525) del x525 l2new_baba += einsum("ijab->baji", x526) * -1 l2new_abab += einsum("ijab->abij", x526) * -1 del x526 x528 += einsum("ijkl->ijkl", v.aabb.oooo) - x529 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x529 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x529 += einsum("abij,kilj->klab", l2.abab, x528) del x528 l2new_baba += einsum("ijab->baji", x529) l2new_abab += einsum("ijab->abij", x529) del x529 x540 += einsum("ab->ab", f.bb.vv) - x541 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x541 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x541 += einsum("ab,caij->ijcb", x540, l2.abab) l2new_baba += einsum("ijab->baji", x541) l2new_abab += einsum("ijab->abij", x541) @@ -4390,7 +4391,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu12new_bb += einsum("ab,wxai->xwbi", x540, lu12.bb) del x540 x543 += einsum("ab->ab", f.aa.vv) - x544 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x544 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x544 += einsum("ab,acij->ijbc", x543, l2.abab) l2new_baba += einsum("ijab->baji", x544) l2new_abab += einsum("ijab->abij", x544) @@ -4399,28 +4400,28 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu12new_aa += einsum("ab,wxai->xwbi", x543, lu12.aa) del x543 x553 += einsum("wia->wia", gc.aa.bov) - x554 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x554 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x554 += einsum("wai,wjb->jiba", lu11.bb, x553) del x553 l2new_baba += einsum("ijab->baji", x554) l2new_abab += einsum("ijab->abij", x554) del x554 x555 += einsum("wia->wia", gc.bb.bov) - x556 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x556 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x556 += einsum("wai,wjb->ijab", lu11.aa, x555) del x555 l2new_baba += einsum("ijab->baji", x556) l2new_abab += einsum("ijab->abij", x556) del x556 x559 += einsum("ijka->ijka", v.aabb.ooov) - x560 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x560 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x560 += einsum("ai,jikb->jkab", l1.aa, x559) del x559 l2new_baba -= einsum("ijab->baji", x560) l2new_abab -= einsum("ijab->abij", x560) del x560 x561 += einsum("iajk->ijka", v.aabb.ovoo) - x562 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x562 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x562 += einsum("ai,jkib->jkba", l1.bb, x561) del x561 l2new_baba -= einsum("ijab->baji", x562) @@ -4439,9 +4440,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x568 += einsum("wab->wab", gc.bb.bvv) x571 += einsum("ia,wba->wib", t1.bb, x568) * -1 del x568 - x569 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x569 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x569 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) - x570 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x570 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x570 += einsum("wia->wia", x569) x596 += einsum("wia->wia", x569) del x569 @@ -4456,9 +4457,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x572 += einsum("wab->wab", gc.aa.bvv) x575 += einsum("ia,wba->wib", t1.aa, x572) * -1 del x572 - x573 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x573 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x573 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) - x574 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x574 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x574 += einsum("wia->wia", x573) x592 += einsum("wia->wia", x573) del x573 @@ -4477,70 +4478,70 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x578 += einsum("w->w", G) ls1new += einsum("w,wx->x", x578, ls2) del x578 - x579 = np.zeros((nbos, nbos), dtype=np.float64) + x579 = np.zeros((nbos, nbos), dtype=types[float]) x579 += einsum("wx,yx->wy", ls2, w) x605 += einsum("wx->wx", x579) del x579 - x580 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x580 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x580 += einsum("wia,wxbi->xba", u11.aa, lu12.aa) - x581 = np.zeros((nbos, nbos), dtype=np.float64) + x581 = np.zeros((nbos, nbos), dtype=types[float]) x581 += einsum("wab,xab->wx", g.aa.bvv, x580) x605 += einsum("wx->wx", x581) del x581 - x608 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x608 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x608 += einsum("wia,xba->wxib", g.aa.bov, x580) del x580 x612 += einsum("wxia->wxia", x608) del x608 - x583 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x583 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x583 += einsum("wia,xwbi->xba", u11.bb, lu12.bb) - x584 = np.zeros((nbos, nbos), dtype=np.float64) + x584 = np.zeros((nbos, nbos), dtype=types[float]) x584 += einsum("wab,xab->wx", g.bb.bvv, x583) x605 += einsum("wx->wx", x584) del x584 - x626 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x626 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x626 += einsum("wia,xba->wxib", g.bb.bov, x583) del x583 x630 += einsum("wxia->wxia", x626) del x626 - x590 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x590 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x590 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x592 += einsum("wia->wia", x590) del x590 x592 += einsum("wai->wia", g.aa.bvo) - x593 = np.zeros((nbos, nbos), dtype=np.float64) + x593 = np.zeros((nbos, nbos), dtype=types[float]) x593 += einsum("wai,xia->wx", lu11.aa, x592) del x592 x605 += einsum("wx->xw", x593) del x593 - x594 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x594 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x594 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x596 += einsum("wia->wia", x594) del x594 x596 += einsum("wai->wia", g.bb.bvo) - x597 = np.zeros((nbos, nbos), dtype=np.float64) + x597 = np.zeros((nbos, nbos), dtype=types[float]) x597 += einsum("wai,xia->wx", lu11.bb, x596) del x596 x605 += einsum("wx->xw", x597) del x597 x598 += einsum("wij->wij", g.aa.boo) - x599 = np.zeros((nbos, nbos), dtype=np.float64) + x599 = np.zeros((nbos, nbos), dtype=types[float]) x599 += einsum("wij,xji->wx", x167, x598) del x167 x605 -= einsum("wx->xw", x599) del x599 - x600 = np.zeros((nbos, nbos), dtype=np.float64) + x600 = np.zeros((nbos, nbos), dtype=types[float]) x600 += einsum("wij,xji->wx", x168, x598) del x168 x605 -= einsum("wx->xw", x600) del x600 - x609 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x609 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x609 += einsum("wai,xji->wxja", lu11.aa, x598) del x598 x612 += einsum("wxia->xwia", x609) del x609 x601 += einsum("wij->wij", g.bb.boo) - x602 = np.zeros((nbos, nbos), dtype=np.float64) + x602 = np.zeros((nbos, nbos), dtype=types[float]) x602 += einsum("wij,xji->wx", x196, x601) del x196 x605 -= einsum("wx->xw", x602) @@ -4548,23 +4549,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls2new += einsum("wx->wx", x605) ls2new += einsum("wx->xw", x605) del x605 - x627 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x627 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x627 += einsum("wai,xji->wxja", lu11.bb, x601) del x601 x630 += einsum("wxia->xwia", x627) del x627 - x606 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x606 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x606 += einsum("wx,xyai->ywia", w, lu12.aa) x612 -= einsum("wxia->wxia", x606) del x606 - x607 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x607 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x607 += einsum("wab,xai->wxib", g.aa.bvv, lu11.aa) x612 -= einsum("wxia->wxia", x607) del x607 lu12new_aa -= einsum("wxia->wxai", x612) lu12new_aa -= einsum("wxia->xwai", x612) del x612 - x613 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x613 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x613 += einsum("wxai,jiba->wxjb", lu12.bb, t2.abab) x615 += einsum("wxia->xwia", x613) del x613 @@ -4576,7 +4577,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x616 -= einsum("ijab->ijab", v.aaaa.oovv) lu12new_aa += einsum("wxai,jiab->xwbj", lu12.aa, x616) del x616 - x617 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x617 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x617 += einsum("wxai,ijab->wxjb", lu12.aa, t2.abab) x619 += einsum("wxia->xwia", x617) del x617 @@ -4587,23 +4588,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x620 += einsum("iabj->ijab", v.aabb.ovvo) lu12new_aa += einsum("wxai,jiba->xwbj", lu12.bb, x620) del x620 - x621 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x621 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x621 += einsum("wia,xyai->xyw", u11.aa, lu12.aa) - x623 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x623 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x623 += einsum("wxy->xwy", x621) del x621 - x622 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x622 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x622 += einsum("wia,xyai->xyw", u11.bb, lu12.bb) x623 += einsum("wxy->xwy", x622) del x622 lu12new_aa += einsum("wia,xyw->yxai", g.aa.bov, x623) lu12new_bb += einsum("wia,xyw->yxai", g.bb.bov, x623) del x623 - x624 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x624 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x624 += einsum("wx,xyai->ywia", w, lu12.bb) x630 -= einsum("wxia->wxia", x624) del x624 - x625 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x625 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x625 += einsum("wab,xai->wxib", g.bb.bvv, lu11.bb) x630 -= einsum("wxia->wxia", x625) del x625 @@ -4698,141 +4699,141 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 1RDM - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("abij,kjab->ik", l2.abab, t2.abab) - x17 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x17 += einsum("ij->ij", x0) * 2 - rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_oo_aa += einsum("ij->ij", x0) * -1 del x0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("wxai,wxja->ij", lu12.aa, u12.aa) x17 += einsum("ij->ij", x1) rdm1_f_oo_aa += einsum("ij->ij", x1) * -0.5 del x1 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum("ai,ja->ij", l1.aa, t1.aa) x17 += einsum("ij->ij", x2) * 2 rdm1_f_oo_aa -= einsum("ij->ij", x2) del x2 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum("wai,wja->ij", lu11.aa, u11.aa) x17 += einsum("ij->ij", x3) * 2 rdm1_f_oo_aa -= einsum("ij->ij", x3) del x3 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum("ijab->jiab", t2.aaaa) * -1 x4 += einsum("ijab->jiba", t2.aaaa) rdm1_f_oo_aa += einsum("abij,ikab->jk", l2.aaaa, x4) * -1 del x4 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum("wxai,wxja->ij", lu12.bb, u12.bb) - x24 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x24 += einsum("ij->ij", x5) * 0.5 - rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_oo_bb += einsum("ij->ij", x5) * -0.5 del x5 - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum("wai,wja->ij", lu11.bb, u11.bb) x24 += einsum("ij->ij", x6) rdm1_f_oo_bb -= einsum("ij->ij", x6) del x6 - x7 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x7 += einsum("ai,ja->ij", l1.bb, t1.bb) x24 += einsum("ij->ij", x7) rdm1_f_oo_bb -= einsum("ij->ij", x7) del x7 - x8 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x8 += einsum("abij,ikab->jk", l2.abab, t2.abab) x24 += einsum("ij->ij", x8) rdm1_f_oo_bb += einsum("ij->ij", x8) * -1 del x8 - x9 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x9 += einsum("ijab->jiab", t2.bbbb) * -1 x9 += einsum("ijab->jiba", t2.bbbb) x24 += einsum("abij,ikba->jk", l2.bbbb, x9) * -1 - rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_vo_bb += einsum("ia,ij->aj", t1.bb, x24) * -1 del x24 rdm1_f_oo_bb += einsum("abij,ikab->jk", l2.bbbb, x9) * -1 del x9 - x10 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x10 += einsum("ia,wxaj->wxji", t1.aa, lu12.aa) - rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_vo_aa += einsum("wxia,wxij->aj", u12.aa, x10) * -0.5 del x10 - x11 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("ia,abjk->jikb", t1.aa, l2.abab) rdm1_f_vo_aa += einsum("ijab,ikjb->ak", t2.abab, x11) * -1 del x11 - x12 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x12 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x13 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x13 += einsum("ijka->ijka", x12) x13 += einsum("ijka->jika", x12) * -1 del x12 rdm1_f_vo_aa += einsum("ijab,jikb->ak", t2.aaaa, x13) * -1 del x13 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum("ijab->jiab", t2.aaaa) x14 -= einsum("ijab->jiba", t2.aaaa) rdm1_f_vo_aa -= einsum("ai,ijab->bj", l1.aa, x14) del x14 - x15 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x15 += einsum("ia,waj->wji", t1.aa, lu11.aa) x15 += einsum("wia,wxaj->xji", u11.aa, lu12.aa) rdm1_f_vo_aa -= einsum("wia,wij->aj", u11.aa, x15) del x15 - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum("ijab->jiab", t2.aaaa) x16 += einsum("ijab->jiba", t2.aaaa) * -1 x17 += einsum("abij,ikab->jk", l2.aaaa, x16) * -2 del x16 rdm1_f_vo_aa += einsum("ia,ij->aj", t1.aa, x17) * -0.5 del x17 - x18 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x18 += einsum("ia,wxaj->wxji", t1.bb, lu12.bb) rdm1_f_vo_bb += einsum("wxia,wxij->aj", u12.bb, x18) * -0.5 del x18 - x19 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x19 += einsum("ia,bajk->jkib", t1.bb, l2.abab) rdm1_f_vo_bb += einsum("ijab,ijka->bk", t2.abab, x19) * -1 del x19 - x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x20 += einsum("ia,abjk->kjib", t1.bb, l2.bbbb) - x21 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x21 += einsum("ijka->ijka", x20) x21 += einsum("ijka->jika", x20) * -1 del x20 rdm1_f_vo_bb += einsum("ijab,ijka->bk", t2.bbbb, x21) * -1 del x21 - x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x22 += einsum("ijab->jiab", t2.bbbb) x22 -= einsum("ijab->jiba", t2.bbbb) rdm1_f_vo_bb -= einsum("ai,ijab->bj", l1.bb, x22) del x22 - x23 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x23 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x23 += einsum("ia,waj->wji", t1.bb, lu11.bb) x23 += einsum("wia,wxaj->xji", u11.bb, lu12.bb) rdm1_f_vo_bb -= einsum("wia,wij->aj", u11.bb, x23) del x23 - x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x25 += einsum("abij->jiab", l2.aaaa) * -1 x25 += einsum("abij->jiba", l2.aaaa) - rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_vv_aa += einsum("ijab,ijbc->ac", t2.aaaa, x25) * -1 del x25 - x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x26 += einsum("abij->jiab", l2.bbbb) * -1 x26 += einsum("abij->jiba", l2.bbbb) - rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_vv_bb += einsum("ijab,ijca->bc", t2.bbbb, x26) * -1 del x26 rdm1_f_oo_aa += einsum("ij->ji", delta_oo.aa) rdm1_f_oo_bb += einsum("ij->ji", delta_oo.bb) - rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_ov_aa += einsum("ai->ia", l1.aa) - rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_ov_bb += einsum("ai->ia", l1.bb) rdm1_f_vo_aa += einsum("wx,wxia->ai", ls2, u12.aa) * 0.5 rdm1_f_vo_aa += einsum("w,wia->ai", ls1, u11.aa) @@ -4886,158 +4887,158 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 2RDM - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("abij,klab->ijkl", l2.aaaa, t2.aaaa) - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x52 += einsum("ijkl->jilk", x0) - rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_aaaa += einsum("ijkl->jkil", x0) * -1 rdm2_f_oooo_aaaa += einsum("ijkl->jlik", x0) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum("ia,jkla->jkil", t1.aa, x1) x52 += einsum("ijkl->ijkl", x2) - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum("ia,ijkl->jkla", t1.aa, x52) del x52 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum("ijka->ikja", x53) * -1 - x127 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x127 += einsum("ijka->ikja", x53) del x53 - x220 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x220 += einsum("ia,ijkl->jlka", t1.aa, x2) - x221 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x221 += einsum("ia,ijkb->jkab", t1.aa, x220) del x220 - x227 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x227 += einsum("ijab->ijab", x221) del x221 - x230 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x230 += einsum("ijab,jikl->lkab", t2.aaaa, x2) - x233 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x233 += einsum("ijab->ijab", x230) del x230 rdm2_f_oooo_aaaa += einsum("ijkl->ikjl", x2) rdm2_f_oooo_aaaa += einsum("ijkl->iljk", x2) * -1 del x2 - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum("ijka->ijka", x1) * -1 x49 += einsum("ijka->jika", x1) - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum("ijab,ijka->kb", t2.aaaa, x49) * 2 - x59 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x59 += einsum("ia->ia", x56) * -1 del x56 - x119 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x119 += einsum("ijab,ijka->kb", t2.aaaa, x49) - x124 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x124 += einsum("ia->ia", x119) * -1 - x336 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x336 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x336 += einsum("ia->ia", x119) * -1 del x119 - x190 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x190 += einsum("ijab,ijka->kb", t2.aaaa, x49) * 2.0000000000000013 - x193 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x193 += einsum("ia->ia", x190) * -1 del x190 - x317 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x317 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x317 += einsum("ijab,ikla->kljb", t2.abab, x49) - x319 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x319 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x319 += einsum("ijka->ijka", x317) * -1 del x317 - x337 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x337 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x337 += einsum("ijab,ijka->kb", t2.aaaa, x49) * -1 - x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x98 += einsum("ijka->ijka", x1) x98 += einsum("ijka->jika", x1) * -1 - x99 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x99 += einsum("ijab,ikla->kljb", t2.abab, x98) del x98 - rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_aabb += einsum("ijka->ijak", x99) * -1 - rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_bbaa += einsum("ijka->akij", x99) * -1 del x99 - x136 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x136 += einsum("ijka->ijka", x1) x136 -= einsum("ijka->jika", x1) - x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x137 += einsum("ia,ijkb->jkab", t1.aa, x136) del x136 - rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_aaaa -= einsum("ijab->ijab", x137) - rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_aaaa -= einsum("ijab->abij", x137) del x137 - x168 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x168 -= einsum("ijka->ijka", x1) x168 += einsum("ijka->jika", x1) - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum("ia,ijkb->jkab", t1.aa, x168) - rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_aaaa -= einsum("ijab->ibaj", x169) - rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_aaaa -= einsum("ijab->ajib", x169) del x169 - x350 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x350 += einsum("ijab,ijkc->kcab", t2.aaaa, x1) - x355 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x355 += einsum("iabc->iabc", x350) del x350 - x351 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x351 += einsum("ia,jikb->jkba", t1.aa, x1) - x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x353 += einsum("ijab->ijab", x351) * -2 del x351 - rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_aaaa += einsum("ijka->ikja", x1) rdm2_f_ooov_aaaa -= einsum("ijka->jkia", x1) - rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_aaaa -= einsum("ijka->iajk", x1) rdm2_f_ovoo_aaaa += einsum("ijka->jaik", x1) del x1 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum("wai,wja->ij", lu11.aa, u11.aa) - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("ij->ji", x3) - x38 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x38 += einsum("ia,ij->ja", t1.aa, x3) - x43 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x43 += einsum("ia->ia", x38) del x38 - x44 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x44 += einsum("ij->ij", x3) - x110 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x110 += einsum("ij->ij", x3) - x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x197 += einsum("ij,kiab->kjab", x3, t2.aaaa) - x219 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x219 -= einsum("ijab->ijab", x197) del x197 - x235 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x235 += einsum("ij->ij", x3) - x335 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x335 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x335 += einsum("ij->ij", x3) rdm2_f_oooo_aaaa -= einsum("ij,kl->ijkl", delta_oo.aa, x3) rdm2_f_oooo_aaaa += einsum("ij,kl->ilkj", delta_oo.aa, x3) rdm2_f_oooo_aaaa += einsum("ij,kl->kijl", delta_oo.aa, x3) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x3) del x3 - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("wxai,wxja->ij", lu12.aa, u12.aa) - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum("ij->ij", x4) x14 += einsum("ij->ji", x4) * 0.5 - x57 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x57 += einsum("ij->ij", x4) * 0.5 x110 += einsum("ij->ij", x4) * 0.5 - x191 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x191 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x191 += einsum("ij->ij", x4) * 0.49999999999999967 x335 += einsum("ij->ij", x4) * 0.5 del x4 - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum("abij,kjab->ik", l2.abab, t2.abab) x8 += einsum("ij->ij", x5) * 2 x14 += einsum("ij->ji", x5) @@ -5046,10 +5047,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x191 += einsum("ij->ij", x5) x335 += einsum("ij->ij", x5) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum("ijab->jiab", t2.aaaa) x6 += einsum("ijab->jiba", t2.aaaa) * -1 - x7 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x7 += einsum("abij,ikab->jk", l2.aaaa, x6) * 2 x8 += einsum("ij->ij", x7) * -1 del x7 @@ -5058,87 +5059,87 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ij,kl->kjil", delta_oo.aa, x8) * 0.5 rdm2_f_oooo_aaaa += einsum("ij,kl->klij", delta_oo.aa, x8) * -0.5 del x8 - x13 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x13 += einsum("abij,ikab->jk", l2.aaaa, x6) x14 += einsum("ij->ji", x13) * -1 x57 += einsum("ij->ij", x13) * -1 - x58 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x58 += einsum("ia,ij->ja", t1.aa, x57) * 2 x59 += einsum("ia->ia", x58) del x58 x60 += einsum("ia,jk->jika", t1.aa, x57) * -1 x127 += einsum("ia,jk->jika", t1.aa, x57) - x189 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x189 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x189 += einsum("ij,ikab->kjab", x57, t2.aaaa) del x57 - x194 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x194 += einsum("ijab->ijba", x189) del x189 x110 += einsum("ij->ij", x13) * -1 x191 += einsum("ij->ij", x13) * -1 del x13 - x192 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x192 += einsum("ia,ij->ja", t1.aa, x191) * 2.0000000000000013 del x191 x193 += einsum("ia->ia", x192) del x192 - x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x126 += einsum("ijka,ilba->ljkb", x49, x6) x127 += einsum("ijka->jkia", x126) del x126 - x184 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x184 += einsum("wxai,ijab->wxjb", lu12.aa, x6) - x185 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x185 += einsum("wxia->xwia", x184) * -1 del x184 - x334 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x334 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x334 += einsum("abij,ikab->jk", l2.aaaa, x6) x335 += einsum("ij->ij", x334) * -1 del x334 - x9 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x9 += einsum("ai,ja->ij", l1.aa, t1.aa) x14 += einsum("ij->ji", x9) - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("ia,ij->ja", t1.aa, x9) - x61 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x61 += einsum("ia->ia", x31) * -1 - rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_aaaa += einsum("ij,ka->ikaj", delta_oo.aa, x31) - rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_aaaa -= einsum("ij,ka->akji", delta_oo.aa, x31) del x31 x44 += einsum("ij->ij", x9) - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia,jk->jika", t1.aa, x44) - x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x125 += einsum("ia,jk->jika", t1.aa, x44) del x44 x110 += einsum("ij->ij", x9) - x123 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x123 += einsum("ia,ij->ja", t1.aa, x110) x124 += einsum("ia->ia", x123) del x123 - x322 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x322 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x322 += einsum("ij,ikab->jkab", x110, t2.abab) - rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x322) * -1 - rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_aabb += einsum("ijab->aibj", x322) * -1 del x322 rdm2_f_oovo_aabb += einsum("ia,jk->jkai", t1.bb, x110) * -1 rdm2_f_vooo_bbaa += einsum("ia,jk->aijk", t1.bb, x110) * -1 del x110 - x195 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x195 += einsum("ij,kiab->jkab", x9, t2.aaaa) x219 += einsum("ijab->ijab", x195) del x195 x235 += einsum("ij->ij", x9) - x236 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x236 += einsum("ia,ij->ja", t1.aa, x235) del x235 - x237 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x237 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x237 += einsum("ia->ia", x236) - x238 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x238 += einsum("ia->ia", x236) del x236 x335 += einsum("ij->ij", x9) @@ -5150,167 +5151,167 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ij,kl->jlki", delta_oo.aa, x9) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x9) del x9 - x10 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x10 += einsum("abij,klab->ikjl", l2.abab, t2.abab) - x101 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x101 += einsum("ijkl->ijkl", x10) - x305 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x305 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x305 += einsum("ijkl->ijkl", x10) - x313 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x313 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x313 += einsum("ijkl->ijkl", x10) - rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x10) - rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x10) del x10 - x11 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x11 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x12 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x12 += einsum("ia,jkla->jikl", t1.aa, x11) x101 += einsum("ijkl->ijkl", x12) - x102 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x102 += einsum("ia,jkil->jkla", t1.bb, x101) rdm2_f_oovo_aabb += einsum("ijka->ijak", x102) rdm2_f_vooo_bbaa += einsum("ijka->akij", x102) del x102 - x117 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x117 += einsum("ia,ijkl->jkla", t1.aa, x101) del x101 - rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x117) - rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_aabb += einsum("ijka->aijk", x117) del x117 x305 += einsum("ijkl->ijkl", x12) - x306 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x306 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x306 += einsum("ijab,ikjl->klab", t2.abab, x305) del x305 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x306) rdm2_f_vovo_aabb += einsum("ijab->aibj", x306) del x306 x313 += einsum("ijkl->ijkl", x12) * 0.9999999999999993 - x314 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x314 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x314 += einsum("ia,ijkl->jkla", t1.aa, x313) del x313 - x315 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x315 += einsum("ijka->ijka", x314) del x314 rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x12) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x12) del x12 - x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x64 += einsum("ijab,ikla->kljb", t2.abab, x11) - x76 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x76 += einsum("ijka->ijka", x64) - x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x130 += einsum("ijka->ijka", x64) * -1 - x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x253 -= einsum("ijka->ijka", x64) del x64 - x71 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x71 += einsum("ijab,ijka->kb", t2.abab, x11) - x75 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x75 += einsum("ia->ia", x71) * 2 - x109 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x109 += einsum("ia->ia", x71) - x279 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x279 += einsum("ia->ia", x71) * 2.0000000000000013 - x333 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x333 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x333 += einsum("ia->ia", x71) - x338 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x338 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x338 += einsum("ia->ia", x71) del x71 - x95 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x95 += einsum("ijab,kjla->kilb", t2.abab, x11) x319 += einsum("ijka->ijka", x95) * -1 rdm2_f_oovo_aabb += einsum("ijka->ijak", x95) rdm2_f_vooo_bbaa += einsum("ijka->akij", x95) del x95 - x161 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x161 += einsum("ia,ijkb->jkba", t1.aa, x11) - rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x161) - rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x161) del x161 - x172 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x172 += einsum("ia,jikb->jkba", t1.bb, x11) - x376 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x376 += einsum("ijab->ijab", x172) - rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x172) - rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x172) del x172 - x371 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x371 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x371 += einsum("ijab,ijkc->kcab", t2.abab, x11) - rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x371) * -1 - rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_aabb += einsum("iabc->baci", x371) * -1 del x371 - rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_bbaa -= einsum("ijka->jkia", x11) - rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_aabb -= einsum("ijka->iajk", x11) x14 += einsum("ij->ji", delta_oo.aa) * -1 rdm2_f_oooo_aabb += einsum("ij,kl->lkji", delta_oo.bb, x14) * -1 rdm2_f_oooo_bbaa += einsum("ij,kl->jilk", delta_oo.bb, x14) * -1 del x14 - x15 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x15 += einsum("ai,ja->ij", l1.bb, t1.bb) - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum("ij->ij", x15) * 2 - x23 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x23 += einsum("ij->ij", x15) - x89 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x89 += einsum("ij->ij", x15) - x93 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x93 += einsum("ia,ij->ja", t1.bb, x15) - x94 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x94 += einsum("ia->ia", x93) * -1 del x93 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum("ij,kiab->jkab", x15, t2.bbbb) - x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x263 += einsum("ijab->ijab", x239) del x239 - x297 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x297 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x297 += einsum("ij->ij", x15) - x332 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x332 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x332 += einsum("ij->ij", x15) - rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_bbbb -= einsum("ij,kl->jikl", delta_oo.bb, x15) rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x15) rdm2_f_oooo_bbbb += einsum("ij,kl->jlki", delta_oo.bb, x15) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x15) del x15 - x16 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x16 += einsum("wai,wja->ij", lu11.bb, u11.bb) x21 += einsum("ij->ij", x16) * 2 x23 += einsum("ij->ij", x16) - x83 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x83 += einsum("ia,ij->ja", t1.bb, x16) - x88 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x88 += einsum("ia->ia", x83) del x83 x89 += einsum("ij->ij", x16) - x90 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x90 += einsum("ia,jk->jika", t1.bb, x89) - x128 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x128 += einsum("ia,jk->jika", t1.bb, x89) del x89 - x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x241 += einsum("ij,kiab->kjab", x16, t2.bbbb) x263 -= einsum("ijab->ijab", x241) del x241 x297 += einsum("ij->ij", x16) - x298 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x298 += einsum("ia,ij->ja", t1.bb, x297) del x297 - x299 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x299 += einsum("ia->ia", x298) - x300 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x300 += einsum("ia->ia", x298) del x298 x332 += einsum("ij->ij", x16) @@ -5319,38 +5320,38 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x16) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x16) del x16 - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum("wxai,wxja->ij", lu12.bb, u12.bb) x21 += einsum("ij->ij", x17) x23 += einsum("ij->ij", x17) * 0.5 - x24 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x24 += einsum("ij->ij", x17) - x73 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x73 += einsum("ij->ij", x17) * 0.5 - x274 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x274 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x274 += einsum("ij->ij", x17) * 0.5 - x277 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x277 += einsum("ij->ij", x17) * 0.49999999999999967 x332 += einsum("ij->ij", x17) * 0.5 del x17 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum("abij,ikab->jk", l2.abab, t2.abab) x21 += einsum("ij->ij", x18) * 2 x23 += einsum("ij->ij", x18) x24 += einsum("ij->ij", x18) * 2 x73 += einsum("ij->ij", x18) - x265 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x265 += einsum("ij,kiab->jkab", x18, t2.bbbb) - x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x280 += einsum("ijab->ijab", x265) * -1 del x265 x277 += einsum("ij->ij", x18) x332 += einsum("ij->ij", x18) del x18 - x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x19 += einsum("ijab->jiab", t2.bbbb) * -1 x19 += einsum("ijab->jiba", t2.bbbb) - x20 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x20 += einsum("abij,ikba->jk", l2.bbbb, x19) * 2 x21 += einsum("ij->ij", x20) * -1 rdm2_f_oooo_aabb += einsum("ij,kl->jikl", delta_oo.aa, x21) * -0.5 @@ -5364,14 +5365,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->kjil", delta_oo.bb, x24) * 0.5 rdm2_f_oooo_bbbb += einsum("ij,kl->klij", delta_oo.bb, x24) * -0.5 del x24 - x22 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x22 += einsum("abij,ikba->jk", l2.bbbb, x19) x23 += einsum("ij->ij", x22) * -1 - x108 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x108 += einsum("ia,ij->ja", t1.bb, x23) x109 += einsum("ia->ia", x108) del x108 - x321 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x321 += einsum("ij,kiab->kjab", x23, t2.abab) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x321) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x321) * -1 @@ -5379,7 +5380,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbaa += einsum("ij,kl->klji", delta_oo.aa, x23) * -1 del x23 x73 += einsum("ij->ij", x22) * -1 - x74 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x74 += einsum("ia,ij->ja", t1.bb, x73) * 2 x75 += einsum("ia->ia", x74) del x74 @@ -5387,158 +5388,158 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x130 += einsum("ia,jk->jika", t1.bb, x73) del x73 x274 += einsum("ij->ij", x22) * -1 - x275 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x275 += einsum("ij,ikab->kjab", x274, t2.bbbb) del x274 x280 += einsum("ijab->ijba", x275) del x275 x277 += einsum("ij->ij", x22) * -1 del x22 - x278 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x278 += einsum("ia,ij->ja", t1.bb, x277) * 2.0000000000000013 del x277 x279 += einsum("ia->ia", x278) del x278 - x268 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("wxai,ijba->wxjb", lu12.bb, x19) - x269 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x269 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x269 += einsum("wxia->xwia", x268) * -1 del x268 - x331 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x331 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x331 += einsum("abij,ikba->jk", l2.bbbb, x19) x332 += einsum("ij->ij", x331) * -1 del x331 x333 += einsum("ia,ij->ja", t1.bb, x332) x338 += einsum("ia,ij->ja", t1.bb, x332) * 0.9999999999999993 del x332 - x25 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x25 += einsum("abij,klba->ijlk", l2.bbbb, t2.bbbb) - x68 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x68 += einsum("ijkl->jilk", x25) - x291 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x291 += einsum("ia,jikl->jkla", t1.bb, x25) - x292 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x292 += einsum("ia,ijkb->kjba", t1.bb, x291) del x291 - x295 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x295 += einsum("ijab->ijab", x292) del x292 - x293 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x293 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x293 += einsum("ijkl->jilk", x25) rdm2_f_oooo_bbbb += einsum("ijkl->jkil", x25) * -1 rdm2_f_oooo_bbbb += einsum("ijkl->jlik", x25) del x25 - x26 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x26 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x27 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x27 += einsum("ia,jkla->kjli", t1.bb, x26) x68 += einsum("ijkl->ijkl", x27) - x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x69 += einsum("ia,ijkl->jkla", t1.bb, x68) del x68 x76 += einsum("ijka->ikja", x69) * -1 x130 += einsum("ijka->ikja", x69) del x69 - x285 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x285 += einsum("ia,ijkl->jlka", t1.bb, x27) - x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x286 += einsum("ia,ijkb->jkab", t1.bb, x285) del x285 - x290 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x290 += einsum("ijab->ijab", x286) del x286 x293 += einsum("ijkl->ijkl", x27) - x294 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x294 += einsum("ijab,ijkl->klab", t2.bbbb, x293) del x293 x295 += einsum("ijab->ijab", x294) del x294 - rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_bbbb += einsum("ijab->ajbi", x295) * -1 rdm2_f_vovo_bbbb += einsum("ijab->bjai", x295) del x295 rdm2_f_oooo_bbbb += einsum("ijkl->ikjl", x27) rdm2_f_oooo_bbbb += einsum("ijkl->iljk", x27) * -1 del x27 - x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x65 += einsum("ijka->ijka", x26) x65 += einsum("ijka->jika", x26) * -1 - x72 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x72 += einsum("ijab,ijkb->ka", t2.bbbb, x65) * 2 x75 += einsum("ia->ia", x72) * -1 del x72 - x104 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x104 += einsum("ijab,ijkb->ka", t2.bbbb, x65) x109 += einsum("ia->ia", x104) * -1 x338 += einsum("ia->ia", x104) * -1 del x104 - x129 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x129 += einsum("ijab,kila->jklb", x19, x65) x130 += einsum("ijka->jkia", x129) del x129 - x276 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x276 += einsum("ijab,ijkb->ka", t2.bbbb, x65) * 2.0000000000000013 x279 += einsum("ia->ia", x276) * -1 del x276 x333 += einsum("ijab,ijkb->ka", t2.bbbb, x65) * -1 - x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x114 += einsum("ijka->ijka", x26) * -1 x114 += einsum("ijka->jika", x26) - x115 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x115 += einsum("ijab,kjlb->ikla", t2.abab, x114) del x114 x315 += einsum("ijka->ijka", x115) * -1 rdm2_f_oovo_bbaa += einsum("ijka->jkai", x115) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x115) * -1 del x115 - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 -= einsum("ijka->ijka", x26) x151 += einsum("ijka->jika", x26) - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum("ia,jikb->jkab", t1.bb, x151) - rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_bbbb -= einsum("ijab->ijab", x152) - rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_bbbb -= einsum("ijab->abij", x152) del x152 - x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum("ia,ijkb->jkab", t1.bb, x151) del x151 - rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_bbbb -= einsum("ijab->ibaj", x181) - rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_bbbb -= einsum("ijab->ajib", x181) del x181 - x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x251 += einsum("ijka->ijka", x26) x251 -= einsum("ijka->jika", x26) - x363 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x363 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x363 += einsum("ijab,ijkc->kcab", t2.bbbb, x26) - x369 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x369 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x369 += einsum("iabc->iabc", x363) del x363 - x364 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x364 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x364 += einsum("ia,jikb->jkba", t1.bb, x26) - x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x366 += einsum("ijab->ijab", x364) * -2 del x364 - rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_bbbb += einsum("ijka->ikja", x26) rdm2_f_ooov_bbbb -= einsum("ijka->jkia", x26) - rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_bbbb -= einsum("ijka->iajk", x26) rdm2_f_ovoo_bbbb += einsum("ijka->jaik", x26) del x26 - x28 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x28 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum("ijab,kljb->klia", t2.abab, x28) x60 += einsum("ijka->ijka", x48) x127 += einsum("ijka->ijka", x48) * -1 - x209 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x209 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x209 -= einsum("ijka->ijka", x48) del x48 - x55 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x55 += einsum("ijab,ikjb->ka", t2.abab, x28) x59 += einsum("ia->ia", x55) * 2 x124 += einsum("ia->ia", x55) @@ -5546,45 +5547,45 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x336 += einsum("ia->ia", x55) x337 += einsum("ia->ia", x55) del x55 - x112 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x112 += einsum("ijab,iklb->klja", t2.abab, x28) x315 += einsum("ijka->ijka", x112) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x112) rdm2_f_vooo_aabb += einsum("ijka->aijk", x112) del x112 - x165 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum("ia,jkib->jkba", t1.bb, x28) - rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_aabb -= einsum("ijab->ijba", x165) - rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x165) del x165 - x177 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x177 += einsum("ia,ijkb->jkab", t1.aa, x28) - x386 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x386 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x386 += einsum("ijab->ijab", x177) - rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x177) - rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_aabb -= einsum("ijab->aijb", x177) del x177 - x318 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x318 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x318 += einsum("ijab,klib->klja", x19, x28) del x19 x319 += einsum("ijka->ijka", x318) * -1 del x318 - x381 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x381 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x381 += einsum("ijab,ikjc->kacb", t2.abab, x28) - rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_aabb += einsum("iabc->aicb", x381) * -1 - rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x381) * -1 del x381 - rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_aabb -= einsum("ijka->ijka", x28) - rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_bbaa -= einsum("ijka->kaij", x28) - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum("wx,wxia->ia", ls2, u12.aa) x61 += einsum("ia->ia", x29) * 0.5 x124 += einsum("ia->ia", x29) * -0.5 @@ -5595,7 +5596,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_aaaa += einsum("ij,ka->jkai", delta_oo.aa, x29) * -0.5 rdm2_f_vooo_aaaa += einsum("ij,ka->akij", delta_oo.aa, x29) * 0.5 del x29 - x30 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x30 += einsum("w,wia->ia", ls1, u11.aa) x61 += einsum("ia->ia", x30) x124 += einsum("ia->ia", x30) * -1 @@ -5606,41 +5607,41 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_aaaa -= einsum("ij,ka->jkai", delta_oo.aa, x30) rdm2_f_vooo_aaaa += einsum("ij,ka->akji", delta_oo.aa, x30) del x30 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ai,jkba->ijkb", l1.aa, t2.aaaa) x45 += einsum("ijka->ijka", x32) x125 += einsum("ijka->ijka", x32) x209 += einsum("ijka->ijka", x32) del x32 - x33 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x33 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("wia,wjk->jkia", u11.aa, x33) x45 -= einsum("ijka->ijka", x34) x125 -= einsum("ijka->ijka", x34) del x34 - x41 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x41 += einsum("wij->wij", x33) - x121 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x121 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x121 += einsum("wij->wij", x33) - x211 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x211 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x211 += einsum("ia,wij->wja", t1.aa, x33) - x214 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x214 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x214 -= einsum("wia->wia", x211) del x211 - x234 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x234 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x234 += einsum("wia,wij->ja", u11.aa, x33) del x33 x237 += einsum("ia->ia", x234) x238 += einsum("ia->ia", x234) del x234 - rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_aaaa += einsum("ia,jb->biaj", t1.aa, x238) rdm2_f_vovo_aaaa += einsum("ia,jb->aibj", t1.aa, x238) * -1 del x238 - x35 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x35 += einsum("wia,wxaj->xji", u11.aa, lu12.aa) - x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum("wia,wjk->jika", u11.aa, x35) x45 += einsum("ijka->ijka", x36) x125 += einsum("ijka->ijka", x36) @@ -5649,43 +5650,43 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa += einsum("ijka->akij", x125) del x125 x41 += einsum("wij->wij", x35) - x42 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x42 += einsum("wia,wij->ja", u11.aa, x41) x43 += einsum("ia->ia", x42) del x42 - x103 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x103 += einsum("wia,wjk->jkia", u11.bb, x41) rdm2_f_oovo_aabb -= einsum("ijka->ijak", x103) rdm2_f_vooo_bbaa -= einsum("ijka->akij", x103) del x103 - x324 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x324 += einsum("ia,wij->wja", t1.aa, x41) del x41 - x325 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x325 += einsum("wia->wia", x324) del x324 x121 += einsum("wij->wij", x35) - x122 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x122 += einsum("wia,wij->ja", u11.aa, x121) x124 += einsum("ia->ia", x122) x337 += einsum("ia->ia", x122) del x122 x336 += einsum("wia,wij->ja", u11.aa, x121) * 0.9999999999999993 del x121 - x200 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x200 += einsum("ia,wij->wja", t1.aa, x35) - x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x201 += einsum("wia,wjb->ijba", u11.aa, x200) del x200 x219 += einsum("ijab->ijab", x201) del x201 - x216 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x216 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x216 += einsum("wia,wij->ja", u11.aa, x35) del x35 - x218 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x218 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x218 -= einsum("ia->ia", x216) del x216 - x37 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x37 += einsum("ai,jiba->jb", l1.bb, t2.abab) x43 -= einsum("ia->ia", x37) x124 += einsum("ia->ia", x37) * -1 @@ -5693,10 +5694,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x336 += einsum("ia->ia", x37) * -0.9999999999999993 x337 += einsum("ia->ia", x37) * -1 del x37 - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 -= einsum("ijab->jiab", t2.aaaa) x39 += einsum("ijab->jiba", t2.aaaa) - x40 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x40 += einsum("ai,ijab->jb", l1.aa, x39) x43 -= einsum("ia->ia", x40) del x40 @@ -5707,25 +5708,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa += einsum("ij,ka->ajik", delta_oo.aa, x43) rdm2_f_vooo_aaaa -= einsum("ij,ka->akij", delta_oo.aa, x43) del x43 - x323 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x323 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x323 += einsum("wai,ijab->wjb", lu11.aa, x39) x325 -= einsum("wia->wia", x323) del x323 - x46 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x46 += einsum("ia,wxaj->wxji", t1.aa, lu12.aa) - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x47 += einsum("wxia,wxjk->jkia", u12.aa, x46) x60 += einsum("ijka->ijka", x47) * 0.5 x127 += einsum("ijka->ijka", x47) * -0.5 rdm2_f_vooo_aaaa += einsum("ijka->ajik", x127) * -1 rdm2_f_vooo_aaaa += einsum("ijka->akij", x127) del x127 - x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x182 += einsum("ia,ijkb->jkab", t1.aa, x47) del x47 x194 += einsum("ijab->ijab", x182) * 0.5 del x182 - x54 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x54 += einsum("wxia,wxij->ja", u12.aa, x46) x59 += einsum("ia->ia", x54) x60 += einsum("ij,ka->jika", delta_oo.aa, x59) * 0.5 @@ -5739,25 +5740,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x336 += einsum("ia->ia", x54) * 0.49999999999999967 x337 += einsum("ia->ia", x54) * 0.5 del x54 - x96 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x96 += einsum("wxia,wxjk->jkia", u12.bb, x46) x319 += einsum("ijka->ijka", x96) * 0.5 rdm2_f_oovo_aabb += einsum("ijka->ijak", x96) * -0.5 rdm2_f_vooo_bbaa += einsum("ijka->akij", x96) * -0.5 del x96 - x198 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x198 += einsum("wia,wxij->xja", u11.aa, x46) del x46 - x199 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x199 += einsum("wia,wjb->jiab", u11.aa, x198) x219 += einsum("ijab->ijab", x199) del x199 x325 += einsum("wia->wia", x198) del x198 - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum("ijab->jiab", t2.aaaa) * -1 x50 += einsum("ijab->jiba", t2.aaaa) - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum("ijka,ilba->jklb", x49, x50) del x49 x60 += einsum("ijka->ijka", x51) @@ -5765,14 +5766,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_aaaa += einsum("ijka->ijak", x60) * -1 rdm2_f_oovo_aaaa += einsum("ijka->ikaj", x60) del x60 - x116 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x116 += einsum("ijka,ilab->ljkb", x11, x50) del x11 x315 += einsum("ijka->ijka", x116) * -1 rdm2_f_oovo_bbaa += einsum("ijka->jkai", x116) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x116) * -1 del x116 - x120 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x120 += einsum("ai,ijab->jb", l1.aa, x50) x124 += einsum("ia->ia", x120) * -1 x337 += einsum("ia->ia", x120) * -1 @@ -5780,7 +5781,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x336 += einsum("ai,ijab->jb", l1.aa, x50) * -0.9999999999999993 rdm2_f_vovo_bbaa += einsum("ia,jb->aibj", t1.bb, x336) * -1 del x336 - x383 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x383 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x383 += einsum("abij,ikac->kjcb", l2.abab, x50) del x50 x386 += einsum("ijab->ijab", x383) * -1 @@ -5789,22 +5790,22 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_aaaa += einsum("ij,ka->jiak", delta_oo.aa, x61) rdm2_f_vooo_aaaa += einsum("ij,ka->aijk", delta_oo.aa, x61) * -1 del x61 - x62 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x62 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x62 += einsum("ia,wxaj->wxji", t1.bb, lu12.bb) - x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x63 += einsum("wxia,wxjk->jkia", u12.bb, x62) x76 += einsum("ijka->ijka", x63) * 0.5 x130 += einsum("ijka->ijka", x63) * -0.5 - rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_bbbb += einsum("ijka->ajik", x130) * -1 rdm2_f_vooo_bbbb += einsum("ijka->akij", x130) del x130 - x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x264 += einsum("ia,ijkb->jkab", t1.bb, x63) del x63 x280 += einsum("ijab->ijab", x264) * 0.5 del x264 - x70 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x70 += einsum("wxia,wxij->ja", u12.bb, x62) x75 += einsum("ia->ia", x70) x76 += einsum("ij,ka->jika", delta_oo.bb, x75) * 0.5 @@ -5818,81 +5819,81 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x333 += einsum("ia->ia", x70) * 0.5 x338 += einsum("ia->ia", x70) * 0.49999999999999967 del x70 - x111 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x111 += einsum("wxia,wxjk->ijka", u12.aa, x62) x315 += einsum("ijka->ijka", x111) * -0.5 rdm2_f_oovo_bbaa += einsum("ijka->jkai", x111) * -0.5 rdm2_f_vooo_aabb += einsum("ijka->aijk", x111) * -0.5 del x111 - x242 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x242 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x242 += einsum("wia,wxij->xja", u11.bb, x62) del x62 - x243 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x243 += einsum("wia,wjb->jiab", u11.bb, x242) x263 += einsum("ijab->ijab", x243) del x243 - x329 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x329 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x329 += einsum("wia->wia", x242) del x242 - x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum("ijab->jiab", t2.bbbb) x66 += einsum("ijab->jiba", t2.bbbb) * -1 - x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x67 += einsum("ijka,jlab->iklb", x65, x66) del x65 x76 += einsum("ijka->ijka", x67) del x67 - rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_bbbb += einsum("ijka->ijak", x76) * -1 rdm2_f_oovo_bbbb += einsum("ijka->ikaj", x76) del x76 - x100 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x100 += einsum("ijka,klba->ijlb", x28, x66) del x28 rdm2_f_oovo_aabb += einsum("ijka->ijak", x100) * -1 rdm2_f_vooo_bbaa += einsum("ijka->akij", x100) * -1 del x100 - x105 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x105 += einsum("ai,ijba->jb", l1.bb, x66) x109 += einsum("ia->ia", x105) * -1 x333 += einsum("ia->ia", x105) * -1 del x105 x338 += einsum("ai,ijba->jb", l1.bb, x66) * -0.9999999999999993 - x375 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x375 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x375 += einsum("abij,jkcb->ikac", l2.abab, x66) x376 += einsum("ijab->ijab", x375) * -1 del x375 - x77 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x77 += einsum("ai,jkab->ikjb", l1.bb, t2.bbbb) x90 += einsum("ijka->ijka", x77) x128 += einsum("ijka->ijka", x77) x253 += einsum("ijka->ijka", x77) del x77 - x78 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x78 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x78 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x79 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x79 += einsum("wia,wjk->jkia", u11.bb, x78) x90 -= einsum("ijka->ijka", x79) x128 -= einsum("ijka->ijka", x79) del x79 - x86 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x86 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x86 += einsum("wij->wij", x78) - x106 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x106 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x106 += einsum("wij->wij", x78) - x256 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x256 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x256 += einsum("ia,wij->wja", t1.bb, x78) - x258 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x258 -= einsum("wia->wia", x256) del x256 - x296 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x296 += einsum("wia,wij->ja", u11.bb, x78) del x78 x299 += einsum("ia->ia", x296) x300 += einsum("ia->ia", x296) del x296 - x80 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x80 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x80 += einsum("wia,wxaj->xji", u11.bb, lu12.bb) - x81 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x81 += einsum("wia,wjk->jika", u11.bb, x80) x90 += einsum("ijka->ijka", x81) x128 += einsum("ijka->ijka", x81) @@ -5901,42 +5902,42 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ijka->akij", x128) del x128 x86 += einsum("wij->wij", x80) - x87 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x87 += einsum("wia,wij->ja", u11.bb, x86) x88 += einsum("ia->ia", x87) del x87 - x118 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x118 += einsum("wia,wjk->ijka", u11.aa, x86) rdm2_f_oovo_bbaa -= einsum("ijka->jkai", x118) rdm2_f_vooo_aabb -= einsum("ijka->aijk", x118) del x118 - x328 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x328 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x328 += einsum("ia,wij->wja", t1.bb, x86) del x86 x329 += einsum("wia->wia", x328) del x328 x106 += einsum("wij->wij", x80) - x107 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x107 += einsum("wia,wij->ja", u11.bb, x106) x109 += einsum("ia->ia", x107) x333 += einsum("ia->ia", x107) del x107 x338 += einsum("wia,wij->ja", u11.bb, x106) * 0.9999999999999993 del x106 - x244 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x244 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x244 += einsum("ia,wij->wja", t1.bb, x80) - x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum("wia,wjb->ijba", u11.bb, x244) del x244 x263 += einsum("ijab->ijab", x245) del x245 - x260 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x260 += einsum("wia,wij->ja", u11.bb, x80) del x80 - x262 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x262 -= einsum("ia->ia", x260) del x260 - x82 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x82 += einsum("ai,ijab->jb", l1.aa, t2.abab) x88 -= einsum("ia->ia", x82) x109 += einsum("ia->ia", x82) * -1 @@ -5944,10 +5945,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x333 += einsum("ia->ia", x82) * -1 x338 += einsum("ia->ia", x82) * -0.9999999999999993 del x82 - x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x84 += einsum("ijab->jiab", t2.bbbb) x84 -= einsum("ijab->jiba", t2.bbbb) - x85 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x85 += einsum("ai,ijba->jb", l1.bb, x84) x88 -= einsum("ia->ia", x85) del x85 @@ -5958,11 +5959,11 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ij,ka->ajik", delta_oo.bb, x88) rdm2_f_vooo_bbbb -= einsum("ij,ka->akij", delta_oo.bb, x88) del x88 - x327 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x327 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x327 += einsum("wai,ijba->wjb", lu11.bb, x84) x329 -= einsum("wia->wia", x327) del x327 - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum("w,wia->ia", ls1, u11.bb) x94 += einsum("ia->ia", x91) x109 += einsum("ia->ia", x91) * -1 @@ -5971,7 +5972,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x333 += einsum("ia->ia", x91) * -1 x338 += einsum("ia->ia", x91) * -0.9999999999999993 del x91 - x92 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x92 += einsum("wx,wxia->ia", ls2, u12.bb) x94 += einsum("ia->ia", x92) * 0.5 x109 += einsum("ia->ia", x92) * -0.5 @@ -5991,10 +5992,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ij,ka->aijk", delta_oo.bb, x94) * -1 rdm2_f_vooo_bbbb += einsum("ij,ka->akji", delta_oo.bb, x94) del x94 - x97 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x97 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) x319 += einsum("ijka->ijka", x97) - x320 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x320 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x320 += einsum("ia,ijkb->jkab", t1.aa, x319) del x319 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x320) * -1 @@ -6007,10 +6008,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_aabb += einsum("ij,ka->jiak", delta_oo.aa, x109) * -1 rdm2_f_vooo_bbaa += einsum("ij,ka->akji", delta_oo.aa, x109) * -1 del x109 - x113 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x113 += einsum("ai,jkba->jikb", l1.bb, t2.abab) x315 += einsum("ijka->ijka", x113) * -1 - x316 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x316 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x316 += einsum("ia,jikb->jkba", t1.bb, x315) del x315 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x316) @@ -6023,11 +6024,11 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_bbaa += einsum("ij,ka->jiak", delta_oo.bb, x124) * -1 rdm2_f_vooo_aabb += einsum("ij,ka->akji", delta_oo.bb, x124) * -1 del x124 - x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x206 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x206 += einsum("ijab->ijab", x131) - x303 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x303 += einsum("ijab->ijab", x131) x353 += einsum("ijab->ijab", x131) * 2 rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x131) @@ -6035,7 +6036,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_aaaa += einsum("ijab->bjia", x131) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x131) del x131 - x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum("wxai,wxjb->ijab", lu12.aa, u12.aa) x353 += einsum("ijab->ijab", x132) rdm2_f_oovv_aaaa += einsum("ijab->ijba", x132) * -0.5 @@ -6043,89 +6044,89 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_aaaa += einsum("ijab->bjia", x132) * 0.5 rdm2_f_vvoo_aaaa += einsum("ijab->baij", x132) * -0.5 del x132 - x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x133 += einsum("wai,wjb->ijab", lu11.aa, u11.aa) rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x133) rdm2_f_ovvo_aaaa += einsum("ijab->iabj", x133) rdm2_f_voov_aaaa += einsum("ijab->bjia", x133) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x133) del x133 - x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x134 += einsum("abij->jiab", l2.aaaa) x134 -= einsum("abij->jiba", l2.aaaa) - x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum("ijab,ikac->kjcb", x134, x39) del x39 rdm2_f_oovv_aaaa += einsum("ijab->jiab", x135) rdm2_f_vvoo_aaaa += einsum("ijab->abji", x135) del x135 - x173 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x173 += einsum("ijab,ikac->kjcb", t2.abab, x134) - x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x283 -= einsum("ijab,ikac->jkbc", t2.abab, x173) - x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x284 += einsum("ijab->ijab", x283) del x283 rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x173) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x173) del x173 - x222 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x222 += einsum("ijab,ikac->jkbc", t2.aaaa, x134) - x223 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x223 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x223 -= einsum("ijab,kica->jkbc", t2.aaaa, x222) del x222 x227 += einsum("ijab->ijab", x223) del x223 - x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x224 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x224 += einsum("ijab,ikbc->jkac", t2.aaaa, x134) - x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x225 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x225 -= einsum("ijab,kicb->jkac", t2.aaaa, x224) del x224 x227 += einsum("ijab->jiba", x225) del x225 - x138 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x138 += einsum("ai,ib->ab", l1.aa, t1.aa) - x144 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x144 += einsum("ab->ab", x138) * 2 - x163 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x163 += einsum("ab->ab", x138) - x348 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x348 += einsum("ab->ab", x138) del x138 - x139 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x139 += einsum("wai,wib->ab", lu11.aa, u11.aa) x144 += einsum("ab->ab", x139) * 2 x163 += einsum("ab->ab", x139) - x196 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x196 += einsum("ab,ijca->ijcb", x139, t2.aaaa) x219 -= einsum("ijab->ijab", x196) del x196 - x311 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x311 += einsum("ab->ab", x139) x348 += einsum("ab->ab", x139) del x139 - x349 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x349 += einsum("ia,bc->ibac", t1.aa, x348) del x348 - x140 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x140 += einsum("wxai,wxib->ab", lu12.aa, u12.aa) x144 += einsum("ab->ab", x140) x163 += einsum("ab->ab", x140) * 0.5 - x187 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x187 += einsum("ab->ab", x140) x311 += einsum("ab->ab", x140) * 0.5 del x140 - x141 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x141 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x144 += einsum("ab->ab", x141) * 2 x163 += einsum("ab->ab", x141) x187 += einsum("ab->ab", x141) * 2 x311 += einsum("ab->ab", x141) del x141 - x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x142 += einsum("abij->jiab", l2.aaaa) x142 += einsum("abij->jiba", l2.aaaa) * -1 - x143 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x143 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x143 += einsum("ijab,ijac->bc", t2.aaaa, x142) * 2 x144 += einsum("ab->ba", x143) * -1 rdm2_f_oovv_aaaa += einsum("ij,ab->jiba", delta_oo.aa, x144) * 0.5 @@ -6135,13 +6136,13 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x144 x187 += einsum("ab->ba", x143) * -1 del x143 - x188 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x188 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x188 += einsum("ab,ijac->ijcb", x187, t2.aaaa) * 0.5 x194 += einsum("ijab->jiab", x188) del x188 x355 += einsum("ia,bc->ibac", t1.aa, x187) * 0.5 del x187 - x162 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x162 += einsum("ijab,ijac->bc", t2.aaaa, x142) x163 += einsum("ab->ba", x162) * -1 rdm2_f_oovv_bbaa += einsum("ij,ab->jiba", delta_oo.bb, x163) @@ -6151,33 +6152,33 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x163 x311 += einsum("ab->ba", x162) * -1 del x162 - x312 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x312 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x312 += einsum("ab,ijac->ijbc", x311, t2.abab) del x311 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x312) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x312) * -1 del x312 - x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x352 += einsum("ijab,ikac->kjcb", x142, x6) * 2 del x142 del x6 x353 += einsum("ijab->jiba", x352) del x352 - x354 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x354 += einsum("ia,ijbc->jabc", t1.aa, x353) * 0.5 del x353 x355 += einsum("iabc->ibac", x354) * -1 del x354 - rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_aaaa += einsum("iabc->bica", x355) rdm2_f_vovv_aaaa += einsum("iabc->ciba", x355) * -1 - rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_aaaa += einsum("iabc->baci", x355) * -1 rdm2_f_vvvo_aaaa += einsum("iabc->cabi", x355) del x355 - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x249 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x249 += einsum("ijab->ijab", x145) x366 += einsum("ijab->ijab", x145) * 2 rdm2_f_oovv_bbbb -= einsum("ijab->ijba", x145) @@ -6185,7 +6186,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_bbbb += einsum("ijab->bjia", x145) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x145) del x145 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum("wxai,wxjb->ijab", lu12.bb, u12.bb) x366 += einsum("ijab->ijab", x146) rdm2_f_oovv_bbbb += einsum("ijab->ijba", x146) * -0.5 @@ -6193,130 +6194,130 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_bbbb += einsum("ijab->bjia", x146) * 0.5 rdm2_f_vvoo_bbbb += einsum("ijab->baij", x146) * -0.5 del x146 - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum("wai,wjb->ijab", lu11.bb, u11.bb) rdm2_f_oovv_bbbb -= einsum("ijab->ijba", x147) rdm2_f_ovvo_bbbb += einsum("ijab->iabj", x147) rdm2_f_voov_bbbb += einsum("ijab->bjia", x147) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x147) del x147 - x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x148 -= einsum("ijab->jiab", t2.bbbb) x148 += einsum("ijab->jiba", t2.bbbb) - x174 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x174 += einsum("abij,jkcb->ikac", l2.abab, x148) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x174) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x174) del x174 - x252 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x252 += einsum("ijab,kila->jklb", x148, x251) del x251 x253 += einsum("ijka->jkia", x252) del x252 - x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x254 += einsum("ia,ijkb->jkab", t1.bb, x253) del x253 x263 += einsum("ijab->ijab", x254) del x254 - x257 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x257 += einsum("wai,ijba->wjb", lu11.bb, x148) x258 -= einsum("wia->wia", x257) del x257 - x261 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x261 += einsum("ai,ijba->jb", l1.bb, x148) x262 -= einsum("ia->ia", x261) del x261 x263 += einsum("ia,jb->ijab", t1.bb, x262) del x262 - x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x149 -= einsum("abij->jiab", l2.bbbb) x149 += einsum("abij->jiba", l2.bbbb) - x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x150 += einsum("ijab,ikca->jkbc", x148, x149) rdm2_f_oovv_bbbb += einsum("ijab->jiab", x150) rdm2_f_vvoo_bbbb += einsum("ijab->abji", x150) del x150 - x179 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x179 += einsum("ijab,jkcb->ikac", t2.abab, x149) - x226 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x226 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x226 -= einsum("ijab,kjcb->ikac", t2.abab, x179) x227 += einsum("ijab->ijab", x226) del x226 - x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x302 -= einsum("ijab->ijab", x179) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x179) rdm2_f_voov_aabb -= einsum("ijab->aijb", x179) del x179 - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum("ijab,ikbc->kjca", x149, x84) rdm2_f_ovvo_bbbb += einsum("ijab->jbai", x180) rdm2_f_voov_bbbb += einsum("ijab->aijb", x180) del x180 - x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x248 += einsum("ijab,ikca->jkbc", t2.bbbb, x149) x249 -= einsum("ijab->jiba", x248) - x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x250 += einsum("ijab,ikbc->jkac", t2.bbbb, x249) del x249 x263 -= einsum("ijab->jiba", x250) del x250 - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x287 -= einsum("ijab,kica->jkbc", t2.bbbb, x248) del x248 x290 += einsum("ijab->jiba", x287) del x287 - x288 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x288 += einsum("ijab,ikcb->jkac", t2.bbbb, x149) del x149 - x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x289 -= einsum("ijab,kicb->jkac", t2.bbbb, x288) del x288 x290 += einsum("ijab->ijab", x289) del x289 - x153 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x153 += einsum("ai,ib->ab", l1.bb, t1.bb) - x159 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x159 += einsum("ab->ab", x153) - x361 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x361 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x361 += einsum("ab->ab", x153) del x153 - x154 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x154 += einsum("wai,wib->ab", lu11.bb, u11.bb) x159 += einsum("ab->ab", x154) - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum("ab,ijac->jicb", x154, t2.bbbb) x263 -= einsum("ijab->ijab", x240) del x240 - x309 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x309 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x309 += einsum("ab->ab", x154) x361 += einsum("ab->ab", x154) del x154 - x362 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x362 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x362 += einsum("ia,bc->ibac", t1.bb, x361) del x361 - x155 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x155 += einsum("wxai,wxib->ab", lu12.bb, u12.bb) x159 += einsum("ab->ab", x155) * 0.5 - x272 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x272 += einsum("ab->ab", x155) x309 += einsum("ab->ab", x155) * 0.5 - x368 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x368 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x368 += einsum("ab->ab", x155) del x155 - x156 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x156 += einsum("abij,ijac->bc", l2.abab, t2.abab) x159 += einsum("ab->ab", x156) - x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x266 += einsum("ab,ijac->jibc", x156, t2.bbbb) x280 += einsum("ijab->ijab", x266) * -1 del x266 x309 += einsum("ab->ab", x156) x368 += einsum("ab->ab", x156) * 2 del x156 - x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum("abij->jiab", l2.bbbb) * -1 x157 += einsum("abij->jiba", l2.bbbb) - x158 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x158 += einsum("ijab,ijbc->ac", t2.bbbb, x157) x159 += einsum("ab->ba", x158) * -1 rdm2_f_oovv_bbbb += einsum("ij,ab->jiba", delta_oo.bb, x159) @@ -6330,16 +6331,16 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x159 x309 += einsum("ab->ba", x158) * -1 del x158 - x310 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x310 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x310 += einsum("ab,ijca->ijcb", x309, t2.abab) del x309 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x310) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x310) * -1 del x310 - x271 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x271 += einsum("ijab,ijbc->ac", t2.bbbb, x157) * 2 x272 += einsum("ab->ba", x271) * -1 - x273 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x273 += einsum("ab,ijac->ijcb", x272, t2.bbbb) * 0.5 del x272 x280 += einsum("ijab->jiab", x273) @@ -6348,27 +6349,27 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x271 x369 += einsum("ia,bc->ibac", t1.bb, x368) * 0.5 del x368 - x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x365 += einsum("ijab,ikbc->kjca", x157, x66) * 2 del x66 del x157 x366 += einsum("ijab->jiba", x365) del x365 - x367 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x367 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x367 += einsum("ia,ijbc->jabc", t1.bb, x366) * 0.5 del x366 x369 += einsum("iabc->ibac", x367) * -1 del x367 - rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_bbbb += einsum("iabc->bica", x369) rdm2_f_vovv_bbbb += einsum("iabc->ciba", x369) * -1 - rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_bbbb += einsum("iabc->baci", x369) * -1 rdm2_f_vvvo_bbbb += einsum("iabc->cabi", x369) del x369 - x160 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x160 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) - x372 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x372 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x372 += einsum("ia,ijbc->jbca", t1.bb, x160) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x372) * -1 rdm2_f_vvvo_aabb += einsum("iabc->baci", x372) * -1 @@ -6376,14 +6377,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x160) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x160) del x160 - x164 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) - x301 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x301 += einsum("ijab,ikbc->kjac", t2.abab, x164) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x301) rdm2_f_vovo_aabb += einsum("ijab->aibj", x301) del x301 - x382 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x382 += einsum("ia,ijbc->jabc", t1.aa, x164) rdm2_f_vovv_aabb += einsum("iabc->aicb", x382) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x382) * -1 @@ -6391,14 +6392,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_aabb -= einsum("ijab->ijba", x164) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x164) del x164 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum("ijab->jiab", t2.aaaa) x166 -= einsum("ijab->jiba", t2.aaaa) - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 += einsum("ijab,ikac->jkbc", x134, x166) del x134 x303 += einsum("ijab->ijab", x167) - x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x304 += einsum("ijab,ikac->kjcb", t2.abab, x303) del x303 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x304) @@ -6407,7 +6408,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovvo_aaaa += einsum("ijab->iabj", x167) rdm2_f_voov_aaaa += einsum("ijab->bjia", x167) del x167 - x178 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x178 += einsum("abij,ikac->kjcb", l2.abab, x166) x302 -= einsum("ijab->ijab", x178) rdm2_f_vovo_bbaa += einsum("ijab,jkcb->ckai", x302, x84) @@ -6418,54 +6419,54 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x178) rdm2_f_voov_aabb -= einsum("ijab->aijb", x178) del x178 - x208 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x208 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x208 += einsum("ijab,iklb->jkla", x166, x168) del x168 x209 += einsum("ijka->jkia", x208) del x208 - x210 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x210 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x210 += einsum("ia,ijkb->jkab", t1.aa, x209) del x209 x219 += einsum("ijab->ijab", x210) del x210 - x213 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x213 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x213 += einsum("wai,ijab->wjb", lu11.aa, x166) x214 -= einsum("wia->wia", x213) del x213 - x217 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x217 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x217 += einsum("ai,ijab->jb", l1.aa, x166) del x166 x218 -= einsum("ia->ia", x217) del x217 x219 += einsum("ia,jb->ijab", t1.aa, x218) del x218 - x170 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x170 += einsum("wxai,wxjb->ijab", lu12.aa, u12.bb) x376 += einsum("ijab->ijab", x170) * -0.5 rdm2_f_ovvo_aabb += einsum("ijab->iabj", x170) * 0.5 rdm2_f_voov_bbaa += einsum("ijab->bjia", x170) * 0.5 del x170 - x171 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x171 += einsum("wai,wjb->ijab", lu11.aa, u11.bb) rdm2_f_ovvo_aabb += einsum("ijab->iabj", x171) rdm2_f_voov_bbaa += einsum("ijab->bjia", x171) del x171 - x175 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x175 += einsum("wxai,wxjb->jiba", lu12.bb, u12.aa) x386 += einsum("ijab->ijab", x175) * -0.5 rdm2_f_ovvo_bbaa += einsum("ijab->jbai", x175) * 0.5 rdm2_f_voov_aabb += einsum("ijab->aijb", x175) * 0.5 del x175 - x176 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x176 += einsum("wai,wjb->jiba", lu11.bb, u11.aa) rdm2_f_ovvo_bbaa += einsum("ijab->jbai", x176) rdm2_f_voov_aabb += einsum("ijab->aijb", x176) del x176 - x183 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nbos, nbos, nocc[0], nvir[0]), dtype=types[float]) x183 += einsum("wxai,jiba->wxjb", lu12.bb, t2.abab) x185 += einsum("wxia->xwia", x183) del x183 - x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x186 += einsum("wxia,wxjb->ijab", u12.aa, x185) * 0.5 x194 += einsum("ijab->jiba", x186) * -1 del x186 @@ -6474,36 +6475,36 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa += einsum("ijab->ajbi", x194) rdm2_f_vovo_aaaa += einsum("ijab->bjai", x194) * -1 del x194 - x308 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x308 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x308 += einsum("wxia,wxjb->jiba", u12.bb, x185) * 0.5 del x185 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x308) rdm2_f_vovo_aabb += einsum("ijab->aibj", x308) del x308 - x202 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x202 += einsum("abij,kiac->kjcb", l2.abab, t2.aaaa) - x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x203 += einsum("ijab,kjcb->kica", t2.abab, x202) del x202 x219 -= einsum("ijab->ijab", x203) del x203 - x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x204 -= einsum("abij->jiab", l2.aaaa) x204 += einsum("abij->jiba", l2.aaaa) - x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x205 += einsum("ijab,ikbc->jkac", t2.aaaa, x204) del x204 x206 -= einsum("ijab->jiba", x205) del x205 - x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x207 += einsum("ijab,ikac->jkbc", t2.aaaa, x206) del x206 x219 += einsum("ijab->ijab", x207) del x207 - x212 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x212 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x212 += einsum("wai,jiba->wjb", lu11.bb, t2.abab) x214 += einsum("wia->wia", x212) - x215 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x215 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x215 += einsum("wia,wjb->ijab", u11.aa, x214) del x214 x219 += einsum("ijab->jiba", x215) @@ -6519,25 +6520,25 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ijab->biaj", x227) rdm2_f_vovo_aaaa += einsum("ijab->aibj", x227) del x227 - x228 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x228 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x228 += einsum("wx,xia->wia", ls2, u11.aa) - x229 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x229 += einsum("wia,wjb->jiba", u11.aa, x228) rdm2_f_vovo_aaaa -= einsum("ijab->biaj", x229) rdm2_f_vovo_aaaa += einsum("ijab->bjai", x229) del x229 x325 -= einsum("wia->wia", x228) del x228 - x326 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x326 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x326 += einsum("wia,wjb->jiba", u11.bb, x325) del x325 rdm2_f_vovo_bbaa -= einsum("ijab->bjai", x326) rdm2_f_vovo_aabb -= einsum("ijab->aibj", x326) del x326 - x231 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x231 += einsum("ijab->jiba", t2.aaaa) x231 += einsum("ia,jb->ijab", t1.aa, t1.aa) - x232 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x232 += einsum("ijkl,ijab->klab", x0, x231) del x0 del x231 @@ -6550,17 +6551,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa += einsum("ia,jb->ajbi", t1.aa, x237) rdm2_f_vovo_aaaa += einsum("ia,jb->bjai", t1.aa, x237) * -1 del x237 - x246 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x246 += einsum("abij,kjcb->ikac", l2.abab, t2.bbbb) - x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x247 += einsum("ijab,ikac->jkbc", t2.abab, x246) del x246 x263 += einsum("ijab->ijab", x247) del x247 - x255 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x255 += einsum("wai,ijab->wjb", lu11.aa, t2.abab) x258 += einsum("wia->wia", x255) - x259 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x259 += einsum("wia,wjb->ijab", u11.bb, x258) del x258 x263 += einsum("ijab->jiba", x259) @@ -6572,17 +6573,17 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x263 x329 -= einsum("wia->wia", x255) del x255 - x330 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x330 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x330 += einsum("wia,wjb->ijab", u11.aa, x329) del x329 rdm2_f_vovo_bbaa -= einsum("ijab->bjai", x330) rdm2_f_vovo_aabb -= einsum("ijab->aibj", x330) del x330 - x267 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nbos, nbos, nocc[1], nvir[1]), dtype=types[float]) x267 += einsum("wxai,ijab->wxjb", lu12.aa, t2.abab) x269 += einsum("wxia->xwia", x267) del x267 - x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x270 += einsum("wxia,wxjb->ijab", u12.bb, x269) * 0.5 x280 += einsum("ijab->jiba", x270) * -1 del x270 @@ -6591,15 +6592,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_bbbb += einsum("ijab->ajbi", x280) rdm2_f_vovo_bbbb += einsum("ijab->bjai", x280) * -1 del x280 - x307 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x307 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x307 += einsum("wxia,wxjb->ijab", u12.aa, x269) * 0.5 del x269 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x307) rdm2_f_vovo_aabb += einsum("ijab->aibj", x307) del x307 - x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x281 += einsum("wx,xia->wia", ls2, u11.bb) - x282 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x282 += einsum("wia,wjb->jiba", u11.bb, x281) del x281 x284 += einsum("ijab->jiba", x282) @@ -6621,71 +6622,71 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x337 += einsum("ia->ia", t1.aa) * -1 rdm2_f_vovo_aabb += einsum("ia,jb->bjai", t1.bb, x337) * -1 del x337 - x339 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x339 += einsum("ia,bcji->jbca", t1.aa, l2.aaaa) - x391 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x391 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x391 += einsum("ia,ibcd->cbda", t1.aa, x339) - x392 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x392 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x392 += einsum("abcd->badc", x391) del x391 - rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_aaaa += einsum("iabc->iacb", x339) rdm2_f_ovvv_aaaa -= einsum("iabc->ibca", x339) - rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_aaaa -= einsum("iabc->caib", x339) rdm2_f_vvov_aaaa += einsum("iabc->cbia", x339) del x339 - x340 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x340 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x340 += einsum("ia,bcji->jbca", t1.bb, l2.bbbb) - x396 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x396 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x396 += einsum("ia,ibcd->cbda", t1.bb, x340) - x397 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x397 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x397 += einsum("abcd->badc", x396) del x396 - rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_bbbb += einsum("iabc->iacb", x340) rdm2_f_ovvv_bbbb -= einsum("iabc->ibca", x340) - rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_bbbb -= einsum("iabc->caib", x340) rdm2_f_vvov_bbbb += einsum("iabc->cbia", x340) del x340 - x341 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x341 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x341 += einsum("ia,bcij->jbac", t1.aa, l2.abab) - rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_bbaa += einsum("iabc->icba", x341) - rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_aabb += einsum("iabc->baic", x341) del x341 - x342 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x342 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x342 += einsum("ia,bcji->jbca", t1.bb, l2.abab) - x394 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x394 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x394 += einsum("ia,ibcd->bacd", t1.aa, x342) - rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x394) - rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_aabb += einsum("abcd->badc", x394) del x394 - rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_aabb += einsum("iabc->iacb", x342) - rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_bbaa += einsum("iabc->cbia", x342) del x342 - x343 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x343 += einsum("ai,jibc->jabc", l1.aa, t2.aaaa) x349 += einsum("iabc->iabc", x343) del x343 - x344 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x344 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x344 += einsum("ia,wbi->wba", t1.aa, lu11.aa) - x345 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x345 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x345 += einsum("wia,wbc->ibca", u11.aa, x344) x349 -= einsum("iabc->iabc", x345) del x345 - x378 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x378 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x378 += einsum("wab->wab", x344) del x344 - x346 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x346 += einsum("wia,xwbi->xba", u11.aa, lu12.aa) - x347 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x347 += einsum("wia,wbc->ibac", u11.aa, x346) x349 += einsum("iabc->iabc", x347) del x347 @@ -6696,28 +6697,28 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x349 x378 += einsum("wab->wab", x346) del x346 - x379 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x379 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x379 += einsum("wia,wbc->ibca", u11.bb, x378) del x378 rdm2_f_vovv_bbaa += einsum("iabc->ciba", x379) rdm2_f_vvvo_aabb += einsum("iabc->baci", x379) del x379 - x356 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x356 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x356 += einsum("ai,jibc->jabc", l1.bb, t2.bbbb) x362 += einsum("iabc->iabc", x356) del x356 - x357 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x357 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x357 += einsum("ia,wbi->wba", t1.bb, lu11.bb) - x358 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x358 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x358 += einsum("wia,wbc->ibca", u11.bb, x357) x362 -= einsum("iabc->iabc", x358) del x358 - x388 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x388 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x388 += einsum("wab->wab", x357) del x357 - x359 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x359 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x359 += einsum("wia,xwbi->xba", u11.bb, lu12.bb) - x360 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x360 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x360 += einsum("wia,wbc->ibac", u11.bb, x359) x362 += einsum("iabc->iabc", x360) del x360 @@ -6728,68 +6729,68 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x362 x388 += einsum("wab->wab", x359) del x359 - x389 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x389 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x389 += einsum("wia,wbc->iabc", u11.aa, x388) del x388 rdm2_f_vovv_aabb += einsum("iabc->aicb", x389) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x389) del x389 - x370 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x370 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x370 += einsum("ai,ijbc->jabc", l1.aa, t2.abab) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x370) rdm2_f_vvvo_aabb += einsum("iabc->baci", x370) del x370 - x373 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x373 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x373 += einsum("abij->jiab", l2.aaaa) * -1 x373 += einsum("abij->jiba", l2.aaaa) - x374 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x374 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x374 += einsum("ijab,ikac->kjcb", t2.abab, x373) del x373 x376 += einsum("ijab->ijab", x374) * -1 del x374 - x377 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x377 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x377 += einsum("ia,ijbc->jabc", t1.aa, x376) del x376 rdm2_f_vovv_bbaa += einsum("iabc->ciab", x377) * -1 rdm2_f_vvvo_aabb += einsum("iabc->abci", x377) * -1 del x377 - x380 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x380 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x380 += einsum("ai,jibc->jbac", l1.bb, t2.abab) rdm2_f_vovv_aabb += einsum("iabc->aicb", x380) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x380) del x380 - x384 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x384 += einsum("abij->jiab", l2.bbbb) x384 += einsum("abij->jiba", l2.bbbb) * -1 - x385 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x385 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x385 += einsum("ijab,jkcb->ikac", t2.abab, x384) del x384 x386 += einsum("ijab->ijab", x385) * -1 del x385 - x387 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x387 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x387 += einsum("ia,jibc->jbac", t1.bb, x386) del x386 rdm2_f_vovv_aabb += einsum("iabc->aibc", x387) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->bcai", x387) * -1 del x387 - x390 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x390 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x390 += einsum("abij,ijcd->abcd", l2.aaaa, t2.aaaa) x392 += einsum("abcd->badc", x390) del x390 - rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_aaaa += einsum("abcd->dacb", x392) * -1 rdm2_f_vvvv_aaaa += einsum("abcd->cadb", x392) del x392 - x393 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x393 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x393 += einsum("abij,ijcd->acbd", l2.abab, t2.abab) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x393) rdm2_f_vvvv_aabb += einsum("abcd->badc", x393) del x393 - x395 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x395 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x395 += einsum("abij,ijcd->abcd", l2.bbbb, t2.bbbb) x397 += einsum("abcd->badc", x395) del x395 - rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_bbbb += einsum("abcd->dacb", x397) * -1 rdm2_f_vvvv_bbbb += einsum("abcd->cadb", x397) del x397 @@ -6811,15 +6812,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovoo_bbbb += einsum("ij,ak->kaji", delta_oo.bb, l1.bb) rdm2_f_oovo_aaaa -= einsum("ij,ka->jkai", delta_oo.aa, t1.aa) rdm2_f_vooo_aaaa += einsum("ij,ka->akji", delta_oo.aa, t1.aa) - rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_aaaa -= einsum("abij->jaib", l2.aaaa) rdm2_f_ovov_aaaa += einsum("abij->jbia", l2.aaaa) - rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_bbbb -= einsum("abij->jaib", l2.bbbb) rdm2_f_ovov_bbbb += einsum("abij->jbia", l2.bbbb) - rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_bbaa += einsum("abij->jbia", l2.abab) - rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_aabb += einsum("abij->iajb", l2.abab) rdm2_f_oovv_aaaa -= einsum("ai,jb->ijba", l1.aa, t1.aa) rdm2_f_oovv_bbbb -= einsum("ai,jb->ijba", l1.bb, t1.bb) @@ -6866,9 +6867,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("ai,wia->w", l1.aa, u11.aa) dm_b_des += einsum("wai,xwia->x", lu11.aa, u12.aa) dm_b_des += einsum("w->w", s1) @@ -6898,7 +6899,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("wxai,yxia->wy", lu12.bb, u12.bb) rdm1_b += einsum("wai,xia->wx", lu11.aa, u11.aa) rdm1_b += einsum("wx,yx->wy", ls2, s2) @@ -6935,182 +6936,182 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv.bb = np.eye(nvir[1]) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("wia,xwaj->xji", u11.aa, lu12.aa) - x7 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x7 += einsum("wij->wij", x0) - x16 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x16 += einsum("wx,xij->wij", s2, x0) - x64 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x64 += einsum("wij->wij", x16) - rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_des_oo_aa -= einsum("wij->wji", x16) del x16 - x75 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x75 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x75 += einsum("wij->wij", x0) - rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_cre_oo_aa -= einsum("wij->wji", x0) del x0 - x1 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("ia,waj->wji", t1.aa, lu11.aa) x7 += einsum("wij->wij", x1) - rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_cre_ov_aa -= einsum("ia,wij->wja", t1.aa, x7) - rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_des_ov_aa -= einsum("wij,wxia->xja", x7, u12.aa) del x7 x75 += einsum("wij->wij", x1) - x77 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x77 += einsum("wia,wij->ja", u11.aa, x75) del x75 rdm_eb_cre_oo_aa -= einsum("wij->wji", x1) del x1 - x2 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x2 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x2 += einsum("wia,xwaj->xji", u11.bb, lu12.bb) - x11 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x11 += einsum("wij->wij", x2) - x36 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x36 += einsum("wx,xij->wij", s2, x2) - x83 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x83 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x83 += einsum("wij->wij", x36) - rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_des_oo_bb -= einsum("wij->wji", x36) del x36 - x89 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x89 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x89 += einsum("wij->wij", x2) - rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_cre_oo_bb -= einsum("wij->wji", x2) del x2 - x3 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x3 += einsum("ia,waj->wji", t1.bb, lu11.bb) x11 += einsum("wij->wij", x3) - rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_cre_ov_bb -= einsum("ia,wij->wja", t1.bb, x11) - rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_des_ov_bb -= einsum("wij,wxia->xja", x11, u12.bb) del x11 x89 += einsum("wij->wij", x3) - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum("wia,wij->ja", u11.bb, x89) del x89 rdm_eb_cre_oo_bb -= einsum("wij->wji", x3) del x3 - x4 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nbos, nbos, nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("ia,wxaj->wxji", t1.aa, lu12.aa) - x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("wia,xwij->xja", u11.aa, x4) rdm_eb_cre_ov_aa -= einsum("wia->wia", x5) rdm_eb_des_ov_aa -= einsum("wx,xia->wia", s2, x5) del x5 x77 += einsum("wxia,wxij->ja", u12.aa, x4) * 0.5 del x4 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum("ijab->jiab", t2.aaaa) x6 -= einsum("ijab->jiba", t2.aaaa) rdm_eb_cre_ov_aa -= einsum("wai,ijab->wjb", lu11.aa, x6) - x8 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=np.float64) + x8 = np.zeros((nbos, nbos, nocc[1], nocc[1]), dtype=types[float]) x8 += einsum("ia,wxaj->wxji", t1.bb, lu12.bb) - x9 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x9 += einsum("wia,xwij->xja", u11.bb, x8) rdm_eb_cre_ov_bb -= einsum("wia->wia", x9) rdm_eb_des_ov_bb -= einsum("wx,xia->wia", s2, x9) del x9 x91 += einsum("wxia,wxij->ja", u12.bb, x8) * 0.5 del x8 - x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x10 += einsum("ijab->jiab", t2.bbbb) x10 -= einsum("ijab->jiba", t2.bbbb) rdm_eb_cre_ov_bb -= einsum("wai,ijab->wjb", lu11.bb, x10) - x12 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x12 += einsum("wia,xwbi->xba", u11.aa, lu12.aa) - rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_cre_vv_aa += einsum("wab->wab", x12) rdm_eb_des_ov_aa -= einsum("wab,xwia->xib", x12, u12.aa) - rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_des_vv_aa += einsum("wx,xab->wab", s2, x12) del x12 - x13 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x13 += einsum("wia,xwbi->xba", u11.bb, lu12.bb) - rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_cre_vv_bb += einsum("wab->wab", x13) rdm_eb_des_ov_bb -= einsum("wab,xwia->xib", x13, u12.bb) - rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_des_vv_bb += einsum("wx,xab->wab", s2, x13) del x13 - x14 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("wai,xwja->xij", lu11.aa, u12.aa) x64 += einsum("wij->wij", x14) rdm_eb_des_oo_aa -= einsum("wij->wji", x14) del x14 - x15 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x15 += einsum("ai,wja->wij", l1.aa, u11.aa) x64 += einsum("wij->wij", x15) rdm_eb_des_oo_aa -= einsum("wij->wji", x15) del x15 - x17 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x17 += einsum("wx,xai->wia", s2, lu11.aa) - x21 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x21 += einsum("wia->wia", x17) - x52 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x52 += einsum("wia->wia", x17) - rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_des_vo_aa += einsum("wia->wai", x17) del x17 - x18 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x18 += einsum("wia,baji->wjb", u11.bb, l2.abab) x21 += einsum("wia->wia", x18) x52 += einsum("wia->wia", x18) rdm_eb_des_vo_aa += einsum("wia->wai", x18) del x18 - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum("abij->jiab", l2.aaaa) x19 += einsum("abij->jiba", l2.aaaa) * -1 - x20 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x20 += einsum("wia,ijab->wjb", u11.aa, x19) x21 += einsum("wia->wia", x20) * -1 del x20 rdm_eb_des_oo_aa += einsum("ia,wja->wij", t1.aa, x21) * -1 rdm_eb_des_vv_aa += einsum("ia,wib->wba", t1.aa, x21) del x21 - x62 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x62 += einsum("ijab,ijcb->ac", t2.aaaa, x19) del x19 - x63 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("ab->ba", x62) * -1 - x92 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x92 += einsum("ab->ba", x62) * -1 del x62 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum("ai,ja->ij", l1.aa, t1.aa) - x28 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x28 += einsum("ij->ij", x22) - x65 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x65 += einsum("ij->ij", x22) - x76 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x76 += einsum("ij->ij", x22) del x22 - x23 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x23 += einsum("wai,wja->ij", lu11.aa, u11.aa) x28 += einsum("ij->ij", x23) x65 += einsum("ij->ij", x23) x76 += einsum("ij->ij", x23) del x23 - x24 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x24 += einsum("wxai,wxja->ij", lu12.aa, u12.aa) x28 += einsum("ij->ij", x24) * 0.5 x65 += einsum("ij->ij", x24) * 0.5 x76 += einsum("ij->ij", x24) * 0.5 del x24 - x25 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("abij,kjab->ik", l2.abab, t2.abab) x28 += einsum("ij->ij", x25) x65 += einsum("ij->ij", x25) x76 += einsum("ij->ij", x25) del x25 - x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum("ijab->jiab", t2.aaaa) x26 += einsum("ijab->jiba", t2.aaaa) * -1 - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum("abij,ikab->jk", l2.aaaa, x26) x28 += einsum("ij->ij", x27) * -1 x65 += einsum("ij->ij", x27) * -1 @@ -7125,24 +7126,24 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x28 += einsum("ij->ji", delta_oo.aa) * -1 rdm_eb_des_oo_aa += einsum("w,ij->wji", s1, x28) * -1 del x28 - x29 = np.zeros((nbos), dtype=np.float64) + x29 = np.zeros((nbos), dtype=types[float]) x29 += einsum("w,xw->x", ls1, s2) - x34 = np.zeros((nbos), dtype=np.float64) + x34 = np.zeros((nbos), dtype=types[float]) x34 += einsum("w->w", x29) del x29 - x30 = np.zeros((nbos), dtype=np.float64) + x30 = np.zeros((nbos), dtype=types[float]) x30 += einsum("ai,wia->w", l1.aa, u11.aa) x34 += einsum("w->w", x30) del x30 - x31 = np.zeros((nbos), dtype=np.float64) + x31 = np.zeros((nbos), dtype=types[float]) x31 += einsum("ai,wia->w", l1.bb, u11.bb) x34 += einsum("w->w", x31) del x31 - x32 = np.zeros((nbos), dtype=np.float64) + x32 = np.zeros((nbos), dtype=types[float]) x32 += einsum("wai,xwia->x", lu11.aa, u12.aa) x34 += einsum("w->w", x32) del x32 - x33 = np.zeros((nbos), dtype=np.float64) + x33 = np.zeros((nbos), dtype=types[float]) x33 += einsum("wai,xwia->x", lu11.bb, u12.bb) x34 += einsum("w->w", x33) del x33 @@ -7151,35 +7152,35 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_des_ov_aa += einsum("w,ia->wia", x34, t1.aa) rdm_eb_des_ov_bb += einsum("w,ia->wia", x34, t1.bb) del x34 - x35 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x35 += einsum("wai,xwja->xij", lu11.bb, u12.bb) x83 += einsum("wij->wij", x35) rdm_eb_des_oo_bb -= einsum("wij->wji", x35) del x35 - x37 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x37 += einsum("ai,wja->wij", l1.bb, u11.bb) x83 += einsum("wij->wij", x37) rdm_eb_des_oo_bb -= einsum("wij->wji", x37) del x37 - x38 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x38 += einsum("wx,xai->wia", s2, lu11.bb) - x42 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x42 += einsum("wia->wia", x38) - x55 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x55 += einsum("wia->wia", x38) - rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_des_vo_bb += einsum("wia->wai", x38) del x38 - x39 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x39 += einsum("wia,abij->wjb", u11.aa, l2.abab) x42 += einsum("wia->wia", x39) x55 += einsum("wia->wia", x39) rdm_eb_des_vo_bb += einsum("wia->wai", x39) del x39 - x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x40 += einsum("abij->jiab", l2.bbbb) x40 += einsum("abij->jiba", l2.bbbb) * -1 - x41 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x41 += einsum("wia,ijab->wjb", u11.bb, x40) del x40 x42 += einsum("wia->wia", x41) * -1 @@ -7187,37 +7188,37 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_des_oo_bb += einsum("ia,wja->wij", t1.bb, x42) * -1 rdm_eb_des_vv_bb += einsum("ia,wib->wba", t1.bb, x42) del x42 - x43 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("ai,ja->ij", l1.bb, t1.bb) - x49 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x49 += einsum("ij->ij", x43) - x84 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x84 += einsum("ij->ij", x43) - x90 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x90 += einsum("ij->ij", x43) del x43 - x44 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x44 += einsum("wai,wja->ij", lu11.bb, u11.bb) x49 += einsum("ij->ij", x44) x84 += einsum("ij->ij", x44) x90 += einsum("ij->ij", x44) del x44 - x45 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x45 += einsum("wxai,wxja->ij", lu12.bb, u12.bb) x49 += einsum("ij->ij", x45) * 0.5 x84 += einsum("ij->ij", x45) * 0.5 x90 += einsum("ij->ij", x45) * 0.5 del x45 - x46 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x46 += einsum("abij,ikab->jk", l2.abab, t2.abab) x49 += einsum("ij->ij", x46) x84 += einsum("ij->ij", x46) x90 += einsum("ij->ij", x46) del x46 - x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x47 += einsum("ijab->jiab", t2.bbbb) * -1 x47 += einsum("ijab->jiba", t2.bbbb) - x48 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x48 += einsum("abij,ikba->jk", l2.bbbb, x47) x49 += einsum("ij->ij", x48) * -1 x84 += einsum("ij->ij", x48) * -1 @@ -7231,10 +7232,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x49 += einsum("ij->ji", delta_oo.bb) * -1 rdm_eb_des_oo_bb += einsum("w,ij->wji", s1, x49) * -1 del x49 - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum("abij->jiab", l2.aaaa) x50 -= einsum("abij->jiba", l2.aaaa) - x51 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x51 += einsum("wia,ijab->wjb", u11.aa, x50) del x50 x52 -= einsum("wia->wia", x51) @@ -7247,10 +7248,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x52 rdm_eb_des_vo_aa -= einsum("wia->wai", x51) del x51 - x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum("abij->jiab", l2.bbbb) x53 -= einsum("abij->jiba", l2.bbbb) - x54 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x54 += einsum("wia,ijab->wjb", u11.bb, x53) del x53 x55 -= einsum("wia->wia", x54) @@ -7263,66 +7264,66 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x55 rdm_eb_des_vo_bb -= einsum("wia->wai", x54) del x54 - x56 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x56 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x56 += einsum("wia,xyai->xyw", u11.aa, lu12.aa) - x58 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x58 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x58 += einsum("wxy->xwy", x56) del x56 - x57 = np.zeros((nbos, nbos, nbos), dtype=np.float64) + x57 = np.zeros((nbos, nbos, nbos), dtype=types[float]) x57 += einsum("wia,xyai->xyw", u11.bb, lu12.bb) x58 += einsum("wxy->xwy", x57) del x57 rdm_eb_des_ov_aa += einsum("wxy,wxia->yia", x58, u12.aa) * 0.5 rdm_eb_des_ov_bb += einsum("wxy,wxia->yia", x58, u12.bb) * 0.5 del x58 - x59 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x59 += einsum("wai,wib->ab", lu11.aa, u11.aa) x63 += einsum("ab->ab", x59) x92 += einsum("ab->ab", x59) del x59 - x60 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x60 += einsum("wxai,wxib->ab", lu12.aa, u12.aa) x63 += einsum("ab->ab", x60) * 0.5 x92 += einsum("ab->ab", x60) * 0.5 del x60 - x61 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x61 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x63 += einsum("ab->ab", x61) rdm_eb_des_ov_aa += einsum("ab,wia->wib", x63, u11.aa) * -1 del x63 x92 += einsum("ab->ab", x61) del x61 - x66 = np.zeros((nbos, nbos), dtype=np.float64) + x66 = np.zeros((nbos, nbos), dtype=types[float]) x66 += einsum("wx,yx->wy", ls2, s2) - x71 = np.zeros((nbos, nbos), dtype=np.float64) + x71 = np.zeros((nbos, nbos), dtype=types[float]) x71 += einsum("wx->wx", x66) del x66 - x67 = np.zeros((nbos, nbos), dtype=np.float64) + x67 = np.zeros((nbos, nbos), dtype=types[float]) x67 += einsum("wai,xia->wx", lu11.aa, u11.aa) x71 += einsum("wx->wx", x67) del x67 - x68 = np.zeros((nbos, nbos), dtype=np.float64) + x68 = np.zeros((nbos, nbos), dtype=types[float]) x68 += einsum("wai,xia->wx", lu11.bb, u11.bb) x71 += einsum("wx->wx", x68) del x68 - x69 = np.zeros((nbos, nbos), dtype=np.float64) + x69 = np.zeros((nbos, nbos), dtype=types[float]) x69 += einsum("wxai,ywia->xy", lu12.aa, u12.aa) x71 += einsum("wx->wx", x69) del x69 - x70 = np.zeros((nbos, nbos), dtype=np.float64) + x70 = np.zeros((nbos, nbos), dtype=types[float]) x70 += einsum("wxai,ywia->xy", lu12.bb, u12.bb) x71 += einsum("wx->wx", x70) del x70 rdm_eb_des_ov_aa += einsum("wx,wia->xia", x71, u11.aa) rdm_eb_des_ov_bb += einsum("wx,wia->xia", x71, u11.bb) del x71 - x72 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x72 += einsum("ia,abjk->jikb", t1.aa, l2.abab) x77 += einsum("ijab,ikjb->ka", t2.abab, x72) del x72 - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum("ijka->ijka", x73) * -1 x74 += einsum("ijka->jika", x73) del x73 @@ -7334,24 +7335,24 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x77 += einsum("ai,jiba->jb", l1.bb, t2.abab) * -1 rdm_eb_des_ov_aa += einsum("w,ia->wia", s1, x77) * -1 del x77 - x78 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x78 += einsum("wai,wib->ab", lu11.bb, u11.bb) - x82 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x82 += einsum("ab->ab", x78) - x93 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x93 += einsum("ab->ab", x78) * 2 del x78 - x79 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x79 += einsum("wxai,wxib->ab", lu12.bb, u12.bb) x82 += einsum("ab->ab", x79) * 0.5 x93 += einsum("ab->ab", x79) del x79 - x80 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x80 += einsum("abij,ijac->bc", l2.abab, t2.abab) x82 += einsum("ab->ab", x80) x93 += einsum("ab->ab", x80) * 2 del x80 - x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x81 += einsum("abij->jiab", l2.bbbb) * -1 x81 += einsum("abij->jiba", l2.bbbb) x82 += einsum("ijab,ijca->cb", t2.bbbb, x81) * -1 @@ -7359,19 +7360,19 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x82 x93 += einsum("ijab,ijca->cb", t2.bbbb, x81) * -2 del x81 - x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x85 += einsum("ia,bajk->jkib", t1.bb, l2.abab) x91 += einsum("ijab,ijka->kb", t2.abab, x85) del x85 - x86 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x86 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x87 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x87 += einsum("ijka->ijka", x86) * -1 x87 += einsum("ijka->jika", x86) del x86 x91 += einsum("ijab,ijka->kb", t2.bbbb, x87) * -1 del x87 - x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x88 += einsum("ijab->jiab", t2.bbbb) x88 += einsum("ijab->jiba", t2.bbbb) * -1 x91 += einsum("ai,ijba->jb", l1.bb, x88) * -1 @@ -7396,9 +7397,9 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_ov_bb += einsum("wai,ijab->wjb", lu11.aa, t2.abab) rdm_eb_cre_ov_bb += einsum("w,ia->wia", ls1, t1.bb) rdm_eb_cre_ov_bb += einsum("wx,xia->wia", ls2, u11.bb) - rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_cre_vo_aa += einsum("wai->wai", lu11.aa) - rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_cre_vo_bb += einsum("wai->wai", lu11.bb) rdm_eb_cre_vv_aa += einsum("ia,wbi->wba", t1.aa, lu11.aa) rdm_eb_cre_vv_bb += einsum("ia,wbi->wba", t1.bb, lu11.bb) diff --git a/ebcc/codegen/UCCSD_S_1_1.py b/ebcc/codegen/UCCSD_S_1_1.py index de13890d..d48b83fe 100644 --- a/ebcc/codegen/UCCSD_S_1_1.py +++ b/ebcc/codegen/UCCSD_S_1_1.py @@ -2,34 +2,35 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nbos=None, t1=None, t2=None, s1=None, u11=None, **kwargs): # Energy - x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum("iajb->jiab", v.bbbb.ovov) x0 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x1 += einsum("ijab->jiba", t2.bbbb) x1 += einsum("ia,jb->ijba", t1.bb, t1.bb) * -1 e_cc = 0 e_cc += einsum("ijab,ijab->", x0, x1) * -0.5 del x0 del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iajb->jiab", v.aaaa.ovov) x2 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum("ijab->jiba", t2.aaaa) x3 += einsum("ia,jb->ijab", t1.aa, t1.aa) e_cc += einsum("ijab,ijab->", x2, x3) * -0.5 del x2 del x3 - x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x4 += einsum("ijab->ijab", t2.abab) x4 += einsum("ia,jb->ijab", t1.aa, t1.bb) e_cc += einsum("iajb,ijab->", v.aabb.ovov, x4) del x4 - x5 = np.zeros((nbos), dtype=np.float64) + x5 = np.zeros((nbos), dtype=types[float]) x5 += einsum("w->w", G) x5 += einsum("ia,wia->w", t1.aa, g.aa.bov) x5 += einsum("ia,wia->w", t1.bb, g.bb.bov) @@ -64,320 +65,320 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # T1, T2, S1 and U11 amplitudes - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum("ia,jakb->ikjb", t1.aa, v.aaaa.ovov) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum("ijka->ijka", x0) * -1 x1 += einsum("ijka->ikja", x0) - x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x67 -= einsum("ijka->ijka", x0) x67 += einsum("ijka->ikja", x0) - x93 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x93 += einsum("ia,jkla->jilk", t1.aa, x0) - x94 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x94 += einsum("ia,jkli->jkla", t1.aa, x93) - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum("ia,jkib->jkab", t1.aa, x94) del x94 - x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x102 += einsum("ijab->ijab", x95) del x95 - x134 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x134 += einsum("ijkl->ijkl", x93) del x93 - x261 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x261 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x261 += einsum("ijka->jkia", x0) * -1 x261 += einsum("ijka->kjia", x0) del x0 x1 += einsum("ijka->jika", v.aaaa.ooov) x1 += einsum("ijka->jkia", v.aaaa.ooov) * -1 - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum("ijab,kjia->kb", t2.aaaa, x1) * -1 del x1 - x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("iabc->ibac", v.aaaa.ovvv) x2 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x30 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x30 += einsum("ia,ibca->bc", t1.aa, x2) - x31 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x31 += einsum("ab->ab", x30) * -1 - x275 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x275 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x275 += einsum("ab->ab", x30) * -1 - x307 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x307 += einsum("ab->ab", x30) * -1 del x30 - x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("ia,jbac->ijbc", t1.aa, x2) t1new_aa += einsum("ijab,icba->jc", t2.aaaa, x2) * -1 del x2 - x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x4 += einsum("ijka->jika", x3) - x122 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x122 += einsum("ijab,kljb->kila", t2.abab, x3) del x3 - x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x126 += einsum("ijka->ikja", x122) del x122 x4 += einsum("ijka->ijka", v.aabb.ooov) - x285 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x285 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x285 += einsum("ijab,iklb->kjla", t2.abab, x4) - x289 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x289 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x289 += einsum("ijka->ikja", x285) * -1 del x285 t1new_aa += einsum("ijab,ikjb->ka", t2.abab, x4) * -1 - x5 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("w,wia->ia", s1, g.aa.bov) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ia->ia", x5) - x71 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x71 += einsum("ia->ia", x5) - x299 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x299 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x299 += einsum("ia->ia", x5) - x308 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x308 += einsum("ia->ia", x5) del x5 - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) x9 += einsum("ia->ia", x6) - x105 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x105 += einsum("ia,ja->ij", t1.aa, x6) - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum("ij,kjab->ikab", x105, t2.aaaa) del x105 - x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x130 += einsum("ijab->ijab", x106) * -1 del x106 - x123 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x123 += einsum("ia,jkab->kjib", x6, t2.aaaa) x126 += einsum("ijka->ikja", x123) * -1 del x123 x299 += einsum("ia->ia", x6) - x306 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x306 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x306 += einsum("ia->ia", x6) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x7 += einsum("iajb->jiba", v.aaaa.ovov) - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ia,ijba->jb", t1.aa, x7) x9 += einsum("ia->ia", x8) * -1 x306 += einsum("ia->ia", x8) * -1 del x8 x307 += einsum("ia,ib->ab", t1.aa, x306) * -1 del x306 - x23 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x23 += einsum("ijab,ikba->jk", t2.aaaa, x7) - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum("ij->ji", x23) * -1 - x128 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x128 += einsum("ij->ji", x23) * -1 del x23 - x113 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x113 += einsum("ijab,ijca->bc", t2.aaaa, x7) - x116 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x116 += einsum("ab->ab", x113) * -1 del x113 - x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x233 += einsum("ijab,ikca->kjcb", t2.abab, x7) - x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x234 += einsum("ijab->ijab", x233) * -1 del x233 - x301 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x301 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x301 += einsum("wia,ijba->wjb", u11.aa, x7) del x7 - x302 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x302 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x302 += einsum("wia->wia", x301) * -1 del x301 x9 += einsum("ia->ia", f.aa.ov) - x26 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x26 += einsum("ia,ja->ij", t1.aa, x9) x27 += einsum("ij->ji", x26) del x26 - x265 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x265 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x265 += einsum("ia,jkab->jikb", x9, t2.abab) - x271 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x271 += einsum("ijka->jika", x265) del x265 - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum("ia,ijab->jb", x9, t2.abab) - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum("ijab->jiab", t2.aaaa) x10 += einsum("ijab->jiba", t2.aaaa) * -1 - x108 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("ijab,kica->jkbc", x10, x107) * -1 del x107 x130 += einsum("ijab->jiab", x108) * -1 del x108 t1new_aa += einsum("ia,ijba->jb", x9, x10) del x9 - x11 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x11 += einsum("w,wia->ia", s1, g.bb.bov) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum("ia->ia", x11) - x155 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x155 += einsum("ia->ia", x11) - x298 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x298 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x298 += einsum("ia->ia", x11) - x317 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x317 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x317 += einsum("ia->ia", x11) del x11 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x15 += einsum("ia->ia", x12) - x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x204 += einsum("ia,jkba->jkib", x12, t2.bbbb) - x208 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x208 += einsum("ijka->ikja", x204) * -1 del x204 - x219 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x219 += einsum("ia,ja->ij", t1.bb, x12) - x220 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x220 += einsum("ij->ij", x219) del x219 x298 += einsum("ia->ia", x12) - x315 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x315 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x315 += einsum("ia->ia", x12) del x12 - x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x13 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x13 += einsum("iajb->jiba", v.bbbb.ovov) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum("ia,ijba->jb", t1.bb, x13) x15 += einsum("ia->ia", x14) * -1 x315 += einsum("ia->ia", x14) * -1 del x14 - x316 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x316 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x316 += einsum("ia,ib->ab", t1.bb, x315) * -1 del x315 - x48 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x48 += einsum("ijab,ikba->kj", t2.bbbb, x13) - x52 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x52 += einsum("ij->ij", x48) * -1 del x48 - x210 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("ijab,ijca->cb", t2.bbbb, x13) - x213 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x213 += einsum("ab->ba", x210) * -1 del x210 - x215 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x215 += einsum("ijab,ikab->kj", t2.bbbb, x13) - x217 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x217 += einsum("ij->ij", x215) * -1 del x215 - x277 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x277 += einsum("ijab,ijac->cb", t2.bbbb, x13) - x278 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x278 += einsum("ab->ba", x277) * -1 x316 += einsum("ab->ba", x277) * -1 del x277 - x304 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x304 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x304 += einsum("wia,ijba->wjb", u11.bb, x13) - x305 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x305 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x305 += einsum("wia->wia", x304) * -1 del x304 x15 += einsum("ia->ia", f.bb.ov) - x51 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x51 += einsum("ia,ja->ij", t1.bb, x15) x52 += einsum("ij->ji", x51) del x51 - x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x286 += einsum("ia,jkba->jkib", x15, t2.abab) x289 += einsum("ijka->ikja", x286) del x286 t1new_aa += einsum("ia,jiba->jb", x15, t2.abab) - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum("iabj->ijba", v.aaaa.ovvo) x16 -= einsum("ijab->ijab", v.aaaa.oovv) - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("ia,jkba->ijkb", t1.aa, x16) - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 -= einsum("ijka->jika", x73) del x73 t1new_aa += einsum("ia,ijba->jb", t1.aa, x16) - u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + u11new_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) u11new_aa += einsum("wia,ijba->wjb", u11.aa, x16) - x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x17 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x18 += einsum("wij->wij", x17) del x17 x18 += einsum("wij->wij", g.aa.boo) - x82 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("ia,wij->wja", t1.aa, x18) - x83 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x83 -= einsum("wia->wia", x82) del x82 t1new_aa -= einsum("wia,wij->ja", u11.aa, x18) del x18 - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum("w,wij->ij", s1, g.aa.boo) x27 += einsum("ij->ij", x19) - x77 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x77 += einsum("ij->ji", x19) del x19 - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x27 += einsum("ij->ij", x20) - x90 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x90 += einsum("ij->ij", x20) del x20 - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x27 += einsum("ij->ij", x21) x90 += einsum("ij->ij", x21) del x21 - x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x91 += einsum("ij,ikab->kjab", x90, t2.aaaa) del x90 - x92 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x92 -= einsum("ijab->ijba", x91) del x91 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x27 += einsum("ij->ji", x22) x128 += einsum("ij->ji", x22) del x22 - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum("ijka->ikja", v.aaaa.ooov) x24 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x25 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("ia,ijka->jk", t1.aa, x24) x27 += einsum("ij->ij", x25) * -1 x128 += einsum("ij->ij", x25) * -1 del x25 - x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum("ij,ikab->kjab", x128, t2.aaaa) del x128 x130 += einsum("ijab->ijba", x129) del x129 - x309 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x309 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x309 += einsum("wia,ijka->wjk", u11.aa, x24) * -1 del x24 x27 += einsum("ij->ij", f.aa.oo) - x291 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x291 += einsum("ij,ikab->jkab", x27, t2.abab) - t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=np.float64) + t2new_baba = np.zeros((nocc[1], nocc[0], nvir[1], nvir[0]), dtype=types[float]) t2new_baba += einsum("ijab->jiba", x291) * -1 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum("ijab->ijab", x291) * -1 del x291 t1new_aa += einsum("ia,ij->ja", t1.aa, x27) * -1 u11new_aa += einsum("ij,wia->wja", x27, u11.aa) * -1 del x27 - x28 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x28 += einsum("w,wab->ab", s1, g.aa.bvv) x31 += einsum("ab->ab", x28) - x85 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x85 += einsum("ab->ab", x28) x275 += einsum("ab->ab", x28) x307 += einsum("ab->ab", x28) del x28 - x29 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x29 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x31 += einsum("ab->ab", x29) - x88 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x88 -= einsum("ab->ba", x29) x275 += einsum("ab->ab", x29) x307 += einsum("ab->ab", x29) @@ -385,12 +386,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x31 += einsum("ab->ab", f.aa.vv) t1new_aa += einsum("ia,ba->ib", t1.aa, x31) del x31 - x32 = np.zeros((nbos), dtype=np.float64) + x32 = np.zeros((nbos), dtype=types[float]) x32 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x34 = np.zeros((nbos), dtype=np.float64) + x34 = np.zeros((nbos), dtype=types[float]) x34 += einsum("w->w", x32) del x32 - x33 = np.zeros((nbos), dtype=np.float64) + x33 = np.zeros((nbos), dtype=types[float]) x33 += einsum("ia,wia->w", t1.bb, g.bb.bov) x34 += einsum("w->w", x33) del x33 @@ -398,31 +399,31 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t1new_aa += einsum("w,wia->ia", x34, u11.aa) t1new_bb += einsum("w,wia->ia", x34, u11.bb) del x34 - x35 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x35 += einsum("ia,jakb->ikjb", t1.bb, v.bbbb.ovov) - x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x36 += einsum("ijka->ijka", x35) x36 += einsum("ijka->ikja", x35) * -1 - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 -= einsum("ijka->ijka", x35) x151 += einsum("ijka->ikja", x35) - x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x184 += einsum("ia,jkla->jilk", t1.bb, x35) - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 += einsum("ijab,klij->lkba", t2.bbbb, x184) - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum("ijab->ijab", x185) del x185 - x225 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x225 += einsum("ia,jkli->jkla", t1.bb, x184) del x184 - x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x226 += einsum("ia,jkib->jkab", t1.bb, x225) del x225 - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum("ijab->ijab", x226) del x226 - x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x282 += einsum("ijka->jkia", x35) * -1 x282 += einsum("ijka->kjia", x35) del x35 @@ -430,135 +431,135 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x36 += einsum("ijka->jkia", v.bbbb.ooov) t1new_bb += einsum("ijab,kija->kb", t2.bbbb, x36) * -1 del x36 - x37 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x37 += einsum("iabc->ibac", v.bbbb.ovvv) x37 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 - x55 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x55 += einsum("ia,ibca->bc", t1.bb, x37) - x56 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x56 += einsum("ab->ab", x55) * -1 x278 += einsum("ab->ab", x55) * -1 x316 += einsum("ab->ab", x55) * -1 del x55 - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum("ia,jbac->ijbc", t1.bb, x37) t1new_bb += einsum("ijab,icba->jc", t2.bbbb, x37) * -1 del x37 - x38 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x38 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x39 += einsum("ijka->ikja", x38) - x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x203 += einsum("ijab,ikla->kjlb", t2.abab, x38) x208 += einsum("ijka->ikja", x203) del x203 - x252 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x252 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x252 += einsum("ijka->ikja", x38) del x38 x39 += einsum("iajk->ijka", v.aabb.ovoo) - x264 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x264 += einsum("ijab,kjla->iklb", t2.abab, x39) x271 += einsum("ijka->jika", x264) * -1 del x264 - x266 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x266 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x266 += einsum("ia,jkla->ijkl", t1.aa, x39) - x267 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x267 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x267 += einsum("ijkl->jikl", x266) del x266 t1new_bb += einsum("ijab,ijka->kb", t2.abab, x39) * -1 - x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x40 -= einsum("ijab->jiab", t2.bbbb) x40 += einsum("ijab->jiba", t2.bbbb) - x165 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x165 += einsum("wia,ijba->wjb", g.bb.bov, x40) - x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x167 -= einsum("wia->wia", x165) del x165 t1new_bb += einsum("ia,ijba->jb", x15, x40) * -1 del x15 - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum("iabj->ijba", v.bbbb.ovvo) x41 -= einsum("ijab->ijab", v.bbbb.oovv) - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum("ijab,ikcb->jkac", x40, x41) - x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 -= einsum("ijab->ijab", x147) del x147 - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x157 += einsum("ia,jkba->ijkb", t1.bb, x41) - x158 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x158 -= einsum("ijka->jika", x157) del x157 t1new_bb += einsum("ia,ijba->jb", t1.bb, x41) - u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + u11new_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) u11new_bb += einsum("wia,ijba->wjb", u11.bb, x41) del x41 - x42 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x42 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x42 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x43 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x43 += einsum("wij->wij", x42) del x42 x43 += einsum("wij->wij", g.bb.boo) - x166 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x166 += einsum("ia,wij->wja", t1.bb, x43) x167 -= einsum("wia->wia", x166) del x166 t1new_bb -= einsum("wia,wij->ja", u11.bb, x43) del x43 - x44 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x44 += einsum("w,wij->ij", s1, g.bb.boo) x52 += einsum("ij->ij", x44) - x161 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x161 += einsum("ij->ji", x44) del x44 - x45 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x45 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x52 += einsum("ij->ij", x45) - x174 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x174 += einsum("ij->ij", x45) del x45 - x46 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x46 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x52 += einsum("ij->ij", x46) x174 += einsum("ij->ij", x46) del x46 - x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x175 += einsum("ij,ikab->kjab", x174, t2.bbbb) del x174 x176 -= einsum("ijab->ijba", x175) del x175 - x47 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x47 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x52 += einsum("ij->ji", x47) x220 += einsum("ij->ij", x47) del x47 - x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum("ij,jkab->kiab", x220, t2.bbbb) del x220 - x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x222 += einsum("ijab->jiba", x221) * -1 del x221 - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum("ijka->ikja", v.bbbb.ooov) x49 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x50 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x50 += einsum("ia,ijka->jk", t1.bb, x49) x52 += einsum("ij->ij", x50) * -1 del x50 - x216 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x216 += einsum("ia,jika->jk", t1.bb, x49) x217 += einsum("ij->ij", x216) * -1 del x216 - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum("ij,ikab->kjab", x217, t2.bbbb) del x217 x222 += einsum("ijab->ijba", x218) * -1 del x218 - x318 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x318 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x318 += einsum("wia,ijka->wjk", u11.bb, x49) * -1 del x49 x52 += einsum("ij->ij", f.bb.oo) - x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("ij,kiab->kjab", x52, t2.abab) t2new_baba += einsum("ijab->jiba", x292) * -1 t2new_abab += einsum("ijab->ijab", x292) * -1 @@ -566,18 +567,18 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t1new_bb += einsum("ia,ij->ja", t1.bb, x52) * -1 u11new_bb += einsum("ij,wia->wja", x52, u11.bb) * -1 del x52 - x53 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x53 += einsum("w,wab->ab", s1, g.bb.bvv) x56 += einsum("ab->ab", x53) - x169 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x169 += einsum("ab->ab", x53) x278 += einsum("ab->ab", x53) x316 += einsum("ab->ab", x53) del x53 - x54 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x54 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x56 += einsum("ab->ab", x54) - x172 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x172 -= einsum("ab->ba", x54) x278 += einsum("ab->ab", x54) x316 += einsum("ab->ab", x54) @@ -585,141 +586,141 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x56 += einsum("ab->ab", f.bb.vv) t1new_bb += einsum("ia,ba->ib", t1.bb, x56) del x56 - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum("ia,bjca->ijbc", t1.aa, v.aaaa.vovv) x92 -= einsum("ijab->ijab", x57) del x57 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum("ijab,jbck->ikac", t2.abab, v.bbaa.ovvo) x92 += einsum("ijab->ijab", x58) del x58 - x59 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x59 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum("ijab,kjcb->kiac", t2.abab, x59) x92 -= einsum("ijab->ijab", x60) del x60 - x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x241 += einsum("ijab->ijab", x59) del x59 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum("ijab->jiab", t2.aaaa) x61 -= einsum("ijab->jiba", t2.aaaa) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum("ijab,ikbc->jkac", x16, x61) del x16 del x61 x92 -= einsum("ijab->jiba", x62) del x62 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 -= einsum("iajb->jiab", v.aaaa.ovov) x63 += einsum("iajb->jiba", v.aaaa.ovov) - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ijab,ikcb->jkac", t2.aaaa, x63) - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 -= einsum("ijab,kica->jkbc", t2.aaaa, x64) x92 -= einsum("ijab->ijab", x65) del x65 - x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x98 -= einsum("ijab,kicb->jkac", t2.aaaa, x64) del x64 x102 += einsum("ijab->jiba", x98) del x98 - x70 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x70 += einsum("ia,ijba->jb", t1.aa, x63) x71 -= einsum("ia->ia", x70) x299 -= einsum("ia->ia", x70) del x70 - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum("ijab,ikca->jkbc", t2.aaaa, x63) - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 -= einsum("ijab,kica->jkbc", t2.aaaa, x96) del x96 x102 += einsum("ijab->ijab", x97) del x97 - x223 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x223 += einsum("ijab,ikca->kjcb", t2.abab, x63) del x63 - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 -= einsum("ijab,ikac->jkbc", t2.abab, x223) del x223 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb -= einsum("ijab->jiab", x224) t2new_bbbb += einsum("ijab->ijab", x224) del x224 - x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x66 += einsum("ijab,kljb->ikla", t2.abab, v.aabb.ooov) x74 += einsum("ijka->jika", x66) del x66 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 -= einsum("ijab->jiab", t2.aaaa) x68 += einsum("ijab->jiba", t2.aaaa) - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum("ijka,klba->ijlb", x67, x68) del x67 x74 += einsum("ijka->jika", x69) del x69 - x81 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("wia,ijba->wjb", g.aa.bov, x68) del x68 x83 -= einsum("wia->wia", x81) del x81 x71 += einsum("ia->ia", f.aa.ov) - x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x72 += einsum("ia,jkab->jkib", x71, t2.aaaa) x74 += einsum("ijka->kjia", x72) del x72 - x76 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x76 += einsum("ia,ja->ij", t1.aa, x71) del x71 x77 += einsum("ij->ij", x76) del x76 x74 -= einsum("ijak->ijka", v.aaaa.oovo) - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum("ia,ijkb->jkab", t1.aa, x74) del x74 x92 += einsum("ijab->ijab", x75) del x75 x77 += einsum("ij->ji", f.aa.oo) - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum("ij,jkab->kiab", x77, t2.aaaa) del x77 x92 += einsum("ijab->jiba", x78) del x78 - x79 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) x83 += einsum("wia->wia", x79) del x79 - x80 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x83 += einsum("wia->wia", x80) del x80 x83 += einsum("wai->wia", g.aa.bvo) - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum("wia,wjb->ijab", u11.aa, x83) x92 += einsum("ijab->jiba", x84) del x84 - x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("wia,wjb->jiba", u11.bb, x83) del x83 t2new_baba += einsum("ijab->jiba", x294) t2new_abab += einsum("ijab->ijab", x294) del x294 x85 += einsum("ab->ab", f.aa.vv) - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum("ab,ijbc->ijca", x85, t2.aaaa) del x85 x92 -= einsum("ijab->jiba", x86) del x86 - x87 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x87 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x88 += einsum("ab->ab", x87) - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum("ab,ijac->ijcb", x88, t2.aaaa) del x88 x92 -= einsum("ijab->jiab", x89) del x89 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum("ijab->ijab", x92) t2new_aaaa -= einsum("ijab->ijba", x92) t2new_aaaa -= einsum("ijab->jiab", x92) @@ -728,12 +729,12 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x275 += einsum("ab->ba", x87) * -1 x307 += einsum("ab->ba", x87) * -1 del x87 - x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x99 -= einsum("iajb->jiab", v.bbbb.ovov) x99 += einsum("iajb->jiba", v.bbbb.ovov) - x100 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x100 += einsum("ijab,jkcb->ikac", t2.abab, x99) - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 -= einsum("ijab,kjcb->ikac", t2.abab, x100) del x100 x102 += einsum("ijab->ijab", x101) @@ -741,26 +742,26 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x102) t2new_aaaa -= einsum("ijab->ijba", x102) del x102 - x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x148 += einsum("ijab,ikcb->jkac", t2.bbbb, x99) - x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x149 -= einsum("ijab,kica->jkbc", t2.bbbb, x148) x176 -= einsum("ijab->ijab", x149) del x149 - x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x229 -= einsum("ijab,kicb->jkac", t2.bbbb, x148) del x148 x230 += einsum("ijab->ijab", x229) del x229 - x154 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x154 += einsum("ia,ijba->jb", t1.bb, x99) x155 -= einsum("ia->ia", x154) x298 -= einsum("ia->ia", x154) del x154 - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 += einsum("ijab,ikca->jkbc", t2.bbbb, x99) del x99 - x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x228 -= einsum("ijab,kica->jkbc", t2.bbbb, x227) del x227 x230 += einsum("ijab->jiba", x228) @@ -768,72 +769,72 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x230) t2new_bbbb -= einsum("ijab->ijba", x230) del x230 - x103 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x103 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum("ijab,kijl->klab", t2.aaaa, x103) x130 += einsum("ijab->ijab", x104) del x104 - x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum("ia,jkil->jkla", t1.aa, x103) del x103 x126 += einsum("ijka->ijka", x118) del x118 - x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) - x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("ijab->jiab", t2.aaaa) * -1 x110 += einsum("ijab->jiba", t2.aaaa) - x111 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("ijab,jkbc->ikac", x109, x110) del x109 x130 += einsum("ijab->jiba", x111) * -1 del x111 - x284 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x284 += einsum("ijab,iklb->jkla", x110, x39) del x110 del x39 x289 += einsum("ijka->ijka", x284) * -1 del x284 - x112 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x112 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x116 += einsum("ab->ab", x112) x275 += einsum("ab->ab", x112) * -1 x307 += einsum("ab->ab", x112) * -1 del x112 - x114 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x114 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x114 += einsum("iabc->ibca", v.aaaa.ovvv) - x115 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x115 += einsum("ia,ibca->bc", t1.aa, x114) del x114 x116 += einsum("ab->ab", x115) * -1 del x115 - x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum("ab,ijbc->ijca", x116, t2.aaaa) del x116 x130 += einsum("ijab->jiab", x117) del x117 - x119 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x119 += einsum("ijab,kbca->jikc", t2.aaaa, v.aaaa.ovvv) x126 += einsum("ijka->ikja", x119) del x119 - x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) - x121 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x121 += einsum("ia,jkba->ijkb", t1.aa, x120) del x120 x126 += einsum("ijka->ikja", x121) del x121 - x124 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x124 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x124 += einsum("ijka->kija", v.aaaa.ooov) - x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x125 += einsum("ijab,ikla->jklb", x10, x124) del x124 x126 += einsum("ijka->ijka", x125) del x125 - x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x127 += einsum("ia,jikb->jkab", t1.aa, x126) del x126 x130 += einsum("ijab->ijab", x127) @@ -843,30 +844,30 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->jiab", x130) t2new_aaaa += einsum("ijab->jiba", x130) * -1 del x130 - x131 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum("ia,bcda->ibdc", t1.aa, v.aaaa.vvvv) - x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum("ia,jbca->ijbc", t1.aa, x131) del x131 - x139 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x139 += einsum("ijab->ijab", x132) del x132 - x133 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x133 += einsum("ijab,kbla->ijlk", t2.aaaa, v.aaaa.ovov) x134 += einsum("ijkl->jilk", x133) - x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum("ijab,klji->klab", t2.aaaa, x134) del x134 x139 += einsum("ijab->jiab", x135) del x135 - x136 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x136 += einsum("ijkl->lkji", x133) del x133 x136 += einsum("ijkl->kilj", v.aaaa.oooo) - x137 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x137 += einsum("ia,ijkl->jkla", t1.aa, x136) del x136 - x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum("ia,ijkb->kjab", t1.aa, x137) del x137 x139 += einsum("ijab->jiba", x138) @@ -874,100 +875,100 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_aaaa += einsum("ijab->ijab", x139) t2new_aaaa += einsum("ijab->ijba", x139) * -1 del x139 - x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x140 += einsum("ijab,ikjl->lkba", t2.aaaa, v.aaaa.oooo) - x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x142 += einsum("ijab->jiba", x140) del x140 - x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x141 += einsum("ijab,cadb->ijcd", t2.aaaa, v.aaaa.vvvv) x142 += einsum("ijab->jiba", x141) del x141 t2new_aaaa += einsum("ijab->ijba", x142) * -1 t2new_aaaa += einsum("ijab->ijab", x142) del x142 - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum("ia,bjca->ijbc", t1.bb, v.bbbb.vovv) x176 -= einsum("ijab->ijab", x143) del x143 - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum("ijab,iack->jkbc", t2.abab, v.aabb.ovvo) x176 += einsum("ijab->ijab", x144) del x144 - x145 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x145 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum("ijab,ikac->kjbc", t2.abab, x145) x176 -= einsum("ijab->ijab", x146) del x146 x234 += einsum("ijab->ijab", x145) - x269 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x269 += einsum("ijab->ijab", x145) del x145 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum("ijab,iakl->jklb", t2.abab, v.aabb.ovoo) x158 += einsum("ijka->jika", x150) del x150 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum("ijab->jiab", t2.bbbb) x152 -= einsum("ijab->jiba", t2.bbbb) - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum("ijka,klab->ijlb", x151, x152) del x152 del x151 x158 += einsum("ijka->jika", x153) del x153 x155 += einsum("ia->ia", f.bb.ov) - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum("ia,jkab->jkib", x155, t2.bbbb) x158 += einsum("ijka->kjia", x156) del x156 - x160 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x160 += einsum("ia,ja->ij", t1.bb, x155) del x155 x161 += einsum("ij->ij", x160) del x160 x158 -= einsum("ijak->ijka", v.bbbb.oovo) - x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x159 += einsum("ia,ijkb->jkab", t1.bb, x158) del x158 x176 += einsum("ijab->ijab", x159) del x159 x161 += einsum("ij->ji", f.bb.oo) - x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x162 += einsum("ij,jkab->kiab", x161, t2.bbbb) del x161 x176 += einsum("ijab->jiba", x162) del x162 - x163 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x163 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) x167 += einsum("wia->wia", x163) del x163 - x164 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x164 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x167 += einsum("wia->wia", x164) del x164 x167 += einsum("wai->wia", g.bb.bvo) - x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x168 += einsum("wia,wjb->ijab", u11.bb, x167) x176 += einsum("ijab->jiba", x168) del x168 - x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x293 += einsum("wia,wjb->ijab", u11.aa, x167) del x167 t2new_baba += einsum("ijab->jiba", x293) t2new_abab += einsum("ijab->ijab", x293) del x293 x169 += einsum("ab->ab", f.bb.vv) - x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x170 += einsum("ab,ijbc->ijca", x169, t2.bbbb) del x169 x176 -= einsum("ijab->jiba", x170) del x170 - x171 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x171 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x171 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x172 += einsum("ab->ab", x171) - x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x173 += einsum("ab,ijac->ijcb", x172, t2.bbbb) del x172 x176 -= einsum("ijab->jiab", x173) @@ -980,39 +981,39 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x278 += einsum("ab->ba", x171) * -1 x316 += einsum("ab->ba", x171) * -1 del x171 - x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x177 += einsum("ijab,ikjl->lkba", t2.bbbb, v.bbbb.oooo) - x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x179 += einsum("ijab->jiba", x177) del x177 - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum("ijab,cbda->ijdc", t2.bbbb, v.bbbb.vvvv) x179 += einsum("ijab->jiba", x178) del x178 t2new_bbbb += einsum("ijab->ijba", x179) * -1 t2new_bbbb += einsum("ijab->ijab", x179) del x179 - x180 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum("ia,bcda->ibdc", t1.bb, v.bbbb.vvvv) - x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum("ia,jbca->ijbc", t1.bb, x180) del x180 x189 += einsum("ijab->ijab", x181) del x181 - x182 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x182 += einsum("ijab,kbla->ijlk", t2.bbbb, v.bbbb.ovov) - x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum("ijab,klji->lkab", t2.bbbb, x182) x189 += einsum("ijab->ijab", x183) del x183 - x186 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x186 += einsum("ijkl->lkji", x182) del x182 x186 += einsum("ijkl->kilj", v.bbbb.oooo) - x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum("ia,ijkl->jkla", t1.bb, x186) del x186 - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum("ia,ijkb->kjab", t1.bb, x187) del x187 x189 += einsum("ijab->ijab", x188) @@ -1020,89 +1021,89 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->ijab", x189) t2new_bbbb += einsum("ijab->ijba", x189) * -1 del x189 - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x190 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ijab,kjil->klba", t2.bbbb, x190) x222 += einsum("ijab->ijab", x191) del x191 - x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x199 += einsum("ia,jkil->jkla", t1.bb, x190) del x190 x208 += einsum("ijka->ijka", x199) del x199 - x192 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x192 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) - x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x193 += einsum("ab,ijcb->ijac", x192, t2.bbbb) x222 += einsum("ijab->ijab", x193) * -1 del x193 x278 += einsum("ab->ab", x192) * -1 x316 += einsum("ab->ab", x192) * -1 del x192 - x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x194 += einsum("ijab->jiab", t2.bbbb) * -1 x194 += einsum("ijab->jiba", t2.bbbb) - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum("ijab,kicb->jkac", x194, x195) * -1 del x195 x222 += einsum("ijab->jiab", x196) * -1 del x196 - x197 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x197 += einsum("iajb,jkcb->ikac", v.aabb.ovov, x194) - x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x198 += einsum("ijab,ikac->jkbc", t2.abab, x197) * -1 x222 += einsum("ijab->ijab", x198) * -1 del x198 x234 += einsum("ijab->ijab", x197) * -1 del x197 - x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x237 += einsum("ijab,ikcb->jkac", x13, x194) del x13 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum("ijab->ijba", x237) del x237 - x263 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x263 += einsum("ijab,klib->klja", x194, x4) del x4 x271 += einsum("ijka->ijka", x263) * -1 del x263 - x200 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x200 += einsum("ijab,kacb->ijkc", t2.bbbb, v.bbbb.ovvv) x208 += einsum("ijka->ikja", x200) del x200 - x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x201 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) - x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x202 += einsum("ia,jkba->ijkb", t1.bb, x201) del x201 x208 += einsum("ijka->ikja", x202) del x202 - x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x205 += einsum("ijka->ikja", v.bbbb.ooov) * -1 x205 += einsum("ijka->kija", v.bbbb.ooov) - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum("ijab->jiab", t2.bbbb) x206 += einsum("ijab->jiba", t2.bbbb) * -1 - x207 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x207 += einsum("ijka,ilab->jklb", x205, x206) del x205 del x206 x208 += einsum("ijka->kija", x207) del x207 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum("ia,jikb->jkab", t1.bb, x208) del x208 x222 += einsum("ijab->ijab", x209) del x209 - x211 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x211 += einsum("iabc->ibca", v.bbbb.ovvv) - x212 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x212 += einsum("ia,ibca->bc", t1.bb, x211) x213 += einsum("ab->ab", x212) * -1 del x212 - x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x214 += einsum("ab,ijbc->ijca", x213, t2.bbbb) del x213 x222 += einsum("ijab->jiab", x214) @@ -1112,35 +1113,35 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_bbbb += einsum("ijab->jiab", x222) t2new_bbbb += einsum("ijab->jiba", x222) * -1 del x222 - x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x238 += einsum("ia,jbca->ijbc", t1.bb, x211) del x211 x239 += einsum("ijab->jiab", x238) * -1 del x238 - x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x231 += einsum("ia,bjca->jibc", t1.bb, v.aabb.vovv) t2new_baba += einsum("ijab->jiba", x231) t2new_abab += einsum("ijab->ijab", x231) del x231 - x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x232 += einsum("ijab,cadb->ijcd", t2.abab, v.aabb.vvvv) t2new_baba += einsum("ijab->jiba", x232) t2new_abab += einsum("ijab->ijab", x232) del x232 x234 += einsum("iabj->ijab", v.aabb.ovvo) - x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x235 += einsum("ijab,ikbc->jkac", x10, x234) del x234 t2new_baba += einsum("ijab->jiba", x235) t2new_abab += einsum("ijab->ijab", x235) del x235 - x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x236 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) x239 += einsum("ijab->jiab", x236) del x236 x239 += einsum("iabj->ijba", v.bbbb.ovvo) x239 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x240 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x240 += einsum("ijab,jkcb->ikac", t2.abab, x239) del x239 t2new_baba += einsum("ijab->jiba", x240) @@ -1151,182 +1152,182 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb t2new_abab -= einsum("ijab,jkcb->ikac", x241, x40) del x40 del x241 - x242 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x242 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x242 -= einsum("iabc->ibac", v.aaaa.ovvv) x242 += einsum("iabc->ibca", v.aaaa.ovvv) - x243 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x243 += einsum("ia,jbca->jibc", t1.aa, x242) del x242 - x244 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x244 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x244 -= einsum("ijab->ijab", x243) del x243 x244 += einsum("iabj->ijba", v.aaaa.ovvo) x244 -= einsum("ijab->ijab", v.aaaa.oovv) - x245 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x245 += einsum("ijab,ikca->kjcb", t2.abab, x244) del x244 t2new_baba += einsum("ijab->jiba", x245) t2new_abab += einsum("ijab->ijab", x245) del x245 - x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x248 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x248 += einsum("ijab->jiab", x246) del x246 - x247 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x247 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x248 -= einsum("ijab->jiab", x247) del x247 x248 += einsum("ijab->ijab", v.aabb.oovv) - x249 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x249 += einsum("ijab,ikcb->kjac", t2.abab, x248) del x248 t2new_baba -= einsum("ijab->jiba", x249) t2new_abab -= einsum("ijab->ijab", x249) del x249 - x250 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x250 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x250 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x254 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x254 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x254 += einsum("ijkl->ijlk", x250) x267 += einsum("ijkl->ijlk", x250) del x250 - x251 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x251 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x251 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x254 += einsum("ijkl->jilk", x251) x267 += einsum("ijkl->jilk", x251) del x251 x252 += einsum("iajk->ijka", v.aabb.ovoo) - x253 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x253 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x253 += einsum("ia,jkla->jikl", t1.aa, x252) del x252 x254 += einsum("ijkl->ijkl", x253) del x253 x254 += einsum("ijkl->ijkl", v.aabb.oooo) - x255 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x255 += einsum("ijab,ikjl->klab", t2.abab, x254) del x254 t2new_baba += einsum("ijab->jiba", x255) t2new_abab += einsum("ijab->ijab", x255) del x255 - x256 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x256 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x257 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x257 += einsum("ijab->jiab", x256) - x287 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x287 += einsum("ijab->jiab", x256) del x256 x257 += einsum("ijab->ijab", v.bbaa.oovv) - x258 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x258 += einsum("ijab,jkca->ikcb", t2.abab, x257) del x257 t2new_baba -= einsum("ijab->jiba", x258) t2new_abab -= einsum("ijab->ijab", x258) del x258 - x259 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x259 += einsum("ia,jkba->jkib", t1.bb, v.aabb.oovv) x271 += einsum("ijka->ijka", x259) del x259 - x260 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x260 += einsum("ijab,kacb->ikjc", t2.abab, v.aabb.ovvv) x271 += einsum("ijka->jika", x260) del x260 x261 += einsum("ijka->ikja", v.aaaa.ooov) x261 += einsum("ijka->kija", v.aaaa.ooov) * -1 - x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x262 += einsum("ijab,ikla->kljb", t2.abab, x261) del x261 x271 += einsum("ijka->ijka", x262) * -1 del x262 x267 += einsum("ijkl->ijkl", v.aabb.oooo) - x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x268 += einsum("ia,jkil->jkla", t1.bb, x267) del x267 x271 += einsum("ijka->ijka", x268) * -1 del x268 x269 += einsum("iabj->ijab", v.aabb.ovvo) - x270 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x270 += einsum("ia,jkab->jikb", t1.aa, x269) del x269 x271 += einsum("ijka->ijka", x270) del x270 x271 += einsum("ijak->ijka", v.aabb.oovo) - x272 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x272 += einsum("ia,ijkb->jkab", t1.aa, x271) del x271 t2new_baba += einsum("ijab->jiba", x272) * -1 t2new_abab += einsum("ijab->ijab", x272) * -1 del x272 - x273 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x273 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x273 += einsum("iajb->jiab", v.aaaa.ovov) x273 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x274 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x274 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x274 += einsum("ijab,ijca->cb", t2.aaaa, x273) del x273 x275 += einsum("ab->ba", x274) * -1 x307 += einsum("ab->ba", x274) * -1 del x274 x275 += einsum("ab->ab", f.aa.vv) - x276 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x276 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x276 += einsum("ab,ijbc->ijac", x275, t2.abab) del x275 t2new_baba += einsum("ijab->jiba", x276) t2new_abab += einsum("ijab->ijab", x276) del x276 x278 += einsum("ab->ab", f.bb.vv) - x279 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x279 += einsum("ab,ijcb->ijca", x278, t2.abab) del x278 t2new_baba += einsum("ijab->jiba", x279) t2new_abab += einsum("ijab->ijab", x279) del x279 - x280 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x280 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x280 += einsum("ia,jabk->kijb", t1.bb, v.bbaa.ovvo) x289 += einsum("ijka->ikja", x280) del x280 - x281 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x281 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x281 += einsum("ijab,kbca->ijkc", t2.abab, v.bbaa.ovvv) x289 += einsum("ijka->ikja", x281) del x281 x282 += einsum("ijka->ikja", v.bbbb.ooov) x282 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x283 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x283 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x283 += einsum("ijab,jklb->ikla", t2.abab, x282) del x282 x289 += einsum("ijka->ijka", x283) * -1 del x283 x287 += einsum("ijab->ijab", v.bbaa.oovv) - x288 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x288 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x288 += einsum("ia,jkba->ijkb", t1.aa, x287) del x287 x289 += einsum("ijka->ijka", x288) del x288 x289 += einsum("ijak->kija", v.bbaa.oovo) - x290 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x290 += einsum("ia,jikb->jkba", t1.bb, x289) del x289 t2new_baba += einsum("ijab->jiba", x290) * -1 t2new_abab += einsum("ijab->ijab", x290) * -1 del x290 - x295 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x295 += einsum("ia,bcda->ibcd", t1.bb, v.aabb.vvvv) - x296 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x296 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x296 += einsum("iabc->iabc", x295) del x295 x296 += einsum("abci->iabc", v.aabb.vvvo) - x297 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x297 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x297 += einsum("ia,jbac->ijbc", t1.aa, x296) del x296 t2new_baba += einsum("ijab->jiba", x297) t2new_abab += einsum("ijab->ijab", x297) del x297 x298 += einsum("ia->ia", f.bb.ov) - s1new = np.zeros((nbos), dtype=np.float64) + s1new = np.zeros((nbos), dtype=types[float]) s1new += einsum("ia,wia->w", x298, u11.bb) del x298 x299 += einsum("ia->ia", f.aa.ov) s1new += einsum("ia,wia->w", x299, u11.aa) del x299 - x300 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x300 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x302 += einsum("wia->wia", x300) del x300 @@ -1336,7 +1337,7 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x10 u11new_bb += einsum("wia,ijab->wjb", x302, t2.abab) del x302 - x303 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x303 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) x305 += einsum("wia->wia", x303) del x303 @@ -1356,22 +1357,22 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x309 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) u11new_aa += einsum("ia,wij->wja", t1.aa, x309) * -1 del x309 - x310 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x310 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x310 += einsum("iabc->ibac", v.aaaa.ovvv) x310 -= einsum("iabc->ibca", v.aaaa.ovvv) - x311 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x311 -= einsum("wia,ibca->wbc", u11.aa, x310) del x310 x311 += einsum("wab->wab", gc.aa.bvv) x311 += einsum("wia,iabc->wbc", u11.bb, v.bbaa.ovvv) u11new_aa += einsum("ia,wba->wib", t1.aa, x311) del x311 - x312 = np.zeros((nbos, nbos), dtype=np.float64) + x312 = np.zeros((nbos, nbos), dtype=types[float]) x312 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x314 = np.zeros((nbos, nbos), dtype=np.float64) + x314 = np.zeros((nbos, nbos), dtype=types[float]) x314 += einsum("wx->wx", x312) del x312 - x313 = np.zeros((nbos, nbos), dtype=np.float64) + x313 = np.zeros((nbos, nbos), dtype=types[float]) x313 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x314 += einsum("wx->wx", x313) del x313 @@ -1389,10 +1390,10 @@ def update_amps(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x318 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) u11new_bb += einsum("ia,wij->wja", t1.bb, x318) * -1 del x318 - x319 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x319 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x319 += einsum("iabc->ibac", v.bbbb.ovvv) x319 -= einsum("iabc->ibca", v.bbbb.ovvv) - x320 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x320 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x320 -= einsum("wia,ibca->wbc", u11.bb, x319) del x319 x320 += einsum("wab->wab", gc.bb.bvv) @@ -1457,52 +1458,52 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # L1, L2, LS1 and LU11 amplitudes - x0 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x0 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x2 += einsum("ia,jkla->jikl", t1.aa, x0) - x67 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x67 += einsum("ijkl->ijkl", x2) - x461 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x461 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x461 += einsum("ijkl->ijkl", x2) - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x2) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x2) del x2 - x52 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x52 += einsum("ia,jikb->jkba", t1.bb, x0) - x68 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x68 += einsum("ijab,kjla->kilb", t2.abab, x0) - x176 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x176 += einsum("ijab,ijka->kb", t2.abab, x0) - x186 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x186 += einsum("ia->ia", x176) del x176 - x252 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x252 += einsum("ijab,ikla->kjlb", t2.abab, x0) - x295 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x295 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x295 += einsum("iajk,lkjb->liba", v.aabb.ovoo, x0) - x333 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x333 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x333 -= einsum("ijab->ijab", x295) del x295 - x430 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x430 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x430 += einsum("iabc,jkib->jkca", v.bbaa.ovvv, x0) - l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=np.float64) + l2new_baba = np.zeros((nvir[1], nvir[0], nocc[1], nocc[0]), dtype=types[float]) l2new_baba -= einsum("ijab->baji", x430) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab -= einsum("ijab->abij", x430) del x430 l1new_aa -= einsum("ijab,kjia->bk", v.bbaa.oovv, x0) - x1 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x1 += einsum("abij,klab->ikjl", l2.abab, t2.abab) x67 += einsum("ijkl->ijkl", x1) x68 += einsum("ia,jkil->jkla", t1.bb, x67) - x258 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x258 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x258 += einsum("ia,ijkl->jkla", t1.aa, x67) del x67 x461 += einsum("ijkl->ijkl", x1) - x462 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x462 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x462 += einsum("iajb,kilj->klab", v.aabb.ovov, x461) del x461 l2new_baba += einsum("ijab->baji", x462) @@ -1511,223 +1512,223 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("iajk,likj->al", v.aabb.ovoo, x1) l1new_bb += einsum("ijka,jilk->al", v.aabb.ooov, x1) del x1 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum("ai,ja->ij", l1.aa, t1.aa) - x163 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x163 += einsum("ij->ij", x3) - x208 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x208 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x208 += einsum("ij->ij", x3) - x326 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x326 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x326 += einsum("ij->ij", x3) - x4 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x4 += einsum("w,wia->ia", s1, g.aa.bov) - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum("ia->ia", x4) - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("ia->ia", x4) - x314 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x314 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x314 += einsum("ia->ia", x4) - x495 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x495 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x495 += einsum("ia->ia", x4) l1new_aa -= einsum("ij,ja->ai", x3, x4) del x3 del x4 - x5 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x5 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) l1new_aa += einsum("iabc,jibc->aj", v.aabb.ovvv, x5) * -1 del x5 x6 += einsum("ia->ia", f.aa.ov) - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum("ia,jkab->jkib", x6, t2.aaaa) del x6 - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("ijka->kjia", x7) del x7 x8 += einsum("ijak->ijka", v.aaaa.oovo) * -1 - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum("ijka->kija", x8) x26 += einsum("ijka->jika", x8) * -1 del x8 - x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x9 += einsum("ijab,kacb->ijkc", t2.aaaa, v.aaaa.ovvv) - x17 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x17 += einsum("ijka->ijka", x9) * -1 del x9 - x10 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x10 += einsum("ijab,kbla->ijlk", t2.aaaa, v.aaaa.ovov) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum("ia,jkil->kjla", t1.aa, x10) x17 += einsum("ijka->ijka", x11) del x11 - x356 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x356 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x356 += einsum("abij,ijkl->klab", l2.aaaa, x10) del x10 - x360 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x360 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x360 += einsum("ijab->ijab", x356) del x356 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum("ia,jbia->jb", t1.bb, v.aabb.ovov) - x15 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x15 += einsum("ia->ia", x12) x31 += einsum("ia->ia", x12) - x209 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x209 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x209 += einsum("ia->ia", x12) - x332 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x332 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x332 += einsum("ia->ia", x12) x495 += einsum("ia->ia", x12) del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum("iajb->jiab", v.aaaa.ovov) * -1 x13 += einsum("iajb->jiba", v.aaaa.ovov) - x14 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x14 += einsum("ia,ijba->jb", t1.aa, x13) x15 += einsum("ia->ia", x14) * -1 - x16 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x16 += einsum("ia,jkab->jkib", x15, t2.aaaa) x17 += einsum("ijka->jika", x16) del x16 x26 += einsum("ijka->jkia", x17) x26 += einsum("ijka->ikja", x17) * -1 del x17 - x344 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x344 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x344 += einsum("ia,ja->ij", t1.aa, x15) - x345 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x345 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x345 += einsum("ij->ij", x344) del x344 - x517 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x517 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x517 += einsum("ia,ib->ab", t1.aa, x15) * -1 x31 += einsum("ia->ia", x14) * -1 x209 += einsum("ia->ia", x14) * -1 del x14 - x194 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x194 += einsum("wia,ijba->wjb", u11.aa, x13) - x195 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x195 += einsum("wia->wia", x194) * -1 del x194 - x435 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x435 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x435 += einsum("ijab,ikca->kjcb", t2.abab, x13) - x437 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x437 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x437 += einsum("ijab->ijab", x435) * -1 del x435 - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum("ia,jbka->ijkb", t1.aa, v.aaaa.ovov) - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum("ijka->ikja", x18) * -1 x19 += einsum("ijka->ijka", x18) - x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x27 += einsum("ijka->jkia", x18) x27 += einsum("ijka->kjia", x18) * -1 - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x46 += einsum("ia,jkla->ijkl", t1.aa, x18) - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x47 += einsum("ia,jkil->kjla", t1.aa, x46) - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x48 += einsum("ijka->ijka", x47) del x47 - x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x357 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x357 += einsum("abij,jikl->klba", l2.aaaa, x46) del x46 x360 += einsum("ijab->ijab", x357) del x357 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum("ijka->jkia", x18) * -1 x83 += einsum("ijka->kjia", x18) - x329 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x329 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x329 += einsum("ijka->ijka", x18) - x341 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x341 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x341 += einsum("ijka->ikja", x18) * -1 x341 += einsum("ijka->ijka", x18) - x466 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x466 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x466 += einsum("ijka->ikja", x18) x466 += einsum("ijka->ijka", x18) * -1 del x18 x19 += einsum("ijka->jkia", v.aaaa.ooov) x19 += einsum("ijka->jika", v.aaaa.ooov) * -1 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum("ijab->jiab", t2.aaaa) x20 += einsum("ijab->jiba", t2.aaaa) * -1 x26 += einsum("ijka,klab->ijlb", x19, x20) - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum("ijka,klab->ijlb", x19, x20) * 0.9999999999999993 del x19 - x82 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x82 += einsum("iabc,ijac->jb", v.aaaa.ovvv, x20) - x116 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x116 += einsum("ia->ia", x82) * -1 del x82 - x161 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x161 += einsum("ai,ijba->jb", l1.aa, x20) - x165 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x165 += einsum("ia->ia", x161) * -1 del x161 - x169 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x169 += einsum("abij,ijac->bc", l2.aaaa, x20) - x170 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x170 += einsum("ab->ab", x169) * -1 - x347 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x347 += einsum("ab->ab", x169) * -1 - x476 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x476 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x476 += einsum("ab->ab", x169) * -1 del x169 - x249 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x249 += einsum("abij,ikca->kjcb", l2.abab, x20) * -1 x258 += einsum("ijka,ilba->ljkb", x0, x20) * -1 - x338 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x338 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x338 += einsum("ijab,ikbc->kjca", x13, x20) - x339 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x339 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x339 += einsum("ijab->ijab", x338) del x338 - x350 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x350 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x350 += einsum("iajb,ijac->cb", v.aaaa.ovov, x20) - x351 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x351 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x351 += einsum("ab->ab", x350) * -1 del x350 - x468 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x468 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x468 += einsum("iajb,ijca->cb", v.aaaa.ovov, x20) - x469 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x469 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x469 += einsum("ab->ab", x468) * -1 x517 += einsum("ab->ab", x468) * -1 del x468 - x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x21 += einsum("ia,jakb->ijkb", t1.aa, v.aabb.ovov) - x22 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x22 += einsum("ijka->jika", x21) - x492 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x492 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x492 += einsum("ijka->jika", x21) x22 += einsum("ijka->ijka", v.aabb.ooov) x26 += einsum("ijab,kljb->lkia", t2.abab, x22) x50 += einsum("ijab,kljb->lkia", t2.abab, x22) * 0.9999999999999993 - x85 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x85 += einsum("ijab,ikjb->ka", t2.abab, x22) x116 += einsum("ia->ia", x85) * -1 del x85 - x228 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x228 += einsum("ijab,iklb->klja", t2.abab, x22) * -1 - x465 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x465 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x465 += einsum("ijka,likb->ljab", x0, x22) l2new_baba += einsum("ijab->baji", x465) l2new_abab += einsum("ijab->abij", x465) del x465 - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum("iabj->ijba", v.aaaa.ovvo) x23 += einsum("ijab->ijab", v.aaaa.oovv) * -1 x26 += einsum("ia,jkba->ijkb", t1.aa, x23) x50 += einsum("ia,jkba->ijkb", t1.aa, x23) * 0.9999999999999993 - x93 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x93 += einsum("ia,ijba->jb", t1.aa, x23) x116 += einsum("ia->ia", x93) del x93 - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x24 += einsum("ia,jkla->ijlk", t1.aa, v.aaaa.ooov) - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("ijkl->jkil", x24) x25 += einsum("ijkl->kjil", x24) * -1 - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x49 += einsum("ijkl->ikjl", x24) x49 += einsum("ijkl->ijkl", x24) * -1 x50 += einsum("ia,jkil->jkla", t1.aa, x49) * -0.9999999999999993 del x49 - x293 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x293 += einsum("abij,jkli->klba", l2.aaaa, x24) del x24 x333 -= einsum("ijab->ijab", x293) @@ -1740,100 +1741,100 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x26 x27 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x27 += einsum("ijka->kija", v.aaaa.ooov) - x39 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x39 += einsum("ijab,kila->kljb", t2.abab, x27) * -1 del x27 - x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x28 += einsum("ijab->jiab", t2.bbbb) x28 += einsum("ijab->jiba", t2.bbbb) * -1 x39 += einsum("ijka,klab->ijlb", x22, x28) * -1 - x124 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x124 += einsum("iabc,ijac->jb", v.bbbb.ovvv, x28) - x154 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x154 += einsum("ia->ia", x124) * -1 del x124 - x183 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x183 += einsum("abij,ikab->jk", l2.bbbb, x28) - x184 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x184 += einsum("ij->ij", x183) * -1 - x251 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x251 += einsum("ij->ij", x183) * -1 - x285 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x285 += einsum("ij->ij", x183) * -1 del x183 - x436 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x436 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x436 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x28) x437 += einsum("ijab->ijab", x436) * -1 del x436 - x509 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x509 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x509 += einsum("wia,ijab->wjb", g.bb.bov, x28) - x511 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x511 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x511 += einsum("wia->wia", x509) * -1 del x509 - x514 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x514 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x514 += einsum("wai,ijab->wjb", lu11.bb, x28) - x515 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x515 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x515 += einsum("wia->wia", x514) * -1 del x514 - x29 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x29 += einsum("ia,jbka->jikb", t1.bb, v.aabb.ovov) - x30 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x30 += einsum("ijka->ikja", x29) - x34 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x34 += einsum("ijka->ikja", x29) - x296 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x296 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x296 += einsum("ijka,ljkb->ilab", x0, x29) x333 -= einsum("ijab->ijab", x296) del x296 - x490 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x490 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x490 += einsum("ijka->ikja", x29) del x29 x30 += einsum("iajk->ijka", v.aabb.ovoo) x39 += einsum("ijab,kjla->kilb", t2.abab, x30) * -1 - x128 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x128 += einsum("ijab,ijka->kb", t2.abab, x30) x154 += einsum("ia->ia", x128) * -1 del x128 - x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x223 += einsum("ijab,ikla->lkjb", t2.abab, x30) - x458 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x458 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x458 += einsum("ia,jkla->ijkl", t1.aa, x30) - x459 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x459 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x459 += einsum("ijkl->jikl", x458) del x458 x31 += einsum("ia->ia", f.aa.ov) x39 += einsum("ia,jkab->ijkb", x31, t2.abab) - x104 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x104 += einsum("ia,ja->ij", t1.aa, x31) - x105 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x105 += einsum("ij->ji", x104) del x104 - x130 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x130 += einsum("ia,ijab->jb", x31, t2.abab) x154 += einsum("ia->ia", x130) del x130 - x196 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x196 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x196 += einsum("ia,wja->wij", x31, u11.aa) - x213 = np.zeros((nbos), dtype=np.float64) + x213 = np.zeros((nbos), dtype=types[float]) x213 += einsum("ia,wia->w", x31, u11.aa) - x215 = np.zeros((nbos), dtype=np.float64) + x215 = np.zeros((nbos), dtype=types[float]) x215 += einsum("w->w", x213) del x213 - lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + lu11new_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) lu11new_aa += einsum("w,ia->wai", ls1, x31) * 2 - x32 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x32 += einsum("ia,jkla->jkil", t1.bb, v.aabb.ooov) - x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x36 += einsum("ijkl->ijlk", x32) x459 += einsum("ijkl->ijlk", x32) del x32 - x33 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x33 += einsum("ijab,kalb->ikjl", t2.abab, v.aabb.ovov) x36 += einsum("ijkl->jilk", x33) x459 += einsum("ijkl->jilk", x33) del x33 x34 += einsum("iajk->ijka", v.aabb.ovoo) - x35 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x35 += einsum("ia,jkla->ijkl", t1.aa, x34) del x34 x36 += einsum("ijkl->jikl", x35) @@ -1842,11 +1843,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x39 += einsum("ia,jkil->jkla", t1.bb, x36) * -1 x228 += einsum("ia,ijkl->jkla", t1.aa, x36) * -1 del x36 - x37 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x37 += einsum("ia,jbca->jibc", t1.bb, v.aabb.ovvv) - x38 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x38 += einsum("ijab->ijab", x37) - x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x304 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x304 += einsum("ijab->ijab", x37) x437 += einsum("ijab->ijab", x37) del x37 @@ -1857,41 +1858,41 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x39 += einsum("ijab,kacb->kijc", t2.abab, v.aabb.ovvv) l1new_aa += einsum("abij,kijb->ak", l2.abab, x39) * -1 del x39 - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum("ijab->ijab", x40) - x343 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x343 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x343 += einsum("ijab,kicb->kjca", x13, x40) del x40 - x355 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x355 += einsum("ijab->ijab", x343) del x343 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum("abij->jiab", l2.aaaa) x41 += einsum("abij->jiba", l2.aaaa) * -1 x42 += einsum("ijab,ikcb->kjca", x20, x41) x52 += einsum("ijab,ikca->kjcb", t2.abab, x41) * -1 - x43 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum("iabc->ibac", v.aaaa.ovvv) x43 += einsum("iabc->ibca", v.aaaa.ovvv) * -1 - x109 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("ia,ibca->bc", t1.aa, x43) - x110 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("ab->ab", x109) * -1 x469 += einsum("ab->ab", x109) * -1 x517 += einsum("ab->ab", x109) * -1 del x109 - x448 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x448 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x448 += einsum("ia,jbac->ijbc", t1.aa, x43) - x449 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x449 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x449 += einsum("ijab->jiab", x448) * -1 del x448 l1new_aa += einsum("ijab,jacb->ci", x42, x43) * -1 del x42 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum("ia,jbca->ijcb", t1.aa, v.aaaa.ovvv) - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia,jkba->ijkb", t1.aa, x44) del x44 x48 += einsum("ijka->ijka", x45) * -0.9999999999999993 @@ -1901,57 +1902,57 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x48 l1new_aa += einsum("abij,ikja->bk", l2.aaaa, x50) del x50 - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum("ijab->jiab", t2.bbbb) * -1 x51 += einsum("ijab->jiba", t2.bbbb) x52 += einsum("abij,jkbc->ikac", l2.abab, x51) * -1 l1new_aa += einsum("iabc,jiba->cj", v.bbaa.ovvv, x52) * -1 del x52 - x179 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x179 += einsum("ai,ijab->jb", l1.bb, x51) x186 += einsum("ia->ia", x179) * -1 del x179 - x190 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x190 += einsum("abij,ijbc->ac", l2.bbbb, x51) - x191 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ab->ab", x190) * -1 - x422 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x422 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x422 += einsum("ab->ab", x190) * -1 - x478 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x478 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x478 += einsum("ab->ab", x190) * -1 del x190 - x53 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x53 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum("ijab,kljb->kila", t2.abab, x53) x68 += einsum("ijab,klia->kljb", x51, x53) * -1 - x159 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x159 += einsum("ijab,ikjb->ka", t2.abab, x53) x165 += einsum("ia->ia", x159) del x159 x249 += einsum("ia,ijkb->jkab", t1.aa, x53) x258 += einsum("ijab,iklb->klja", t2.abab, x53) - x364 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x364 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x364 += einsum("ijka,jilb->lkba", v.aabb.ooov, x53) - x403 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x403 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x403 -= einsum("ijab->ijab", x364) del x364 - x367 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x367 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x367 += einsum("ijka,ijlb->lkba", x21, x53) del x21 x403 -= einsum("ijab->ijab", x367) del x367 - x433 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x433 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x433 += einsum("iabc,jikb->jkac", v.aabb.ovvv, x53) l2new_baba -= einsum("ijab->baji", x433) l2new_abab -= einsum("ijab->abij", x433) del x433 - x464 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x464 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x464 += einsum("ijka,likb->ljab", x30, x53) l2new_baba += einsum("ijab->baji", x464) l2new_abab += einsum("ijab->abij", x464) del x464 - x483 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x483 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x483 += einsum("ia,jikb->jkab", x31, x53) l2new_baba += einsum("ijab->baji", x483) * -1 l2new_abab += einsum("ijab->abij", x483) * -1 @@ -1962,105 +1963,105 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_baba += einsum("ijka,ijlb->balk", x466, x53) * -1 l2new_abab += einsum("ijka,iklb->abjl", x466, x53) del x466 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum("ijka->ijka", x54) * -1 x55 += einsum("ijka->jika", x54) x68 += einsum("ijab,kila->kljb", t2.abab, x55) * -1 l1new_aa += einsum("ijab,kjia->bk", x23, x55) * -1 del x23 - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum("ijka->ijka", x54) x62 += einsum("ijka->jika", x54) * -1 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum("ia,jikb->jkba", t1.aa, x62) * -1 l1new_aa += einsum("iabc,jiab->cj", x43, x63) del x43 del x63 - x342 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x342 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x342 += einsum("ijka,likb->ljba", x341, x62) del x341 x355 += einsum("ijab->ijab", x342) del x342 l2new_abab += einsum("ijka,ljib->balk", x22, x62) * -1 del x62 - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x71 += einsum("ia,jkla->kjli", t1.aa, x54) - x72 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x72 += einsum("ijkl->ijkl", x71) - x117 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x117 += einsum("ijkl->ijkl", x71) * -1 x117 += einsum("ijkl->ijlk", x71) l1new_aa += einsum("ijka,ljik->al", v.aaaa.ooov, x117) del x117 - x358 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x358 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x358 += einsum("ijkl->ijkl", x71) del x71 - x160 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x160 += einsum("ijab,jikb->ka", x20, x54) del x20 x165 += einsum("ia->ia", x160) * -1 del x160 - x294 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x294 += einsum("iabc,jkib->kjac", v.aaaa.ovvv, x54) x333 -= einsum("ijab->ijab", x294) del x294 - x306 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x306 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x306 += einsum("ijka->ijka", x54) x306 -= einsum("ijka->jika", x54) l2new_baba += einsum("ijka,ljib->abkl", x22, x306) * -1 del x22 - x354 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x354 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x354 += einsum("ia,jkib->jkba", x15, x54) del x15 x355 += einsum("ijab->ijab", x354) del x354 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum("ijab->jiab", t2.aaaa) * -1 x56 += einsum("ijab->jiba", t2.aaaa) - x58 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x58 += einsum("abij,ikba->jk", l2.aaaa, x56) - x59 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x59 += einsum("ij->ij", x58) * -1 x163 += einsum("ij->ij", x58) * -1 - x205 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x205 += einsum("ij->ij", x58) * -1 del x58 x60 += einsum("ijka,ilba->jlkb", x55, x56) del x55 - x86 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x86 += einsum("ia,ijba->jb", x31, x56) del x31 x116 += einsum("ia->ia", x86) * -1 del x86 - x101 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x101 += einsum("iajb,ikba->kj", v.aaaa.ovov, x56) x105 += einsum("ij->ji", x101) * -1 x345 += einsum("ij->ij", x101) * -1 del x101 x228 += einsum("ijka,ilba->ljkb", x30, x56) * -1 - x439 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x439 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x439 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x56) - x441 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x441 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x441 += einsum("ijab->ijab", x439) * -1 del x439 - x500 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x500 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x500 += einsum("wia,ijba->wjb", g.aa.bov, x56) - x502 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x502 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x502 += einsum("wia->wia", x500) * -1 del x500 - x505 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x505 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x505 += einsum("wai,ijba->wjb", lu11.aa, x56) - x506 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x506 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x506 += einsum("wia->wia", x505) * -1 del x505 - x57 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x57 += einsum("abij,kjab->ik", l2.abab, t2.abab) x59 += einsum("ij->ij", x57) x60 += einsum("ia,jk->jika", t1.aa, x59) x68 += einsum("ia,jk->jkia", t1.bb, x59) * -1 - x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x353 += einsum("ij,jakb->ikab", x59, v.aaaa.ovov) x355 += einsum("ijab->ijba", x353) * -1 del x353 @@ -2069,23 +2070,23 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x163 += einsum("ij->ij", x57) x205 += einsum("ij->ij", x57) del x57 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum("iajb->jiab", v.aaaa.ovov) x61 += einsum("iajb->jiba", v.aaaa.ovov) * -1 - x447 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x447 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x447 += einsum("ijab,ikbc->jkac", x56, x61) del x56 x449 += einsum("ijab->jiab", x447) del x447 l1new_aa += einsum("ijka,kjab->bi", x60, x61) * -1 del x60 - x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum("ia,bcda->ibdc", t1.aa, v.aaaa.vvvv) - x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum("iabc->iabc", x64) * -1 del x64 x65 += einsum("aibc->iabc", v.aaaa.vovv) - x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum("iabc->iabc", x65) x66 += einsum("iabc->ibac", x65) * -1 del x65 @@ -2094,220 +2095,220 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x68 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) * -1 l1new_aa += einsum("iajb,kijb->ak", v.aabb.ovov, x68) del x68 - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum("ai,jkab->ikjb", l1.aa, t2.aaaa) - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum("ijka->ijka", x69) del x69 - x70 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x70 += einsum("abij,klab->ijkl", l2.aaaa, t2.aaaa) x72 += einsum("ijkl->jilk", x70) - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum("ia,ijkl->jkla", t1.aa, x72) del x72 x74 += einsum("ijka->ikja", x73) del x73 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum("ijka->ikja", x74) x75 += einsum("ijka->ijka", x74) * -1 del x74 l1new_aa += einsum("iajb,kijb->ak", v.aaaa.ovov, x75) * -1 del x75 - x118 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x118 += einsum("ijkl->jikl", x70) x118 += einsum("ijkl->jilk", x70) * -1 l1new_aa += einsum("ijka,jlik->al", v.aaaa.ooov, x118) * -1 del x118 x358 += einsum("ijkl->jilk", x70) del x70 - x359 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x359 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x359 += einsum("iajb,klji->klab", v.aaaa.ovov, x358) del x358 x360 += einsum("ijab->jiab", x359) del x359 - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum("ijab->abij", x360) l2new_aaaa += einsum("ijab->baij", x360) * -1 del x360 - x76 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x76 += einsum("abci->iabc", v.aabb.vvvo) x76 += einsum("ia,bcda->ibcd", t1.bb, v.aabb.vvvv) l1new_aa += einsum("abij,jacb->ci", l2.abab, x76) del x76 - x77 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x77 += einsum("w,wai->ia", s1, g.aa.bvo) x116 += einsum("ia->ia", x77) del x77 - x78 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x78 += einsum("wab,wib->ia", g.aa.bvv, u11.aa) x116 += einsum("ia->ia", x78) del x78 - x79 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x79 += einsum("ia,iabj->jb", t1.bb, v.bbaa.ovvo) x116 += einsum("ia->ia", x79) del x79 - x80 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x80 += einsum("ijab,jkib->ka", t2.aaaa, v.aaaa.ooov) x116 += einsum("ia->ia", x80) del x80 - x81 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x81 += einsum("ijab,jbca->ic", t2.abab, v.bbaa.ovvv) x116 += einsum("ia->ia", x81) del x81 x83 += einsum("ijka->ikja", v.aaaa.ooov) - x84 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x84 += einsum("ijab,ijkb->ka", t2.aaaa, x83) del x83 x116 += einsum("ia->ia", x84) * -1 del x84 - x87 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x87 += einsum("w,wia->ia", s1, g.bb.bov) - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum("ia->ia", x87) - x235 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x235 += einsum("ia->ia", x87) - x384 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x384 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x384 += einsum("ia->ia", x87) - x494 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x494 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x494 += einsum("ia->ia", x87) - x88 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x88 += einsum("ia,iajb->jb", t1.aa, v.aabb.ovov) x91 += einsum("ia->ia", x88) - x241 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x241 += einsum("ia->ia", x88) - x289 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x289 += einsum("ia->ia", x88) - x402 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x402 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x402 += einsum("ia->ia", x88) x494 += einsum("ia->ia", x88) del x88 - x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x89 += einsum("iajb->jiab", v.bbbb.ovov) x89 += einsum("iajb->jiba", v.bbbb.ovov) * -1 - x90 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x90 += einsum("ia,ijab->jb", t1.bb, x89) x91 += einsum("ia->ia", x90) * -1 x241 += einsum("ia->ia", x90) * -1 - x242 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x242 += einsum("ia,jkab->jkib", x241, t2.bbbb) - x247 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x247 += einsum("ijka->jika", x242) del x242 - x415 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x415 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x415 += einsum("ia,ja->ij", t1.bb, x241) - x416 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x416 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x416 += einsum("ij->ij", x415) del x415 - x525 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x525 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x525 += einsum("ia,ib->ab", t1.bb, x241) * -1 x289 += einsum("ia->ia", x90) * -1 del x90 - x274 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x274 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x274 += einsum("wia,ijab->wjb", u11.bb, x89) - x275 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x275 += einsum("wia->wia", x274) * -1 del x274 - x414 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x414 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x414 += einsum("ijab,ikab->jk", t2.bbbb, x89) x416 += einsum("ij->ij", x414) * -1 del x414 - x440 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x440 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x440 += einsum("ijab,jkbc->ikac", t2.abab, x89) x441 += einsum("ijab->ijab", x440) * -1 del x440 - x471 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x471 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x471 += einsum("ijab,ijbc->ac", t2.bbbb, x89) - x472 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x472 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x472 += einsum("ab->ab", x471) * -1 x525 += einsum("ab->ab", x471) * -1 del x471 x91 += einsum("ia->ia", f.bb.ov) - x92 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x92 += einsum("ia,jiba->jb", x91, t2.abab) x116 += einsum("ia->ia", x92) del x92 - x129 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x129 += einsum("ia,ijab->jb", x91, x28) x154 += einsum("ia->ia", x129) * -1 del x129 - x144 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x144 += einsum("ia,ja->ij", t1.bb, x91) - x145 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x145 += einsum("ij->ji", x144) del x144 - x214 = np.zeros((nbos), dtype=np.float64) + x214 = np.zeros((nbos), dtype=types[float]) x214 += einsum("ia,wia->w", x91, u11.bb) x215 += einsum("w->w", x214) del x214 x228 += einsum("ia,jkba->jikb", x91, t2.abab) - x276 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x276 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x276 += einsum("ia,wja->wij", x91, u11.bb) - x482 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x482 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x482 += einsum("ia,jkib->jkba", x91, x0) l2new_baba += einsum("ijab->baji", x482) * -1 l2new_abab += einsum("ijab->abij", x482) * -1 del x482 - lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + lu11new_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) lu11new_bb += einsum("w,ia->wai", ls1, x91) * 2 del x91 - x94 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x94 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x94 += einsum("ia,wja->wji", t1.aa, g.aa.bov) - x95 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x95 += einsum("wij->wij", x94) - x521 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x521 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x521 += einsum("wij->wij", x94) del x94 x95 += einsum("wij->wij", g.aa.boo) - x96 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x96 += einsum("wia,wij->ja", u11.aa, x95) x116 += einsum("ia->ia", x96) * -1 del x96 - x501 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x501 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x501 += einsum("ia,wij->wja", t1.aa, x95) x502 += einsum("wia->wia", x501) * -1 del x501 - x97 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x97 += einsum("w,wij->ij", s1, g.aa.boo) x105 += einsum("ij->ij", x97) - x316 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x316 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x316 += einsum("ij->ij", x97) del x97 - x98 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x98 += einsum("wia,wja->ij", g.aa.bov, u11.aa) x105 += einsum("ij->ij", x98) x316 += einsum("ij->ij", x98) del x98 - x99 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x99 += einsum("ia,jkia->jk", t1.bb, v.aabb.ooov) x105 += einsum("ij->ij", x99) - x319 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x319 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x319 += einsum("ij->ij", x99) del x99 - x100 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x100 += einsum("ijab,kajb->ik", t2.abab, v.aabb.ovov) x105 += einsum("ij->ji", x100) x345 += einsum("ij->ij", x100) del x100 - x346 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x346 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x346 += einsum("ij,abik->kjab", x345, l2.aaaa) del x345 x355 += einsum("ijab->ijba", x346) del x346 - x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x102 += einsum("ijka->ikja", v.aaaa.ooov) * -1 x102 += einsum("ijka->kija", v.aaaa.ooov) - x103 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x103 += einsum("ia,jika->jk", t1.aa, x102) x105 += einsum("ij->ij", x103) * -1 del x103 x196 += einsum("wia,jika->wjk", u11.aa, x102) * -1 del x102 x105 += einsum("ij->ij", f.aa.oo) - x106 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x106 += einsum("ia,ij->ja", t1.aa, x105) x116 += einsum("ia->ia", x106) * -1 del x106 - x475 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x475 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x475 += einsum("ij,abjk->ikab", x105, l2.abab) l2new_baba += einsum("ijab->baji", x475) * -1 l2new_abab += einsum("ijab->abij", x475) * -1 @@ -2315,44 +2316,44 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ai,ji->aj", l1.aa, x105) * -1 lu11new_aa += einsum("ij,waj->wai", x105, lu11.aa) * -1 del x105 - x107 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("w,wab->ab", s1, g.aa.bvv) x110 += einsum("ab->ab", x107) - x309 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x309 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x309 += einsum("ab->ab", x107) x469 += einsum("ab->ab", x107) x517 += einsum("ab->ab", x107) del x107 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("ia,iabc->bc", t1.bb, v.bbaa.ovvv) x110 += einsum("ab->ab", x108) - x312 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x312 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x312 += einsum("ab->ab", x108) x469 += einsum("ab->ab", x108) x517 += einsum("ab->ab", x108) del x108 x110 += einsum("ab->ab", f.aa.vv) - x111 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x111 += einsum("ia,ba->ib", t1.aa, x110) x116 += einsum("ia->ia", x111) del x111 l1new_aa += einsum("ai,ab->bi", l1.aa, x110) del x110 - x112 = np.zeros((nbos), dtype=np.float64) + x112 = np.zeros((nbos), dtype=types[float]) x112 += einsum("ia,wia->w", t1.aa, g.aa.bov) - x114 = np.zeros((nbos), dtype=np.float64) + x114 = np.zeros((nbos), dtype=types[float]) x114 += einsum("w->w", x112) del x112 - x113 = np.zeros((nbos), dtype=np.float64) + x113 = np.zeros((nbos), dtype=types[float]) x113 += einsum("ia,wia->w", t1.bb, g.bb.bov) x114 += einsum("w->w", x113) del x113 x114 += einsum("w->w", G) - x115 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x115 += einsum("w,wia->ia", x114, u11.aa) x116 += einsum("ia->ia", x115) del x115 - x153 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x153 += einsum("w,wia->ia", x114, u11.bb) del x114 x154 += einsum("ia->ia", x153) @@ -2360,150 +2361,150 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x116 += einsum("ai->ia", f.aa.vo) l1new_aa += einsum("ia,ijba->bj", x116, x41) l1new_bb += einsum("ia,abij->bj", x116, l2.abab) - ls1new = np.zeros((nbos), dtype=np.float64) + ls1new = np.zeros((nbos), dtype=types[float]) ls1new += einsum("ia,wai->w", x116, lu11.aa) del x116 - x119 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x119 += einsum("w,wai->ia", s1, g.bb.bvo) x154 += einsum("ia->ia", x119) del x119 - x120 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x120 += einsum("wab,wib->ia", g.bb.bvv, u11.bb) x154 += einsum("ia->ia", x120) del x120 - x121 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x121 += einsum("ia,iabj->jb", t1.aa, v.aabb.ovvo) x154 += einsum("ia->ia", x121) del x121 - x122 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x122 += einsum("ijab,iacb->jc", t2.abab, v.aabb.ovvv) x154 += einsum("ia->ia", x122) del x122 - x123 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x123 += einsum("ijab,ikja->kb", t2.bbbb, v.bbbb.ooov) x154 += einsum("ia->ia", x123) del x123 - x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x125 += einsum("ia,jbka->ijkb", t1.bb, v.bbbb.ovov) - x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x126 += einsum("ijka->jkia", x125) * -1 x126 += einsum("ijka->kjia", x125) - x220 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x220 += einsum("ijka->ikja", x125) x220 += einsum("ijka->ijka", x125) * -1 - x225 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x225 += einsum("ijka->jkia", x125) * -1 x225 += einsum("ijka->kjia", x125) - x244 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x244 += einsum("ia,jkla->ijkl", t1.bb, x125) - x245 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x245 += einsum("ijkl->ijkl", x244) - x406 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x406 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x406 += einsum("ijkl->ijkl", x244) del x244 - x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x267 += einsum("ijka->jkia", x125) - x399 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x399 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x399 += einsum("ijka->ijka", x125) - x410 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x410 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x410 += einsum("ijka->ikja", x125) * -1 x410 += einsum("ijka->ijka", x125) del x125 - x463 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x463 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x463 += einsum("ijka,jlkb->ilab", x0, x410) l2new_baba += einsum("ijab->baji", x463) * -1 l2new_abab += einsum("ijab->abij", x463) * -1 del x463 x126 += einsum("ijka->ikja", v.bbbb.ooov) - x127 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x127 += einsum("ijab,jika->kb", t2.bbbb, x126) del x126 x154 += einsum("ia->ia", x127) * -1 del x127 - x131 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x131 += einsum("iabj->ijba", v.bbbb.ovvo) x131 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x132 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x132 += einsum("ia,ijba->jb", t1.bb, x131) x154 += einsum("ia->ia", x132) del x132 x223 += einsum("ia,jkba->ijkb", t1.bb, x131) - x133 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x133 += einsum("ia,wja->wji", t1.bb, g.bb.bov) - x134 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x134 += einsum("wij->wij", x133) - x526 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x526 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x526 += einsum("wij->wij", x133) del x133 x134 += einsum("wij->wij", g.bb.boo) - x135 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x135 += einsum("wia,wij->ja", u11.bb, x134) x154 += einsum("ia->ia", x135) * -1 del x135 - x510 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x510 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x510 += einsum("ia,wij->wja", t1.bb, x134) x511 += einsum("wia->wia", x510) * -1 del x510 - x136 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x136 += einsum("w,wij->ij", s1, g.bb.boo) x145 += einsum("ij->ij", x136) - x386 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x386 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x386 += einsum("ij->ij", x136) del x136 - x137 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x137 += einsum("wia,wja->ij", g.bb.bov, u11.bb) x145 += einsum("ij->ij", x137) x386 += einsum("ij->ij", x137) del x137 - x138 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x138 += einsum("ia,iajk->jk", t1.aa, v.aabb.ovoo) x145 += einsum("ij->ij", x138) - x389 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x389 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x389 += einsum("ij->ij", x138) del x138 - x139 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x139 += einsum("ijab,iakb->jk", t2.abab, v.aabb.ovov) x145 += einsum("ij->ji", x139) x416 += einsum("ij->ij", x139) del x139 - x417 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x417 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x417 += einsum("ij,abik->kjab", x416, l2.bbbb) del x416 - x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x426 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x426 += einsum("ijab->ijba", x417) del x417 - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum("iajb->jiab", v.bbbb.ovov) * -1 x140 += einsum("iajb->jiba", v.bbbb.ovov) - x141 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x141 += einsum("ijab,ikba->jk", t2.bbbb, x140) x145 += einsum("ij->ji", x141) * -1 del x141 - x419 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x419 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x419 += einsum("ijab,ijbc->ac", t2.bbbb, x140) - x420 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x420 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x420 += einsum("ab->ab", x419) * -1 del x419 - x443 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x443 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x443 += einsum("ijab,ikcb->kjca", x140, x51) del x140 - x445 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x445 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x445 += einsum("ijab->jiab", x443) del x443 - x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x142 += einsum("ijka->ikja", v.bbbb.ooov) x142 += einsum("ijka->kija", v.bbbb.ooov) * -1 - x143 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x143 += einsum("ia,ijka->jk", t1.bb, x142) x145 += einsum("ij->ij", x143) * -1 del x143 x276 += einsum("wia,ijka->wjk", u11.bb, x142) * -1 x145 += einsum("ij->ij", f.bb.oo) - x146 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x146 += einsum("ia,ij->ja", t1.bb, x145) x154 += einsum("ia->ia", x146) * -1 del x146 - x474 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x474 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x474 += einsum("ij,abkj->kiab", x145, l2.abab) l2new_baba += einsum("ijab->baji", x474) * -1 l2new_abab += einsum("ijab->abij", x474) * -1 @@ -2511,38 +2512,38 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ai,ji->aj", l1.bb, x145) * -1 lu11new_bb += einsum("ij,waj->wai", x145, lu11.bb) * -1 del x145 - x147 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x147 += einsum("w,wab->ab", s1, g.bb.bvv) - x151 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x151 += einsum("ab->ab", x147) - x379 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x379 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x379 += einsum("ab->ab", x147) x472 += einsum("ab->ab", x147) x525 += einsum("ab->ab", x147) del x147 - x148 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x148 += einsum("ia,iabc->bc", t1.aa, v.aabb.ovvv) x151 += einsum("ab->ab", x148) - x382 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x382 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x382 += einsum("ab->ab", x148) x472 += einsum("ab->ab", x148) x525 += einsum("ab->ab", x148) del x148 - x149 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x149 += einsum("iabc->ibac", v.bbbb.ovvv) * -1 x149 += einsum("iabc->ibca", v.bbbb.ovvv) - x150 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x150 += einsum("ia,ibac->bc", t1.bb, x149) x151 += einsum("ab->ab", x150) * -1 x472 += einsum("ab->ab", x150) * -1 x525 += einsum("ab->ab", x150) * -1 del x150 - x444 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x444 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x444 += einsum("ia,jbca->ijbc", t1.bb, x149) x445 += einsum("ijab->jiab", x444) * -1 del x444 x151 += einsum("ab->ab", f.bb.vv) - x152 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x152 += einsum("ia,ba->ib", t1.bb, x151) x154 += einsum("ia->ia", x152) del x152 @@ -2551,33 +2552,33 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x154 += einsum("ai->ia", f.bb.vo) l1new_aa += einsum("ia,baji->bj", x154, l2.abab) ls1new += einsum("ia,wai->w", x154, lu11.bb) - x155 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x155 += einsum("w,wia->ia", ls1, u11.aa) x165 += einsum("ia->ia", x155) * -1 del x155 - x156 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x156 += einsum("ai,jiba->jb", l1.bb, t2.abab) x165 += einsum("ia->ia", x156) * -1 del x156 - x157 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x157 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x157 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x158 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x158 += einsum("wia,wij->ja", u11.aa, x157) x165 += einsum("ia->ia", x158) del x158 - x503 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x503 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x503 += einsum("ia,wij->wja", t1.aa, x157) x506 += einsum("wia->wia", x503) * -1 del x503 lu11new_bb -= einsum("wij,jika->wak", x157, v.aabb.ooov) - x162 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x162 += einsum("wai,wja->ij", lu11.aa, u11.aa) x163 += einsum("ij->ij", x162) - x164 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x164 += einsum("ia,ij->ja", t1.aa, x163) x165 += einsum("ia->ia", x164) del x164 - x481 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x481 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x481 += einsum("ij,jakb->ikab", x163, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x481) * -1 l2new_abab += einsum("ijab->abij", x481) * -1 @@ -2586,13 +2587,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ij,wji->w", x163, g.aa.boo) * -1 lu11new_aa += einsum("ij,wja->wai", x163, g.aa.bov) * -1 x205 += einsum("ij->ij", x162) - x206 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x206 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x206 += einsum("w,ij->wij", s1, x205) del x205 x208 += einsum("ij->ij", x162) x326 += einsum("ij->ij", x162) del x162 - x327 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x327 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x327 += einsum("ij,jakb->ikab", x326, v.aaaa.ovov) del x326 x333 += einsum("ijab->ijba", x327) @@ -2603,77 +2604,77 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ia,iajb->bj", x165, v.aabb.ovov) * -1 ls1new += einsum("ia,wia->w", x165, g.aa.bov) * -1 del x165 - x166 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x166 += einsum("ai,ib->ab", l1.aa, t1.aa) x170 += einsum("ab->ab", x166) del x166 - x167 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x167 += einsum("wai,wib->ab", lu11.aa, u11.aa) x170 += einsum("ab->ab", x167) - x292 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x292 += einsum("ab,icjb->ijac", x167, v.aaaa.ovov) x333 += einsum("ijab->ijab", x292) del x292 x476 += einsum("ab->ab", x167) del x167 - x168 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x168 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x170 += einsum("ab->ab", x168) l1new_bb += einsum("ab,icab->ci", x170, v.bbaa.ovvv) ls1new += einsum("ab,wab->w", x170, g.aa.bvv) x347 += einsum("ab->ab", x168) - x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x348 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x348 += einsum("ab,ibjc->ijac", x347, v.aaaa.ovov) del x347 x355 += einsum("ijab->jiab", x348) * -1 del x348 x476 += einsum("ab->ab", x168) del x168 - x477 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x477 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x477 += einsum("ab,ibjc->ijac", x476, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x477) * -1 l2new_abab += einsum("ijab->abij", x477) * -1 del x477 lu11new_aa += einsum("ab,wib->wai", x476, g.aa.bov) * -1 del x476 - x171 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x171 += einsum("iabc->ibac", v.aaaa.ovvv) * -1 x171 += einsum("iabc->ibca", v.aaaa.ovvv) l1new_aa += einsum("ab,iacb->ci", x170, x171) * -1 del x170 del x171 - x172 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x172 += einsum("w,wia->ia", ls1, u11.bb) x186 += einsum("ia->ia", x172) * -1 del x172 - x173 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x173 += einsum("ai,ijab->jb", l1.aa, t2.abab) x186 += einsum("ia->ia", x173) * -1 del x173 - x174 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x174 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x174 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x175 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x175 += einsum("wia,wij->ja", u11.bb, x174) x186 += einsum("ia->ia", x175) del x175 - x513 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x513 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x513 += einsum("ia,wij->wja", t1.bb, x174) x515 += einsum("wia->wia", x513) * -1 del x513 lu11new_aa -= einsum("wij,kaji->wak", x174, v.aabb.ovoo) - x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x177 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x178 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x178 += einsum("ijka,jiab->kb", x177, x51) x186 += einsum("ia->ia", x178) * -1 del x178 - x250 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x250 += einsum("ijka->ijka", x177) x250 += einsum("ijka->jika", x177) * -1 x252 += einsum("ijka,jlba->ilkb", x250, x51) del x51 x258 += einsum("ijab,jklb->ikla", t2.abab, x250) * -1 - x411 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x411 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x411 += einsum("ijka,jlkb->ilab", x250, x410) del x410 x426 += einsum("ijab->ijab", x411) @@ -2682,69 +2683,69 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x131 l2new_baba += einsum("ijka,lkib->abjl", x250, x30) del x250 - x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x253 += einsum("ijka->ijka", x177) * -1 x253 += einsum("ijka->jika", x177) - x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x254 += einsum("ia,ijkb->jkba", t1.bb, x253) * -1 l1new_bb += einsum("iabc,jiac->bj", x149, x254) del x254 l2new_abab += einsum("ijka,lkib->balj", x253, x30) * -1 del x253 del x30 - x265 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x265 += einsum("ia,jkla->kjli", t1.bb, x177) - x266 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x266 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x266 += einsum("ijkl->ijkl", x265) * -1 x266 += einsum("ijkl->ijlk", x265) - x405 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x405 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x405 += einsum("iajb,klji->lkab", v.bbbb.ovov, x265) del x265 - x408 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x408 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x408 += einsum("ijab->ijab", x405) del x405 - x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x366 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x366 += einsum("iabc,jkib->kjac", v.bbbb.ovvv, x177) x403 -= einsum("ijab->ijab", x366) del x366 - x375 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x375 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x375 += einsum("ijka->ijka", x177) x375 -= einsum("ijka->jika", x177) - x425 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x425 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x425 += einsum("ia,jkib->jkba", x241, x177) del x241 x426 += einsum("ijab->ijab", x425) del x425 - x180 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x180 += einsum("ai,ja->ij", l1.bb, t1.bb) x184 += einsum("ij->ij", x180) - x288 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x288 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x288 += einsum("ij->ij", x180) - x396 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x396 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x396 += einsum("ij->ij", x180) l1new_bb -= einsum("ij,ja->ai", x180, x87) del x180 del x87 - x181 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x181 += einsum("wai,wja->ij", lu11.bb, u11.bb) x184 += einsum("ij->ij", x181) x285 += einsum("ij->ij", x181) x288 += einsum("ij->ij", x181) x396 += einsum("ij->ij", x181) del x181 - x397 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x397 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x397 += einsum("ij,jakb->kiab", x396, v.bbbb.ovov) del x396 x403 += einsum("ijab->jiba", x397) del x397 - x182 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x182 += einsum("abij,ikab->jk", l2.abab, t2.abab) x184 += einsum("ij->ij", x182) - x185 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x185 += einsum("ia,ij->ja", t1.bb, x184) x186 += einsum("ia->ia", x185) del x185 - x480 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x480 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x480 += einsum("ij,kajb->kiab", x184, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x480) * -1 l2new_abab += einsum("ijab->abij", x480) * -1 @@ -2760,7 +2761,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ijka,kjab->bi", x252, x89) * -1 del x252 x258 += einsum("ia,jk->ijka", t1.aa, x251) * -1 - x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x424 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x424 += einsum("ij,jakb->kiab", x251, v.bbbb.ovov) x426 += einsum("ijab->jiba", x424) * -1 del x424 @@ -2768,27 +2769,27 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x251 x285 += einsum("ij->ij", x182) del x182 - x286 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x286 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x286 += einsum("w,ij->wij", s1, x285) del x285 x186 += einsum("ia->ia", t1.bb) * -1 l1new_aa += einsum("ia,jbia->bj", x186, v.aabb.ovov) * -1 ls1new += einsum("ia,wia->w", x186, g.bb.bov) * -1 - x187 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x187 += einsum("ai,ib->ab", l1.bb, t1.bb) x191 += einsum("ab->ab", x187) ls1new += einsum("ab,wab->w", x187, g.bb.bvv) del x187 - x188 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x188 += einsum("wai,wib->ab", lu11.bb, u11.bb) x191 += einsum("ab->ab", x188) - x363 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x363 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x363 += einsum("ab,icjb->ijac", x188, v.bbbb.ovov) x403 += einsum("ijab->ijab", x363) del x363 x478 += einsum("ab->ab", x188) del x188 - x189 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x189 += einsum("abij,ijac->bc", l2.abab, t2.abab) x191 += einsum("ab->ab", x189) l1new_aa += einsum("ab,icab->ci", x191, v.aabb.ovvv) @@ -2796,14 +2797,14 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x149 del x191 x422 += einsum("ab->ab", x189) - x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x423 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x423 += einsum("ab,ibjc->ijca", x422, v.bbbb.ovov) del x422 x426 += einsum("ijab->jiba", x423) * -1 del x423 x478 += einsum("ab->ab", x189) del x189 - x479 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x479 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x479 += einsum("ab,icjb->ijca", x478, v.aabb.ovov) l2new_baba += einsum("ijab->baji", x479) * -1 l2new_abab += einsum("ijab->abij", x479) * -1 @@ -2811,19 +2812,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ls1new += einsum("ab,wab->w", x478, g.bb.bvv) lu11new_bb += einsum("ab,wib->wai", x478, g.bb.bov) * -1 del x478 - x192 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x192 -= einsum("ijka->ikja", v.aaaa.ooov) x192 += einsum("ijka->kija", v.aaaa.ooov) - x307 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x307 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x307 += einsum("ijka,lkib->jlab", x192, x306) del x306 x333 += einsum("ijab->jiba", x307) del x307 - x318 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x318 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x318 += einsum("ia,jika->jk", t1.aa, x192) x319 -= einsum("ij->ij", x318) del x318 - x320 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x320 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x320 += einsum("ij,abjk->kiab", x319, l2.aaaa) del x319 x333 -= einsum("ijab->ijba", x320) @@ -2832,12 +2833,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x163 l2new_abab += einsum("ijka,kilb->abjl", x192, x53) del x192 - x193 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x193 += einsum("wia,jbia->wjb", u11.bb, v.aabb.ovov) x195 += einsum("wia->wia", x193) - x324 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x324 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x324 += einsum("wia->wia", x193) - x484 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x484 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x484 += einsum("wia->wia", x193) del x193 x195 += einsum("wia->wia", gc.aa.bov) @@ -2848,17 +2849,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x196 += einsum("wia,jkia->wjk", u11.bb, v.aabb.ooov) l1new_aa += einsum("wai,wji->aj", lu11.aa, x196) * -1 del x196 - x197 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x197 += einsum("iabc->ibac", v.aaaa.ovvv) x197 -= einsum("iabc->ibca", v.aaaa.ovvv) - x198 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x198 -= einsum("wia,ibca->wbc", u11.aa, x197) - x311 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x311 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x311 += einsum("ia,ibca->bc", t1.aa, x197) del x197 x312 -= einsum("ab->ab", x311) del x311 - x313 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x313 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x313 += einsum("ab,acij->ijcb", x312, l2.aaaa) del x312 x333 += einsum("ijab->jiab", x313) @@ -2867,25 +2868,25 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x198 += einsum("wia,iabc->wbc", u11.bb, v.bbaa.ovvv) l1new_aa += einsum("wai,wab->bi", lu11.aa, x198) del x198 - x199 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x199 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x199 += einsum("wia,baji->wjb", u11.bb, l2.abab) - x202 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x202 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x202 += einsum("wia->wia", x199) - x204 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x204 += einsum("wia->wia", x199) del x199 - x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x200 -= einsum("abij->jiab", l2.aaaa) x200 += einsum("abij->jiba", l2.aaaa) - x201 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x201 += einsum("wia,ijba->wjb", u11.aa, x200) x202 -= einsum("wia->wia", x201) del x201 - x321 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x321 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x321 += einsum("wia,wjb->ijab", g.aa.bov, x202) x333 += einsum("ijab->ijab", x321) del x321 - x488 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x488 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x488 += einsum("wia,wjb->jiba", g.bb.bov, x202) l2new_baba += einsum("ijab->baji", x488) l2new_abab += einsum("ijab->abij", x488) @@ -2894,7 +2895,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("wia,wji->aj", x202, x95) * -1 del x202 del x95 - x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x203 += einsum("abij->jiab", l2.aaaa) * -1 x203 += einsum("abij->jiba", l2.aaaa) x204 += einsum("wia,ijba->wjb", u11.aa, x203) * -1 @@ -2903,7 +2904,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x206 += einsum("ai,wja->wij", l1.aa, u11.aa) l1new_aa += einsum("wia,wji->aj", g.aa.bov, x206) * -1 del x206 - x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x207 += einsum("iabj->ijba", v.aaaa.ovvo) x207 -= einsum("ijab->ijab", v.aaaa.oovv) l1new_aa += einsum("ai,jiab->bj", l1.aa, x207) @@ -2913,15 +2914,15 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("ij,ja->ai", x208, x209) * -1 del x208 del x209 - x210 = np.zeros((nbos), dtype=np.float64) + x210 = np.zeros((nbos), dtype=types[float]) x210 += einsum("w,wx->x", s1, w) x215 += einsum("w->w", x210) del x210 - x211 = np.zeros((nbos), dtype=np.float64) + x211 = np.zeros((nbos), dtype=types[float]) x211 += einsum("ia,wia->w", t1.aa, gc.aa.bov) x215 += einsum("w->w", x211) del x211 - x212 = np.zeros((nbos), dtype=np.float64) + x212 = np.zeros((nbos), dtype=types[float]) x212 += einsum("ia,wia->w", t1.bb, gc.bb.bov) x215 += einsum("w->w", x212) del x212 @@ -2929,12 +2930,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("w,wai->ai", x215, lu11.aa) l1new_bb += einsum("w,wai->ai", x215, lu11.bb) del x215 - x216 = np.zeros((nbos), dtype=np.float64) + x216 = np.zeros((nbos), dtype=types[float]) x216 += einsum("ai,wia->w", l1.aa, u11.aa) - x218 = np.zeros((nbos), dtype=np.float64) + x218 = np.zeros((nbos), dtype=types[float]) x218 += einsum("w->w", x216) del x216 - x217 = np.zeros((nbos), dtype=np.float64) + x217 = np.zeros((nbos), dtype=types[float]) x217 += einsum("ai,wia->w", l1.bb, u11.bb) x218 += einsum("w->w", x217) del x217 @@ -2942,7 +2943,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_aa += einsum("w,wia->ai", x218, g.aa.bov) l1new_bb += einsum("w,wia->ai", x218, g.bb.bov) del x218 - x219 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x219 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) l1new_bb += einsum("iabc,jibc->aj", v.bbaa.ovvv, x219) * -1 del x219 @@ -2950,19 +2951,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x220 += einsum("ijka->jika", v.bbbb.ooov) x223 += einsum("ijka,jlab->iklb", x220, x28) del x220 - x221 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x221 += einsum("ia,jkla->ijlk", t1.bb, v.bbbb.ooov) - x222 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x222 += einsum("ijkl->ikjl", x221) * -1 x222 += einsum("ijkl->ijkl", x221) x223 += einsum("ia,jikl->jkla", t1.bb, x222) * -1 del x222 - x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x365 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x365 += einsum("abij,jkli->klba", l2.bbbb, x221) del x221 x403 -= einsum("ijab->ijab", x365) del x365 - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 -= einsum("abij->jiab", l2.bbbb) x224 += einsum("abij->jiba", l2.bbbb) l1new_bb += einsum("ijka,ikab->bj", x223, x224) @@ -2971,11 +2972,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x225 += einsum("ijka->kija", v.bbbb.ooov) * -1 x228 += einsum("ijab,jklb->ikla", t2.abab, x225) * -1 del x225 - x226 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x226 += einsum("ia,jabc->ijbc", t1.bb, v.bbaa.ovvv) - x227 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x227 += einsum("ijab->jiab", x226) - x456 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x456 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x456 += einsum("ijab->jiab", x226) del x226 x227 += einsum("ijab->ijab", v.bbaa.oovv) @@ -2986,20 +2987,20 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x228 += einsum("ijab,kbca->ikjc", t2.abab, v.bbaa.ovvv) l1new_bb += einsum("abij,ikja->bk", l2.abab, x228) * -1 del x228 - x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x229 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum("ijab->ijab", x229) del x229 - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum("abij->jiab", l2.bbbb) * -1 x230 += einsum("abij->jiba", l2.bbbb) - x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x231 += einsum("ijab,ikca->kjcb", x230, x28) del x28 x232 += einsum("ijab->jiba", x231) del x231 - x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x409 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x409 += einsum("ijab,jkcb->kica", x232, x89) x426 += einsum("ijab->jiba", x409) * -1 del x409 @@ -3007,43 +3008,43 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x230 l1new_bb += einsum("iabc,ijab->cj", v.aabb.ovvv, x249) * -1 del x249 - x233 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x233 += einsum("iabc->ibac", v.bbbb.ovvv) x233 += einsum("iabc->ibca", v.bbbb.ovvv) * -1 l1new_bb += einsum("ijab,jacb->ci", x232, x233) * -1 del x232 del x233 - x234 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x234 += einsum("ia,jkil->jkla", t1.bb, v.bbbb.oooo) - x237 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x237 += einsum("ijka->ijka", x234) del x234 x235 += einsum("ia->ia", f.bb.ov) - x236 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x236 += einsum("ia,jkab->jkib", x235, t2.bbbb) del x235 x237 += einsum("ijka->kjia", x236) del x236 x237 += einsum("ijak->ijka", v.bbbb.oovo) * -1 - x248 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x248 += einsum("ijka->ikja", x237) x248 += einsum("ijka->ijka", x237) * -1 del x237 - x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x238 += einsum("ijab,kbca->jikc", t2.bbbb, v.bbbb.ovvv) x247 += einsum("ijka->ijka", x238) * -1 del x238 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum("ia,jbca->ijcb", t1.bb, v.bbbb.ovvv) - x240 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x240 += einsum("ia,jkba->ijkb", t1.bb, x239) del x239 x247 += einsum("ijka->ijka", x240) * -1 del x240 - x243 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x243 += einsum("ijab,kalb->ijkl", t2.bbbb, v.bbbb.ovov) x245 += einsum("ijkl->jilk", x243) - x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x246 += einsum("ia,jkil->jkla", t1.bb, x245) del x245 x247 += einsum("ijka->jika", x246) @@ -3055,18 +3056,18 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x248 x406 += einsum("ijkl->jilk", x243) del x243 - x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x407 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x407 += einsum("abij,ijkl->klab", l2.bbbb, x406) del x406 x408 += einsum("ijab->jiba", x407) del x407 - x255 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x255 += einsum("ia,bcda->ibdc", t1.bb, v.bbbb.vvvv) - x256 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x256 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x256 += einsum("iabc->iabc", x255) * -1 del x255 x256 += einsum("aibc->iabc", v.bbbb.vovv) - x257 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x257 += einsum("iabc->iabc", x256) * -1 x257 += einsum("iabc->ibac", x256) del x256 @@ -3075,38 +3076,38 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x258 += einsum("ai,jkba->jikb", l1.bb, t2.abab) * -1 l1new_bb += einsum("iajb,ikja->bk", v.aabb.ovov, x258) del x258 - x259 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x259 += einsum("ai,jkba->ijkb", l1.bb, t2.bbbb) - x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x262 += einsum("ijka->ijka", x259) del x259 - x260 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x260 += einsum("abij,klba->ijlk", l2.bbbb, t2.bbbb) - x261 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x261 += einsum("ia,jikl->jkla", t1.bb, x260) x262 += einsum("ijka->ijka", x261) del x261 - x263 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x263 += einsum("ijka->ikja", x262) x263 += einsum("ijka->ijka", x262) * -1 del x262 l1new_bb += einsum("iajb,kija->bk", v.bbbb.ovov, x263) del x263 - x271 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x271 += einsum("ijkl->jikl", x260) * -1 x271 += einsum("ijkl->jilk", x260) l1new_bb += einsum("ijka,jlki->al", v.bbbb.ooov, x271) * -1 del x271 - x404 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x404 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x404 += einsum("iajb,klij->lkba", v.bbbb.ovov, x260) del x260 x408 += einsum("ijab->ijab", x404) del x404 - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum("ijab->abij", x408) l2new_bbbb += einsum("ijab->baij", x408) * -1 del x408 - x264 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x264 += einsum("aibc->iabc", v.aabb.vovv) x264 += einsum("ia,bacd->ibcd", t1.aa, v.aabb.vvvv) l1new_bb += einsum("abij,iabc->cj", l2.abab, x264) @@ -3115,46 +3116,46 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ijkl,klja->ai", x266, x267) * -1 del x266 del x267 - x268 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x268 += einsum("ia,jbca->ijcb", t1.aa, v.bbaa.ovvv) - x269 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x269 += einsum("ijab->ijab", x268) - x373 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x373 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x373 += einsum("ijab->ijab", x268) x441 += einsum("ijab->ijab", x268) del x268 x269 += einsum("iabj->jiba", v.bbaa.ovvo) l1new_bb += einsum("ijka,ikab->bj", x0, x269) * -1 del x269 - x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x270 += einsum("abij->jiab", l2.bbbb) x270 += einsum("abij->jiba", l2.bbbb) * -1 - x283 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x283 += einsum("wia,ijab->wjb", u11.bb, x270) - x284 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x284 += einsum("wia->wia", x283) * -1 del x283 - x412 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x412 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x412 += einsum("ijab,jkbc->ikac", t2.abab, x270) - x413 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x413 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x413 += einsum("iajb,ikac->jkbc", v.aabb.ovov, x412) * -1 del x412 x426 += einsum("ijab->jiba", x413) * -1 del x413 l1new_bb += einsum("ia,ijab->bj", x154, x270) * -1 del x154 - x272 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x272 -= einsum("iajb->jiab", v.bbbb.ovov) x272 += einsum("iajb->jiba", v.bbbb.ovov) l1new_bb += einsum("ia,ijab->bj", x186, x272) * -1 del x272 del x186 - x273 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x273 += einsum("wia,iajb->wjb", u11.aa, v.aabb.ovov) x275 += einsum("wia->wia", x273) - x394 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x394 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x394 += einsum("wia->wia", x273) - x486 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x486 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x486 += einsum("wia->wia", x273) del x273 x275 += einsum("wia->wia", gc.bb.bov) @@ -3165,21 +3166,21 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x276 += einsum("wia,iajk->wjk", u11.aa, v.aabb.ovoo) l1new_bb += einsum("wai,wji->aj", lu11.bb, x276) * -1 del x276 - x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x277 -= einsum("iabc->ibac", v.bbbb.ovvv) x277 += einsum("iabc->ibca", v.bbbb.ovvv) - x278 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x278 -= einsum("wia,ibac->wbc", u11.bb, x277) - x368 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x368 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x368 += einsum("ia,jbca->ijbc", t1.bb, x277) - x369 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x369 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x369 -= einsum("ijab->ijab", x368) del x368 - x381 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x381 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x381 += einsum("ia,ibac->bc", t1.bb, x277) x382 -= einsum("ab->ab", x381) del x381 - x383 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x383 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x383 += einsum("ab,acij->ijcb", x382, l2.bbbb) del x382 x403 += einsum("ijab->jiab", x383) @@ -3188,9 +3189,9 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x278 += einsum("wia,iabc->wbc", u11.aa, v.aabb.ovvv) l1new_bb += einsum("wai,wab->bi", lu11.bb, x278) del x278 - x279 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x279 += einsum("wia,abij->wjb", u11.aa, l2.abab) - x282 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x282 += einsum("wia->wia", x279) x284 += einsum("wia->wia", x279) del x279 @@ -3198,19 +3199,19 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("wij,wja->ai", x134, x284) * -1 del x284 del x134 - x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x280 += einsum("abij->jiab", l2.bbbb) x280 -= einsum("abij->jiba", l2.bbbb) - x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x281 += einsum("wia,ijab->wjb", u11.bb, x280) del x280 x282 -= einsum("wia->wia", x281) del x281 - x391 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x391 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x391 += einsum("wia,wjb->ijab", g.bb.bov, x282) x403 += einsum("ijab->ijab", x391) del x391 - x489 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x489 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x489 += einsum("wia,wjb->ijab", g.aa.bov, x282) l2new_baba += einsum("ijab->baji", x489) l2new_abab += einsum("ijab->abij", x489) @@ -3220,7 +3221,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x286 += einsum("ai,wja->wij", l1.bb, u11.bb) l1new_bb += einsum("wia,wji->aj", g.bb.bov, x286) * -1 del x286 - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x287 += einsum("iabj->ijba", v.bbbb.ovvo) x287 -= einsum("ijab->ijab", v.bbbb.oovv) l1new_bb += einsum("ai,jiab->bj", l1.bb, x287) @@ -3230,65 +3231,65 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l1new_bb += einsum("ij,ja->ai", x288, x289) * -1 del x288 del x289 - x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x290 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x290 += einsum("wia,wbj->ijab", gc.aa.bov, lu11.aa) x333 += einsum("ijab->ijab", x290) del x290 - x291 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x291 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x291 += einsum("ai,jbac->ijbc", l1.aa, v.aaaa.ovvv) x333 -= einsum("ijab->ijab", x291) del x291 - x297 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x297 += einsum("abij->jiab", l2.aaaa) x297 -= einsum("abij->jiba", l2.aaaa) - x298 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x298 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x298 -= einsum("iabc->ibac", v.aaaa.ovvv) x298 += einsum("iabc->ibca", v.aaaa.ovvv) - x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x299 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x299 += einsum("ia,jbca->ijbc", t1.aa, x298) - x300 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x300 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x300 -= einsum("ijab->ijab", x299) del x299 x300 += einsum("iabj->jiba", v.aaaa.ovvo) x300 -= einsum("ijab->jiab", v.aaaa.oovv) - x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x301 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x301 += einsum("ijab,ikbc->jkac", x297, x300) del x297 del x300 x333 += einsum("ijab->ijab", x301) del x301 - x302 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x302 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x302 += einsum("ijab->jiab", t2.bbbb) x302 -= einsum("ijab->jiba", t2.bbbb) - x303 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x303 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x303 += einsum("iajb,jkbc->ikac", v.aabb.ovov, x302) del x302 x304 -= einsum("ijab->ijab", x303) del x303 x304 += einsum("iabj->ijab", v.aabb.ovvo) - x305 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x305 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x305 += einsum("abij,kjcb->ikac", l2.abab, x304) del x304 x333 += einsum("ijab->ijab", x305) del x305 - x308 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x308 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x308 += einsum("wia,wib->ab", g.aa.bov, u11.aa) x309 -= einsum("ab->ba", x308) x469 += einsum("ab->ba", x308) * -1 x517 += einsum("ab->ba", x308) * -1 del x308 x309 += einsum("ab->ab", f.aa.vv) - x310 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x310 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x310 += einsum("ab,acij->ijcb", x309, l2.aaaa) del x309 x333 -= einsum("ijab->jiba", x310) del x310 x314 += einsum("ia->ia", f.aa.ov) - x315 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x315 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x315 += einsum("ia,ja->ij", t1.aa, x314) x316 += einsum("ij->ji", x315) del x315 - x328 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x328 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x328 += einsum("ia,jkib->jkba", x314, x54) del x54 x333 += einsum("ijab->ijba", x328) @@ -3297,25 +3298,25 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new_aa -= einsum("ia,wji->waj", x314, x157) del x314 x316 += einsum("ij->ij", f.aa.oo) - x317 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x317 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x317 += einsum("ij,abjk->kiab", x316, l2.aaaa) del x316 x333 += einsum("ijab->jiba", x317) del x317 - x322 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x322 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x322 -= einsum("iajb->jiab", v.aaaa.ovov) x322 += einsum("iajb->jiba", v.aaaa.ovov) - x323 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x323 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x323 += einsum("wia,ijba->wjb", u11.aa, x322) x324 -= einsum("wia->wia", x323) - x325 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x325 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x325 += einsum("wai,wjb->ijab", lu11.aa, x324) del x324 x333 += einsum("ijab->ijab", x325) del x325 x484 -= einsum("wia->wia", x323) del x323 - x331 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x331 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x331 += einsum("ia,ijba->jb", t1.aa, x322) del x322 x332 -= einsum("ia->ia", x331) @@ -3324,7 +3325,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x495 -= einsum("ia->ia", x331) del x331 x329 -= einsum("ijka->jika", v.aaaa.ooov) - x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x330 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x330 += einsum("ai,ijkb->jkab", l1.aa, x329) del x329 x333 += einsum("ijab->ijab", x330) @@ -3334,32 +3335,32 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_aaaa -= einsum("ijab->abji", x333) l2new_aaaa += einsum("ijab->baji", x333) del x333 - x334 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x334 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x334 += einsum("abij,kjli->klba", l2.aaaa, v.aaaa.oooo) - x336 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x336 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x336 += einsum("ijab->jiba", x334) del x334 - x335 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x335 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x335 += einsum("abij,acbd->ijcd", l2.aaaa, v.aaaa.vvvv) x336 += einsum("ijab->jiba", x335) del x335 l2new_aaaa += einsum("ijab->baij", x336) * -1 l2new_aaaa += einsum("ijab->abij", x336) del x336 - x337 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x337 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x337 += einsum("ijab,kcjb->ikac", t2.abab, v.aabb.ovov) x339 += einsum("ijab->ijab", x337) - x340 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x340 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x340 += einsum("ijab,ikca->kjcb", x339, x41) del x339 x355 += einsum("ijab->ijab", x340) * -1 del x340 x449 += einsum("ijab->jiab", x337) del x337 - x349 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x349 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x349 += einsum("ijab,icjb->ac", t2.abab, v.aabb.ovov) x351 += einsum("ab->ab", x349) - x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x352 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x352 += einsum("ab,acij->ijcb", x351, l2.aaaa) del x351 x355 += einsum("ijab->jiab", x352) @@ -3372,72 +3373,72 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x469 += einsum("ab->ab", x349) * -1 x517 += einsum("ab->ab", x349) * -1 del x349 - x361 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x361 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x361 += einsum("wia,wbj->ijab", gc.bb.bov, lu11.bb) x403 += einsum("ijab->ijab", x361) del x361 - x362 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x362 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x362 += einsum("ai,jbac->ijbc", l1.bb, v.bbbb.ovvv) x403 -= einsum("ijab->ijab", x362) del x362 x369 += einsum("iabj->jiba", v.bbbb.ovvo) x369 -= einsum("ijab->jiab", v.bbbb.oovv) - x370 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x370 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x370 += einsum("ijab,ikac->jkbc", x224, x369) del x369 x403 += einsum("ijab->ijab", x370) del x370 - x371 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x371 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x371 -= einsum("ijab->jiab", t2.aaaa) x371 += einsum("ijab->jiba", t2.aaaa) - x372 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x372 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x372 += einsum("iajb,ikca->kjcb", v.aabb.ovov, x371) del x371 x373 -= einsum("ijab->ijab", x372) del x372 x373 += einsum("iabj->jiba", v.bbaa.ovvo) - x374 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x374 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x374 += einsum("abij,ikac->jkbc", l2.abab, x373) del x373 x403 += einsum("ijab->ijab", x374) del x374 - x376 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x376 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x376 += einsum("ijka->ikja", v.bbbb.ooov) x376 -= einsum("ijka->kija", v.bbbb.ooov) - x377 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x377 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x377 += einsum("ijka,lkjb->ilab", x375, x376) del x375 x403 += einsum("ijab->ijab", x377) del x377 - x388 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x388 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x388 += einsum("ia,ijka->jk", t1.bb, x376) x389 -= einsum("ij->ij", x388) del x388 - x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x390 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x390 += einsum("ij,abjk->kiab", x389, l2.bbbb) del x389 x403 -= einsum("ijab->ijba", x390) del x390 l2new_baba += einsum("ijka,lkjb->bali", x0, x376) del x376 - x378 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x378 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x378 += einsum("wia,wib->ab", g.bb.bov, u11.bb) x379 -= einsum("ab->ba", x378) x472 += einsum("ab->ba", x378) * -1 x525 += einsum("ab->ba", x378) * -1 del x378 x379 += einsum("ab->ab", f.bb.vv) - x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x380 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x380 += einsum("ab,acij->ijcb", x379, l2.bbbb) del x379 x403 -= einsum("ijab->jiba", x380) del x380 x384 += einsum("ia->ia", f.bb.ov) - x385 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x385 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x385 += einsum("ia,ja->ij", t1.bb, x384) x386 += einsum("ij->ji", x385) del x385 - x398 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x398 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x398 += einsum("ia,jkib->jkba", x384, x177) del x177 x403 += einsum("ijab->ijba", x398) @@ -3446,25 +3447,25 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new_bb -= einsum("ia,wji->waj", x384, x174) del x384 x386 += einsum("ij->ij", f.bb.oo) - x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x387 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x387 += einsum("ij,abjk->kiab", x386, l2.bbbb) del x386 x403 += einsum("ijab->jiba", x387) del x387 - x392 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x392 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x392 += einsum("iajb->jiab", v.bbbb.ovov) x392 -= einsum("iajb->jiba", v.bbbb.ovov) - x393 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x393 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x393 += einsum("wia,ijab->wjb", u11.bb, x392) x394 -= einsum("wia->wia", x393) - x395 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x395 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x395 += einsum("wai,wjb->ijab", lu11.bb, x394) del x394 x403 += einsum("ijab->ijab", x395) del x395 x486 -= einsum("wia->wia", x393) del x393 - x401 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x401 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x401 += einsum("ia,ijab->jb", t1.bb, x392) del x392 x402 -= einsum("ia->ia", x401) @@ -3473,7 +3474,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x494 -= einsum("ia->ia", x401) del x401 x399 -= einsum("ijka->jika", v.bbbb.ooov) - x400 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x400 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x400 += einsum("ai,ijkb->jkab", l1.bb, x399) del x399 x403 += einsum("ijab->ijab", x400) @@ -3483,10 +3484,10 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_bbbb -= einsum("ijab->abji", x403) l2new_bbbb += einsum("ijab->baji", x403) del x403 - x418 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x418 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x418 += einsum("ijab,iajc->bc", t2.abab, v.aabb.ovov) x420 += einsum("ab->ab", x418) - x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x421 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x421 += einsum("ab,acij->ijcb", x420, l2.bbbb) del x420 x426 += einsum("ijab->jiab", x421) @@ -3499,35 +3500,35 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x472 += einsum("ab->ab", x418) * -1 x525 += einsum("ab->ab", x418) * -1 del x418 - x427 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x427 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x427 += einsum("abij,kilj->klab", l2.bbbb, v.bbbb.oooo) - x429 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x429 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x429 += einsum("ijab->jiba", x427) del x427 - x428 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x428 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x428 += einsum("abij,acbd->ijcd", l2.bbbb, v.bbbb.vvvv) x429 += einsum("ijab->jiba", x428) del x428 l2new_bbbb += einsum("ijab->baij", x429) * -1 l2new_bbbb += einsum("ijab->abij", x429) del x429 - x431 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x431 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x431 += einsum("ai,jbac->jibc", l1.bb, v.aabb.ovvv) l2new_baba += einsum("ijab->baji", x431) l2new_abab += einsum("ijab->abij", x431) del x431 - x432 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x432 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x432 += einsum("abij,acbd->ijcd", l2.abab, v.aabb.vvvv) l2new_baba += einsum("ijab->baji", x432) l2new_abab += einsum("ijab->abij", x432) del x432 - x434 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x434 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x434 += einsum("ai,jbac->ijcb", l1.aa, v.bbaa.ovvv) l2new_baba += einsum("ijab->baji", x434) l2new_abab += einsum("ijab->abij", x434) del x434 x437 += einsum("iabj->ijab", v.aabb.ovvo) - x438 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x438 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x438 += einsum("ijab,kica->kjcb", x270, x437) del x437 del x270 @@ -3540,13 +3541,13 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_abab += einsum("ijab,ikbc->acjk", x203, x441) * -1 del x441 del x203 - x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x442 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x442 += einsum("ijab,iakc->jkbc", t2.abab, v.aabb.ovov) x445 += einsum("ijab->jiab", x442) del x442 x445 += einsum("iabj->ijba", v.bbbb.ovvo) x445 += einsum("ijab->ijab", v.bbbb.oovv) * -1 - x446 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x446 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x446 += einsum("abij,kjbc->ikac", l2.abab, x445) del x445 l2new_baba += einsum("ijab->baji", x446) @@ -3554,47 +3555,47 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x446 x449 += einsum("iabj->ijba", v.aaaa.ovvo) x449 += einsum("ijab->ijab", v.aaaa.oovv) * -1 - x450 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x450 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x450 += einsum("abij,kiac->kjcb", l2.abab, x449) del x449 l2new_baba += einsum("ijab->baji", x450) l2new_abab += einsum("ijab->abij", x450) del x450 - x451 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x451 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x451 += einsum("ia,jabc->ijbc", t1.aa, v.aabb.ovvv) - x453 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x453 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x453 += einsum("ijab->jiab", x451) del x451 - x452 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x452 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x452 += einsum("ijab,kajc->ikbc", t2.abab, v.aabb.ovov) x453 += einsum("ijab->jiab", x452) * -1 del x452 x453 += einsum("ijab->ijab", v.aabb.oovv) - x454 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x454 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x454 += einsum("abij,kibc->kjac", l2.abab, x453) del x453 l2new_baba += einsum("ijab->baji", x454) * -1 l2new_abab += einsum("ijab->abij", x454) * -1 del x454 - x455 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x455 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x455 += einsum("ijab,ickb->jkac", t2.abab, v.aabb.ovov) x456 += einsum("ijab->jiab", x455) * -1 del x455 x456 += einsum("ijab->ijab", v.bbaa.oovv) - x457 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x457 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x457 += einsum("abij,kjac->ikcb", l2.abab, x456) del x456 l2new_baba += einsum("ijab->baji", x457) * -1 l2new_abab += einsum("ijab->abij", x457) * -1 del x457 x459 += einsum("ijkl->ijkl", v.aabb.oooo) - x460 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x460 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x460 += einsum("abij,kilj->klab", l2.abab, x459) del x459 l2new_baba += einsum("ijab->baji", x460) l2new_abab += einsum("ijab->abij", x460) del x460 - x467 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x467 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x467 += einsum("ijka->ikja", v.aaaa.ooov) x467 -= einsum("ijka->kija", v.aaaa.ooov) l2new_baba -= einsum("ijka,kilb->balj", x467, x53) @@ -3603,42 +3604,42 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x467 del x157 x469 += einsum("ab->ab", f.aa.vv) - x470 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x470 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x470 += einsum("ab,acij->ijbc", x469, l2.abab) del x469 l2new_baba += einsum("ijab->baji", x470) l2new_abab += einsum("ijab->abij", x470) del x470 x472 += einsum("ab->ab", f.bb.vv) - x473 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x473 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x473 += einsum("ab,caij->ijcb", x472, l2.abab) del x472 l2new_baba += einsum("ijab->baji", x473) l2new_abab += einsum("ijab->abij", x473) del x473 x484 += einsum("wia->wia", gc.aa.bov) - x485 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x485 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x485 += einsum("wai,wjb->jiba", lu11.bb, x484) del x484 l2new_baba += einsum("ijab->baji", x485) l2new_abab += einsum("ijab->abij", x485) del x485 x486 += einsum("wia->wia", gc.bb.bov) - x487 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x487 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x487 += einsum("wai,wjb->ijab", lu11.aa, x486) del x486 l2new_baba += einsum("ijab->baji", x487) l2new_abab += einsum("ijab->abij", x487) del x487 x490 += einsum("iajk->ijka", v.aabb.ovoo) - x491 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x491 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x491 += einsum("ai,jkib->jkba", l1.bb, x490) del x490 l2new_baba -= einsum("ijab->baji", x491) l2new_abab -= einsum("ijab->abij", x491) del x491 x492 += einsum("ijka->ijka", v.aabb.ooov) - x493 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x493 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x493 += einsum("ai,jikb->jkab", l1.aa, x492) del x492 l2new_baba -= einsum("ijab->baji", x493) @@ -3652,7 +3653,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb l2new_baba += einsum("ai,jb->abij", l1.bb, x495) l2new_abab += einsum("ai,jb->baji", l1.bb, x495) del x495 - x496 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x496 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x496 -= einsum("ijka->ikja", v.bbbb.ooov) x496 += einsum("ijka->kija", v.bbbb.ooov) l2new_abab -= einsum("ijka,lkjb->abil", x0, x496) @@ -3660,17 +3661,17 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new_bb -= einsum("wij,kjia->wak", x174, x496) del x496 del x174 - x497 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x497 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x497 += einsum("ia,wbi->wba", t1.bb, lu11.bb) lu11new_aa += einsum("wab,icab->wci", x497, v.aabb.ovvv) lu11new_bb -= einsum("wab,iacb->wci", x497, x277) del x497 del x277 - x498 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x498 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x498 += einsum("ia,wba->wib", t1.aa, g.aa.bvv) x502 += einsum("wia->wia", x498) del x498 - x499 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x499 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x499 += einsum("wia,jiba->wjb", g.bb.bov, t2.abab) x502 += einsum("wia->wia", x499) del x499 @@ -3679,7 +3680,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x41 lu11new_bb += einsum("wia,abij->wbj", x502, l2.abab) del x502 - x504 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x504 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x504 += einsum("wai,jiba->wjb", lu11.bb, t2.abab) x506 += einsum("wia->wia", x504) del x504 @@ -3687,11 +3688,11 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x13 lu11new_bb += einsum("wia,iajb->wbj", x506, v.aabb.ovov) del x506 - x507 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x507 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x507 += einsum("ia,wba->wib", t1.bb, g.bb.bvv) x511 += einsum("wia->wia", x507) del x507 - x508 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x508 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x508 += einsum("wia,ijab->wjb", g.aa.bov, t2.abab) x511 += einsum("wia->wia", x508) del x508 @@ -3700,7 +3701,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new_bb += einsum("wia,ijab->wbj", x511, x224) del x224 del x511 - x512 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x512 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x512 += einsum("wai,ijab->wjb", lu11.aa, t2.abab) x515 += einsum("wia->wia", x512) del x512 @@ -3708,7 +3709,7 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb lu11new_bb += einsum("wia,ijab->wbj", x515, x89) * -1 del x89 del x515 - x516 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x516 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x516 += einsum("ia,wbi->wba", t1.aa, lu11.aa) lu11new_aa -= einsum("wab,iacb->wci", x516, x298) del x298 @@ -3717,12 +3718,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x517 += einsum("ab->ab", f.aa.vv) lu11new_aa += einsum("ab,wai->wbi", x517, lu11.aa) del x517 - x518 = np.zeros((nbos, nbos), dtype=np.float64) + x518 = np.zeros((nbos, nbos), dtype=types[float]) x518 += einsum("wia,xia->wx", g.aa.bov, u11.aa) - x520 = np.zeros((nbos, nbos), dtype=np.float64) + x520 = np.zeros((nbos, nbos), dtype=types[float]) x520 += einsum("wx->wx", x518) del x518 - x519 = np.zeros((nbos, nbos), dtype=np.float64) + x519 = np.zeros((nbos, nbos), dtype=types[float]) x519 += einsum("wia,xia->wx", g.bb.bov, u11.bb) x520 += einsum("wx->wx", x519) del x519 @@ -3733,12 +3734,12 @@ def update_lams(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x521 += einsum("wij->wij", g.aa.boo) lu11new_aa -= einsum("ai,wji->waj", l1.aa, x521) del x521 - x522 = np.zeros((nbos, nbos), dtype=np.float64) + x522 = np.zeros((nbos, nbos), dtype=types[float]) x522 += einsum("wai,xia->wx", lu11.aa, u11.aa) - x524 = np.zeros((nbos, nbos), dtype=np.float64) + x524 = np.zeros((nbos, nbos), dtype=types[float]) x524 += einsum("wx->wx", x522) del x522 - x523 = np.zeros((nbos, nbos), dtype=np.float64) + x523 = np.zeros((nbos, nbos), dtype=types[float]) x523 += einsum("wai,xia->wx", lu11.bb, u11.bb) x524 += einsum("wx->wx", x523) del x523 @@ -3812,125 +3813,125 @@ def make_rdm1_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 1RDM - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11.aa, u11.aa) - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("ij->ij", x0) - rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_oo_aa = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_oo_aa -= einsum("ij->ij", x0) del x0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("abij,kjab->ik", l2.abab, t2.abab) x14 += einsum("ij->ij", x1) rdm1_f_oo_aa += einsum("ij->ij", x1) * -1 del x1 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum("ai,ja->ij", l1.aa, t1.aa) x14 += einsum("ij->ij", x2) rdm1_f_oo_aa -= einsum("ij->ij", x2) del x2 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum("ijab->jiab", t2.aaaa) x3 += einsum("ijab->jiba", t2.aaaa) * -1 rdm1_f_oo_aa += einsum("abij,ikba->jk", l2.aaaa, x3) * -1 del x3 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum("abij,ikab->jk", l2.abab, t2.abab) - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum("ij->ij", x4) - rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_oo_bb = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_oo_bb += einsum("ij->ij", x4) * -1 del x4 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum("wai,wja->ij", lu11.bb, u11.bb) x21 += einsum("ij->ij", x5) rdm1_f_oo_bb -= einsum("ij->ij", x5) del x5 - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum("ai,ja->ij", l1.bb, t1.bb) x21 += einsum("ij->ij", x6) rdm1_f_oo_bb -= einsum("ij->ij", x6) del x6 - x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x7 += einsum("ijab->jiab", t2.bbbb) * -1 x7 += einsum("ijab->jiba", t2.bbbb) rdm1_f_oo_bb += einsum("abij,ikab->jk", l2.bbbb, x7) * -1 del x7 - x8 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x8 += einsum("ia,waj->wji", t1.aa, lu11.aa) - rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_vo_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_vo_aa -= einsum("wia,wij->aj", u11.aa, x8) del x8 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum("ia,abjk->jikb", t1.aa, l2.abab) rdm1_f_vo_aa += einsum("ijab,ikjb->ak", t2.abab, x9) * -1 del x9 - x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x10 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum("ijka->ijka", x10) * -1 x11 += einsum("ijka->jika", x10) del x10 rdm1_f_vo_aa += einsum("ijab,jika->bk", t2.aaaa, x11) * -1 del x11 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum("ijab->jiab", t2.aaaa) x12 -= einsum("ijab->jiba", t2.aaaa) rdm1_f_vo_aa -= einsum("ai,ijab->bj", l1.aa, x12) del x12 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum("ijab->jiab", t2.aaaa) * -1 x13 += einsum("ijab->jiba", t2.aaaa) x14 += einsum("abij,ikba->jk", l2.aaaa, x13) * -1 del x13 rdm1_f_vo_aa += einsum("ia,ij->aj", t1.aa, x14) * -1 del x14 - x15 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x15 += einsum("ia,waj->wji", t1.bb, lu11.bb) - rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_vo_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_vo_bb -= einsum("wia,wij->aj", u11.bb, x15) del x15 - x16 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x16 += einsum("ia,bajk->jkib", t1.bb, l2.abab) rdm1_f_vo_bb += einsum("ijab,ijka->bk", t2.abab, x16) * -1 del x16 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x17 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum("ijka->ijka", x17) x18 += einsum("ijka->jika", x17) * -1 del x17 rdm1_f_vo_bb += einsum("ijab,jikb->ak", t2.bbbb, x18) * -1 del x18 - x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x19 += einsum("ijab->jiab", t2.bbbb) x19 -= einsum("ijab->jiba", t2.bbbb) rdm1_f_vo_bb -= einsum("ai,ijab->bj", l1.bb, x19) del x19 - x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum("ijab->jiab", t2.bbbb) x20 += einsum("ijab->jiba", t2.bbbb) * -1 x21 += einsum("abij,ikab->jk", l2.bbbb, x20) * -1 del x20 rdm1_f_vo_bb += einsum("ia,ij->aj", t1.bb, x21) * -1 del x21 - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum("abij->jiab", l2.aaaa) * -1 x22 += einsum("abij->jiba", l2.aaaa) - rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_vv_aa = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_vv_aa += einsum("ijab,ijca->bc", t2.aaaa, x22) * -1 del x22 - x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x23 += einsum("abij->jiab", l2.bbbb) * -1 x23 += einsum("abij->jiba", l2.bbbb) - rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_vv_bb = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_vv_bb += einsum("ijab,ijbc->ac", t2.bbbb, x23) * -1 del x23 rdm1_f_oo_aa += einsum("ij->ji", delta_oo.aa) rdm1_f_oo_bb += einsum("ij->ji", delta_oo.bb) - rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_ov_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_ov_aa += einsum("ai->ia", l1.aa) - rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_ov_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_ov_bb += einsum("ai->ia", l1.bb) rdm1_f_vo_aa += einsum("ai,jiba->bj", l1.bb, t2.abab) rdm1_f_vo_aa += einsum("w,wia->ai", ls1, u11.aa) @@ -3980,44 +3981,44 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb delta_vv.bb = np.eye(nvir[1]) # 2RDM - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("wai,wja->ij", lu11.aa, u11.aa) - x18 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x18 += einsum("ij->ij", x0) - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum("ia,ij->ja", t1.aa, x0) - x32 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x32 += einsum("ia->ia", x29) del x29 - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum("ij->ij", x0) - x96 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x96 += einsum("ij->ji", x0) - x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum("ij,kiab->kjab", x0, t2.aaaa) - x161 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x161 -= einsum("ijab->ijab", x145) del x145 - x248 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x248 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x248 += einsum("ij->ij", x0) - rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_aaaa -= einsum("ij,kl->ijkl", delta_oo.aa, x0) rdm2_f_oooo_aaaa += einsum("ij,kl->ilkj", delta_oo.aa, x0) rdm2_f_oooo_aaaa += einsum("ij,kl->kijl", delta_oo.aa, x0) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x0) del x0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x1 += einsum("abij,klba->ijlk", l2.aaaa, t2.aaaa) - x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x39 += einsum("ijkl->jilk", x1) - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum("ijab,ijkl->klab", t2.aaaa, x1) - x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x178 += einsum("ijab->ijab", x174) del x174 - x176 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x176 += einsum("ia,jikl->jkla", t1.aa, x1) - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum("ia,ijkb->jkab", t1.aa, x176) del x176 x178 += einsum("ijab->ijab", x177) @@ -4025,126 +4026,126 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ijkl->jkil", x1) * -1 rdm2_f_oooo_aaaa += einsum("ijkl->jlik", x1) del x1 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x2 += einsum("ia,abjk->kjib", t1.aa, l2.aaaa) - x3 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x3 += einsum("ia,jkla->jkil", t1.aa, x2) x39 += einsum("ijkl->ijkl", x3) - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum("ia,ijkl->jkla", t1.aa, x39) del x39 - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum("ijka->ikja", x40) - x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x95 += einsum("ijka->ikja", x40) del x40 - x162 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x162 += einsum("ia,ijkl->jlka", t1.aa, x3) - x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x163 += einsum("ia,ijkb->jkab", t1.aa, x162) del x162 - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum("ijab->ijab", x163) del x163 - x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x175 += einsum("ijab,jikl->klba", t2.aaaa, x3) x178 += einsum("ijab->ijab", x175) del x175 - rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_aaaa += einsum("ijab->ajbi", x178) * -1 rdm2_f_vovo_aaaa += einsum("ijab->bjai", x178) del x178 rdm2_f_oooo_aaaa += einsum("ijkl->ikjl", x3) rdm2_f_oooo_aaaa += einsum("ijkl->iljk", x3) * -1 del x3 - x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x36 += einsum("ijka->ijka", x2) x36 += einsum("ijka->jika", x2) * -1 - x42 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x42 += einsum("ijka->ijka", x2) * -1 x42 += einsum("ijka->jika", x2) - x43 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x43 += einsum("ijab,jikb->ka", t2.aaaa, x42) - x45 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia->ia", x43) * -1 - x93 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x93 += einsum("ia->ia", x43) * -1 - x249 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x249 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x249 += einsum("ia->ia", x43) * -1 del x43 - x77 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x77 += einsum("ijab,kila->kljb", t2.abab, x42) - x234 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x234 += einsum("ijka->ijka", x77) * -1 - rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_aabb += einsum("ijka->ijak", x77) * -1 - rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_bbaa += einsum("ijka->akij", x77) * -1 del x77 - x251 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x251 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x251 += einsum("ijab,jikb->ka", t2.aaaa, x42) * -1 del x42 - x104 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x104 += einsum("ijka->ijka", x2) x104 -= einsum("ijka->jika", x2) - x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x105 += einsum("ia,ijkb->jkab", t1.aa, x104) - rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_aaaa -= einsum("ijab->ijab", x105) - rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_aaaa -= einsum("ijab->abij", x105) del x105 - x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x130 -= einsum("ijka->ijka", x2) x130 += einsum("ijka->jika", x2) - x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum("ia,ijkb->jkab", t1.aa, x130) del x130 - rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_aaaa -= einsum("ijab->ibaj", x131) - rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_aaaa -= einsum("ijab->ajib", x131) del x131 - x261 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x261 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x261 += einsum("ijab,jikc->kcba", t2.aaaa, x2) - x266 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x266 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x266 += einsum("iabc->iabc", x261) del x261 - x262 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x262 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x262 += einsum("ia,jikb->jkba", t1.aa, x2) - x264 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x264 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x264 += einsum("ijab->ijab", x262) * -1 del x262 - rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_aaaa = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_aaaa += einsum("ijka->ikja", x2) rdm2_f_ooov_aaaa -= einsum("ijka->jkia", x2) - rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_aaaa -= einsum("ijka->iajk", x2) rdm2_f_ovoo_aaaa += einsum("ijka->jaik", x2) del x2 - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("abij,kjab->ik", l2.abab, t2.abab) - x7 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x7 += einsum("ij->ij", x4) x18 += einsum("ij->ij", x4) x96 += einsum("ij->ji", x4) x248 += einsum("ij->ij", x4) del x4 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum("ijab->jiab", t2.aaaa) * -1 x5 += einsum("ijab->jiba", t2.aaaa) - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum("abij,ikba->jk", l2.aaaa, x5) x7 += einsum("ij->ij", x6) * -1 - x44 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x44 += einsum("ia,ij->ja", t1.aa, x7) x45 += einsum("ia->ia", x44) del x44 x46 += einsum("ia,jk->jika", t1.aa, x7) x95 += einsum("ia,jk->jika", t1.aa, x7) - x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x172 += einsum("ij,ikab->kjab", x7, t2.aaaa) - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum("ijab->ijba", x172) del x172 rdm2_f_oooo_aaaa += einsum("ij,kl->jikl", delta_oo.aa, x7) * -1 @@ -4154,61 +4155,61 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x7 x18 += einsum("ij->ij", x6) * -1 del x6 - x91 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x91 += einsum("ai,ijab->jb", l1.aa, x5) x93 += einsum("ia->ia", x91) * -1 x251 += einsum("ia->ia", x91) * -1 del x91 - x247 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x247 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x247 += einsum("abij,ikba->jk", l2.aaaa, x5) x248 += einsum("ij->ij", x247) * -1 del x247 x249 += einsum("ai,ijab->jb", l1.aa, x5) * -0.9999999999999993 - x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x292 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x292 += einsum("abij,ikac->kjcb", l2.abab, x5) - x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x294 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x294 += einsum("ijab->ijab", x292) * -1 del x292 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum("ai,ja->ij", l1.aa, t1.aa) x18 += einsum("ij->ij", x8) - x92 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x92 += einsum("ia,ij->ja", t1.aa, x18) x93 += einsum("ia->ia", x92) del x92 - x240 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x240 += einsum("ij,ikab->jkab", x18, t2.abab) - rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vovo_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x240) * -1 - rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_aabb += einsum("ijab->aibj", x240) * -1 del x240 - rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_aabb += einsum("ij,kl->klji", delta_oo.bb, x18) * -1 - rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_oooo_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_oooo_bbaa += einsum("ij,kl->jikl", delta_oo.bb, x18) * -1 rdm2_f_oovo_aabb += einsum("ia,jk->jkai", t1.bb, x18) * -1 del x18 x33 += einsum("ij->ij", x8) - x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x34 += einsum("ia,jk->jika", t1.aa, x33) - x94 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x94 += einsum("ia,jk->jika", t1.aa, x33) - x179 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x179 += einsum("ia,ij->ja", t1.aa, x33) del x33 - x180 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x180 += einsum("ia->ia", x179) - x181 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x181 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x181 += einsum("ia->ia", x179) del x179 - x48 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x48 += einsum("ia,ij->ja", t1.aa, x8) - x49 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x49 -= einsum("ia->ia", x48) del x48 x96 += einsum("ij->ji", x8) - x143 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x143 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x143 += einsum("ij,kiab->jkab", x8, t2.aaaa) x161 += einsum("ijab->ijab", x143) del x143 @@ -4221,44 +4222,44 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aaaa += einsum("ij,kl->jlki", delta_oo.aa, x8) rdm2_f_oooo_aaaa -= einsum("ij,kl->klji", delta_oo.aa, x8) del x8 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x9 += einsum("abij,klab->ikjl", l2.abab, t2.abab) - x79 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x79 += einsum("ijkl->ijkl", x9) - x226 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x226 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x226 += einsum("ijkl->ijkl", x9) - x232 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x232 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x232 += einsum("ijkl->ijkl", x9) rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x9) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x9) del x9 - x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x10 += einsum("ia,bajk->jkib", t1.bb, l2.abab) - x11 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x11 += einsum("ia,jkla->jikl", t1.aa, x10) x79 += einsum("ijkl->ijkl", x11) - x80 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x80 += einsum("ia,jkil->jkla", t1.bb, x79) rdm2_f_oovo_aabb += einsum("ijka->ijak", x80) rdm2_f_vooo_bbaa += einsum("ijka->akij", x80) del x80 - x90 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x90 += einsum("ia,ijkl->jkla", t1.aa, x79) del x79 - rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x90) - rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_aabb += einsum("ijka->aijk", x90) del x90 x226 += einsum("ijkl->ijkl", x11) - x227 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x227 += einsum("ijab,ikjl->klab", t2.abab, x226) del x226 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x227) rdm2_f_vovo_aabb += einsum("ijab->aibj", x227) del x227 x232 += einsum("ijkl->ijkl", x11) * 0.9999999999999993 - x233 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x233 += einsum("ia,jkil->jkla", t1.bb, x232) del x232 x234 += einsum("ijka->ijka", x233) @@ -4266,119 +4267,119 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aabb += einsum("ijkl->ijkl", x11) rdm2_f_oooo_bbaa += einsum("ijkl->klij", x11) del x11 - x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x63 += einsum("ijab,ikla->kljb", t2.abab, x10) - x72 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x72 += einsum("ijka->ijka", x63) * -1 - x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x99 += einsum("ijka->ijka", x63) * -1 - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x190 -= einsum("ijka->ijka", x63) del x63 - x68 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x68 += einsum("ijab,ijka->kb", t2.abab, x10) - x71 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x71 += einsum("ia->ia", x68) - x84 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x84 += einsum("ia->ia", x68) - x97 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x97 += einsum("ia->ia", x68) - x246 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x246 += einsum("ia->ia", x68) - x250 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x250 += einsum("ia->ia", x68) del x68 - x75 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x75 += einsum("ijab,kjla->kilb", t2.abab, x10) x234 += einsum("ijka->ijka", x75) rdm2_f_oovo_aabb += einsum("ijka->ijak", x75) rdm2_f_vooo_bbaa += einsum("ijka->akij", x75) del x75 - x89 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x89 += einsum("ijka,ilab->ljkb", x10, x5) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x89) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x89) * -1 del x89 - x126 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x126 += einsum("ia,ijkb->jkba", t1.aa, x10) - rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_oovv_bbaa = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x126) - rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x126) del x126 - x132 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x132 += einsum("ia,jikb->jkba", t1.bb, x10) - x286 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x286 += einsum("ijab->ijab", x132) - rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x132) - rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_voov_bbaa = np.zeros((nvir[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x132) del x132 - x280 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x280 += einsum("ijab,ijkc->kcab", t2.abab, x10) - rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_bbaa = np.zeros((nvir[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x280) * -1 - rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_aabb += einsum("iabc->baci", x280) * -1 del x280 - rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ooov_bbaa = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ooov_bbaa -= einsum("ijka->jkia", x10) - rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_aabb -= einsum("ijka->iajk", x10) - x12 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x12 += einsum("ai,ja->ij", l1.bb, t1.bb) - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum("ij->ji", x12) - x51 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x51 += einsum("ia,ij->ja", t1.bb, x12) - x73 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x73 -= einsum("ia->ia", x51) - rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_oovo_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_oovo_bbbb += einsum("ij,ka->ikaj", delta_oo.bb, x51) - rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vooo_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vooo_bbbb -= einsum("ij,ka->akji", delta_oo.bb, x51) del x51 - x61 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x61 += einsum("ij->ij", x12) - x82 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x82 += einsum("ij->ij", x12) - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum("ij,kiab->jkab", x12, t2.bbbb) - x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x199 += einsum("ijab->ijab", x182) del x182 - x245 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x245 += einsum("ij->ij", x12) - rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_oooo_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_oooo_bbbb -= einsum("ij,kl->jikl", delta_oo.bb, x12) rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x12) rdm2_f_oooo_bbbb += einsum("ij,kl->jlki", delta_oo.bb, x12) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x12) del x12 - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum("wai,wja->ij", lu11.bb, u11.bb) x17 += einsum("ij->ji", x13) - x57 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x57 += einsum("ia,ij->ja", t1.bb, x13) - x60 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x60 += einsum("ia->ia", x57) del x57 x61 += einsum("ij->ij", x13) - x62 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x62 += einsum("ia,jk->jika", t1.bb, x61) - x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x98 += einsum("ia,jk->jika", t1.bb, x61) - x217 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x217 += einsum("ia,ij->ja", t1.bb, x61) del x61 - x218 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x218 += einsum("ia->ia", x217) - x219 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x219 += einsum("ia->ia", x217) del x217 x82 += einsum("ij->ij", x13) - x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x184 += einsum("ij,kiab->kjab", x13, t2.bbbb) x199 -= einsum("ijab->ijab", x184) del x184 @@ -4388,27 +4389,27 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->kijl", delta_oo.bb, x13) rdm2_f_oooo_bbbb -= einsum("ij,kl->klji", delta_oo.bb, x13) del x13 - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum("abij,ikab->jk", l2.abab, t2.abab) x17 += einsum("ij->ji", x14) - x22 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x22 += einsum("ij->ij", x14) x82 += einsum("ij->ij", x14) - x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x207 += einsum("ij,kiab->jkab", x14, t2.bbbb) - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum("ijab->ijab", x207) * -1 del x207 x245 += einsum("ij->ij", x14) del x14 - x15 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x15 += einsum("ijab->jiab", t2.bbbb) * -1 x15 += einsum("ijab->jiba", t2.bbbb) - x16 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x16 += einsum("abij,ikba->jk", l2.bbbb, x15) x17 += einsum("ij->ji", x16) * -1 x22 += einsum("ij->ij", x16) * -1 - x70 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x70 += einsum("ia,ij->ja", t1.bb, x22) x71 += einsum("ia->ia", x70) del x70 @@ -4420,12 +4421,12 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_bbbb += einsum("ij,kl->klij", delta_oo.bb, x22) * -1 del x22 x82 += einsum("ij->ij", x16) * -1 - x83 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x83 += einsum("ia,ij->ja", t1.bb, x82) x84 += einsum("ia->ia", x83) x97 += einsum("ia->ia", x83) del x83 - x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x241 += einsum("ij,kiab->kjab", x82, t2.abab) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x241) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x241) * -1 @@ -4433,18 +4434,18 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_bbaa += einsum("ia,jk->jkai", t1.aa, x82) * -1 rdm2_f_vooo_aabb += einsum("ia,jk->aijk", t1.aa, x82) * -1 del x82 - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum("ij,ikab->kjab", x16, t2.bbbb) * -1 del x16 x211 += einsum("ijab->ijba", x210) del x210 - x81 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x81 += einsum("ai,ijab->jb", l1.bb, x15) x84 += einsum("ia->ia", x81) * -1 x97 += einsum("ia->ia", x81) * -1 x246 += einsum("ia->ia", x81) * -1 del x81 - x244 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x244 += einsum("abij,ikba->jk", l2.bbbb, x15) x245 += einsum("ij->ij", x244) * -1 del x244 @@ -4452,7 +4453,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x250 += einsum("ia,ij->ja", t1.bb, x245) * 0.9999999999999993 del x245 x250 += einsum("ai,ijab->jb", l1.bb, x15) * -0.9999999999999993 - x285 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x285 += einsum("abij,jkbc->ikac", l2.abab, x15) x286 += einsum("ijab->ijab", x285) * -1 del x285 @@ -4460,59 +4461,59 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oooo_aabb += einsum("ij,kl->jilk", delta_oo.aa, x17) * -1 rdm2_f_oooo_bbaa += einsum("ij,kl->lkji", delta_oo.aa, x17) * -1 del x17 - x19 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x19 += einsum("abij,klab->ijkl", l2.bbbb, t2.bbbb) - x66 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x66 += einsum("ijkl->jilk", x19) - x212 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x212 += einsum("ia,jikl->jkla", t1.bb, x19) - x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x213 += einsum("ia,ijkb->kjba", t1.bb, x212) del x212 - x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x216 += einsum("ijab->ijab", x213) del x213 - x214 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x214 += einsum("ijkl->jilk", x19) rdm2_f_oooo_bbbb += einsum("ijkl->jkil", x19) * -1 rdm2_f_oooo_bbbb += einsum("ijkl->jlik", x19) del x19 - x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x20 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x21 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x21 += einsum("ia,jkla->kjli", t1.bb, x20) x66 += einsum("ijkl->ijkl", x21) - x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x67 += einsum("ia,ijkl->jkla", t1.bb, x66) del x66 x72 += einsum("ijka->ikja", x67) x99 += einsum("ijka->ikja", x67) del x67 - x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x201 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x201 += einsum("ia,ijkl->jlka", t1.bb, x21) - x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x202 += einsum("ia,ijkb->jkab", t1.bb, x201) del x201 - x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x206 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x206 += einsum("ijab->ijab", x202) del x202 x214 += einsum("ijkl->ijkl", x21) - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum("ijab,ijkl->klab", t2.bbbb, x214) del x214 x216 += einsum("ijab->jiba", x215) del x215 - rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vovo_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vovo_bbbb += einsum("ijab->ajbi", x216) * -1 rdm2_f_vovo_bbbb += einsum("ijab->bjai", x216) del x216 rdm2_f_oooo_bbbb += einsum("ijkl->ikjl", x21) rdm2_f_oooo_bbbb += einsum("ijkl->iljk", x21) * -1 del x21 - x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x64 += einsum("ijka->ijka", x20) * -1 x64 += einsum("ijka->jika", x20) - x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x65 += einsum("ijab,ikla->jklb", x15, x64) x72 += einsum("ijka->jkia", x65) x99 += einsum("ijka->jkia", x65) @@ -4520,7 +4521,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ijka->ajik", x99) * -1 rdm2_f_vooo_bbbb += einsum("ijka->akij", x99) del x99 - x69 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x69 += einsum("ijab,ijka->kb", t2.bbbb, x64) x71 += einsum("ia->ia", x69) * -1 x72 += einsum("ij,ka->jika", delta_oo.bb, x71) * -1 @@ -4535,71 +4536,71 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x97 += einsum("ia->ia", x69) * -1 x250 += einsum("ia->ia", x69) * -1 del x69 - x88 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x88 += einsum("ijab,kjlb->ikla", t2.abab, x64) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x88) * -1 rdm2_f_vooo_aabb += einsum("ijka->aijk", x88) * -1 del x88 x246 += einsum("ijab,ijka->kb", t2.bbbb, x64) * -1 del x64 - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x117 += einsum("ijka->ijka", x20) x117 -= einsum("ijka->jika", x20) - x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x118 += einsum("ia,ijkb->jkab", t1.bb, x117) - rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_bbbb -= einsum("ijab->ijab", x118) - rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_vvoo_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_vvoo_bbbb -= einsum("ijab->abij", x118) del x118 - x236 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x236 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x236 += einsum("ijab,kjlb->ikla", t2.abab, x117) del x117 - x238 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x238 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x238 -= einsum("ijka->ijka", x236) del x236 - x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x141 -= einsum("ijka->ijka", x20) x141 += einsum("ijka->jika", x20) - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum("ia,ijkb->jkab", t1.bb, x141) - rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_ovvo_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_ovvo_bbbb -= einsum("ijab->ibaj", x142) - rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_bbbb = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_bbbb -= einsum("ijab->ajib", x142) del x142 - x267 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x267 += einsum("ijab,jikc->kcba", t2.bbbb, x20) - x274 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x274 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x274 += einsum("iabc->iabc", x267) del x267 - x268 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x268 += einsum("ia,jikb->jkba", t1.bb, x20) - x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x271 += einsum("ijab->ijab", x268) * -1 del x268 - rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_bbbb = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_bbbb += einsum("ijka->ikja", x20) rdm2_f_ooov_bbbb -= einsum("ijka->jkia", x20) - rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_ovoo_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_ovoo_bbbb -= einsum("ijka->iajk", x20) rdm2_f_ovoo_bbbb += einsum("ijka->jaik", x20) del x20 - x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum("ia,abjk->jikb", t1.aa, l2.abab) - x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x35 += einsum("ijab,kljb->klia", t2.abab, x23) x46 += einsum("ijka->ijka", x35) * -1 x95 += einsum("ijka->ijka", x35) * -1 - x152 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x152 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x152 -= einsum("ijka->ijka", x35) del x35 - x41 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x41 += einsum("ijab,ikjb->ka", t2.abab, x23) x45 += einsum("ia->ia", x41) x46 += einsum("ij,ka->jika", delta_oo.aa, x45) * -1 x173 += einsum("ia,jb->ijab", t1.aa, x45) - rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vooo_aaaa = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vooo_aaaa += einsum("ij,ka->ajik", delta_oo.aa, x45) rdm2_f_vooo_aaaa += einsum("ij,ka->akij", delta_oo.aa, x45) * -1 del x45 @@ -4607,55 +4608,55 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x249 += einsum("ia->ia", x41) x251 += einsum("ia->ia", x41) del x41 - x78 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x78 += einsum("ijab,klia->kljb", x15, x23) del x15 x234 += einsum("ijka->ijka", x78) * -1 rdm2_f_oovo_aabb += einsum("ijka->ijak", x78) * -1 rdm2_f_vooo_bbaa += einsum("ijka->akij", x78) * -1 del x78 - x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x85 += einsum("ijab,iklb->klja", t2.abab, x23) x238 -= einsum("ijka->ijka", x85) rdm2_f_oovo_bbaa += einsum("ijka->jkai", x85) rdm2_f_vooo_aabb += einsum("ijka->aijk", x85) del x85 - x128 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum("ia,jkib->jkba", t1.bb, x23) - rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_oovv_aabb = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_oovv_aabb -= einsum("ijab->ijba", x128) - rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_vvoo_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x128) del x128 - x136 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x136 += einsum("ia,ijkb->jkab", t1.aa, x23) x294 += einsum("ijab->ijab", x136) - rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_ovvo_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x136) - rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_voov_aabb = np.zeros((nvir[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_voov_aabb -= einsum("ijab->aijb", x136) del x136 - x290 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x290 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x290 += einsum("ijab,ikjc->kacb", t2.abab, x23) - rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_aabb = np.zeros((nvir[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_aabb += einsum("iabc->aicb", x290) * -1 - rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x290) * -1 del x290 - rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ooov_aabb = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ooov_aabb -= einsum("ijka->ijka", x23) - rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_ovoo_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_ovoo_bbaa -= einsum("ijka->kaij", x23) del x23 - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum("ai,jkab->ikjb", l1.aa, t2.aaaa) x34 += einsum("ijka->ijka", x24) x94 += einsum("ijka->ijka", x24) x152 += einsum("ijka->ijka", x24) del x24 - x25 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x25 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum("wia,wjk->jkia", u11.aa, x25) x34 -= einsum("ijka->ijka", x26) x94 -= einsum("ijka->ijka", x26) @@ -4663,7 +4664,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa -= einsum("ijka->ajik", x94) rdm2_f_vooo_aaaa += einsum("ijka->akij", x94) del x94 - x28 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x28 += einsum("wia,wij->ja", u11.aa, x25) x32 += einsum("ia->ia", x28) x93 += einsum("ia->ia", x28) @@ -4672,65 +4673,65 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x249 += einsum("ia->ia", x28) * 0.9999999999999993 x251 += einsum("ia->ia", x28) del x28 - x74 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x74 += einsum("wia,wjk->jkia", u11.bb, x25) rdm2_f_oovo_aabb -= einsum("ijka->ijak", x74) rdm2_f_vooo_bbaa -= einsum("ijka->akij", x74) del x74 - x154 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x154 += einsum("ia,wij->wja", t1.aa, x25) del x25 - x157 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x157 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x157 -= einsum("wia->wia", x154) del x154 - x27 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x27 += einsum("ai,jiba->jb", l1.bb, t2.abab) x32 -= einsum("ia->ia", x27) x93 += einsum("ia->ia", x27) * -1 - x160 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x160 += einsum("ia->ia", x27) x249 += einsum("ia->ia", x27) * -0.9999999999999993 x251 += einsum("ia->ia", x27) * -1 del x27 - x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x30 -= einsum("ijab->jiab", t2.aaaa) x30 += einsum("ijab->jiba", t2.aaaa) - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("ai,ijab->jb", l1.aa, x30) x32 -= einsum("ia->ia", x31) del x31 x34 -= einsum("ij,ka->jika", delta_oo.aa, x32) - rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_oovo_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_oovo_aaaa += einsum("ijka->ijak", x34) rdm2_f_oovo_aaaa -= einsum("ijka->ikaj", x34) del x34 rdm2_f_vooo_aaaa += einsum("ij,ka->ajik", delta_oo.aa, x32) rdm2_f_vooo_aaaa -= einsum("ij,ka->akij", delta_oo.aa, x32) del x32 - x138 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x138 += einsum("abij,ikca->kjcb", l2.abab, x30) rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x138) rdm2_f_voov_aabb -= einsum("ijab->aijb", x138) del x138 - x156 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x156 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x156 += einsum("wai,ijba->wjb", lu11.aa, x30) x157 -= einsum("wia->wia", x156) del x156 - x159 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x159 += einsum("ai,ijba->jb", l1.aa, x30) x160 -= einsum("ia->ia", x159) del x159 x161 += einsum("ia,jb->ijab", t1.aa, x160) del x160 - x237 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x237 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x237 += einsum("ijka,ilba->ljkb", x10, x30) del x10 x238 -= einsum("ijka->ijka", x237) del x237 - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum("ijab->jiab", t2.aaaa) x37 += einsum("ijab->jiba", t2.aaaa) * -1 - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x38 += einsum("ijka,jlba->iklb", x36, x37) del x36 x46 += einsum("ijka->ijka", x38) @@ -4744,7 +4745,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x95 x96 += einsum("abij,ikab->kj", l2.aaaa, x37) * -1 del x37 - x47 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x47 += einsum("w,wia->ia", ls1, u11.aa) x49 += einsum("ia->ia", x47) x93 += einsum("ia->ia", x47) * -1 @@ -4766,7 +4767,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_aaaa -= einsum("ij,ka->aijk", delta_oo.aa, x49) rdm2_f_vooo_aaaa += einsum("ij,ka->akji", delta_oo.aa, x49) del x49 - x50 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x50 += einsum("w,wia->ia", ls1, u11.bb) x73 += einsum("ia->ia", x50) x84 += einsum("ia->ia", x50) * -1 @@ -4778,15 +4779,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_bbbb -= einsum("ij,ka->jkai", delta_oo.bb, x50) rdm2_f_vooo_bbbb += einsum("ij,ka->akji", delta_oo.bb, x50) del x50 - x52 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x52 += einsum("ai,jkba->ijkb", l1.bb, t2.bbbb) x62 += einsum("ijka->ijka", x52) x98 += einsum("ijka->ijka", x52) x190 += einsum("ijka->ijka", x52) del x52 - x53 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x53 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x53 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x54 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x54 += einsum("wia,wjk->jkia", u11.bb, x53) x62 -= einsum("ijka->ijka", x54) x98 -= einsum("ijka->ijka", x54) @@ -4794,7 +4795,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb -= einsum("ijka->ajik", x98) rdm2_f_vooo_bbbb += einsum("ijka->akij", x98) del x98 - x56 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x56 += einsum("wia,wij->ja", u11.bb, x53) x60 += einsum("ia->ia", x56) x84 += einsum("ia->ia", x56) @@ -4807,33 +4808,33 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x246 += einsum("ia->ia", x56) x250 += einsum("ia->ia", x56) * 0.9999999999999993 del x56 - x87 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x87 += einsum("wia,wjk->ijka", u11.aa, x53) rdm2_f_oovo_bbaa -= einsum("ijka->jkai", x87) rdm2_f_vooo_aabb -= einsum("ijka->aijk", x87) del x87 - x193 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x193 += einsum("ia,wij->wja", t1.bb, x53) del x53 - x195 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x195 -= einsum("wia->wia", x193) del x193 - x55 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x55 += einsum("ai,ijab->jb", l1.aa, t2.abab) x60 -= einsum("ia->ia", x55) x84 += einsum("ia->ia", x55) * -1 x97 += einsum("ia->ia", x55) * -1 rdm2_f_vooo_bbaa += einsum("ij,ka->akji", delta_oo.aa, x97) * -1 del x97 - x198 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x198 += einsum("ia->ia", x55) x246 += einsum("ia->ia", x55) * -1 x250 += einsum("ia->ia", x55) * -0.9999999999999993 del x55 - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x58 -= einsum("ijab->jiab", t2.bbbb) x58 += einsum("ijab->jiba", t2.bbbb) - x59 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x59 += einsum("ai,ijab->jb", l1.bb, x58) x60 -= einsum("ia->ia", x59) del x59 @@ -4844,12 +4845,12 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vooo_bbbb += einsum("ij,ka->ajik", delta_oo.bb, x60) rdm2_f_vooo_bbbb -= einsum("ij,ka->akij", delta_oo.bb, x60) del x60 - x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum("ijka,ilab->ljkb", x141, x58) del x141 x190 += einsum("ijka->jkia", x189) del x189 - x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x191 += einsum("ia,ijkb->jkab", t1.bb, x190) del x190 x199 += einsum("ijab->ijab", x191) @@ -4858,10 +4859,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovo_bbbb += einsum("ij,ka->jiak", delta_oo.bb, x73) rdm2_f_vooo_bbbb -= einsum("ij,ka->aijk", delta_oo.bb, x73) del x73 - x76 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x76 += einsum("ai,jkab->ijkb", l1.aa, t2.abab) x234 += einsum("ijka->ijka", x76) * -1 - x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x235 += einsum("ia,ijkb->jkab", t1.aa, x234) del x234 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x235) @@ -4873,10 +4874,10 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x84 += einsum("ia->ia", t1.bb) * -1 rdm2_f_oovo_aabb += einsum("ij,ka->jiak", delta_oo.aa, x84) * -1 del x84 - x86 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x86 += einsum("ai,jkba->jikb", l1.bb, t2.abab) x238 += einsum("ijka->ijka", x86) - x239 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x239 += einsum("ia,jikb->jkba", t1.bb, x238) del x238 rdm2_f_vovo_bbaa -= einsum("ijab->bjai", x239) @@ -4892,20 +4893,20 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x96 += einsum("ij->ji", delta_oo.aa) * -1 rdm2_f_vooo_bbaa += einsum("ia,jk->aikj", t1.bb, x96) * -1 del x96 - x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum("wai,wjb->ijab", lu11.aa, u11.aa) rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x100) rdm2_f_ovvo_aaaa += einsum("ijab->iabj", x100) rdm2_f_voov_aaaa += einsum("ijab->bjia", x100) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x100) del x100 - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum("abij,kjcb->ikac", l2.abab, t2.abab) - x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x146 += einsum("ijab,jkac->ikbc", t2.aaaa, x101) x161 -= einsum("ijab->ijab", x146) del x146 - x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x148 += einsum("ijab->ijab", x101) x264 += einsum("ijab->ijab", x101) rdm2_f_oovv_aaaa -= einsum("ijab->ijba", x101) @@ -4913,87 +4914,87 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_voov_aaaa += einsum("ijab->bjia", x101) rdm2_f_vvoo_aaaa -= einsum("ijab->baij", x101) del x101 - x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x102 -= einsum("abij->jiab", l2.aaaa) x102 += einsum("abij->jiba", l2.aaaa) - x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x103 += einsum("ijab,ikbc->kjca", x102, x30) rdm2_f_oovv_aaaa += einsum("ijab->jiab", x103) rdm2_f_vvoo_aaaa += einsum("ijab->abji", x103) del x103 - x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum("ijab,ikcb->kjca", x102, x30) rdm2_f_ovvo_aaaa += einsum("ijab->jbai", x129) rdm2_f_voov_aaaa += einsum("ijab->aijb", x129) del x129 - x134 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x134 += einsum("ijab,ikca->kjcb", t2.abab, x102) - x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x200 -= einsum("ijab,ikac->jkbc", t2.abab, x134) rdm2_f_vovo_bbbb -= einsum("ijab->ajbi", x200) rdm2_f_vovo_bbbb += einsum("ijab->aibj", x200) del x200 - x221 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x221 -= einsum("ijab->ijab", x134) rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x134) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x134) del x134 - x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x147 += einsum("ijab,ikbc->jkac", t2.aaaa, x102) x148 -= einsum("ijab->jiba", x147) del x147 - x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x149 += einsum("ijab,ikac->jkbc", t2.aaaa, x148) del x148 x161 += einsum("ijab->ijab", x149) del x149 - x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x164 += einsum("ijab,ikca->jkbc", t2.aaaa, x102) - x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x165 -= einsum("ijab,kica->jkbc", t2.aaaa, x164) del x164 x169 += einsum("ijab->jiba", x165) del x165 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum("ijab,ikcb->jkac", t2.aaaa, x102) del x102 - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 -= einsum("ijab,kicb->jkac", t2.aaaa, x166) del x166 x169 += einsum("ijab->ijab", x167) del x167 - x106 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x106 += einsum("ai,ib->ab", l1.aa, t1.aa) - x111 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x111 += einsum("ab->ab", x106) - x259 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x259 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x259 += einsum("ab->ab", x106) del x106 - x107 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x107 += einsum("wai,wib->ab", lu11.aa, u11.aa) x111 += einsum("ab->ab", x107) - x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x144 += einsum("ab,ijca->ijcb", x107, t2.aaaa) x161 -= einsum("ijab->ijab", x144) del x144 - x230 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x230 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x230 += einsum("ab->ab", x107) x259 += einsum("ab->ab", x107) del x107 - x260 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x260 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x260 += einsum("ia,bc->ibac", t1.aa, x259) del x259 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x111 += einsum("ab->ab", x108) - x170 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x170 += einsum("ab->ab", x108) x230 += einsum("ab->ab", x108) del x108 - x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum("abij->jiab", l2.aaaa) * -1 x109 += einsum("abij->jiba", l2.aaaa) - x110 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x110 += einsum("ijab,ijbc->ac", t2.aaaa, x109) x111 += einsum("ab->ba", x110) * -1 rdm2_f_oovv_aaaa += einsum("ij,ab->jiba", delta_oo.aa, x111) @@ -5006,7 +5007,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_aabb += einsum("ia,bc->cbai", t1.bb, x111) del x111 x170 += einsum("ab->ba", x110) * -1 - x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x171 += einsum("ab,ijac->ijcb", x170, t2.aaaa) x173 += einsum("ijab->jiab", x171) del x171 @@ -5019,63 +5020,63 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x170 x230 += einsum("ab->ba", x110) * -1 del x110 - x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x231 += einsum("ab,ijac->ijbc", x230, t2.abab) del x230 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x231) * -1 rdm2_f_vovo_aabb += einsum("ijab->aibj", x231) * -1 del x231 - x263 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x263 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x263 += einsum("ijab,ikcb->kjca", x109, x5) del x5 x264 += einsum("ijab->jiba", x263) del x263 - x265 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x265 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x265 += einsum("ia,ijbc->jabc", t1.aa, x264) del x264 x266 += einsum("iabc->ibac", x265) * -1 del x265 - rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vovv_aaaa = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vovv_aaaa += einsum("iabc->bica", x266) rdm2_f_vovv_aaaa += einsum("iabc->ciba", x266) * -1 - rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_vvvo_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_vvvo_aaaa += einsum("iabc->baci", x266) * -1 rdm2_f_vvvo_aaaa += einsum("iabc->cabi", x266) del x266 - x284 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x284 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x284 += einsum("ijab,ikac->kjcb", t2.abab, x109) del x109 x286 += einsum("ijab->ijab", x284) * -1 del x284 - x287 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x287 += einsum("ia,ijbc->jabc", t1.aa, x286) del x286 rdm2_f_vovv_bbaa += einsum("iabc->ciab", x287) * -1 rdm2_f_vvvo_aabb += einsum("iabc->abci", x287) * -1 del x287 - x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x112 += einsum("abij,ikac->jkbc", l2.abab, t2.abab) - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 += einsum("ijab->ijab", x112) x271 += einsum("ijab->ijab", x112) rdm2_f_oovv_bbbb -= einsum("ijab->ijba", x112) rdm2_f_ovvo_bbbb += einsum("ijab->iabj", x112) rdm2_f_voov_bbbb += einsum("ijab->bjia", x112) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x112) - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum("wai,wjb->ijab", lu11.bb, u11.bb) rdm2_f_oovv_bbbb -= einsum("ijab->ijba", x113) rdm2_f_ovvo_bbbb += einsum("ijab->iabj", x113) rdm2_f_voov_bbbb += einsum("ijab->bjia", x113) rdm2_f_vvoo_bbbb -= einsum("ijab->baij", x113) del x113 - x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x114 += einsum("ijab->jiab", t2.bbbb) x114 -= einsum("ijab->jiba", t2.bbbb) - x135 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x135 += einsum("abij,jkbc->ikac", l2.abab, x114) x221 -= einsum("ijab->ijab", x135) - x222 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x222 += einsum("ijab,ikac->kjcb", x221, x30) del x221 del x30 @@ -5085,81 +5086,81 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovvo_aabb -= einsum("ijab->iabj", x135) rdm2_f_voov_bbaa -= einsum("ijab->bjia", x135) del x135 - x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x188 += einsum("ijab,ikac->jkbc", x112, x114) del x112 x199 -= einsum("ijab->ijab", x188) del x188 - x194 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x194 += einsum("wai,ijab->wjb", lu11.bb, x114) x195 -= einsum("wia->wia", x194) del x194 - x197 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x197 += einsum("ai,ijab->jb", l1.bb, x114) x198 -= einsum("ia->ia", x197) del x197 x199 += einsum("ia,jb->ijab", t1.bb, x198) del x198 - x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x115 += einsum("abij->jiab", l2.bbbb) x115 -= einsum("abij->jiba", l2.bbbb) - x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum("ijab,ikbc->jkac", x114, x115) rdm2_f_oovv_bbbb += einsum("ijab->jiab", x116) rdm2_f_vvoo_bbbb += einsum("ijab->abji", x116) del x116 - x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x139 += einsum("ijab,jkbc->ikac", t2.abab, x115) - x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x168 -= einsum("ijab,kjcb->ikac", t2.abab, x139) x169 += einsum("ijab->jiba", x168) del x168 rdm2_f_ovvo_bbaa -= einsum("ijab->jbai", x139) rdm2_f_voov_aabb -= einsum("ijab->aijb", x139) del x139 - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum("ijab,ikca->kjcb", x115, x58) del x58 del x115 rdm2_f_ovvo_bbbb += einsum("ijab->jbai", x140) rdm2_f_voov_bbbb += einsum("ijab->aijb", x140) del x140 - x119 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x119 += einsum("ai,ib->ab", l1.bb, t1.bb) - x124 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x124 += einsum("ab->ab", x119) - x278 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x278 += einsum("ab->ab", x119) del x119 - x120 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x120 += einsum("wai,wib->ab", lu11.bb, u11.bb) x124 += einsum("ab->ab", x120) - x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x183 += einsum("ab,ijac->jicb", x120, t2.bbbb) x199 -= einsum("ijab->ijab", x183) del x183 - x228 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x228 += einsum("ab->ab", x120) x278 += einsum("ab->ab", x120) del x120 - x279 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x279 += einsum("ia,bc->ibac", t1.bb, x278) del x278 - x121 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x121 += einsum("abij,ijac->bc", l2.abab, t2.abab) x124 += einsum("ab->ab", x121) - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum("ab,ijac->jibc", x121, t2.bbbb) x211 += einsum("ijab->ijab", x208) * -1 del x208 x228 += einsum("ab->ab", x121) - x273 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x273 += einsum("ab->ab", x121) del x121 - x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x122 += einsum("abij->jiab", l2.bbbb) * -1 x122 += einsum("abij->jiba", l2.bbbb) - x123 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x123 += einsum("ijab,ijca->bc", t2.bbbb, x122) x124 += einsum("ab->ba", x123) * -1 rdm2_f_oovv_bbbb += einsum("ij,ab->jiba", delta_oo.bb, x124) @@ -5171,7 +5172,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovv_aabb += einsum("ia,bc->aicb", t1.aa, x124) rdm2_f_vvvo_bbaa += einsum("ia,bc->cbai", t1.aa, x124) del x124 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum("ab,ijbc->ijca", x123, t2.bbbb) * -1 x211 += einsum("ijab->jiab", x209) del x209 @@ -5181,7 +5182,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_bbbb += einsum("ijab->bjai", x211) * -1 del x211 x228 += einsum("ab->ba", x123) * -1 - x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x229 += einsum("ab,ijca->ijcb", x228, t2.abab) del x228 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x229) * -1 @@ -5191,19 +5192,19 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb del x123 x274 += einsum("ia,bc->ibac", t1.bb, x273) del x273 - x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x293 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x293 += einsum("ijab,jkbc->ikac", t2.abab, x122) x294 += einsum("ijab->ijab", x293) * -1 del x293 - x295 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x295 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x295 += einsum("ia,jibc->jbac", t1.bb, x294) del x294 rdm2_f_vovv_aabb += einsum("iabc->aibc", x295) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->bcai", x295) * -1 del x295 - x125 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x125 += einsum("abij,ikcb->jkac", l2.abab, t2.abab) - x281 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x281 += einsum("ia,ijbc->jbca", t1.bb, x125) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x281) * -1 rdm2_f_vvvo_aabb += einsum("iabc->baci", x281) * -1 @@ -5211,14 +5212,14 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_bbaa -= einsum("ijab->ijba", x125) rdm2_f_vvoo_aabb -= einsum("ijab->baij", x125) del x125 - x127 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum("abij,kjac->ikbc", l2.abab, t2.abab) - x220 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x220 += einsum("ijab,ikbc->kjac", t2.abab, x127) rdm2_f_vovo_bbaa += einsum("ijab->bjai", x220) rdm2_f_vovo_aabb += einsum("ijab->aibj", x220) del x220 - x291 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x291 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x291 += einsum("ia,ijbc->jabc", t1.aa, x127) rdm2_f_vovv_aabb += einsum("iabc->aicb", x291) * -1 rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x291) * -1 @@ -5226,35 +5227,35 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_oovv_aabb -= einsum("ijab->ijba", x127) rdm2_f_vvoo_bbaa -= einsum("ijab->baij", x127) del x127 - x133 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x133 += einsum("wai,wjb->ijab", lu11.aa, u11.bb) rdm2_f_ovvo_aabb += einsum("ijab->iabj", x133) rdm2_f_voov_bbaa += einsum("ijab->bjia", x133) del x133 - x137 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x137 += einsum("wai,wjb->jiba", lu11.bb, u11.aa) rdm2_f_ovvo_bbaa += einsum("ijab->jbai", x137) rdm2_f_voov_aabb += einsum("ijab->aijb", x137) del x137 - x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x150 += einsum("ijab->jiab", t2.aaaa) x150 -= einsum("ijab->jiba", t2.aaaa) - x151 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x151 += einsum("ijka,jlba->iklb", x104, x150) del x104 del x150 x152 += einsum("ijka->ijka", x151) del x151 - x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x153 += einsum("ia,ijkb->jkab", t1.aa, x152) del x152 x161 += einsum("ijab->ijab", x153) del x153 - x155 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x155 += einsum("wai,jiba->wjb", lu11.bb, t2.abab) x157 += einsum("wia->wia", x155) del x155 - x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x158 += einsum("wia,wjb->ijab", u11.aa, x157) x161 += einsum("ijab->jiba", x158) del x158 @@ -5263,7 +5264,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ijab->ajbi", x161) rdm2_f_vovo_aaaa += einsum("ijab->bjai", x161) del x161 - x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x243 += einsum("wia,wjb->jiba", u11.bb, x157) del x157 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x243) @@ -5277,44 +5278,44 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_aaaa -= einsum("ia,jb->aibj", t1.aa, x180) rdm2_f_vovo_aaaa += einsum("ia,jb->biaj", t1.aa, x180) del x180 - x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x185 -= einsum("abij->jiab", l2.bbbb) x185 += einsum("abij->jiba", l2.bbbb) - x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x186 += einsum("ijab,ikcb->jkac", t2.bbbb, x185) - x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x187 -= einsum("ijab,kica->jkbc", t2.bbbb, x186) x199 -= einsum("ijab->ijab", x187) del x187 - x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x205 -= einsum("ijab,kicb->jkac", t2.bbbb, x186) del x186 x206 += einsum("ijab->jiba", x205) del x205 - x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x203 += einsum("ijab,ikca->jkbc", t2.bbbb, x185) - x204 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x204 -= einsum("ijab,kica->jkbc", t2.bbbb, x203) del x203 x206 += einsum("ijab->ijab", x204) del x204 - x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x223 += einsum("ijab,ikca->jkbc", x114, x185) del x185 del x114 x224 += einsum("ijab->jiba", x223) del x223 - x225 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x225 += einsum("ijab,jkbc->ikac", t2.abab, x224) del x224 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x225) rdm2_f_vovo_aabb += einsum("ijab->aibj", x225) del x225 - x192 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x192 += einsum("wai,ijab->wjb", lu11.aa, t2.abab) x195 += einsum("wia->wia", x192) del x192 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum("wia,wjb->ijab", u11.bb, x195) x199 += einsum("ijab->jiba", x196) del x196 @@ -5323,7 +5324,7 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vovo_bbbb -= einsum("ijab->ajbi", x199) rdm2_f_vovo_bbbb += einsum("ijab->bjai", x199) del x199 - x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x242 += einsum("wia,wjb->ijab", u11.aa, x195) del x195 rdm2_f_vovo_bbaa += einsum("ijab->bjai", x242) @@ -5343,62 +5344,62 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb x250 += einsum("ia->ia", t1.bb) * -0.9999999999999993 rdm2_f_vovo_aabb += einsum("ia,jb->aibj", t1.aa, x250) * -1 del x250 - x252 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x252 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x252 += einsum("ia,bcji->jbca", t1.aa, l2.aaaa) - x297 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x297 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x297 += einsum("ia,ibcd->cbda", t1.aa, x252) - x298 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x298 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x298 += einsum("abcd->badc", x297) del x297 - rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_aaaa = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_aaaa += einsum("iabc->iacb", x252) rdm2_f_ovvv_aaaa -= einsum("iabc->ibca", x252) - rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_aaaa -= einsum("iabc->caib", x252) rdm2_f_vvov_aaaa += einsum("iabc->cbia", x252) del x252 - x253 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x253 += einsum("ia,bcji->jbca", t1.bb, l2.bbbb) - x302 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x302 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x302 += einsum("ia,ibcd->cbda", t1.bb, x253) - x303 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x303 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x303 += einsum("abcd->badc", x302) del x302 - rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_bbbb = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_bbbb += einsum("iabc->iacb", x253) rdm2_f_ovvv_bbbb -= einsum("iabc->ibca", x253) - rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_bbbb -= einsum("iabc->caib", x253) rdm2_f_vvov_bbbb += einsum("iabc->cbia", x253) del x253 - x254 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x254 += einsum("ia,bcij->jbac", t1.aa, l2.abab) - rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_ovvv_bbaa = np.zeros((nocc[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_ovvv_bbaa += einsum("iabc->icba", x254) - rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_vvov_aabb = np.zeros((nvir[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_vvov_aabb += einsum("iabc->baic", x254) del x254 - x255 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x255 += einsum("ia,bcji->jbca", t1.bb, l2.abab) - x300 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x300 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x300 += einsum("ia,ibcd->bacd", t1.aa, x255) - rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_bbaa = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x300) - rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_aabb = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_aabb += einsum("abcd->badc", x300) del x300 - rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_ovvv_aabb = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_ovvv_aabb += einsum("iabc->iacb", x255) - rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_vvov_bbaa = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_vvov_bbaa += einsum("iabc->cbia", x255) del x255 - x256 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x256 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x256 += einsum("ai,jibc->jabc", l1.aa, t2.aaaa) x260 += einsum("iabc->iabc", x256) del x256 - x257 = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + x257 = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) x257 += einsum("ia,wbi->wba", t1.aa, lu11.aa) - x258 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x258 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x258 += einsum("wia,wbc->ibca", u11.aa, x257) x260 -= einsum("iabc->iabc", x258) del x258 @@ -5407,40 +5408,40 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_aaaa -= einsum("iabc->baci", x260) rdm2_f_vvvo_aaaa += einsum("iabc->cabi", x260) del x260 - x282 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x282 += einsum("wia,wbc->ibca", u11.bb, x257) del x257 rdm2_f_vovv_bbaa += einsum("iabc->ciba", x282) rdm2_f_vvvo_aabb += einsum("iabc->baci", x282) del x282 - x269 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x269 += einsum("ijab->jiab", t2.bbbb) x269 += einsum("ijab->jiba", t2.bbbb) * -1 - x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x270 += einsum("ijab,ikbc->jkac", x122, x269) del x122 del x269 x271 += einsum("ijab->ijab", x270) del x270 - x272 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x272 += einsum("ia,ijbc->jabc", t1.bb, x271) del x271 x274 += einsum("iabc->ibac", x272) * -1 del x272 - rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vovv_bbbb = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vovv_bbbb += einsum("iabc->bica", x274) rdm2_f_vovv_bbbb += einsum("iabc->ciba", x274) * -1 - rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_vvvo_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_vvvo_bbbb += einsum("iabc->baci", x274) * -1 rdm2_f_vvvo_bbbb += einsum("iabc->cabi", x274) del x274 - x275 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x275 += einsum("ai,jibc->jabc", l1.bb, t2.bbbb) x279 += einsum("iabc->iabc", x275) del x275 - x276 = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) x276 += einsum("ia,wbi->wba", t1.bb, lu11.bb) - x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x277 += einsum("wia,wbc->ibca", u11.bb, x276) x279 -= einsum("iabc->iabc", x277) del x277 @@ -5449,40 +5450,40 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_vvvo_bbbb -= einsum("iabc->baci", x279) rdm2_f_vvvo_bbbb += einsum("iabc->cabi", x279) del x279 - x289 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x289 += einsum("wia,wbc->iabc", u11.aa, x276) del x276 rdm2_f_vovv_aabb += einsum("iabc->aicb", x289) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x289) del x289 - x283 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x283 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x283 += einsum("ai,ijbc->jabc", l1.aa, t2.abab) rdm2_f_vovv_bbaa += einsum("iabc->ciba", x283) rdm2_f_vvvo_aabb += einsum("iabc->baci", x283) del x283 - x288 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x288 += einsum("ai,jibc->jbac", l1.bb, t2.abab) rdm2_f_vovv_aabb += einsum("iabc->aicb", x288) rdm2_f_vvvo_bbaa += einsum("iabc->cbai", x288) del x288 - x296 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x296 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x296 += einsum("abij,ijcd->abcd", l2.aaaa, t2.aaaa) x298 += einsum("abcd->badc", x296) del x296 - rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_vvvv_aaaa = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_vvvv_aaaa += einsum("abcd->dacb", x298) * -1 rdm2_f_vvvv_aaaa += einsum("abcd->cadb", x298) del x298 - x299 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x299 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x299 += einsum("abij,ijcd->acbd", l2.abab, t2.abab) rdm2_f_vvvv_bbaa += einsum("abcd->dcba", x299) rdm2_f_vvvv_aabb += einsum("abcd->badc", x299) del x299 - x301 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x301 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x301 += einsum("abij,ijcd->abcd", l2.bbbb, t2.bbbb) x303 += einsum("abcd->badc", x301) del x301 - rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_vvvv_bbbb = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_vvvv_bbbb += einsum("abcd->dacb", x303) * -1 rdm2_f_vvvv_bbbb += einsum("abcd->cadb", x303) del x303 @@ -5504,15 +5505,15 @@ def make_rdm2_f(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb rdm2_f_ovoo_bbbb += einsum("ij,ak->kaji", delta_oo.bb, l1.bb) rdm2_f_oovo_bbbb -= einsum("ij,ka->jkai", delta_oo.bb, t1.bb) rdm2_f_vooo_bbbb += einsum("ij,ka->akji", delta_oo.bb, t1.bb) - rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_aaaa = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_aaaa -= einsum("abij->jaib", l2.aaaa) rdm2_f_ovov_aaaa += einsum("abij->jbia", l2.aaaa) - rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_bbbb = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_bbbb -= einsum("abij->jaib", l2.bbbb) rdm2_f_ovov_bbbb += einsum("abij->jbia", l2.bbbb) - rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_ovov_bbaa = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_ovov_bbaa += einsum("abij->jbia", l2.abab) - rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_ovov_aabb = np.zeros((nocc[0], nvir[0], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_ovov_aabb += einsum("abij->iajb", l2.abab) rdm2_f_oovv_aaaa -= einsum("ai,jb->ijba", l1.aa, t1.aa) rdm2_f_oovv_bbbb -= einsum("ai,jb->ijba", l1.bb, t1.bb) @@ -5559,9 +5560,9 @@ def make_sing_b_dm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, ) # Single boson DM - dm_b_cre = np.zeros((nbos), dtype=np.float64) + dm_b_cre = np.zeros((nbos), dtype=types[float]) dm_b_cre += einsum("w->w", ls1) - dm_b_des = np.zeros((nbos), dtype=np.float64) + dm_b_des = np.zeros((nbos), dtype=types[float]) dm_b_des += einsum("w->w", s1) dm_b_des += einsum("ai,wia->w", l1.aa, u11.aa) dm_b_des += einsum("ai,wia->w", l1.bb, u11.bb) @@ -5588,7 +5589,7 @@ def make_rdm1_b(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=None, nb ) # Boson 1RDM - rdm1_b = np.zeros((nbos, nbos), dtype=np.float64) + rdm1_b = np.zeros((nbos, nbos), dtype=types[float]) rdm1_b += einsum("w,x->wx", ls1, s1) rdm1_b += einsum("wai,xia->wx", lu11.aa, u11.aa) rdm1_b += einsum("wai,xia->wx", lu11.bb, u11.bb) @@ -5622,97 +5623,97 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non delta_vv.bb = np.eye(nvir[1]) # Boson-fermion coupling RDM - x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x0 += einsum("ia,waj->wji", t1.aa, lu11.aa) - x48 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x48 += einsum("wia,wij->ja", u11.aa, x0) - rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_cre_oo_aa -= einsum("wij->wji", x0) - rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_cre_ov_aa -= einsum("ia,wij->wja", t1.aa, x0) del x0 - x1 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x1 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x1 += einsum("ia,waj->wji", t1.bb, lu11.bb) - x60 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x60 += einsum("wia,wij->ja", u11.bb, x1) - rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_cre_oo_bb -= einsum("wij->wji", x1) - rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_cre_ov_bb -= einsum("ia,wij->wja", t1.bb, x1) del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum("ijab->jiab", t2.aaaa) x2 -= einsum("ijab->jiba", t2.aaaa) rdm_eb_cre_ov_aa -= einsum("wai,ijab->wjb", lu11.aa, x2) - x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum("ijab->jiab", t2.bbbb) x3 -= einsum("ijab->jiba", t2.bbbb) rdm_eb_cre_ov_bb -= einsum("wai,ijab->wjb", lu11.bb, x3) - x4 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x4 += einsum("ai,wja->wij", l1.aa, u11.aa) - x40 = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) x40 += einsum("wij->wij", x4) - rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=np.float64) + rdm_eb_des_oo_aa = np.zeros((nbos, nocc[0], nocc[0]), dtype=types[float]) rdm_eb_des_oo_aa -= einsum("wij->wji", x4) del x4 - x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x5 += einsum("wia,baji->wjb", u11.bb, l2.abab) - x8 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x8 += einsum("wia->wia", x5) - x31 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x31 += einsum("wia->wia", x5) - rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_des_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_des_vo_aa += einsum("wia->wai", x5) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum("abij->jiab", l2.aaaa) x6 += einsum("abij->jiba", l2.aaaa) * -1 - x7 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x7 += einsum("wia,ijab->wjb", u11.aa, x6) x8 += einsum("wia->wia", x7) * -1 del x7 rdm_eb_des_oo_aa += einsum("ia,wja->wij", t1.aa, x8) * -1 - rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_des_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_des_vv_aa += einsum("ia,wib->wba", t1.aa, x8) del x8 - x37 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x37 += einsum("ijab,ijac->bc", t2.aaaa, x6) del x6 - x38 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x38 += einsum("ab->ba", x37) * -1 - x61 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x61 += einsum("ab->ba", x37) * -1 del x37 - x9 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x9 += einsum("ai,ja->ij", l1.aa, t1.aa) - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum("ij->ij", x9) - x39 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x39 += einsum("ij->ij", x9) - x47 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x47 += einsum("ij->ij", x9) del x9 - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum("wai,wja->ij", lu11.aa, u11.aa) x14 += einsum("ij->ij", x10) x39 += einsum("ij->ij", x10) x47 += einsum("ij->ij", x10) del x10 - x11 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x11 += einsum("abij,kjab->ik", l2.abab, t2.abab) x14 += einsum("ij->ij", x11) x39 += einsum("ij->ij", x11) x47 += einsum("ij->ij", x11) del x11 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum("ijab->jiab", t2.aaaa) * -1 x12 += einsum("ijab->jiba", t2.aaaa) - x13 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x13 += einsum("abij,ikba->jk", l2.aaaa, x12) x14 += einsum("ij->ij", x13) * -1 x39 += einsum("ij->ij", x13) * -1 del x13 - rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + rdm_eb_des_ov_aa = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) rdm_eb_des_ov_aa += einsum("ij,wia->wja", x39, u11.aa) * -1 del x39 x47 += einsum("abij,ikba->jk", l2.aaaa, x12) * -1 @@ -5723,81 +5724,81 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x14 += einsum("ij->ji", delta_oo.aa) * -1 rdm_eb_des_oo_aa += einsum("w,ij->wji", s1, x14) * -1 del x14 - x15 = np.zeros((nbos), dtype=np.float64) + x15 = np.zeros((nbos), dtype=types[float]) x15 += einsum("ai,wia->w", l1.aa, u11.aa) - x17 = np.zeros((nbos), dtype=np.float64) + x17 = np.zeros((nbos), dtype=types[float]) x17 += einsum("w->w", x15) del x15 - x16 = np.zeros((nbos), dtype=np.float64) + x16 = np.zeros((nbos), dtype=types[float]) x16 += einsum("ai,wia->w", l1.bb, u11.bb) x17 += einsum("w->w", x16) del x16 rdm_eb_des_oo_aa += einsum("w,ij->wji", x17, delta_oo.aa) - rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + rdm_eb_des_oo_bb = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) rdm_eb_des_oo_bb += einsum("w,ij->wji", x17, delta_oo.bb) rdm_eb_des_ov_aa += einsum("w,ia->wia", x17, t1.aa) - rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + rdm_eb_des_ov_bb = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) rdm_eb_des_ov_bb += einsum("w,ia->wia", x17, t1.bb) del x17 - x18 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x18 += einsum("ai,wja->wij", l1.bb, u11.bb) - x54 = np.zeros((nbos, nocc[1], nocc[1]), dtype=np.float64) + x54 = np.zeros((nbos, nocc[1], nocc[1]), dtype=types[float]) x54 += einsum("wij->wij", x18) rdm_eb_des_oo_bb -= einsum("wij->wji", x18) del x18 - x19 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x19 += einsum("wia,abij->wjb", u11.aa, l2.abab) - x22 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x22 += einsum("wia->wia", x19) - x34 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x34 += einsum("wia->wia", x19) - rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_des_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_des_vo_bb += einsum("wia->wai", x19) del x19 - x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum("abij->jiab", l2.bbbb) x20 += einsum("abij->jiba", l2.bbbb) * -1 - x21 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x21 += einsum("wia,ijab->wjb", u11.bb, x20) x22 += einsum("wia->wia", x21) * -1 del x21 rdm_eb_des_oo_bb += einsum("ia,wja->wij", t1.bb, x22) * -1 - rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_des_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_des_vv_bb += einsum("ia,wib->wba", t1.bb, x22) del x22 - x51 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x51 += einsum("ijab,ijcb->ac", t2.bbbb, x20) del x20 - x52 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x52 += einsum("ab->ba", x51) * -1 - x62 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x62 += einsum("ab->ba", x51) * -1 del x51 - x23 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x23 += einsum("ai,ja->ij", l1.bb, t1.bb) - x28 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x28 += einsum("ij->ij", x23) - x53 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x53 += einsum("ij->ij", x23) - x59 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x59 += einsum("ij->ij", x23) del x23 - x24 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x24 += einsum("wai,wja->ij", lu11.bb, u11.bb) x28 += einsum("ij->ij", x24) x53 += einsum("ij->ij", x24) x59 += einsum("ij->ij", x24) del x24 - x25 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x25 += einsum("abij,ikab->jk", l2.abab, t2.abab) x28 += einsum("ij->ij", x25) x53 += einsum("ij->ij", x25) x59 += einsum("ij->ij", x25) del x25 - x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x26 += einsum("ijab->jiab", t2.bbbb) x26 += einsum("ijab->jiba", t2.bbbb) * -1 - x27 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x27 += einsum("abij,ikab->jk", l2.bbbb, x26) x28 += einsum("ij->ij", x27) * -1 x53 += einsum("ij->ij", x27) * -1 @@ -5811,10 +5812,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x28 += einsum("ij->ji", delta_oo.bb) * -1 rdm_eb_des_oo_bb += einsum("w,ij->wji", s1, x28) * -1 del x28 - x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x29 += einsum("abij->jiab", l2.aaaa) x29 -= einsum("abij->jiba", l2.aaaa) - x30 = np.zeros((nbos, nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nbos, nocc[0], nvir[0]), dtype=types[float]) x30 += einsum("wia,ijab->wjb", u11.aa, x29) del x29 x31 -= einsum("wia->wia", x30) @@ -5827,10 +5828,10 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x31 rdm_eb_des_vo_aa -= einsum("wia->wai", x30) del x30 - x32 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x32 += einsum("abij->jiab", l2.bbbb) x32 -= einsum("abij->jiba", l2.bbbb) - x33 = np.zeros((nbos, nocc[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nbos, nocc[1], nvir[1]), dtype=types[float]) x33 += einsum("wia,ijab->wjb", u11.bb, x32) del x32 x34 -= einsum("wia->wia", x33) @@ -5843,37 +5844,37 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non del x3 rdm_eb_des_vo_bb -= einsum("wia->wai", x33) del x33 - x35 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x35 += einsum("wai,wib->ab", lu11.aa, u11.aa) x38 += einsum("ab->ab", x35) x61 += einsum("ab->ab", x35) del x35 - x36 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x36 += einsum("abij,ijcb->ac", l2.abab, t2.abab) x38 += einsum("ab->ab", x36) rdm_eb_des_ov_aa += einsum("ab,wia->wib", x38, u11.aa) * -1 del x38 x61 += einsum("ab->ab", x36) del x36 - x41 = np.zeros((nbos, nbos), dtype=np.float64) + x41 = np.zeros((nbos, nbos), dtype=types[float]) x41 += einsum("wai,xia->wx", lu11.aa, u11.aa) - x43 = np.zeros((nbos, nbos), dtype=np.float64) + x43 = np.zeros((nbos, nbos), dtype=types[float]) x43 += einsum("wx->wx", x41) del x41 - x42 = np.zeros((nbos, nbos), dtype=np.float64) + x42 = np.zeros((nbos, nbos), dtype=types[float]) x42 += einsum("wai,xia->wx", lu11.bb, u11.bb) x43 += einsum("wx->wx", x42) del x42 rdm_eb_des_ov_aa += einsum("wx,wia->xia", x43, u11.aa) rdm_eb_des_ov_bb += einsum("wx,wia->xia", x43, u11.bb) del x43 - x44 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x44 += einsum("ia,abjk->jikb", t1.aa, l2.abab) x48 += einsum("ijab,ikjb->ka", t2.abab, x44) del x44 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum("ia,bajk->jkib", t1.aa, l2.aaaa) - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum("ijka->ijka", x45) x46 += einsum("ijka->jika", x45) * -1 del x45 @@ -5884,31 +5885,31 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non x48 += einsum("ai,jiba->jb", l1.bb, t2.abab) * -1 rdm_eb_des_ov_aa += einsum("w,ia->wia", s1, x48) * -1 del x48 - x49 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x49 += einsum("wai,wib->ab", lu11.bb, u11.bb) x52 += einsum("ab->ab", x49) x62 += einsum("ab->ab", x49) del x49 - x50 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x50 += einsum("abij,ijac->bc", l2.abab, t2.abab) x52 += einsum("ab->ab", x50) rdm_eb_des_ov_bb += einsum("ab,wia->wib", x52, u11.bb) * -1 del x52 x62 += einsum("ab->ab", x50) del x50 - x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x55 += einsum("ia,bajk->jkib", t1.bb, l2.abab) x60 += einsum("ijab,ijka->kb", t2.abab, x55) del x55 - x56 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x56 += einsum("ia,bajk->jkib", t1.bb, l2.bbbb) - x57 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x57 += einsum("ijka->ijka", x56) x57 += einsum("ijka->jika", x56) * -1 del x56 x60 += einsum("ijab,ijkb->ka", t2.bbbb, x57) * -1 del x57 - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x58 += einsum("ijab->jiab", t2.bbbb) * -1 x58 += einsum("ijab->jiba", t2.bbbb) x60 += einsum("ai,ijab->jb", l1.bb, x58) * -1 @@ -5930,13 +5931,13 @@ def make_eb_coup_rdm(f=None, v=None, w=None, g=None, G=None, nocc=None, nvir=Non rdm_eb_cre_ov_aa += einsum("wai,jiba->wjb", lu11.bb, t2.abab) rdm_eb_cre_ov_bb += einsum("w,ia->wia", ls1, t1.bb) rdm_eb_cre_ov_bb += einsum("wai,ijab->wjb", lu11.aa, t2.abab) - rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=np.float64) + rdm_eb_cre_vo_aa = np.zeros((nbos, nvir[0], nocc[0]), dtype=types[float]) rdm_eb_cre_vo_aa += einsum("wai->wai", lu11.aa) - rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=np.float64) + rdm_eb_cre_vo_bb = np.zeros((nbos, nvir[1], nocc[1]), dtype=types[float]) rdm_eb_cre_vo_bb += einsum("wai->wai", lu11.bb) - rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=np.float64) + rdm_eb_cre_vv_aa = np.zeros((nbos, nvir[0], nvir[0]), dtype=types[float]) rdm_eb_cre_vv_aa += einsum("ia,wbi->wba", t1.aa, lu11.aa) - rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=np.float64) + rdm_eb_cre_vv_bb = np.zeros((nbos, nvir[1], nvir[1]), dtype=types[float]) rdm_eb_cre_vv_bb += einsum("ia,wbi->wba", t1.bb, lu11.bb) rdm_eb_des_ov_aa += einsum("wia->wia", u11.aa) rdm_eb_des_ov_bb += einsum("wia->wia", u11.bb) diff --git a/ebcc/codegen/UCCSDtp.py b/ebcc/codegen/UCCSDtp.py index df18b1fa..7ebbb59e 100644 --- a/ebcc/codegen/UCCSDtp.py +++ b/ebcc/codegen/UCCSDtp.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, t3=None, **kw e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 2), ()) * -1.0 - x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(f.bb.ov, (0, 1), (0, 1)) * 2.0 x1 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) * 2.0 x1 += einsum(t1.bb, (0, 1), x0, (0, 2, 3, 1), (2, 3)) * -1.0 del x0 e_cc += einsum(t1.bb, (0, 1), x1, (0, 1), ()) * 0.5 del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x3 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(f.aa.ov, (0, 1), (0, 1)) x3 += einsum(t1.aa, (0, 1), x2, (0, 2, 3, 1), (2, 3)) * -0.5 del x2 @@ -50,7 +51,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) sVb = space[1].active[space[1].correlated][space[1].virtual[space[1].correlated]] # T amplitudes - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb[np.ix_(sob,svb)] += einsum(f.bb.ov, (0, 1), (0, 1)) t1new_bb[np.ix_(sob,svb)] += einsum(f.bb.oo, (0, 1), t1.bb[np.ix_(sob,svb)], (1, 2), (0, 2)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(f.bb.vv, (0, 1), t1.bb[np.ix_(sob,svb)], (2, 1), (2, 0)) @@ -62,7 +63,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t1new_bb[np.ix_(sOb,sVb)] += einsum(v.aaaa.OVOV, (0, 1, 2, 3), t3.abaaba, (0, 4, 2, 1, 5, 3), (4, 5)) t1new_bb[np.ix_(sOb,sVb)] += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.babbab, (4, 0, 2, 5, 1, 3), (4, 5)) * 2.0 t1new_bb[np.ix_(sOb,sVb)] += einsum(v.bbbb.OVOV, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 2, 5, 1, 3), (4, 5)) * 3.0 - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa[np.ix_(soa,sva)] += einsum(f.aa.ov, (0, 1), (0, 1)) t1new_aa[np.ix_(soa,sva)] += einsum(f.aa.oo, (0, 1), t1.aa[np.ix_(soa,sva)], (1, 2), (0, 2)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(f.aa.vv, (0, 1), t1.aa[np.ix_(soa,sva)], (2, 1), (2, 0)) @@ -74,12 +75,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t1new_aa[np.ix_(sOa,sVa)] += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 0, 5, 3, 1), (4, 5)) * 2.0 t1new_aa[np.ix_(sOa,sVa)] += einsum(v.bbbb.OVOV, (0, 1, 2, 3), t3.babbab, (0, 4, 2, 1, 5, 3), (4, 5)) t1new_aa[np.ix_(sOa,sVa)] += einsum(v.aaaa.OVOV, (0, 1, 2, 3), t3.aaaaaa, (4, 0, 2, 5, 1, 3), (4, 5)) * 3.0 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(f.bb.OV, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(f.aa.OV, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(f.aa.oo, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(f.bb.oo, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 @@ -104,12 +105,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_abab[np.ix_(sOa,sob,sVa,sVb)] += einsum(v.bbbb.oOOV, (0, 1, 2, 3), t3.babbab, (1, 4, 2, 5, 6, 3), (4, 0, 6, 5)) * -2.0 t2new_abab[np.ix_(sOa,sOb,sVa,svb)] += einsum(v.bbbb.vVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 1, 6, 3), (5, 4, 6, 0)) * 2.0 t2new_abab[np.ix_(sOa,sOb,sva,sVb)] += einsum(v.aabb.vVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 1, 3), (5, 4, 0, 6)) * 2.0 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(f.aa.OV, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(f.bb.OV, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 - t3new_babbab = np.zeros((naocc[1], naocc[0], naocc[1], navir[1], navir[0], navir[1]), dtype=np.float64) + t3new_babbab = np.zeros((naocc[1], naocc[0], naocc[1], navir[1], navir[0], navir[1]), dtype=types[float]) t3new_babbab += einsum(f.aa.OO, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 t3new_babbab += einsum(f.aa.VV, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 t3new_babbab += einsum(v.bbbb.OOOO, (0, 1, 2, 3), t3.babbab, (3, 4, 1, 5, 6, 7), (0, 4, 2, 5, 6, 7)) * -2.0 @@ -117,7 +118,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(v.aaaa.OVOV, (0, 1, 2, 3), t3.babbab, (4, 2, 5, 6, 3, 7), (4, 0, 5, 6, 1, 7)) * 2.0 t3new_babbab += einsum(v.bbbb.VVVV, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 1, 7, 3), (4, 5, 6, 0, 7, 2)) * 2.0 t3new_babbab += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 7, 3), (4, 0, 5, 6, 1, 7)) * 6.0 - t3new_abaaba = np.zeros((naocc[0], naocc[1], naocc[0], navir[0], navir[1], navir[0]), dtype=np.float64) + t3new_abaaba = np.zeros((naocc[0], naocc[1], naocc[0], navir[0], navir[1], navir[0]), dtype=types[float]) t3new_abaaba += einsum(f.bb.OO, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 t3new_abaaba += einsum(f.bb.VV, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 t3new_abaaba += einsum(v.aaaa.OOOO, (0, 1, 2, 3), t3.abaaba, (1, 4, 3, 5, 6, 7), (0, 4, 2, 5, 6, 7)) * 2.0 @@ -125,268 +126,268 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(v.bbbb.OVOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 7), (4, 0, 5, 6, 1, 7)) * 2.0 t3new_abaaba += einsum(v.aaaa.VVVV, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 1, 7, 3), (4, 5, 6, 0, 7, 2)) * 2.0 t3new_abaaba += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 1), (4, 2, 5, 6, 3, 7)) * 6.0 - x0 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x0 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x0, (0, 1), (0, 1)) t1new_bb[np.ix_(sob,svb)] += einsum(x0, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 0, 3, 1), (2, 3)) * 2.0 t1new_aa[np.ix_(soa,sva)] += einsum(x0, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 0, 3, 1), (2, 3)) - x1 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovov, (2, 3, 0, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x1, (0, 1), (0, 1)) t1new_bb[np.ix_(sob,svb)] += einsum(x1, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 0, 3, 1), (2, 3)) * 2.0 t1new_aa[np.ix_(soa,sva)] += einsum(x1, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 0, 3, 1), (2, 3)) - x2 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x2 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ooov, (4, 1, 0, 3), (4, 2)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x2, (0, 1), (0, 1)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x2, (0, 1), (0, 1)) * -1.0 del x2 - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovvv, (1, 3, 4, 2), (0, 4)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x3, (0, 1), (0, 1)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x3, (0, 1), (0, 1)) * -1.0 del x3 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum(f.bb.ov, (0, 1), t1.bb[np.ix_(sob,svb)], (2, 1), (0, 2)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x4, (0, 2), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x4, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - x5 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x5 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x5, (2, 1), (0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x5, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x6 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x6 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x6, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x6, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 - x7 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x7 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ooov, (2, 0, 3, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x7, (2, 0), (2, 1)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x7, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) - x8 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x8 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x8 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ooov, (2, 3, 0, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x8, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x8, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 - x9 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvv, (0, 2, 3, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x9, (1, 2), (0, 2)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x9, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 - x10 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x10 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x10, (2, 1), (0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x10, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x11 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovov, (2, 3, 0, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x11, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (0, 2, 1, 3), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(x11, (0, 1), (0, 1)) t1new_aa[np.ix_(soa,sva)] += einsum(x11, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 0, 3, 1), (2, 3)) * 2.0 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovov, (2, 1, 0, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x12, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (0, 2, 1, 3), (2, 3)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x12, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 0, 3, 1), (2, 3)) * -2.0 - x13 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x13 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.ovov, (2, 3, 4, 1), (2, 0, 4, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x13, (0, 4, 1, 2), (4, 3)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x13, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x14, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x14, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 - x15 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x15, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (0, 2, 1, 3), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(x15, (0, 1), (0, 1)) t1new_aa[np.ix_(soa,sva)] += einsum(x15, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 0, 3, 1), (2, 3)) * 2.0 - x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x17 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x17 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x16, (4, 0, 1, 3), (4, 2)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x17, (0, 1), (0, 1)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x17, (0, 1), (0, 1)) * -1.0 del x17 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x19 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x19 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x18, (2, 0), (2, 1)) t1new_bb[np.ix_(sob,svb)] += einsum(x19, (0, 1), (0, 1)) * -1.0 t1new_bb[np.ix_(sob,svb)] += einsum(x19, (0, 1), (0, 1)) * -1.0 del x19 - x20 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x20 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovov, (2, 1, 0, 3), (2, 3)) t1new_bb[np.ix_(sob,svb)] += einsum(x20, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 0, 3, 1), (2, 3)) * -2.0 t1new_aa[np.ix_(soa,sva)] += einsum(x20, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 0, 3, 1), (2, 3)) * -1.0 - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x0, (2, 1), (0, 2)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x21, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x21, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 - x22 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x22 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x20, (2, 1), (0, 2)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x22, (2, 0), (2, 1)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x22, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) - x23 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x23 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x1, (2, 1), (0, 2)) t1new_bb[np.ix_(sob,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x23, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x23, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 - x24 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ooov, (4, 0, 1, 3), (4, 2)) t1new_aa[np.ix_(soa,sva)] += einsum(x24, (0, 1), (0, 1)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x24, (0, 1), (0, 1)) * -1.0 del x24 - x25 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovvv, (1, 2, 4, 3), (0, 4)) t1new_aa[np.ix_(soa,sva)] += einsum(x25, (0, 1), (0, 1)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x25, (0, 1), (0, 1)) * -1.0 del x25 - x26 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x26 += einsum(f.aa.ov, (0, 1), t1.aa[np.ix_(soa,sva)], (2, 1), (0, 2)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x26, (0, 2), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x26, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ooov, (2, 0, 3, 1), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x27, (2, 0), (2, 1)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x27, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) - x28 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x28 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ooov, (2, 3, 0, 1), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x28, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x28, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 - x29 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x29 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvv, (0, 2, 3, 1), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x29, (1, 2), (0, 2)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x29, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 - x30 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x30 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvv, (0, 1, 2, 3), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x30, (2, 1), (0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x30, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 3, 0, 4)) - x31 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x31, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x31, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 - x32 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x32, (2, 1), (0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x32, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 3, 0, 4)) - x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x33 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovov, (2, 1, 3, 4), (0, 2, 3, 4)) t1new_aa[np.ix_(soa,sva)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x33, (4, 0, 1, 3), (4, 2)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x33, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 - x34 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x34, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x34, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x35 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x36 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x36 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x35, (4, 0, 1, 3), (4, 2)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x36, (0, 1), (0, 1)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x36, (0, 1), (0, 1)) * -1.0 del x36 - x37 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x37 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 1, 3), (0, 4)) - x38 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x38 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x37, (2, 0), (2, 1)) t1new_aa[np.ix_(soa,sva)] += einsum(x38, (0, 1), (0, 1)) * -1.0 t1new_aa[np.ix_(soa,sva)] += einsum(x38, (0, 1), (0, 1)) * -1.0 del x38 - x39 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x39 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x12, (2, 1), (0, 2)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x39, (2, 0), (2, 1)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x39, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) - x40 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x11, (2, 1), (0, 2)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x40, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x40, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 - x41 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x15, (2, 1), (0, 2)) t1new_aa[np.ix_(soa,sva)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x41, (2, 0), (2, 1)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x41, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(f.aa.oo, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (0, 2, 3, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x42, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x42, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x42 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(f.aa.vv, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x43 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x44, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x44, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x44 - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x45, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x45, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x45, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x45, (4, 0, 2, 5), (4, 1, 5, 3)) - x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x46, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x46, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x46, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.oooo, (4, 1, 5, 0), (4, 5, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) del x47 - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x48, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x48 - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x49, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x49, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x49, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x50, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x50, (0, 1, 2, 3), (1, 0, 3, 2)) del x50 - x51 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x51 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x51 += einsum(v.aabb.oOOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 1, 5, 3, 6), (4, 5, 6, 0)) t2new_aaaa[np.ix_(soa,sOa,sVa,sVa)] += einsum(x51, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 t2new_aaaa[np.ix_(sOa,soa,sVa,sVa)] += einsum(x51, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 del x51 - x52 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=types[float]) x52 += einsum(v.aabb.vVOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 6, 0)) t2new_aaaa[np.ix_(sOa,sOa,sva,sVa)] += einsum(x52, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sva)] += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x52 - x53 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x53 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x53 += einsum(v.aaaa.oOOV, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 1, 5, 6, 3), (4, 5, 6, 0)) t2new_aaaa[np.ix_(soa,sOa,sVa,sVa)] += einsum(x53, (0, 1, 2, 3), (3, 0, 2, 1)) * 6.0 t2new_aaaa[np.ix_(sOa,soa,sVa,sVa)] += einsum(x53, (0, 1, 2, 3), (0, 3, 2, 1)) * -6.0 del x53 - x54 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=types[float]) x54 += einsum(v.aaaa.vVOV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 3, 1), (4, 5, 6, 0)) t2new_aaaa[np.ix_(sOa,sOa,sva,sVa)] += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) * 6.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sva)] += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * -6.0 del x54 - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(x26, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 0, 3, 4), (1, 2, 3, 4)) del x26 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x55, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x55 - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(f.aa.ov, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (0, 2, 3, 4)) - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x56, (0, 2, 3, 4), (2, 3, 1, 4)) del x56 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x57 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x58, (2, 3, 0, 4), (2, 3, 1, 4)) del x58 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -394,32 +395,32 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x59, (0, 1, 2, 3), (1, 0, 3, 2)) del x59 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x60, (2, 0, 3, 4), (2, 3, 1, 4)) del x60 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x61, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x61 - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x35, (2, 3, 0, 4), (2, 3, 1, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x62, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x62, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x62, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x62, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x62 - x63 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x63, (2, 3, 1, 4), (0, 2, 3, 4)) del x63 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x64, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x64 - x65 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x65 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x65, (2, 3, 0, 4), (2, 3, 1, 4)) del x65 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -427,11 +428,11 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x66, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x66, (0, 1, 2, 3), (1, 0, 3, 2)) del x66 - x67 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x67 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.vvov, (2, 1, 3, 4), (0, 3, 2, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x67, (4, 1, 5, 3), (4, 0, 5, 2)) * 2.0 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x67, (4, 1, 5, 3), (4, 0, 2, 5)) del x67 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x68, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -439,18 +440,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x68, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x68, (0, 1, 2, 3), (1, 0, 2, 3)) del x68 - x69 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x69 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x69, (4, 5, 0, 1), (4, 5, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x70, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x70, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x70, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x70, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x70 - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x71 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x71, (2, 3, 0, 4), (2, 3, 1, 4)) del x71 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -458,9 +459,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x72, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x72, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x72 - x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x73, (2, 3, 0, 4), (2, 3, 1, 4)) del x73 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x74, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -468,22 +469,22 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x74, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x74, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x74 - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(x27, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (2, 0, 3, 4)) del x27 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x75, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x75 - x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x76 += einsum(x28, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (2, 0, 3, 4)) del x28 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x76, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x76 - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x77, (4, 0, 5, 2), (4, 1, 5, 3)) * -1.0 - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x77, (4, 1, 5, 3), (4, 0, 2, 5)) del x77 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -491,16 +492,16 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x78, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x78, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x78 - x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x45, (4, 1, 3, 5), (4, 0, 2, 5)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x79, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x79, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x79, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x79 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x80, (2, 3, 0, 4), (2, 3, 1, 4)) del x80 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -508,133 +509,133 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x81, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x81, (0, 1, 2, 3), (0, 1, 3, 2)) del x81 - x82 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x82 += einsum(x30, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 4, 0)) del x30 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x82, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x82, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x82 - x83 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x83 += einsum(x29, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 0), (2, 3, 4, 1)) del x29 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x83, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x83, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x83 - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum(x31, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (2, 0, 3, 4)) del x31 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x84, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x84, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x84 - x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(x32, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 4, 0)) del x32 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x85, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x85 - x86 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x86 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x86 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.vOOV, (1, 2, 3, 4), (2, 3, 4, 0)) t2new_abab[np.ix_(soa,sOb,sVa,sVb)] += einsum(x86, (0, 1, 2, 3), t3.babbab, (4, 0, 1, 5, 6, 2), (3, 4, 6, 5)) * -2.0 - x87 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x87 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x87 += einsum(x86, (0, 1, 2, 3), t3.abaaba, (4, 1, 0, 5, 2, 6), (4, 5, 6, 3)) del x86 t2new_aaaa[np.ix_(soa,sOa,sVa,sVa)] += einsum(x87, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 t2new_aaaa[np.ix_(sOa,soa,sVa,sVa)] += einsum(x87, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 del x87 - x88 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x88 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x88 += einsum(v.aabb.oVOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 1), (4, 5, 6, 0)) - x89 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=types[float]) x89 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x88, (2, 3, 4, 0), (3, 2, 4, 1)) * -1.0 del x88 t2new_aaaa[np.ix_(sOa,sOa,sva,sVa)] += einsum(x89, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sva)] += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x89 - x90 = np.zeros((naocc[1], navir[1]), dtype=np.float64) + x90 = np.zeros((naocc[1], navir[1]), dtype=types[float]) x90 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovOV, (0, 1, 2, 3), (2, 3)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x90, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x90, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 1), (3, 2, 5, 4)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x90, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 del x90 - x91 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x91 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.vOOV, (1, 2, 3, 4), (3, 2, 4, 0)) t2new_abab[np.ix_(soa,sOb,sVa,sVb)] += einsum(x91, (0, 1, 2, 3), t3.abaaba, (1, 4, 0, 5, 6, 2), (3, 4, 5, 6)) * -1.0 - x92 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x92 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x92 += einsum(x91, (0, 1, 2, 3), t3.aaaaaa, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) * -1.0 del x91 t2new_aaaa[np.ix_(soa,sOa,sVa,sVa)] += einsum(x92, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 t2new_aaaa[np.ix_(sOa,soa,sVa,sVa)] += einsum(x92, (0, 1, 2, 3), (0, 3, 2, 1)) * -3.0 del x92 - x93 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x93 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x93 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.vOOV, (1, 2, 3, 4), (3, 2, 4, 0)) t2new_abab[np.ix_(soa,sOb,sVa,sVb)] += einsum(x93, (0, 1, 2, 3), t3.abaaba, (1, 4, 0, 5, 6, 2), (3, 4, 5, 6)) * -1.0 - x94 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x94 = np.zeros((naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x94 += einsum(x93, (0, 1, 2, 3), t3.aaaaaa, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) * -1.0 del x93 t2new_aaaa[np.ix_(soa,sOa,sVa,sVa)] += einsum(x94, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 t2new_aaaa[np.ix_(sOa,soa,sVa,sVa)] += einsum(x94, (0, 1, 2, 3), (0, 3, 2, 1)) * -3.0 del x94 - x95 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x95 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x95 += einsum(v.aaaa.oVOV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 3, 1), (4, 5, 6, 0)) - x96 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((naocc[0], naocc[0], navir[0], nvir[0]), dtype=types[float]) x96 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x95, (2, 3, 4, 0), (3, 2, 4, 1)) * -1.0 del x95 t2new_aaaa[np.ix_(sOa,sOa,sva,sVa)] += einsum(x96, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 t2new_aaaa[np.ix_(sOa,sOa,sVa,sva)] += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) * 6.0 del x96 - x97 = np.zeros((naocc[0], navir[0]), dtype=np.float64) + x97 = np.zeros((naocc[0], navir[0]), dtype=types[float]) x97 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovOV, (0, 1, 2, 3), (2, 3)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x97, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x97, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x97, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 del x97 - x98 = np.zeros((naocc[0], navir[0]), dtype=np.float64) + x98 = np.zeros((naocc[0], navir[0]), dtype=types[float]) x98 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.oVvO, (0, 2, 1, 3), (3, 2)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x98, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * -6.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x98, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * -2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x98, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * -2.0 del x98 - x99 = np.zeros((naocc[1], navir[1]), dtype=np.float64) + x99 = np.zeros((naocc[1], navir[1]), dtype=types[float]) x99 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovOV, (0, 1, 2, 3), (2, 3)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x99, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x99, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 1), (3, 2, 5, 4)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x99, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 del x99 - x100 = np.zeros((naocc[1], navir[1]), dtype=np.float64) + x100 = np.zeros((naocc[1], navir[1]), dtype=types[float]) x100 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.oVvO, (0, 2, 1, 3), (3, 2)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x100, (0, 1), t3.abaaba, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * -2.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x100, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 1), (3, 2, 5, 4)) * -2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x100, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * -6.0 del x100 - x101 = np.zeros((naocc[0], navir[0]), dtype=np.float64) + x101 = np.zeros((naocc[0], navir[0]), dtype=types[float]) x101 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.OVov, (2, 3, 0, 1), (2, 3)) t2new_aaaa[np.ix_(sOa,sOa,sVa,sVa)] += einsum(x101, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 6.0 t2new_abab[np.ix_(sOa,sOb,sVa,sVb)] += einsum(x101, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 1), (2, 3, 4, 5)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,sVb)] += einsum(x101, (0, 1), t3.babbab, (2, 0, 3, 4, 1, 5), (2, 3, 4, 5)) * 2.0 del x101 - x102 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x102 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) - x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x103 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x102, (4, 1, 5, 3), (4, 0, 5, 2)) del x102 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x103, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x103 - x104 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x104 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x105 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x104, (4, 1, 5, 3), (4, 0, 5, 2)) del x104 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x105, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x105, (0, 1, 2, 3), (0, 1, 3, 2)) del x105 - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(x34, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (2, 0, 3, 4)) del x34 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x106, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x106, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x106 - x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x46, (4, 1, 5, 3), (0, 4, 2, 5)) del x46 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x107, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 @@ -642,56 +643,56 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x107, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x107, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x107 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x108, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 3, 0, 4)) * -1.0 - x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(x108, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 4, 0)) del x108 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x109, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x109, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x109 - x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x49, (4, 1, 5, 3), (4, 0, 5, 2)) del x49 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x110, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x110, (0, 1, 2, 3), (0, 1, 3, 2)) * -4.0 del x110 - x111 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x111 += einsum(x37, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (2, 0, 3, 4)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x111, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x111, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x111, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x111, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x111 - x112 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x112 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) - x113 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x113 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x112, (4, 1, 5, 3), (4, 0, 5, 2)) del x112 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x113, (0, 1, 2, 3), (0, 1, 2, 3)) * -4.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x113, (0, 1, 2, 3), (0, 1, 3, 2)) * 4.0 del x113 - x114 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x114 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x115 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x115 += einsum(x114, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 4, 0)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x115, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x115, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x115 - x116 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x116 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 - x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x116, (4, 5, 0, 1), (5, 4, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x117, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x117, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x117 - x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x69, (2, 3, 4, 0), (2, 4, 3, 1)) del x69 - x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x118, (2, 0, 3, 4), (2, 3, 1, 4)) del x118 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x119, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -699,10 +700,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x119, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x119, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x119 - x120 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x120 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x45, (2, 3, 1, 4), (0, 2, 3, 4)) del x45 - x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x120, (2, 3, 0, 4), (2, 3, 1, 4)) del x120 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x121, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -710,9 +711,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x121, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x121 - x122 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x122 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x33, (4, 5, 1, 3), (4, 0, 5, 2)) - x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x123 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x122, (2, 3, 0, 4), (2, 3, 1, 4)) del x122 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -720,16 +721,16 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x123, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x123, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x123 - x124 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x124 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x35, (2, 3, 4, 1), (2, 0, 4, 3)) - x125 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x125 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x124, (4, 5, 0, 1), (5, 4, 2, 3)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x125, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x125, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x125 - x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x126 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x35, (4, 1, 5, 3), (4, 0, 5, 2)) - x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x127 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x126, (2, 3, 0, 4), (2, 3, 1, 4)) del x126 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x127, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -737,9 +738,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x127, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x127, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x127 - x128 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x128 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x35, (4, 5, 1, 3), (4, 0, 5, 2)) - x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x129 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x128, (2, 3, 0, 4), (2, 3, 1, 4)) del x128 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x129, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -747,201 +748,201 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x129, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x129 - x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x130 += einsum(x39, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (0, 2, 3, 4)) del x39 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x130, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x130, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x130 - x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum(x40, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (0, 2, 3, 4)) del x40 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x131, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x131, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x131 - x132 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x132 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x116, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x116 - x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x133 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x132, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x132 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x133, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x133, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x133 - x134 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x134 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x134 += einsum(x11, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 0, 4)) - x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x135 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x134, (2, 3, 0, 4), (2, 3, 1, 4)) del x134 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x135, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x135, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x135 - x136 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x136 += einsum(x12, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 0, 4)) - x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x137 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x137 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x136, (2, 3, 0, 4), (2, 3, 1, 4)) del x136 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x137, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x137, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x137 - x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum(x41, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 1, 3, 4), (0, 2, 3, 4)) del x41 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x138, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x138, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x138 - x139 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x139 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x139 += einsum(x15, (0, 1), t2.aaaa[np.ix_(soa,soa,sva,sva)], (2, 3, 4, 1), (2, 3, 0, 4)) - x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x140 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x140 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x139, (2, 3, 0, 4), (2, 3, 1, 4)) del x139 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x140, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x140, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x140 - x141 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x141 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x141 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x124, (2, 3, 0, 4), (3, 2, 4, 1)) del x124 - x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x142 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x142 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x141, (2, 3, 0, 4), (2, 3, 1, 4)) del x141 t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x142, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa[np.ix_(soa,soa,sva,sva)] += einsum(x142, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x142 - x143 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x143 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (2, 0, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x143, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x143, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 - x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x144 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 0, 2), (4, 1, 5, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x144, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x144, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 - x145 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x145 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x145, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x145, (1, 4, 3, 5), (0, 4, 2, 5)) * 4.0 - x146 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x146 += einsum(f.aa.ov, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x146, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x146 - x147 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x147 += einsum(f.bb.ov, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 0, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x147, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x147 - x148 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.oovv, (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x148, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x148 - x149 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x149 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x149, (2, 0, 3, 4), (2, 3, 1, 4)) del x149 - x150 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x150 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x150, (2, 3, 1, 4), (0, 2, 3, 4)) del x150 - x151 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x151 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x151 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (0, 3, 4, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x151, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x151 - x152 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x152 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aaaa.ooov, (4, 5, 0, 2), (4, 5, 1, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x152, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x152 - x153 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aaaa.ooov, (4, 0, 5, 2), (4, 5, 1, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x153, (2, 0, 3, 4), (2, 3, 1, 4)) del x153 - x154 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x154 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x154 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x154, (4, 0, 5, 1), (4, 5, 2, 3)) - x155 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x155 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x155, (4, 0, 5, 3), (4, 1, 2, 5)) * -1.0 del x155 - x156 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovoo, (4, 2, 5, 1), (0, 4, 5, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x156, (2, 0, 3, 4), (2, 3, 1, 4)) del x156 - x157 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x157 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovvv, (4, 2, 5, 3), (0, 4, 1, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x157, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x157 - x158 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x158 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (4, 5, 0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x158, (2, 0, 3, 4), (2, 3, 1, 4)) * -2.0 del x158 - x159 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x159 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.ooov, (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x159, (4, 0, 5, 1), (4, 5, 2, 3)) - x160 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x160 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x160, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x160 - x161 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x161 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.bbbb.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x161, (2, 3, 0, 4), (2, 3, 4, 1)) del x161 - x162 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x162 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ooov, (4, 0, 5, 3), (4, 1, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x162, (2, 3, 0, 4), (2, 3, 4, 1)) del x162 - x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x163 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvv, (2, 1, 3, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x163, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x164, (4, 1, 3, 5), (0, 4, 2, 5)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x164, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x164, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x164, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x164, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x165 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x165 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x165, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 - x166 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x166 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.vvov, (4, 2, 5, 3), (0, 1, 5, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x166, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x166 - x167 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x167 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), v.aabb.ovoo, (1, 3, 4, 5), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x167, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x167 - x168 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x168 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x168 += einsum(v.aaaa.oVOV, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 3, 6, 1), (4, 5, 6, 0)) t2new_abab[np.ix_(sOa,sOb,sva,sVb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x168, (2, 3, 4, 0), (2, 3, 1, 4)) * 2.0 del x168 - x169 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x169 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x169 += einsum(v.aabb.oVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 1, 3), (5, 4, 6, 0)) t2new_abab[np.ix_(sOa,sOb,sva,sVb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x169, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x169 - x170 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x170 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x170 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.OVvO, (2, 3, 1, 4), (2, 4, 3, 0)) t2new_abab[np.ix_(sOa,sob,sVa,sVb)] += einsum(x170, (0, 1, 2, 3), t3.abaaba, (4, 1, 0, 5, 6, 2), (4, 3, 5, 6)) * -2.0 - x171 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x171 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x171 += einsum(v.aabb.OVoV, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 3, 1), (4, 5, 6, 2)) t2new_abab[np.ix_(sOa,sOb,sVa,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x171, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x171 - x172 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x172 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x172 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.vOOV, (1, 2, 3, 4), (3, 2, 4, 0)) t2new_abab[np.ix_(sOa,sob,sVa,sVb)] += einsum(x172, (0, 1, 2, 3), t3.babbab, (1, 4, 0, 5, 6, 2), (4, 3, 6, 5)) * -1.0 - x173 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x173 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x173 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.vOOV, (1, 2, 3, 4), (3, 2, 4, 0)) t2new_abab[np.ix_(sOa,sob,sVa,sVb)] += einsum(x173, (0, 1, 2, 3), t3.babbab, (0, 4, 1, 5, 6, 2), (4, 3, 6, 5)) - x174 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x174 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x174 += einsum(v.bbbb.oVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 1, 6, 3), (5, 4, 6, 0)) * -1.0 t2new_abab[np.ix_(sOa,sOb,sVa,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x174, (2, 3, 4, 0), (2, 3, 4, 1)) * 2.0 del x174 - x175 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x175 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (0, 4, 1, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x175, (4, 0, 5, 1), (4, 5, 2, 3)) - x176 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x176 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x176, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 - x177 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 5, 2, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x177, (4, 1, 5, 2), (0, 4, 5, 3)) del x177 - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x178, (4, 1, 5, 3), (0, 4, 2, 5)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x178, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -949,204 +950,204 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x178, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x178, (0, 1, 2, 3), (1, 0, 3, 2)) del x178 - x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x179 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x179, (4, 1, 5, 3), (0, 4, 2, 5)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x179, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x179, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x179, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x179, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 - x180 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x180 += einsum(x18, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x180, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x180, (0, 1, 2, 3), (0, 1, 2, 3)) del x180 - x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 5), (0, 4, 2, 5)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x181, (4, 1, 5, 3), (0, 4, 2, 5)) * -2.0 - x182 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x182 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x183 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x183 += einsum(x182, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x183, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x183, (0, 1, 2, 3), (0, 1, 2, 3)) del x183 - x184 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x184 += einsum(x114, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 3, 0, 4)) * -1.0 del x114 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x184, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x184, (0, 1, 2, 3), (0, 1, 2, 3)) del x184 - x185 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x185 += einsum(x37, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (1, 2, 3, 4), (0, 2, 3, 4)) * -1.0 del x37 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x185, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(x185, (0, 1, 2, 3), (0, 1, 2, 3)) del x185 - x186 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x186 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 0, 5), (4, 1, 5, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x186, (1, 4, 3, 5), (0, 4, 2, 5)) * -2.0 - x187 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x143, (2, 3, 1, 4), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x187, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x187 - x188 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x154, (2, 3, 4, 0), (2, 3, 4, 1)) del x154 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x188, (2, 0, 3, 4), (2, 3, 1, 4)) del x188 - x189 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x159, (2, 3, 4, 0), (3, 2, 4, 1)) del x159 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x189, (0, 2, 3, 4), (2, 3, 1, 4)) del x189 - x190 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x190 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x165, (2, 3, 4, 1), (0, 2, 3, 4)) del x165 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x190, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x190 - x191 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x191 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x35, (4, 0, 5, 2), (4, 5, 1, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x191, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x191 - x192 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x192 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x35, (4, 5, 0, 2), (4, 5, 1, 3)) del x35 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x192, (2, 0, 3, 4), (2, 3, 1, 4)) del x192 - x193 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum(x11, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 0, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x193, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x193 - x194 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x194 += einsum(x12, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 0, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x194, (2, 0, 3, 4), (2, 3, 1, 4)) del x194 - x195 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x195 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x33, (4, 5, 1, 3), (4, 5, 0, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x195, (2, 0, 3, 4), (2, 3, 1, 4)) * -2.0 del x195 - x196 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x196 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x13, (2, 3, 4, 1), (0, 2, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x196, (4, 0, 5, 1), (4, 5, 2, 3)) - x197 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x197 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x33, (4, 0, 5, 3), (4, 1, 5, 2)) del x33 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x197, (2, 3, 0, 4), (2, 3, 4, 1)) del x197 - x198 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x198 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x198 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x13, (4, 5, 1, 2), (0, 4, 5, 3)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x198, (2, 0, 3, 4), (2, 3, 1, 4)) del x198 - x199 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x199 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x175, (2, 3, 4, 0), (2, 3, 4, 1)) del x175 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x199, (2, 0, 3, 4), (2, 3, 1, 4)) del x199 - x200 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x200 += einsum(x15, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 1, 4), (2, 0, 3, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x200, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 del x200 - x201 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x201 += einsum(x0, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x201, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x201 - x202 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x202 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x16, (4, 1, 5, 3), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x202, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x202 - x203 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x203 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x16, (4, 5, 1, 3), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x203, (2, 3, 0, 4), (2, 3, 4, 1)) del x203 - x204 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x204 += einsum(x1, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x204, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x204 - x205 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x205 += einsum(x20, (0, 1), t2.abab[np.ix_(soa,sob,sva,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x205, (2, 3, 0, 4), (2, 3, 4, 1)) del x205 - x206 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x206 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sva)], (0, 1, 2, 3), x13, (1, 4, 5, 3), (0, 4, 5, 2)) t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x206, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x206 - x207 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x207 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x196, (2, 3, 4, 0), (2, 3, 4, 1)) del x196 t2new_abab[np.ix_(soa,sob,sva,svb)] += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), x207, (2, 0, 3, 4), (2, 3, 1, 4)) del x207 - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(f.bb.oo, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (0, 2, 3, 4)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x208, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x208, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x208 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum(f.bb.vv, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x209, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x209, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x209 - x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x210 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x210, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x210, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x210, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x210, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x210 - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.oooo, (4, 0, 5, 1), (4, 5, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x211, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x211, (0, 1, 2, 3), (1, 0, 3, 2)) del x211 - x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x212 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.oovv, (4, 1, 5, 3), (0, 4, 2, 5)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x212, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x212, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x212, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x212, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x212 - x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x213 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x213 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x213, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x213, (0, 1, 2, 3), (1, 0, 3, 2)) del x213 - x214 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x214 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x214 += einsum(v.aabb.OVoO, (0, 1, 2, 3), t3.babbab, (4, 0, 3, 5, 1, 6), (4, 5, 6, 2)) t2new_bbbb[np.ix_(sob,sOb,sVb,sVb)] += einsum(x214, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 t2new_bbbb[np.ix_(sOb,sob,sVb,sVb)] += einsum(x214, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 del x214 - x215 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=types[float]) x215 += einsum(v.aabb.OVvV, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 6, 2)) t2new_bbbb[np.ix_(sOb,sOb,svb,sVb)] += einsum(x215, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,svb)] += einsum(x215, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x215 - x216 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x216 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x216 += einsum(v.bbbb.oOOV, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 2, 5, 6, 3), (4, 5, 6, 0)) * -1.0 t2new_bbbb[np.ix_(sob,sOb,sVb,sVb)] += einsum(x216, (0, 1, 2, 3), (3, 0, 2, 1)) * 6.0 t2new_bbbb[np.ix_(sOb,sob,sVb,sVb)] += einsum(x216, (0, 1, 2, 3), (0, 3, 2, 1)) * -6.0 del x216 - x217 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=types[float]) x217 += einsum(v.bbbb.vVOV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 1, 3), (4, 5, 6, 0)) * -1.0 t2new_bbbb[np.ix_(sOb,sOb,svb,sVb)] += einsum(x217, (0, 1, 2, 3), (0, 1, 3, 2)) * 6.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,svb)] += einsum(x217, (0, 1, 2, 3), (0, 1, 2, 3)) * -6.0 del x217 - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum(x4, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 0, 3, 4), (1, 2, 3, 4)) del x4 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x218, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x218, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x218 - x219 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x219 += einsum(f.bb.ov, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (0, 2, 3, 4)) - x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x220 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x219, (0, 2, 3, 4), (2, 3, 1, 4)) del x219 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x220, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x220, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x220 - x221 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x221 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.oovv, (2, 3, 4, 1), (0, 2, 3, 4)) - x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x222 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x221, (2, 3, 0, 4), (2, 3, 1, 4)) del x221 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x222, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1154,42 +1155,42 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x222, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x222, (0, 1, 2, 3), (1, 0, 3, 2)) del x222 - x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x223 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.oooo, (2, 3, 4, 0), (2, 3, 4, 1)) - x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x224 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x223, (2, 0, 3, 4), (2, 3, 1, 4)) del x223 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x224, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x224, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x224 - x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x225 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x16, (2, 3, 0, 4), (2, 3, 1, 4)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x225, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x225, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x225, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x225, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x225 - x226 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x226 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x226, (2, 3, 1, 4), (0, 2, 3, 4)) del x226 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x227, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x227, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x227 - x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x228 += einsum(x6, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) del x6 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x228, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x228, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x228 - x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x229 += einsum(x5, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) del x5 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x229, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x229, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x229 - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x143, (0, 4, 2, 5), (4, 1, 3, 5)) del x143 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x230, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -1197,9 +1198,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x230, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x230, (0, 1, 2, 3), (1, 0, 2, 3)) del x230 - x231 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x231 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x231, (2, 3, 0, 4), (2, 3, 1, 4)) del x231 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x232, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1207,18 +1208,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x232, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x232, (0, 1, 2, 3), (1, 0, 3, 2)) del x232 - x233 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x233 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x234 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x233, (4, 5, 0, 1), (4, 5, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x234, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x234, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x234, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x234, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x234 - x235 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x235 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x236 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x235, (2, 3, 0, 4), (2, 3, 1, 4)) del x235 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x236, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -1226,9 +1227,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x236, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x236, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x236 - x237 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x237 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ooov, (4, 1, 5, 3), (0, 4, 5, 2)) - x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x238 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x237, (2, 3, 0, 4), (2, 3, 1, 4)) del x237 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x238, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -1236,19 +1237,19 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x238, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x238, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x238 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum(x7, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) del x7 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x239, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x239, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x239 - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum(x8, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) del x8 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x240, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x240, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x240 - x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x241 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x163, (4, 1, 5, 3), (4, 0, 2, 5)) del x163 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x241, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -1256,16 +1257,16 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x241, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x241, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x241 - x242 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x242 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x164, (4, 1, 3, 5), (4, 0, 2, 5)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x242, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x242, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x242, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x242, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x242 - x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x243 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x244 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x244 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x244 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x243, (2, 3, 0, 4), (2, 3, 1, 4)) del x243 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x244, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1273,65 +1274,65 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x244, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x244, (0, 1, 2, 3), (0, 1, 3, 2)) del x244 - x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum(x10, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) del x10 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x245, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x245, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x245 - x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum(x9, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 0), (2, 3, 4, 1)) del x9 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x246, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x246, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x246 - x247 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x247 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x247 += einsum(x170, (0, 1, 2, 3), t3.babbab, (4, 0, 1, 5, 2, 6), (4, 5, 6, 3)) del x170 t2new_bbbb[np.ix_(sob,sOb,sVb,sVb)] += einsum(x247, (0, 1, 2, 3), (3, 0, 2, 1)) * -2.0 t2new_bbbb[np.ix_(sOb,sob,sVb,sVb)] += einsum(x247, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 del x247 - x248 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x248 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x248 += einsum(v.aabb.OVoV, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 3), (4, 5, 6, 2)) - x249 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=types[float]) x249 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x248, (2, 3, 4, 0), (3, 2, 4, 1)) * -1.0 del x248 t2new_bbbb[np.ix_(sOb,sOb,svb,sVb)] += einsum(x249, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,svb)] += einsum(x249, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x249 - x250 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x250 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x250 += einsum(x172, (0, 1, 2, 3), t3.bbbbbb, (4, 0, 1, 5, 6, 2), (4, 5, 6, 3)) del x172 t2new_bbbb[np.ix_(sob,sOb,sVb,sVb)] += einsum(x250, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 t2new_bbbb[np.ix_(sOb,sob,sVb,sVb)] += einsum(x250, (0, 1, 2, 3), (0, 3, 2, 1)) * -3.0 del x250 - x251 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x251 = np.zeros((naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x251 += einsum(x173, (0, 1, 2, 3), t3.bbbbbb, (4, 1, 0, 5, 6, 2), (4, 5, 6, 3)) * -1.0 del x173 t2new_bbbb[np.ix_(sob,sOb,sVb,sVb)] += einsum(x251, (0, 1, 2, 3), (3, 0, 2, 1)) * 3.0 t2new_bbbb[np.ix_(sOb,sob,sVb,sVb)] += einsum(x251, (0, 1, 2, 3), (0, 3, 2, 1)) * -3.0 del x251 - x252 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x252 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x252 += einsum(v.bbbb.oVOV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 3, 1), (4, 5, 6, 0)) - x253 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((naocc[1], naocc[1], navir[1], nvir[1]), dtype=types[float]) x253 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x252, (2, 3, 4, 0), (3, 2, 4, 1)) * -1.0 del x252 t2new_bbbb[np.ix_(sOb,sOb,svb,sVb)] += einsum(x253, (0, 1, 2, 3), (0, 1, 3, 2)) * -6.0 t2new_bbbb[np.ix_(sOb,sOb,sVb,svb)] += einsum(x253, (0, 1, 2, 3), (0, 1, 2, 3)) * 6.0 del x253 - x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x254 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x144, (0, 4, 2, 5), (4, 1, 5, 3)) del x144 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x254, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x254, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x254 - x255 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x255 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x186, (0, 4, 2, 5), (4, 1, 5, 3)) del x186 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x255, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x255, (0, 1, 2, 3), (1, 0, 2, 3)) del x255 - x256 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x256 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x145, (0, 4, 2, 5), (1, 4, 3, 5)) del x145 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x256, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 @@ -1339,25 +1340,25 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x256, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x256, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x256 - x257 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x257 += einsum(x14, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) del x14 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x257, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x257, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x257 - x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x258 += einsum(x176, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) del x176 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x258, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x258, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x258 - x259 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x259 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x179, (4, 1, 5, 3), (0, 4, 2, 5)) del x179 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x259, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x259, (0, 1, 2, 3), (0, 1, 3, 2)) * -4.0 del x259 - x260 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x260 += einsum(x18, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (2, 0, 3, 4)) del x18 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x260, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 @@ -1365,13 +1366,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x260, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x260, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x260 - x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x261 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x181, (4, 1, 5, 3), (0, 4, 2, 5)) del x181 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x261, (0, 1, 2, 3), (0, 1, 2, 3)) * -4.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x261, (0, 1, 2, 3), (0, 1, 3, 2)) * 4.0 del x261 - x262 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x262 += einsum(x182, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) del x182 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x262, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -1379,17 +1380,17 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x262, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x262, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x262 - x263 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x263 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x264 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x263, (4, 5, 0, 1), (5, 4, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x264, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x264, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x264 - x265 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x265 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x233, (2, 3, 4, 0), (2, 4, 3, 1)) del x233 - x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x266 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x266 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x265, (2, 0, 3, 4), (2, 3, 1, 4)) del x265 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x266, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1397,10 +1398,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x266, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x266, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x266 - x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x267 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x267 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x164, (2, 3, 1, 4), (0, 2, 3, 4)) del x164 - x268 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x268 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x268 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x267, (2, 3, 0, 4), (2, 3, 1, 4)) del x267 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x268, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1408,24 +1409,24 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x268, (0, 1, 2, 3), (0, 1, 3, 2)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x268, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x268 - x269 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x269 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x269 += einsum(x21, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (0, 2, 3, 4)) del x21 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x269, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x269, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x269 - x270 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x270 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x270 += einsum(x0, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) - x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x271 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x271 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x270, (2, 3, 0, 4), (2, 3, 1, 4)) del x270 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x271, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x271, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x271 - x272 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x272 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x272 += einsum(t2.abab[np.ix_(soa,sob,sva,svb)], (0, 1, 2, 3), x13, (0, 4, 5, 2), (4, 1, 5, 3)) del x13 - x273 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x273 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x273 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x272, (2, 3, 0, 4), (2, 3, 1, 4)) del x272 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x273, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -1433,16 +1434,16 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x273, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x273, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x273 - x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x274 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x274 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x16, (2, 3, 4, 1), (2, 0, 4, 3)) - x275 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x275 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x275 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x274, (4, 5, 0, 1), (5, 4, 2, 3)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x275, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x275, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x275 - x276 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x276 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x276 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 0, 5, 2)) - x277 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x277 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x277 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x276, (2, 3, 0, 4), (2, 3, 1, 4)) del x276 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x277, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -1450,10 +1451,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x277, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x277, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x277 - x278 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x278 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x278 += einsum(t2.bbbb[np.ix_(sob,sob,svb,svb)], (0, 1, 2, 3), x16, (4, 5, 1, 3), (4, 0, 5, 2)) del x16 - x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x279 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x279 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x278, (2, 3, 0, 4), (2, 3, 1, 4)) del x278 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x279, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -1461,66 +1462,66 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x279, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x279, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x279 - x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x280 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x280 += einsum(x22, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (0, 2, 3, 4)) del x22 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x280, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x280, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x280 - x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x281 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x281 += einsum(x23, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 1, 3, 4), (0, 2, 3, 4)) del x23 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x281, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x281, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x281 - x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x282 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x282 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x263, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x263 - x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x283 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x283 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x282, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x282 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x283, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x283, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x283 - x284 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x284 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x284 += einsum(x1, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) - x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x285 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x285 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x284, (2, 3, 0, 4), (2, 3, 1, 4)) del x284 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x285, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x285, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x285 - x286 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x286 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x286 += einsum(x20, (0, 1), t2.bbbb[np.ix_(sob,sob,svb,svb)], (2, 3, 4, 1), (2, 3, 0, 4)) - x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x287 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x287 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x286, (2, 3, 0, 4), (2, 3, 1, 4)) del x286 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x287, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x287, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x287 - x288 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x288 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x288 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x274, (2, 3, 0, 4), (3, 2, 4, 1)) del x274 - x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x289 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x289 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), x288, (2, 3, 0, 4), (2, 3, 1, 4)) del x288 t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x289, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb[np.ix_(sob,sob,svb,svb)] += einsum(x289, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x289 - x290 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x290 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x290 += einsum(f.aa.OO, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) - t3new_aaaaaa = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + t3new_aaaaaa = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) t3new_aaaaaa += einsum(x290, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x290, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x290, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x290 - x291 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x291 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x291 += einsum(f.aa.VV, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x291, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 t3new_aaaaaa += einsum(x291, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x291, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x291 - x292 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x292 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x292 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aaaa.oOOV, (0, 4, 5, 6), (1, 5, 4, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x292, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 t3new_aaaaaa += einsum(x292, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -1541,7 +1542,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x292, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x292, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 del x292 - x293 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x293 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x293 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.vVOV, (2, 4, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 t3new_aaaaaa += einsum(x293, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -2.0 t3new_aaaaaa += einsum(x293, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -1562,7 +1563,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x293, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -2.0 t3new_aaaaaa += einsum(x293, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 del x293 - x294 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x294 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x294 += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.abaaba, (4, 2, 5, 6, 3, 7), (4, 5, 0, 6, 7, 1)) t3new_aaaaaa += einsum(x294, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x294, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 @@ -1574,13 +1575,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x294, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x294, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x294 - x295 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x295 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x295 += einsum(v.aaaa.OOOO, (0, 1, 2, 3), t3.aaaaaa, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 6, 7)) * -1.0 t3new_aaaaaa += einsum(x295, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x295, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x295, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 del x295 - x296 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x296 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x296 += einsum(v.aaaa.OOVV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) t3new_aaaaaa += einsum(x296, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x296, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 @@ -1592,7 +1593,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x296, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x296, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 6.0 del x296 - x297 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x297 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x297 += einsum(v.aaaa.OVOV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 2, 6, 7, 3), (4, 5, 0, 6, 7, 1)) t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 6.0 t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 @@ -1604,33 +1605,33 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x297, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x297 - x298 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x298 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x298 += einsum(v.aaaa.VVVV, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 3, 1), (4, 5, 6, 7, 0, 2)) * -1.0 t3new_aaaaaa += einsum(x298, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x298, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x298, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x298 - x299 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x299 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x299 += einsum(f.aa.vO, (0, 1), t1.aa[np.ix_(sOa,sva)], (2, 0), (1, 2)) t3new_babbab += einsum(x299, (0, 1), t3.babbab, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 - x300 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x300 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x300 += einsum(x299, (0, 1), t3.aaaaaa, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x300, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x300, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x300, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x300 - x301 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x301 = np.zeros((navir[0], navir[0]), dtype=types[float]) x301 += einsum(f.aa.oV, (0, 1), t1.aa[np.ix_(soa,sVa)], (0, 2), (1, 2)) t3new_babbab += einsum(x301, (0, 1), t3.babbab, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 - x302 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x302 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x302 += einsum(x301, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) t3new_aaaaaa += einsum(x302, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x302, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x302, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x302 - x303 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x303 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x303 += einsum(f.aa.ov, (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x304 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x304 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x304 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x303, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) t3new_aaaaaa += einsum(x304, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 t3new_aaaaaa += einsum(x304, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -4.0 @@ -1642,9 +1643,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x304, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_aaaaaa += einsum(x304, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x304 - x305 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x305 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x305 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.oOvV, (2, 3, 1, 4), (0, 3, 4, 2)) - x306 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x306 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x306 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x305, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -2.0 t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 @@ -1665,9 +1666,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -2.0 t3new_aaaaaa += einsum(x306, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x306 - x307 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x307 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x307 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aaaa.oOoO, (4, 5, 0, 6), (1, 5, 6, 2, 3, 4)) * -1.0 - x308 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x308 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x308 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x307, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x307 t3new_aaaaaa += einsum(x308, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -1689,9 +1690,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x308, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x308, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x308 - x309 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x309 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x309 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.oOvV, (4, 5, 2, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x310 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x310 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x310 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x309, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x309 t3new_aaaaaa += einsum(x310, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -1713,9 +1714,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x310, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x310, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x310 - x311 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x311 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x311 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.ovOV, (2, 1, 3, 4), (0, 3, 4, 2)) - x312 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x312 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x312 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x311, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x312, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -2.0 t3new_aaaaaa += einsum(x312, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 @@ -1736,9 +1737,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x312, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 t3new_aaaaaa += einsum(x312, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 2.0 del x312 - x313 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x313 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x313 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovOV, (4, 2, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x314 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x314 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x314 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x313, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x313 t3new_aaaaaa += einsum(x314, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -1760,9 +1761,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x314, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x314, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 del x314 - x315 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x315 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x315 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.vVvV, (4, 5, 2, 6), (0, 1, 3, 5, 6, 4)) * -1.0 - x316 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x316 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x316 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x315, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x315 t3new_aaaaaa += einsum(x316, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -2.0 @@ -1784,10 +1785,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x316, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * -2.0 t3new_aaaaaa += einsum(x316, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x316 - x317 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x317 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x317 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aabb.oOOV, (0, 2, 3, 4), (2, 3, 1, 4)) t3new_babbab += einsum(x317, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * -6.0 - x318 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x318 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x318 += einsum(x317, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 5, 0, 2, 6, 7)) t3new_aaaaaa += einsum(x318, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -2.0 t3new_aaaaaa += einsum(x318, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -1799,10 +1800,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x318, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -2.0 t3new_aaaaaa += einsum(x318, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 del x318 - x319 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x319 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x319 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.vVOV, (1, 2, 3, 4), (0, 3, 2, 4)) t3new_babbab += einsum(x319, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * 6.0 - x320 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x320 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x320 += einsum(x319, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (0, 4, 5, 6, 7, 2)) t3new_aaaaaa += einsum(x320, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x320, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -1814,9 +1815,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x320, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x320, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -2.0 del x320 - x321 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=np.float64) + x321 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=types[float]) x321 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.vOOO, (1, 2, 3, 4), (0, 3, 4, 2)) - x322 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x322 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x322 += einsum(x321, (0, 1, 2, 3), t3.aaaaaa, (4, 3, 2, 5, 6, 7), (0, 4, 1, 5, 6, 7)) * -1.0 t3new_aaaaaa += einsum(x322, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x322, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 @@ -1825,10 +1826,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x322, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x322, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 del x322 - x323 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x323 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x323 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aaaa.oOOV, (0, 2, 3, 4), (3, 2, 1, 4)) t3new_babbab += einsum(x323, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 3, 7), (4, 1, 5, 6, 2, 7)) * -2.0 - x324 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x324 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x324 += einsum(x323, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 3), (4, 5, 1, 2, 6, 7)) t3new_aaaaaa += einsum(x324, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -6.0 t3new_aaaaaa += einsum(x324, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -6.0 @@ -1840,10 +1841,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x324, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x324, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x324 - x325 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x325 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x325 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aaaa.oVOO, (0, 2, 3, 4), (3, 4, 1, 2)) t3new_babbab += einsum(x325, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.0 - x326 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x326 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x326 += einsum(x325, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) t3new_aaaaaa += einsum(x326, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x326, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0 @@ -1855,28 +1856,28 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x326, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 6.0 t3new_aaaaaa += einsum(x326, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x326 - x327 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x327 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x327 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.oOvO, (0, 2, 1, 3), (2, 3)) t3new_babbab += einsum(x327, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * 2.0 - x328 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x328 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x328 += einsum(x327, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) t3new_aaaaaa += einsum(x328, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x328, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x328, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 del x328 - x329 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x329 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x329 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovOO, (0, 1, 2, 3), (2, 3)) t3new_babbab += einsum(x329, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x330 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x330 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x330 += einsum(x329, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) t3new_aaaaaa += einsum(x330, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x330, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x330, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x330 - x331 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x331 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x331 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.vOVV, (1, 2, 3, 4), (0, 2, 3, 4)) t3new_babbab += einsum(x331, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -2.0 - x332 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x332 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x332 += einsum(x331, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 7, 2)) t3new_aaaaaa += einsum(x332, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x332, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 @@ -1888,10 +1889,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x332, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x332, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * 6.0 del x332 - x333 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x333 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x333 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.vVOV, (1, 2, 3, 4), (0, 3, 4, 2)) t3new_babbab += einsum(x333, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 2, 7), (4, 0, 5, 6, 3, 7)) * 2.0 - x334 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x334 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x334 += einsum(x333, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 2), (0, 4, 5, 6, 7, 3)) t3new_aaaaaa += einsum(x334, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 6.0 t3new_aaaaaa += einsum(x334, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 @@ -1903,9 +1904,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x334, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x334, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -6.0 del x334 - x335 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x335 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=types[float]) x335 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aaaa.oVVV, (0, 2, 3, 4), (1, 3, 4, 2)) - x336 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x336 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x336 += einsum(x335, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 2, 3), (4, 5, 6, 0, 7, 1)) t3new_aaaaaa += einsum(x336, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x336, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -6.0 @@ -1914,45 +1915,45 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x336, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 t3new_aaaaaa += einsum(x336, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x336 - x337 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x337 = np.zeros((navir[0], navir[0]), dtype=types[float]) x337 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovVV, (0, 1, 2, 3), (2, 3)) t3new_babbab += einsum(x337, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x338 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x338 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x338 += einsum(x337, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) t3new_aaaaaa += einsum(x338, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x338, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x338, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x338 - x339 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x339 = np.zeros((navir[0], navir[0]), dtype=types[float]) x339 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.oVvV, (0, 2, 1, 3), (2, 3)) t3new_babbab += einsum(x339, (0, 1), t3.babbab, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 - x340 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x340 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x340 += einsum(x339, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) t3new_aaaaaa += einsum(x340, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 t3new_aaaaaa += einsum(x340, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x340, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 6.0 del x340 - x341 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x341 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x341 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.OOov, (2, 3, 0, 1), (2, 3)) t3new_babbab += einsum(x341, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x342 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x342 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x342 += einsum(x341, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) t3new_aaaaaa += einsum(x342, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x342, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x342, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x342 - x343 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x343 = np.zeros((navir[0], navir[0]), dtype=types[float]) x343 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.VVov, (2, 3, 0, 1), (2, 3)) t3new_babbab += einsum(x343, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x344 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x344 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x344 += einsum(x343, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) t3new_aaaaaa += einsum(x344, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_aaaaaa += einsum(x344, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x344, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x344 - x345 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x345 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x345 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.aabb.oOov, (4, 5, 1, 3), (0, 5, 2, 4)) - x346 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x346 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x346 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x345, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x346, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x346, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -2.0 @@ -1973,9 +1974,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x346, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x346, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 del x346 - x347 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x347 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x347 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.aabb.vVov, (4, 5, 1, 3), (0, 2, 5, 4)) - x348 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x348 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x348 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x347, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 t3new_aaaaaa += einsum(x348, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 t3new_aaaaaa += einsum(x348, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 @@ -1996,9 +1997,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x348, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 2.0 t3new_aaaaaa += einsum(x348, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 4, 5)) * -2.0 del x348 - x349 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x349 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x349 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovoO, (0, 2, 4, 5), (1, 5, 3, 4)) - x350 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x350 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x350 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x349, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x350, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_aaaaaa += einsum(x350, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -4.0 @@ -2019,9 +2020,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x350, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -4.0 t3new_aaaaaa += einsum(x350, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 4.0 del x350 - x351 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x351 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x351 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovoO, (4, 2, 0, 5), (1, 5, 3, 4)) - x352 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x352 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x352 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x351, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x352, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -4.0 t3new_aaaaaa += einsum(x352, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 4.0 @@ -2042,9 +2043,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x352, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 4.0 t3new_aaaaaa += einsum(x352, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * 4.0 del x352 - x353 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x353 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x353 += einsum(t2.aaaa[np.ix_(soa,soa,sVa,sVa)], (0, 1, 2, 3), v.aaaa.ovoO, (1, 4, 0, 5), (5, 2, 3, 4)) - x354 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x354 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x354 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x353, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 t3new_aaaaaa += einsum(x354, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_aaaaaa += einsum(x354, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 2.0 @@ -2065,9 +2066,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x354, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 t3new_aaaaaa += einsum(x354, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x354 - x355 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x355 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x355 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovvV, (0, 4, 2, 5), (1, 3, 5, 4)) - x356 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x356 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x356 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x355, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 t3new_aaaaaa += einsum(x356, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -4.0 t3new_aaaaaa += einsum(x356, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 @@ -2088,9 +2089,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x356, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_aaaaaa += einsum(x356, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x356 - x357 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x357 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x357 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovvV, (4, 2, 3, 5), (0, 1, 5, 4)) * -1.0 - x358 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x358 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x358 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x357, (4, 5, 6, 0), (5, 4, 1, 2, 3, 6)) t3new_aaaaaa += einsum(x358, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_aaaaaa += einsum(x358, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 @@ -2111,9 +2112,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x358, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 t3new_aaaaaa += einsum(x358, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -2.0 del x358 - x359 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x359 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x359 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovvV, (0, 2, 4, 5), (1, 3, 5, 4)) - x360 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x360 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x360 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x359, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 t3new_aaaaaa += einsum(x360, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 4.0 t3new_aaaaaa += einsum(x360, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -4.0 @@ -2134,10 +2135,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x360, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -4.0 t3new_aaaaaa += einsum(x360, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x360 - x361 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x361 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x361 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovOV, (1, 3, 4, 5), (0, 4, 2, 5)) t3new_babbab += einsum(x361, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * 6.0000000000000595 - x362 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x362 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x362 += einsum(x361, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x362, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.00000000000002 t3new_aaaaaa += einsum(x362, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -2.00000000000002 @@ -2149,10 +2150,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x362, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 2.00000000000002 t3new_aaaaaa += einsum(x362, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.00000000000002 del x362 - x363 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x363 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x363 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.oVvO, (1, 4, 3, 5), (0, 5, 2, 4)) t3new_babbab += einsum(x363, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * -6.0000000000000595 - x364 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x364 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x364 += einsum(x363, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x364, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.00000000000002 t3new_aaaaaa += einsum(x364, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 2.00000000000002 @@ -2164,19 +2165,19 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x364, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.00000000000002 t3new_aaaaaa += einsum(x364, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.00000000000002 del x364 - x365 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x365 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x365 += einsum(t2.abab[np.ix_(sOa,sob,sva,svb)], (0, 1, 2, 3), v.aabb.vOov, (2, 4, 1, 3), (0, 4)) t3new_babbab += einsum(x365, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x366 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x366 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x366 += einsum(x365, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x366, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x366, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x366, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x366 - x367 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x367 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x367 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.aabb.OVov, (4, 5, 1, 3), (0, 4, 2, 5)) t3new_babbab += einsum(x367, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.00000000000002 - x368 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x368 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x368 += einsum(x367, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x368, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0000000000000595 t3new_aaaaaa += einsum(x368, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -6.0000000000000595 @@ -2188,18 +2189,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x368, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 6.0000000000000595 t3new_aaaaaa += einsum(x368, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -6.0000000000000595 del x368 - x369 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x369 = np.zeros((navir[0], navir[0]), dtype=types[float]) x369 += einsum(t2.abab[np.ix_(soa,sob,sVa,svb)], (0, 1, 2, 3), v.aabb.oVov, (0, 4, 1, 3), (2, 4)) t3new_babbab += einsum(x369, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x370 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x370 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x370 += einsum(x369, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x370, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x370, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x370, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x370 - x371 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x371 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x371 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.vOOV, (2, 4, 5, 6), (0, 1, 4, 5, 3, 6)) * -1.0 - x372 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x372 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x372 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x371, (6, 7, 2, 1, 8, 4), (7, 6, 0, 8, 3, 5)) * -1.0 t3new_aaaaaa += einsum(x372, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -4.0 t3new_aaaaaa += einsum(x372, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 @@ -2211,9 +2212,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x372, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -4.0 t3new_aaaaaa += einsum(x372, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 4.0 del x372 - x373 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[0], navir[1]), dtype=np.float64) + x373 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[0], navir[1]), dtype=types[float]) x373 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aabb.oVOV, (0, 4, 5, 6), (1, 5, 2, 3, 4, 6)) * -1.0 - x374 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x374 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x374 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x373, (6, 1, 7, 8, 5, 4), (6, 0, 2, 7, 8, 3)) t3new_aaaaaa += einsum(x374, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 4.0 t3new_aaaaaa += einsum(x374, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -4.0 @@ -2225,10 +2226,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x374, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.0 t3new_aaaaaa += einsum(x374, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -4.0 del x374 - x375 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x375 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x375 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.ovOV, (0, 2, 4, 5), (1, 4, 3, 5)) t3new_babbab += einsum(x375, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * 12.000000000000123 - x376 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x376 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x376 += einsum(x375, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x376, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.00000000000004 t3new_aaaaaa += einsum(x376, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -4.00000000000004 @@ -2240,9 +2241,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x376, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 4.00000000000004 t3new_aaaaaa += einsum(x376, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -4.00000000000004 del x376 - x377 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x377 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x377 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.vOOV, (2, 4, 5, 6), (0, 1, 5, 4, 3, 6)) * -1.0 - x378 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x378 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x378 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x377, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 3, 4)) * -1.0 t3new_aaaaaa += einsum(x378, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x378, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 @@ -2254,9 +2255,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x378, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x378, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 del x378 - x379 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=np.float64) + x379 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=types[float]) x379 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sva)], (0, 1, 2, 3), v.aaaa.vOvO, (2, 4, 3, 5), (0, 1, 4, 5)) - x380 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x380 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x380 += einsum(x379, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 t3new_aaaaaa += einsum(x380, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 t3new_aaaaaa += einsum(x380, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 @@ -2265,9 +2266,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x380, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 t3new_aaaaaa += einsum(x380, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 del x380 - x381 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x381 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x381 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.vOOV, (2, 4, 5, 6), (0, 1, 5, 4, 3, 6)) * -1.0 - x382 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x382 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x382 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x381, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 3, 4)) * -1.0 t3new_aaaaaa += einsum(x382, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x382, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 @@ -2279,9 +2280,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x382, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x382, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 del x382 - x383 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x383 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], navir[0]), dtype=types[float]) x383 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aaaa.oVOV, (0, 4, 5, 6), (1, 5, 2, 3, 6, 4)) * -1.0 - x384 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x384 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x384 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x383, (6, 2, 7, 8, 4, 5), (6, 0, 1, 7, 8, 3)) t3new_aaaaaa += einsum(x384, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -12.0 t3new_aaaaaa += einsum(x384, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 12.0 @@ -2293,10 +2294,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x384, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -12.0 t3new_aaaaaa += einsum(x384, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 12.0 del x384 - x385 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x385 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x385 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovOV, (0, 2, 4, 5), (1, 4, 3, 5)) t3new_babbab += einsum(x385, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 4.00000000000004 - x386 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x386 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x386 += einsum(x385, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x386, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 12.000000000000123 t3new_aaaaaa += einsum(x386, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -12.000000000000123 @@ -2308,9 +2309,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x386, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 12.000000000000123 t3new_aaaaaa += einsum(x386, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -12.000000000000123 del x386 - x387 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x387 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x387 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovvO, (0, 3, 2, 4), (1, 4)) * -1.0 - x388 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x388 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x388 += einsum(x387, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x388, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x388, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 @@ -2319,10 +2320,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x388, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x388, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x388 - x389 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x389 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x389 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.oVvO, (0, 4, 2, 5), (1, 5, 3, 4)) t3new_babbab += einsum(x389, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -4.00000000000004 - x390 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x390 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x390 += einsum(x389, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x390, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -12.000000000000123 t3new_aaaaaa += einsum(x390, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 12.000000000000123 @@ -2334,37 +2335,37 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x390, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -12.000000000000123 t3new_aaaaaa += einsum(x390, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 12.000000000000123 del x390 - x391 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x391 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=types[float]) x391 += einsum(t2.aaaa[np.ix_(soa,soa,sVa,sVa)], (0, 1, 2, 3), v.aaaa.oVoV, (0, 4, 1, 5), (2, 3, 4, 5)) t3new_abaaba += einsum(x391, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 2, 7, 3), (4, 5, 6, 0, 7, 1)) * 2.0 - x392 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x392 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x392 += einsum(x391, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 2, 3), (4, 5, 6, 1, 0, 7)) * -1.0 del x391 t3new_aaaaaa += einsum(x392, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 t3new_aaaaaa += einsum(x392, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x392, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x392 - x393 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x393 = np.zeros((navir[0], navir[0]), dtype=types[float]) x393 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovoV, (1, 2, 0, 4), (3, 4)) * -1.0 t3new_babbab += einsum(x393, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x394 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x394 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x394 += einsum(x393, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x394, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x394, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x394, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x394 - x395 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x395 = np.zeros((navir[0], navir[0]), dtype=types[float]) x395 += einsum(t2.aaaa[np.ix_(soa,soa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovoV, (1, 2, 0, 4), (3, 4)) * -1.0 t3new_babbab += einsum(x395, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x396 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x396 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x396 += einsum(x395, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x396, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x396, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x396, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x396 - x397 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x397 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x397 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aaaa.ovoO, (2, 6, 0, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x398 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x398 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x398 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x397, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x397 t3new_aaaaaa += einsum(x398, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -2386,9 +2387,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x398, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x398, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x398 - x399 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x399 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x399 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aaaa.ovoO, (0, 6, 2, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x400 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x400 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x400 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x399, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x399 t3new_aaaaaa += einsum(x400, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -2.0 @@ -2410,9 +2411,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x400, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 t3new_aaaaaa += einsum(x400, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 del x400 - x401 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x401 = np.zeros((naocc[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x401 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t1.aa[np.ix_(soa,sVa)], (2, 3), v.aaaa.ovoO, (2, 4, 0, 5), (5, 1, 3, 4)) - x402 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x402 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x402 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x401, (4, 5, 6, 2), (0, 1, 4, 5, 6, 3)) * -1.0 t3new_aaaaaa += einsum(x402, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 t3new_aaaaaa += einsum(x402, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -2.0 @@ -2433,9 +2434,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x402, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 t3new_aaaaaa += einsum(x402, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x402 - x403 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x403 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x403 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aaaa.ovvV, (2, 1, 6, 7), (0, 3, 4, 5, 7, 6)) * -1.0 - x404 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x404 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x404 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x403, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x403 t3new_aaaaaa += einsum(x404, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -2.0 @@ -2457,9 +2458,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x404, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_aaaaaa += einsum(x404, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * -2.0 del x404 - x405 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x405 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x405 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aaaa.ovvV, (0, 6, 4, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x406 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x406 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x406 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x405, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x405 t3new_aaaaaa += einsum(x406, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -2481,9 +2482,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x406, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_aaaaaa += einsum(x406, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x406 - x407 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=np.float64) + x407 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[0], nvir[0]), dtype=types[float]) x407 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aaaa.ovvV, (0, 4, 6, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x408 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x408 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x408 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x407, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x407 t3new_aaaaaa += einsum(x408, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 @@ -2505,12 +2506,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x408, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x408, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 del x408 - x409 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x409 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x409 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.ovOV, (2, 1, 3, 4), (0, 3, 4, 2)) - x410 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x410 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x410 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x409, (2, 3, 4, 0), (2, 3, 1, 4)) t3new_babbab += einsum(x410, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) * -6.0 - x411 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x411 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x411 += einsum(x410, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x411, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_aaaaaa += einsum(x411, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 2.0 @@ -2522,12 +2523,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x411, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.0 t3new_aaaaaa += einsum(x411, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x411 - x412 = np.zeros((naocc[0], naocc[0], naocc[0], nvir[0]), dtype=np.float64) + x412 = np.zeros((naocc[0], naocc[0], naocc[0], nvir[0]), dtype=types[float]) x412 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.vOvO, (2, 3, 1, 4), (0, 3, 4, 2)) - x413 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=np.float64) + x413 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[0]), dtype=types[float]) x413 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x412, (2, 3, 4, 1), (2, 0, 4, 3)) del x412 - x414 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x414 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x414 += einsum(x413, (0, 1, 2, 3), t3.aaaaaa, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 t3new_aaaaaa += einsum(x414, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 t3new_aaaaaa += einsum(x414, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 @@ -2536,13 +2537,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x414, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 t3new_aaaaaa += einsum(x414, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 del x414 - x415 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x415 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x415 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.ovOV, (2, 1, 3, 4), (0, 3, 4, 2)) - x416 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x416 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x416 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x415, (2, 3, 4, 0), (2, 3, 1, 4)) del x415 t3new_babbab += einsum(x416, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -2.0 - x417 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x417 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x417 += einsum(x416, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x417, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -6.0 t3new_aaaaaa += einsum(x417, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 6.0 @@ -2554,13 +2555,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x417, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x417, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 6.0 del x417 - x418 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x418 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x418 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aaaa.oVvO, (2, 3, 1, 4), (0, 4, 3, 2)) - x419 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=np.float64) + x419 = np.zeros((naocc[0], naocc[0], navir[0], navir[0]), dtype=types[float]) x419 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x418, (2, 3, 4, 0), (2, 3, 1, 4)) del x418 t3new_babbab += einsum(x419, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.0 - x420 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x420 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x420 += einsum(x419, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) t3new_aaaaaa += einsum(x420, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x420, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -6.0 @@ -2572,96 +2573,96 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x420, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x420, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -6.0 del x420 - x421 = np.zeros((naocc[0], nvir[0]), dtype=np.float64) + x421 = np.zeros((naocc[0], nvir[0]), dtype=types[float]) x421 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvO, (0, 2, 1, 3), (3, 2)) - x422 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x422 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x422 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x421, (2, 1), (0, 2)) del x421 t3new_babbab += einsum(x422, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * 2.0 - x423 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x423 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x423 += einsum(x422, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x423, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x423, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -6.0 t3new_aaaaaa += einsum(x423, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 del x423 - x424 = np.zeros((naocc[0], nvir[0]), dtype=np.float64) + x424 = np.zeros((naocc[0], nvir[0]), dtype=types[float]) x424 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovvO, (0, 1, 2, 3), (3, 2)) - x425 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x425 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x425 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x424, (2, 1), (0, 2)) del x424 t3new_babbab += einsum(x425, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x426 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x426 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x426 += einsum(x425, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x426, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x426, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x426, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x426 - x427 = np.zeros((navir[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x427 = np.zeros((navir[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x427 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aaaa.oVoV, (2, 3, 0, 4), (1, 3, 4, 2)) - x428 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x428 = np.zeros((navir[0], navir[0], navir[0], navir[0]), dtype=types[float]) x428 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x427, (2, 3, 4, 0), (2, 1, 4, 3)) del x427 t3new_abaaba += einsum(x428, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 3, 7, 2), (4, 5, 6, 0, 7, 1)) * -2.0 - x429 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x429 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x429 += einsum(x428, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 6, 7, 2, 3), (4, 5, 6, 1, 0, 7)) * -1.0 del x428 t3new_aaaaaa += einsum(x429, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 t3new_aaaaaa += einsum(x429, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x429, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x429 - x430 = np.zeros((navir[0], nocc[0]), dtype=np.float64) + x430 = np.zeros((navir[0], nocc[0]), dtype=types[float]) x430 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovoV, (0, 1, 2, 3), (3, 2)) - x431 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x431 = np.zeros((navir[0], navir[0]), dtype=types[float]) x431 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x430, (2, 0), (1, 2)) del x430 t3new_babbab += einsum(x431, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x432 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x432 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x432 += einsum(x431, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x432, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x432, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x432, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x432 - x433 = np.zeros((navir[0], nocc[0]), dtype=np.float64) + x433 = np.zeros((navir[0], nocc[0]), dtype=types[float]) x433 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aaaa.ovoV, (2, 1, 0, 3), (3, 2)) - x434 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x434 = np.zeros((navir[0], navir[0]), dtype=types[float]) x434 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x433, (2, 0), (1, 2)) del x433 t3new_babbab += einsum(x434, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x435 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x435 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x435 += einsum(x434, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x435, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 t3new_aaaaaa += einsum(x435, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_aaaaaa += einsum(x435, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x435 - x436 = np.zeros((naocc[0], nvir[0]), dtype=np.float64) + x436 = np.zeros((naocc[0], nvir[0]), dtype=types[float]) x436 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.vOov, (2, 3, 0, 1), (3, 2)) - x437 = np.zeros((naocc[0], naocc[0]), dtype=np.float64) + x437 = np.zeros((naocc[0], naocc[0]), dtype=types[float]) x437 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x436, (2, 1), (0, 2)) del x436 t3new_babbab += einsum(x437, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x438 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x438 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x438 += einsum(x437, (0, 1), t3.aaaaaa, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) t3new_aaaaaa += einsum(x438, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x438, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_aaaaaa += einsum(x438, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x438 - x439 = np.zeros((navir[0], nocc[0]), dtype=np.float64) + x439 = np.zeros((navir[0], nocc[0]), dtype=types[float]) x439 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.aabb.oVov, (2, 3, 0, 1), (3, 2)) - x440 = np.zeros((navir[0], navir[0]), dtype=np.float64) + x440 = np.zeros((navir[0], navir[0]), dtype=types[float]) x440 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x439, (2, 0), (1, 2)) del x439 t3new_babbab += einsum(x440, (0, 1), t3.babbab, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x441 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x441 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x441 += einsum(x440, (0, 1), t3.aaaaaa, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_aaaaaa += einsum(x441, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_aaaaaa += einsum(x441, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_aaaaaa += einsum(x441, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x441 - x442 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=np.float64) + x442 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=types[float]) x442 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x443 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x443 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x443 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x442, (2, 3, 4, 1), (0, 2, 3, 4)) - x444 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x444 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x444 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x443, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x444, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x444, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -2682,9 +2683,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x444, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_aaaaaa += einsum(x444, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -2.0 del x444 - x445 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x445 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x445 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x442, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x446 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x446 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x446 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x445, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x445 t3new_aaaaaa += einsum(x446, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * 2.0 @@ -2706,11 +2707,11 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x446, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -2.0 t3new_aaaaaa += einsum(x446, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 del x446 - x447 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=np.float64) + x447 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=types[float]) x447 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 0, 2), (1, 3, 4, 5)) - x448 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x448 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x448 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x447, (2, 3, 4, 1), (0, 2, 3, 4)) - x449 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x449 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x449 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x448, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x449, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_aaaaaa += einsum(x449, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -4.0 @@ -2731,11 +2732,11 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x449, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -4.0 t3new_aaaaaa += einsum(x449, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 4.0 del x449 - x450 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=np.float64) + x450 = np.zeros((naocc[0], navir[0], nocc[0], nvir[0]), dtype=types[float]) x450 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 0, 5), (1, 3, 4, 5)) - x451 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x451 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x451 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x450, (2, 3, 4, 1), (0, 2, 3, 4)) - x452 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x452 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x452 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x451, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_aaaaaa += einsum(x452, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -4.0 t3new_aaaaaa += einsum(x452, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 4.0 @@ -2756,9 +2757,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x452, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * 4.0 t3new_aaaaaa += einsum(x452, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 4.0 del x452 - x453 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], nocc[0], nocc[0]), dtype=np.float64) + x453 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], nocc[0], nocc[0]), dtype=types[float]) x453 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aaaa.ovov, (6, 1, 7, 4), (0, 2, 3, 5, 6, 7)) * -1.0 - x454 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x454 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x454 += einsum(t2.aaaa[np.ix_(soa,soa,sVa,sVa)], (0, 1, 2, 3), x453, (4, 5, 6, 7, 0, 1), (4, 5, 6, 7, 2, 3)) del x453 t3new_aaaaaa += einsum(x454, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -2780,9 +2781,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x454, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.0 t3new_aaaaaa += einsum(x454, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x454 - x455 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x455 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x455 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x447, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x456 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x456 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x456 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x455, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x455 t3new_aaaaaa += einsum(x456, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -4.0 @@ -2804,11 +2805,11 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x456, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_aaaaaa += einsum(x456, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x456 - x457 = np.zeros((naocc[0], naocc[0], nocc[0], nocc[0]), dtype=np.float64) + x457 = np.zeros((naocc[0], naocc[0], nocc[0], nocc[0]), dtype=types[float]) x457 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sva)], (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x458 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x458 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x458 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x457, (4, 5, 0, 6), (4, 5, 1, 2, 3, 6)) - x459 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x459 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x459 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x458, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x458 t3new_aaaaaa += einsum(x459, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -2830,9 +2831,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x459, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x459, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 del x459 - x460 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x460 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x460 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x450, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x461 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x461 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x461 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x460, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x460 t3new_aaaaaa += einsum(x461, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 4.0 @@ -2854,9 +2855,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x461, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -4.0 t3new_aaaaaa += einsum(x461, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x461 - x462 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x462 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x462 += einsum(x11, (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x463 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x463 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x463 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x462, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) t3new_aaaaaa += einsum(x463, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 t3new_aaaaaa += einsum(x463, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -4.0 @@ -2868,9 +2869,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x463, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_aaaaaa += einsum(x463, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x463 - x464 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x464 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x464 += einsum(x12, (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x465 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x465 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x465 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x464, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) t3new_aaaaaa += einsum(x465, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -4.0 t3new_aaaaaa += einsum(x465, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * 4.0 @@ -2882,9 +2883,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x465, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -4.0 t3new_aaaaaa += einsum(x465, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x465 - x466 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=np.float64) + x466 = np.zeros((naocc[0], naocc[0], navir[0], nocc[0]), dtype=types[float]) x466 += einsum(x15, (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x467 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x467 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x467 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x466, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) t3new_aaaaaa += einsum(x467, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 t3new_aaaaaa += einsum(x467, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 3, 4)) * -4.0 @@ -2896,12 +2897,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x467, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_aaaaaa += einsum(x467, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x467 - x468 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], nocc[0], nvir[0]), dtype=np.float64) + x468 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], nocc[0], nvir[0]), dtype=types[float]) x468 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aaaa.ovov, (6, 7, 2, 1), (0, 3, 4, 5, 6, 7)) * -1.0 - x469 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x469 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x469 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x468, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x468 - x470 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x470 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x470 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x469, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x469 t3new_aaaaaa += einsum(x470, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -2923,12 +2924,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x470, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * 2.0 t3new_aaaaaa += einsum(x470, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x470 - x471 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], nocc[0], nvir[0]), dtype=np.float64) + x471 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], nocc[0], nvir[0]), dtype=types[float]) x471 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aaaa.ovov, (6, 7, 0, 4), (2, 3, 1, 5, 6, 7)) * -1.0 - x472 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=np.float64) + x472 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], nocc[0]), dtype=types[float]) x472 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x471, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x471 - x473 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=np.float64) + x473 = np.zeros((naocc[0], naocc[0], naocc[0], navir[0], navir[0], navir[0]), dtype=types[float]) x473 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x472, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x472 t3new_aaaaaa += einsum(x473, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -2950,144 +2951,144 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_aaaaaa += einsum(x473, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.0 t3new_aaaaaa += einsum(x473, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x473 - x474 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x474 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x474 += einsum(f.bb.OO, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x474, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x474, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x474 - x475 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x475 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x475 += einsum(f.bb.VV, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x475, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x475, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x475 - x476 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x476 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x476 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.bbbb.oOOV, (1, 4, 5, 6), (0, 5, 4, 2, 3, 6)) t3new_babbab += einsum(x476, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x476, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x476, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x476, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 del x476 - x477 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x477 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x477 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aabb.oOOV, (0, 4, 5, 6), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x477, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x477, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x477, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x477, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x477 - x478 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x478 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x478 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.vVOV, (3, 4, 5, 6), (0, 1, 5, 2, 6, 4)) t3new_babbab += einsum(x478, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x478, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x478, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x478, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) del x478 - x479 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x479 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x479 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.vVOV, (2, 4, 5, 6), (0, 1, 5, 4, 3, 6)) * -1.0 t3new_babbab += einsum(x479, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x479, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x479, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x479, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x479 - x480 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x480 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x480 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.aabb.OVoO, (4, 5, 0, 6), (4, 1, 6, 5, 2, 3)) * -1.0 t3new_babbab += einsum(x480, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x480, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x480 - x481 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x481 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x481 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.OVvV, (4, 5, 2, 6), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x481, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x481, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x481 - x482 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x482 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x482 += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 1), (4, 5, 2, 6, 7, 3)) t3new_babbab += einsum(x482, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x482, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x482, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x482, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x482 - x483 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x483 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x483 += einsum(v.aabb.OOOO, (0, 1, 2, 3), t3.babbab, (4, 1, 3, 5, 6, 7), (0, 4, 2, 6, 5, 7)) t3new_babbab += einsum(x483, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x483, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x483 - x484 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x484 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x484 += einsum(v.bbbb.OOVV, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 4, 0, 7, 6, 2)) t3new_babbab += einsum(x484, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x484, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x484, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x484, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x484 - x485 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x485 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x485 += einsum(v.aabb.OOVV, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 7, 3), (0, 4, 5, 7, 6, 2)) t3new_babbab += einsum(x485, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x485, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x485 - x486 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x486 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x486 += einsum(v.bbbb.OVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 7, 3), (5, 4, 0, 7, 6, 1)) t3new_babbab += einsum(x486, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x486, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x486, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x486, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x486 - x487 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x487 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x487 += einsum(v.aabb.VVOO, (0, 1, 2, 3), t3.babbab, (4, 5, 3, 6, 1, 7), (5, 4, 2, 0, 6, 7)) t3new_babbab += einsum(x487, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x487, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x487 - x488 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x488 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x488 += einsum(v.aabb.VVVV, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (5, 4, 6, 0, 7, 2)) t3new_babbab += einsum(x488, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x488, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x488 - x489 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x489 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x489 += einsum(f.bb.vO, (0, 1), t1.bb[np.ix_(sOb,svb)], (2, 0), (1, 2)) t3new_abaaba += einsum(x489, (0, 1), t3.abaaba, (2, 0, 3, 4, 5, 6), (2, 1, 3, 4, 5, 6)) * -2.0 - x490 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x490 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x490 += einsum(x489, (0, 1), t3.babbab, (2, 3, 0, 4, 5, 6), (3, 1, 2, 5, 4, 6)) t3new_babbab += einsum(x490, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x490, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x490 - x491 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x491 = np.zeros((navir[1], navir[1]), dtype=types[float]) x491 += einsum(f.bb.oV, (0, 1), t1.bb[np.ix_(sob,sVb)], (0, 2), (1, 2)) t3new_abaaba += einsum(x491, (0, 1), t3.abaaba, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 - x492 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x492 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x492 += einsum(x491, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 0), (3, 2, 4, 6, 1, 5)) t3new_babbab += einsum(x492, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x492, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x492 - x493 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x493 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x493 += einsum(f.aa.ov, (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x494 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x494 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x494 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x493, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x494, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x494, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x494, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x494, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x494 - x495 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x495 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x495 += einsum(f.bb.ov, (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x496 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x496 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x496 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x495, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x496, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x496, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x496 - x497 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x497 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x497 += einsum(f.bb.ov, (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 - x498 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x498 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x498 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x497, (4, 5, 6, 1), (0, 5, 4, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x498, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x498, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x498 - x499 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x499 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x499 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x409, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x499, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x499, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x499, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x499, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x499 - x500 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x500 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x500 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.ovOV, (4, 2, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x501 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x501 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x501 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x500, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x500 t3new_babbab += einsum(x501, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -3095,58 +3096,58 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x501, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x501, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x501 - x502 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x502 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x502 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.aabb.oOoO, (4, 5, 0, 6), (5, 1, 6, 2, 3, 4)) * -1.0 - x503 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x503 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x503 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x502, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x502 t3new_babbab += einsum(x503, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x503, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x503 - x504 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x504 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x504 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.oOvV, (4, 5, 2, 6), (5, 0, 1, 3, 6, 4)) * -1.0 - x505 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x505 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x505 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x504, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x504 t3new_babbab += einsum(x505, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x505, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x505 - x506 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x506 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x506 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.vVoO, (1, 2, 3, 4), (0, 4, 2, 3)) - x507 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x507 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x507 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x506, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x507, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x507, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x507 - x508 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x508 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x508 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.vVvV, (4, 5, 2, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x509 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x509 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x509 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x508, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x508 t3new_babbab += einsum(x509, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x509, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x509 - x510 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x510 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x510 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.oOvV, (2, 3, 1, 4), (0, 3, 4, 2)) - x511 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x511 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x511 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x510, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x511, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x511, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x511, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x511, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 del x511 - x512 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x512 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x512 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.oOvV, (2, 3, 1, 4), (3, 0, 4, 2)) - x513 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x513 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x513 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x512, (4, 5, 6, 0), (4, 5, 1, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x513, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x513, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x513, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x513, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x513 - x514 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x514 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x514 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.bbbb.oOoO, (4, 5, 1, 6), (0, 5, 6, 2, 3, 4)) - x515 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x515 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x515 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x514, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x514 t3new_babbab += einsum(x515, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -3154,9 +3155,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x515, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x515, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x515 - x516 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x516 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x516 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aabb.oOoO, (0, 4, 5, 6), (4, 1, 6, 2, 3, 5)) * -1.0 - x517 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x517 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x517 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x516, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x516 t3new_babbab += einsum(x517, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -3164,9 +3165,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x517, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x517, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x517 - x518 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x518 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x518 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.oOvV, (4, 5, 3, 6), (0, 1, 5, 2, 6, 4)) - x519 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x519 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x519 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x518, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x518 t3new_babbab += einsum(x519, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 @@ -3174,18 +3175,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x519, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x519, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 del x519 - x520 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x520 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x520 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.ovOV, (2, 1, 3, 4), (0, 3, 4, 2)) - x521 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x521 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x521 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x520, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x521, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x521, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x521, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x521, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x521 - x522 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x522 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x522 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovOV, (4, 3, 5, 6), (0, 1, 5, 2, 6, 4)) - x523 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x523 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x523 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x522, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x522 t3new_babbab += einsum(x523, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) @@ -3193,9 +3194,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x523, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x523, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) del x523 - x524 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x524 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x524 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.vVvV, (4, 5, 3, 6), (0, 1, 2, 5, 6, 4)) - x525 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x525 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x525 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x524, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x524 t3new_babbab += einsum(x525, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -3203,9 +3204,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x525, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x525, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x525 - x526 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x526 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x526 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.vVvV, (2, 4, 5, 6), (0, 1, 4, 3, 6, 5)) * -1.0 - x527 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x527 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x527 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x526, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x526 t3new_babbab += einsum(x527, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 @@ -3213,9 +3214,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x527, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x527, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 del x527 - x528 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x528 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x528 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.vVoO, (2, 4, 5, 6), (0, 1, 6, 4, 3, 5)) * -1.0 - x529 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x529 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x529 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x528, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x528 t3new_babbab += einsum(x529, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -3223,709 +3224,709 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x529, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x529, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x529 - x530 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x530 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x530 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.OVov, (2, 3, 4, 1), (2, 0, 3, 4)) - x531 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x531 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x531 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x530, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x531, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x531, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x531 - x532 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x532 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x532 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.OVov, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 - x533 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x533 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x533 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x532, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x532 t3new_babbab += einsum(x533, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x533, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x533 - x534 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=np.float64) + x534 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=types[float]) x534 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.vOOO, (1, 2, 3, 4), (0, 2, 3, 4)) - x535 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x535 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x535 += einsum(x534, (0, 1, 2, 3), t3.babbab, (4, 1, 3, 5, 6, 7), (0, 4, 2, 6, 5, 7)) t3new_babbab += einsum(x535, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x535, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x535 - x536 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=np.float64) + x536 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=types[float]) x536 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.vOVV, (1, 2, 3, 4), (0, 2, 3, 4)) - x537 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x537 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x537 += einsum(x536, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 7, 3), (0, 4, 5, 7, 6, 2)) t3new_babbab += einsum(x537, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x537, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x537 - x538 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=np.float64) + x538 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=types[float]) x538 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aabb.oVOO, (0, 2, 3, 4), (3, 4, 1, 2)) - x539 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x539 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x539 += einsum(x538, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 3, 7), (5, 4, 0, 2, 6, 7)) t3new_babbab += einsum(x539, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x539, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x539 - x540 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x540 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x540 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovOO, (0, 1, 2, 3), (2, 3)) t3new_abaaba += einsum(x540, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x541 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x541 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x541 += einsum(x540, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 2, 0, 5, 4, 6)) t3new_babbab += einsum(x541, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x541, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x541 - x542 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x542 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x542 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), v.aabb.oVVV, (0, 2, 3, 4), (1, 2, 3, 4)) - x543 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x543 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x543 += einsum(x542, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (5, 4, 6, 0, 7, 2)) t3new_babbab += einsum(x543, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x543, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x543 - x544 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x544 = np.zeros((navir[1], navir[1]), dtype=types[float]) x544 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovVV, (0, 1, 2, 3), (2, 3)) t3new_abaaba += einsum(x544, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x545 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x545 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x545 += einsum(x544, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 5, 0)) t3new_babbab += einsum(x545, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x545, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x545 - x546 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x546 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x546 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.OVvV, (2, 3, 1, 4), (2, 0, 3, 4)) t3new_abaaba += einsum(x546, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * 6.0 - x547 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x547 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x547 += einsum(x546, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 7, 3)) t3new_babbab += einsum(x547, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x547, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x547, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x547, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 del x547 - x548 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x548 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x548 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.aabb.OVoO, (2, 3, 0, 4), (2, 4, 3, 1)) t3new_abaaba += einsum(x548, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * -6.0 - x549 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x549 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x549 += einsum(x548, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 5, 1, 6, 3, 7)) t3new_babbab += einsum(x549, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x549, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x549, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x549, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x549 - x550 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=np.float64) + x550 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=types[float]) x550 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.OOvO, (2, 3, 1, 4), (2, 3, 0, 4)) - x551 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x551 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x551 += einsum(x550, (0, 1, 2, 3), t3.babbab, (4, 1, 3, 5, 6, 7), (0, 2, 4, 6, 5, 7)) t3new_babbab += einsum(x551, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x551, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x551 - x552 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=np.float64) + x552 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=types[float]) x552 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.vOOO, (1, 2, 3, 4), (0, 3, 4, 2)) - x553 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x553 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x553 += einsum(x552, (0, 1, 2, 3), t3.babbab, (3, 4, 2, 5, 6, 7), (4, 0, 1, 6, 5, 7)) * -1.0 t3new_babbab += einsum(x553, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x553, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x553 - x554 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x554 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x554 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.bbbb.oOOV, (0, 2, 3, 4), (3, 2, 1, 4)) t3new_abaaba += einsum(x554, (0, 1, 2, 3), t3.abaaba, (4, 0, 5, 6, 3, 7), (4, 1, 5, 6, 2, 7)) * -2.0 - x555 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x555 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x555 += einsum(x554, (0, 1, 2, 3), t3.babbab, (4, 5, 0, 6, 7, 3), (5, 4, 1, 7, 2, 6)) t3new_babbab += einsum(x555, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x555, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x555, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x555, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x555 - x556 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x556 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x556 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.bbbb.oVOO, (0, 2, 3, 4), (3, 4, 1, 2)) t3new_abaaba += einsum(x556, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.0 - x557 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x557 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x557 += einsum(x556, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 4, 0, 7, 2, 6)) t3new_babbab += einsum(x557, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x557, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x557, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x557, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x557 - x558 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=np.float64) + x558 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=types[float]) x558 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.aabb.OOoV, (2, 3, 0, 4), (2, 3, 1, 4)) - x559 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x559 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x559 += einsum(x558, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 7, 3), (0, 4, 5, 7, 2, 6)) t3new_babbab += einsum(x559, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x559, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x559 - x560 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x560 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x560 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.oOvO, (0, 2, 1, 3), (2, 3)) t3new_abaaba += einsum(x560, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * 2.0 - x561 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x561 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x561 += einsum(x560, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 2, 0, 5, 4, 6)) t3new_babbab += einsum(x561, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x561, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x561 - x562 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x562 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x562 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovOO, (0, 1, 2, 3), (2, 3)) t3new_abaaba += einsum(x562, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x563 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x563 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x563 += einsum(x562, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 2, 0, 5, 4, 6)) t3new_babbab += einsum(x563, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x563, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x563 - x564 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x564 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x564 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.vOVV, (1, 2, 3, 4), (0, 2, 3, 4)) t3new_abaaba += einsum(x564, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -2.0 - x565 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x565 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x565 += einsum(x564, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 6, 2)) t3new_babbab += einsum(x565, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x565, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x565, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x565, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 del x565 - x566 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x566 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x566 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.vVOV, (1, 2, 3, 4), (0, 3, 4, 2)) t3new_abaaba += einsum(x566, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 2, 7), (4, 0, 5, 6, 3, 7)) * 2.0 - x567 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x567 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x567 += einsum(x566, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 2), (5, 0, 4, 7, 6, 3)) t3new_babbab += einsum(x567, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x567, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x567, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x567, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 del x567 - x568 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x568 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=types[float]) x568 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.bbbb.oVVV, (0, 2, 3, 4), (1, 3, 4, 2)) - x569 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x569 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x569 += einsum(x568, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 3, 7, 2), (5, 4, 6, 7, 0, 1)) * -1.0 t3new_babbab += einsum(x569, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x569, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x569 - x570 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x570 = np.zeros((navir[1], navir[1]), dtype=types[float]) x570 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovVV, (0, 1, 2, 3), (2, 3)) t3new_abaaba += einsum(x570, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x571 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x571 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x571 += einsum(x570, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 5, 0)) t3new_babbab += einsum(x571, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x571, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x571 - x572 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x572 = np.zeros((navir[1], navir[1]), dtype=types[float]) x572 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.oVvV, (0, 2, 1, 3), (2, 3)) t3new_abaaba += einsum(x572, (0, 1), t3.abaaba, (2, 3, 4, 5, 0, 6), (2, 3, 4, 5, 1, 6)) * -2.0 - x573 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x573 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x573 += einsum(x572, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 0), (3, 2, 4, 6, 5, 1)) t3new_babbab += einsum(x573, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x573, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x573 - x574 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=np.float64) + x574 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=types[float]) x574 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.VVvO, (2, 3, 1, 4), (0, 4, 2, 3)) - x575 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x575 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x575 += einsum(x574, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 3, 7), (5, 0, 4, 2, 6, 7)) t3new_babbab += einsum(x575, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x575, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x575 - x576 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x576 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x576 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.aabb.VVoV, (2, 3, 0, 4), (2, 3, 1, 4)) - x577 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x577 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x577 += einsum(x576, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (5, 4, 6, 0, 2, 7)) t3new_babbab += einsum(x577, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x577, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x577 - x578 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x578 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x578 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovoO, (4, 2, 0, 5), (5, 1, 3, 4)) - x579 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x579 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x579 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x578, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x579, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x579, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x579, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x579, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 del x579 - x580 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x580 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x580 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovoO, (0, 2, 4, 5), (5, 1, 3, 4)) - x581 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x581 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x581 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x580, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x581, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x581, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x581, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x581, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) del x581 - x582 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x582 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x582 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.ovoO, (0, 4, 1, 5), (5, 2, 3, 4)) - x583 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x583 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x583 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x582, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x583, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x583, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x583, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x583, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x583 - x584 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x584 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x584 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.ovoO, (0, 2, 4, 5), (1, 5, 3, 4)) - x585 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x585 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x585 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x584, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x585, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x585, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x585, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x585, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x585 - x586 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x586 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x586 += einsum(t2.abab[np.ix_(sOa,sob,sva,sVb)], (0, 1, 2, 3), v.aabb.ovoO, (4, 2, 1, 5), (0, 5, 3, 4)) * -1.0 - x587 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x587 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x587 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x586, (4, 5, 6, 0), (4, 1, 5, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x587, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x587, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x587, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x587, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x587 - x588 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x588 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x588 += einsum(t2.abab[np.ix_(soa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.ovvV, (0, 4, 3, 5), (1, 2, 5, 4)) * -1.0 - x589 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x589 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x589 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x588, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x589, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x589, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x589, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x589, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x589 - x590 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x590 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x590 += einsum(t2.abab[np.ix_(sOa,sOb,sva,svb)], (0, 1, 2, 3), v.aabb.ovvV, (4, 2, 3, 5), (0, 1, 5, 4)) - x591 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x591 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x591 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x590, (4, 5, 6, 0), (4, 5, 1, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x591, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x591, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x591, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x591, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x591 - x592 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x592 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x592 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovvV, (0, 4, 2, 5), (1, 5, 3, 4)) - x593 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x593 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x593 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x592, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x593, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x593, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x593, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x593, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x593 - x594 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x594 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x594 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.ovvV, (0, 2, 4, 5), (1, 3, 5, 4)) - x595 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x595 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x595 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x594, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) t3new_babbab += einsum(x595, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x595, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x595, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x595, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x595 - x596 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x596 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x596 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovvV, (0, 2, 4, 5), (1, 5, 3, 4)) - x597 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x597 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x597 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x596, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x597, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x597, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x597, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x597, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x597 - x598 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x598 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x598 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovoO, (0, 2, 4, 5), (1, 5, 3, 4)) - x599 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x599 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x599 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x598, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x599, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x599, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x599, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x599, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 del x599 - x600 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x600 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x600 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovoO, (4, 3, 1, 5), (0, 5, 2, 4)) - x601 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x601 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x601 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x600, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x601, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x601, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x601 - x602 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x602 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x602 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovoO, (4, 2, 0, 5), (1, 5, 3, 4)) - x603 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x603 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x603 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x602, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x603, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x603, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x603, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x603, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 del x603 - x604 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x604 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x604 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovoO, (1, 3, 4, 5), (0, 5, 2, 4)) - x605 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x605 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x605 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x604, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x605, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x605, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x605 - x606 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x606 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x606 += einsum(t2.bbbb[np.ix_(sob,sob,sVb,sVb)], (0, 1, 2, 3), v.bbbb.ovoO, (1, 4, 0, 5), (5, 2, 3, 4)) - x607 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x607 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x607 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x606, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) t3new_babbab += einsum(x607, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x607, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x607, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x607, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) del x607 - x608 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x608 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x608 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.oOov, (4, 5, 0, 2), (5, 1, 3, 4)) - x609 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x609 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x609 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x608, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x609, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x609, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x609, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x609, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x609 - x610 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x610 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x610 += einsum(t2.abab[np.ix_(soa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.oOov, (0, 4, 5, 3), (4, 1, 2, 5)) * -1.0 - x611 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x611 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x611 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x610, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x611, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x611, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x611 - x612 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x612 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x612 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.oOov, (0, 4, 1, 5), (4, 2, 3, 5)) - x613 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x613 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x613 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x612, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x613, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x613, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x613 - x614 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x614 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x614 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovvV, (0, 4, 2, 5), (1, 3, 5, 4)) - x615 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x615 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x615 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x614, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) t3new_babbab += einsum(x615, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x615, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x615, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x615, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x615 - x616 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x616 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x616 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovvV, (0, 2, 4, 5), (1, 3, 5, 4)) - x617 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x617 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x617 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x616, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) t3new_babbab += einsum(x617, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x617, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x617, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x617, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x617 - x618 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x618 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x618 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovvV, (1, 3, 4, 5), (0, 2, 5, 4)) - x619 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x619 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x619 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x618, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x619, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x619, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x619 - x620 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x620 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x620 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,svb)], (0, 1, 2, 3), v.bbbb.ovvV, (4, 3, 2, 5), (0, 1, 5, 4)) - x621 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x621 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x621 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x620, (4, 5, 6, 1), (0, 5, 4, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x621, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x621, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x621, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x621, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) del x621 - x622 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x622 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x622 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovvV, (1, 4, 3, 5), (0, 2, 5, 4)) - x623 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x623 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x623 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x622, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x623, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x623, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x623 - x624 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x624 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x624 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.vVov, (4, 5, 0, 2), (1, 5, 3, 4)) - x625 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x625 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x625 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x624, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x625, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x625, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x625, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x625, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 del x625 - x626 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x626 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x626 += einsum(t2.abab[np.ix_(sOa,sOb,sva,svb)], (0, 1, 2, 3), v.aabb.vVov, (2, 4, 5, 3), (0, 1, 4, 5)) - x627 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x627 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x627 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x626, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x627, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x627, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x627 - x628 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x628 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x628 += einsum(t2.abab[np.ix_(sOa,sob,sva,sVb)], (0, 1, 2, 3), v.aabb.vVov, (2, 4, 1, 5), (0, 4, 3, 5)) * -1.0 - x629 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x629 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x629 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x628, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x629, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x629, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x629 - x630 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x630 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x630 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.ovoO, (0, 2, 4, 5), (1, 5, 3, 4)) - x631 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x631 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x631 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x630, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x631, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 4.0 t3new_babbab += einsum(x631, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -4.0 del x631 - x632 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x632 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x632 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.ovvV, (0, 2, 4, 5), (1, 3, 5, 4)) - x633 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x633 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x633 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x632, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 t3new_babbab += einsum(x633, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 4.0 t3new_babbab += einsum(x633, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.0 del x633 - x634 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x634 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x634 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.vOOV, (2, 4, 5, 6), (0, 5, 4, 1, 6, 3)) * -1.0 - x635 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x635 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x635 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x634, (6, 0, 2, 7, 5, 8), (6, 7, 1, 3, 8, 4)) t3new_babbab += einsum(x635, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x635, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x635, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x635, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x635 - x636 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x636 = np.zeros((naocc[0], naocc[0], naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x636 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.vOOV, (2, 4, 5, 6), (0, 5, 4, 1, 6, 3)) * -1.0 - x637 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x637 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x637 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x636, (6, 0, 2, 7, 5, 8), (6, 7, 1, 3, 8, 4)) t3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x637, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x637 - x638 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[0], navir[1]), dtype=np.float64) + x638 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[0], navir[1]), dtype=types[float]) x638 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aaaa.oVOV, (0, 4, 5, 6), (5, 1, 2, 6, 4, 3)) * -1.0 - x639 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x639 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x639 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x638, (2, 6, 7, 3, 5, 8), (0, 6, 1, 7, 8, 4)) t3new_babbab += einsum(x639, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x639, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x639, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x639, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x639 - x640 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x640 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x640 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovOV, (0, 2, 4, 5), (4, 1, 5, 3)) t3new_abaaba += einsum(x640, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * 6.0000000000000595 - x641 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x641 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x641 += einsum(x640, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) t3new_babbab += einsum(x641, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.00000000000002 t3new_babbab += einsum(x641, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.00000000000002 t3new_babbab += einsum(x641, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.00000000000002 t3new_babbab += einsum(x641, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.00000000000002 del x641 - x642 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x642 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x642 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.oVvO, (0, 4, 2, 5), (5, 1, 4, 3)) t3new_abaaba += einsum(x642, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * -6.0000000000000595 - x643 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x643 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x643 += einsum(x642, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) t3new_babbab += einsum(x643, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.00000000000002 t3new_babbab += einsum(x643, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.00000000000002 t3new_babbab += einsum(x643, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.00000000000002 t3new_babbab += einsum(x643, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.00000000000002 del x643 - x644 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x644 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x644 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.vOOV, (2, 4, 5, 6), (0, 4, 1, 5, 3, 6)) * -1.0 - x645 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x645 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x645 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x644, (6, 1, 7, 2, 8, 5), (6, 7, 0, 4, 8, 3)) t3new_babbab += einsum(x645, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x645, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x645, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x645, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x645 - x646 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=np.float64) + x646 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=types[float]) x646 += einsum(t2.abab[np.ix_(sOa,sOb,sva,svb)], (0, 1, 2, 3), v.aabb.vOvO, (2, 4, 3, 5), (0, 4, 1, 5)) - x647 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x647 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x647 += einsum(x646, (0, 1, 2, 3), t3.babbab, (4, 1, 3, 5, 6, 7), (0, 2, 4, 6, 5, 7)) t3new_babbab += einsum(x647, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x647, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x647 - x648 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1], navir[0], navir[0]), dtype=np.float64) + x648 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1], navir[0], navir[0]), dtype=types[float]) x648 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.OVvO, (4, 5, 3, 6), (0, 4, 1, 6, 2, 5)) - x649 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x649 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x649 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x648, (6, 1, 7, 2, 8, 4), (6, 7, 0, 8, 3, 5)) t3new_babbab += einsum(x649, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x649, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x649 - x650 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x650 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x650 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.OVoV, (4, 5, 1, 6), (0, 4, 2, 5, 3, 6)) - x651 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x651 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x651 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x650, (6, 1, 7, 4, 8, 5), (6, 0, 2, 7, 8, 3)) t3new_babbab += einsum(x651, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x651, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x651 - x652 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=np.float64) + x652 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=types[float]) x652 += einsum(t2.abab[np.ix_(sOa,sob,sva,sVb)], (0, 1, 2, 3), v.aabb.vOoV, (2, 4, 1, 5), (0, 4, 3, 5)) * -1.0 - x653 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x653 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x653 += einsum(x652, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 7, 3), (0, 4, 5, 7, 2, 6)) t3new_babbab += einsum(x653, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.00000000000002 t3new_babbab += einsum(x653, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.00000000000002 del x653 - x654 = np.zeros((naocc[1], naocc[1], navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x654 = np.zeros((naocc[1], naocc[1], navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x654 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aabb.oVOV, (0, 4, 5, 6), (1, 5, 2, 4, 3, 6)) * -1.0 - x655 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x655 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x655 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x654, (6, 2, 7, 4, 8, 5), (1, 6, 0, 7, 8, 3)) t3new_babbab += einsum(x655, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x655, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x655, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x655, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x655 - x656 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x656 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x656 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.ovOV, (0, 2, 4, 5), (1, 4, 3, 5)) t3new_abaaba += einsum(x656, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.00000000000002 - x657 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x657 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x657 += einsum(x656, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 2, 6)) t3new_babbab += einsum(x657, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.00000000000002 t3new_babbab += einsum(x657, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.00000000000002 t3new_babbab += einsum(x657, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.00000000000002 t3new_babbab += einsum(x657, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.00000000000002 del x657 - x658 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x658 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x658 += einsum(t2.abab[np.ix_(soa,sOb,sva,svb)], (0, 1, 2, 3), v.aabb.ovvO, (0, 2, 3, 4), (1, 4)) * -1.0 t3new_abaaba += einsum(x658, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * 2.0 - x659 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x659 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x659 += einsum(x658, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x659, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x659, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x659 - x660 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=np.float64) + x660 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=types[float]) x660 += einsum(t2.abab[np.ix_(soa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.oVvO, (0, 4, 3, 5), (1, 5, 2, 4)) * -1.0 - x661 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x661 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x661 += einsum(x660, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 3, 7), (5, 0, 4, 2, 6, 7)) t3new_babbab += einsum(x661, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.00000000000002 t3new_babbab += einsum(x661, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.00000000000002 del x661 - x662 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x662 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x662 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.oVoV, (0, 4, 1, 5), (2, 4, 3, 5)) - x663 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x663 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x663 += einsum(x662, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (5, 4, 6, 0, 2, 7)) t3new_babbab += einsum(x663, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x663, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x663 - x664 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x664 = np.zeros((navir[1], navir[1]), dtype=types[float]) x664 += einsum(t2.abab[np.ix_(soa,sob,sva,sVb)], (0, 1, 2, 3), v.aabb.ovoV, (0, 2, 1, 4), (3, 4)) * -1.0 t3new_abaaba += einsum(x664, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x665 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x665 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x665 += einsum(x664, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x665, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x665, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x665 - x666 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=np.float64) + x666 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=types[float]) x666 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.vOOV, (3, 4, 5, 6), (0, 1, 5, 4, 2, 6)) - x667 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x667 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x667 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x666, (6, 7, 1, 2, 8, 5), (6, 7, 0, 8, 3, 4)) t3new_babbab += einsum(x667, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 3.0 t3new_babbab += einsum(x667, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -3.0 del x667 - x668 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=np.float64) + x668 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=types[float]) x668 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.bbbb.vOOV, (3, 4, 5, 6), (0, 1, 5, 4, 2, 6)) - x669 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x669 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x669 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x668, (6, 7, 1, 2, 8, 5), (6, 7, 0, 8, 3, 4)) t3new_babbab += einsum(x669, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 3.0 t3new_babbab += einsum(x669, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -3.0 del x669 - x670 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], navir[1]), dtype=np.float64) + x670 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], navir[1]), dtype=types[float]) x670 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.bbbb.oVOV, (1, 4, 5, 6), (0, 5, 2, 3, 6, 4)) - x671 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x671 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x671 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x670, (6, 2, 7, 8, 4, 5), (6, 0, 1, 7, 8, 3)) t3new_babbab += einsum(x671, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -6.0 t3new_babbab += einsum(x671, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 6.0 del x671 - x672 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=np.float64) + x672 = np.zeros((naocc[0], naocc[1], naocc[1], naocc[1], navir[0], navir[1]), dtype=types[float]) x672 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.OVvO, (4, 5, 2, 6), (4, 0, 1, 6, 5, 3)) * -1.0 - x673 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x673 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x673 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x672, (2, 6, 7, 1, 5, 8), (0, 7, 6, 3, 8, 4)) * -1.0 t3new_babbab += einsum(x673, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -4.0 t3new_babbab += einsum(x673, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 4.0 del x673 - x674 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], navir[1]), dtype=np.float64) + x674 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], navir[1]), dtype=types[float]) x674 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.aabb.OVoV, (4, 5, 0, 6), (4, 1, 5, 2, 3, 6)) * -1.0 - x675 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x675 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x675 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x674, (2, 6, 5, 7, 8, 4), (0, 6, 1, 3, 7, 8)) t3new_babbab += einsum(x675, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 4.0 t3new_babbab += einsum(x675, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -4.0 del x675 - x676 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x676 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x676 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.OVov, (4, 5, 0, 2), (4, 1, 5, 3)) t3new_abaaba += einsum(x676, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * 12.000000000000123 - x677 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x677 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x677 += einsum(x676, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) t3new_babbab += einsum(x677, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 4.00000000000004 t3new_babbab += einsum(x677, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.00000000000004 t3new_babbab += einsum(x677, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -4.00000000000004 t3new_babbab += einsum(x677, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 4.00000000000004 del x677 - x678 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x678 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x678 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.vOOV, (2, 4, 5, 6), (0, 1, 5, 4, 3, 6)) * -1.0 - x679 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x679 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x679 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x678, (6, 7, 2, 0, 8, 5), (1, 7, 6, 4, 8, 3)) t3new_babbab += einsum(x679, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x679, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x679 - x680 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=np.float64) + x680 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=types[float]) x680 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,svb)], (0, 1, 2, 3), v.bbbb.vOvO, (2, 4, 3, 5), (0, 1, 4, 5)) - x681 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x681 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x681 += einsum(x680, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 5, 6, 7), (4, 1, 0, 6, 5, 7)) * -1.0 t3new_babbab += einsum(x681, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x681, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 del x681 - x682 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x682 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x682 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.vOOV, (2, 4, 5, 6), (0, 1, 5, 4, 3, 6)) * -1.0 - x683 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x683 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x683 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x682, (6, 7, 0, 2, 8, 5), (1, 7, 6, 4, 8, 3)) * -1.0 t3new_babbab += einsum(x683, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x683, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x683 - x684 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x684 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], navir[1]), dtype=types[float]) x684 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.bbbb.oVOV, (0, 4, 5, 6), (1, 5, 2, 3, 6, 4)) * -1.0 - x685 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x685 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x685 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x684, (6, 2, 7, 8, 3, 5), (1, 6, 0, 4, 7, 8)) t3new_babbab += einsum(x685, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.0 t3new_babbab += einsum(x685, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 4.0 del x685 - x686 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x686 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x686 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovOV, (0, 2, 4, 5), (1, 4, 3, 5)) t3new_abaaba += einsum(x686, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 4.00000000000004 - x687 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x687 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x687 += einsum(x686, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 2, 6)) t3new_babbab += einsum(x687, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 4.00000000000004 t3new_babbab += einsum(x687, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.00000000000004 t3new_babbab += einsum(x687, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -4.00000000000004 t3new_babbab += einsum(x687, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 4.00000000000004 del x687 - x688 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x688 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x688 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,svb)], (0, 1, 2, 3), v.bbbb.ovvO, (0, 3, 2, 4), (1, 4)) * -1.0 - x689 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x689 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x689 += einsum(x688, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x689, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x689, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x689, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x689, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x689 - x690 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x690 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x690 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.oVvO, (0, 4, 2, 5), (1, 5, 3, 4)) t3new_abaaba += einsum(x690, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -4.00000000000004 - x691 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x691 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x691 += einsum(x690, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 2, 6)) t3new_babbab += einsum(x691, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -4.00000000000004 t3new_babbab += einsum(x691, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 4.00000000000004 t3new_babbab += einsum(x691, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 4.00000000000004 t3new_babbab += einsum(x691, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -4.00000000000004 del x691 - x692 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x692 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x692 += einsum(x387, (0, 1), t3.babbab, (2, 1, 3, 4, 5, 6), (0, 2, 3, 5, 4, 6)) t3new_babbab += einsum(x692, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x692, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x692 - x693 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x693 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=types[float]) x693 += einsum(t2.bbbb[np.ix_(sob,sob,sVb,sVb)], (0, 1, 2, 3), v.bbbb.oVoV, (0, 4, 1, 5), (2, 3, 5, 4)) * -1.0 t3new_babbab += einsum(x693, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 2, 7, 3), (4, 5, 6, 0, 7, 1)) * 2.0 - x694 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x694 = np.zeros((navir[1], navir[1]), dtype=types[float]) x694 += einsum(t2.bbbb[np.ix_(sob,sob,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovoV, (1, 2, 0, 4), (3, 4)) * -1.0 t3new_abaaba += einsum(x694, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x695 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x695 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x695 += einsum(x694, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x695, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x695, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x695 - x696 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x696 = np.zeros((navir[1], navir[1]), dtype=types[float]) x696 += einsum(t2.bbbb[np.ix_(sob,sob,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovoV, (1, 2, 0, 4), (3, 4)) * -1.0 t3new_abaaba += einsum(x696, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x697 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x697 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x697 += einsum(x696, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x697, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x697, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x697 - x698 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x698 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x698 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.aabb.ovoO, (0, 6, 2, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x699 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x699 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x699 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x698, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x698 t3new_babbab += einsum(x699, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x699, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x699 - x700 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x700 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x700 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.aabb.ovvV, (0, 6, 4, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x701 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x701 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x701 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x700, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x700 t3new_babbab += einsum(x701, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x701, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x701 - x702 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x702 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x702 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aabb.ovvV, (2, 6, 1, 7), (0, 3, 4, 5, 7, 6)) * -1.0 - x703 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x703 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x703 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x702, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x702 t3new_babbab += einsum(x703, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) @@ -3933,9 +3934,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x703, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x703, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x703 - x704 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x704 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x704 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aabb.ovoO, (2, 6, 0, 7), (3, 7, 4, 1, 5, 6)) * -1.0 - x705 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x705 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x705 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x704, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x704 t3new_babbab += einsum(x705, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -3943,9 +3944,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x705, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x705, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x705 - x706 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x706 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x706 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aabb.ovvV, (0, 4, 6, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x707 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x707 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x707 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x706, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x706 t3new_babbab += einsum(x707, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) @@ -3953,49 +3954,49 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x707, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x707, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) del x707 - x708 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=np.float64) + x708 = np.zeros((naocc[1], navir[0], navir[1], nvir[0]), dtype=types[float]) x708 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t1.bb[np.ix_(sob,sVb)], (2, 3), v.aabb.ovoO, (0, 4, 2, 5), (5, 1, 3, 4)) - x709 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x709 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x709 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x708, (4, 5, 6, 2), (0, 1, 4, 5, 6, 3)) * -1.0 t3new_babbab += einsum(x709, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x709, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x709, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x709, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x709 - x710 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x710 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x710 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.aabb.oOov, (0, 6, 2, 7), (6, 3, 1, 4, 5, 7)) * -1.0 - x711 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x711 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x711 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x710, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x710 t3new_babbab += einsum(x711, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x711, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x711 - x712 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x712 = np.zeros((naocc[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x712 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t1.bb[np.ix_(sob,sVb)], (2, 3), v.aabb.oOov, (0, 4, 2, 5), (4, 1, 3, 5)) - x713 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x713 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x713 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x712, (4, 5, 6, 2), (4, 0, 1, 5, 6, 3)) * -1.0 t3new_babbab += einsum(x713, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x713, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x713 - x714 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x714 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x714 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.aabb.vVov, (6, 7, 2, 1), (0, 3, 7, 4, 5, 6)) * -1.0 - x715 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x715 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x715 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x714, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x714 t3new_babbab += einsum(x715, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x715, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x715 - x716 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=np.float64) + x716 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], navir[1], nvir[0]), dtype=types[float]) x716 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.aabb.vVov, (6, 7, 0, 4), (2, 3, 7, 1, 5, 6)) * -1.0 - x717 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x717 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x717 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x716, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x716 t3new_babbab += einsum(x717, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x717, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x717 - x718 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x718 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x718 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.bbbb.ovoO, (3, 6, 0, 7), (2, 7, 4, 1, 5, 6)) - x719 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x719 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x719 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x718, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x718 t3new_babbab += einsum(x719, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4003,9 +4004,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x719, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x719, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x719 - x720 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x720 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x720 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.bbbb.ovoO, (0, 6, 3, 7), (2, 7, 4, 1, 5, 6)) - x721 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x721 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x721 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x720, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x720 t3new_babbab += einsum(x721, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4013,9 +4014,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x721, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x721, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x721 - x722 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x722 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x722 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aabb.oOov, (2, 6, 0, 7), (6, 3, 4, 1, 5, 7)) * -1.0 - x723 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x723 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x723 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x722, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x722 t3new_babbab += einsum(x723, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4023,18 +4024,18 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x723, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x723, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x723 - x724 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x724 = np.zeros((naocc[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x724 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t1.bb[np.ix_(sob,sVb)], (2, 3), v.bbbb.ovoO, (2, 4, 0, 5), (5, 1, 3, 4)) - x725 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x725 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x725 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x724, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) t3new_babbab += einsum(x725, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x725, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x725, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x725, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) del x725 - x726 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x726 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x726 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.bbbb.ovvV, (3, 1, 6, 7), (2, 0, 4, 5, 7, 6)) - x727 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x727 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x727 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x726, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x726 t3new_babbab += einsum(x727, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) @@ -4042,9 +4043,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x727, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x727, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) del x727 - x728 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x728 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x728 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.bbbb.ovvV, (0, 6, 5, 7), (2, 3, 4, 1, 7, 6)) - x729 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x729 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x729 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x728, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x728 t3new_babbab += einsum(x729, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4052,9 +4053,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x729, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x729, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x729 - x730 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x730 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x730 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.bbbb.ovvV, (0, 5, 6, 7), (2, 3, 4, 1, 7, 6)) - x731 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x731 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x731 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x730, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x730 t3new_babbab += einsum(x731, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4062,9 +4063,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x731, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x731, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x731 - x732 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=np.float64) + x732 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], navir[1], nvir[1]), dtype=types[float]) x732 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aabb.vVov, (4, 6, 0, 7), (2, 3, 6, 1, 5, 7)) * -1.0 - x733 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x733 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x733 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x732, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x732 t3new_babbab += einsum(x733, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4072,189 +4073,189 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x733, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x733, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x733 - x734 = np.zeros((naocc[0], naocc[1], naocc[1], nvir[0]), dtype=np.float64) + x734 = np.zeros((naocc[0], naocc[1], naocc[1], nvir[0]), dtype=types[float]) x734 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.vOvO, (2, 3, 1, 4), (3, 0, 4, 2)) - x735 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=np.float64) + x735 = np.zeros((naocc[0], naocc[0], naocc[1], naocc[1]), dtype=types[float]) x735 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x734, (2, 3, 4, 1), (0, 2, 3, 4)) del x734 - x736 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x736 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x736 += einsum(x735, (0, 1, 2, 3), t3.babbab, (4, 1, 3, 5, 6, 7), (0, 2, 4, 6, 5, 7)) t3new_babbab += einsum(x736, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x736, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x736 - x737 = np.zeros((naocc[0], naocc[0], navir[1], nocc[1]), dtype=np.float64) + x737 = np.zeros((naocc[0], naocc[0], navir[1], nocc[1]), dtype=types[float]) x737 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), v.aabb.vOoV, (1, 2, 3, 4), (0, 2, 4, 3)) - x738 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=np.float64) + x738 = np.zeros((naocc[0], naocc[0], navir[1], navir[1]), dtype=types[float]) x738 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x737, (2, 3, 4, 0), (2, 3, 1, 4)) del x737 - x739 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x739 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x739 += einsum(x738, (0, 1, 2, 3), t3.babbab, (4, 1, 5, 6, 7, 3), (0, 4, 5, 7, 2, 6)) t3new_babbab += einsum(x739, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x739, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x739 - x740 = np.zeros((naocc[1], naocc[1], navir[0], nocc[0]), dtype=np.float64) + x740 = np.zeros((naocc[1], naocc[1], navir[0], nocc[0]), dtype=types[float]) x740 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.aabb.oVvO, (2, 3, 1, 4), (0, 4, 3, 2)) - x741 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=np.float64) + x741 = np.zeros((naocc[1], naocc[1], navir[0], navir[0]), dtype=types[float]) x741 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x740, (2, 3, 4, 0), (2, 3, 1, 4)) del x740 - x742 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x742 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x742 += einsum(x741, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 3, 7), (5, 0, 4, 2, 6, 7)) t3new_babbab += einsum(x742, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x742, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x742 - x743 = np.zeros((naocc[1], nvir[1]), dtype=np.float64) + x743 = np.zeros((naocc[1], nvir[1]), dtype=types[float]) x743 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovvO, (0, 1, 2, 3), (3, 2)) - x744 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x744 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x744 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x743, (2, 1), (0, 2)) del x743 t3new_abaaba += einsum(x744, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x745 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x745 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x745 += einsum(x744, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x745, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x745, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x745 - x746 = np.zeros((navir[0], navir[1], navir[1], nocc[0]), dtype=np.float64) + x746 = np.zeros((navir[0], navir[1], navir[1], nocc[0]), dtype=types[float]) x746 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.aabb.oVoV, (2, 3, 0, 4), (3, 1, 4, 2)) - x747 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=np.float64) + x747 = np.zeros((navir[0], navir[0], navir[1], navir[1]), dtype=types[float]) x747 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x746, (2, 3, 4, 0), (1, 2, 3, 4)) del x746 - x748 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x748 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x748 += einsum(x747, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 7, 1, 3), (5, 4, 6, 0, 2, 7)) t3new_babbab += einsum(x748, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x748, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x748 - x749 = np.zeros((navir[1], nocc[1]), dtype=np.float64) + x749 = np.zeros((navir[1], nocc[1]), dtype=types[float]) x749 += einsum(t1.aa[np.ix_(soa,sva)], (0, 1), v.aabb.ovoV, (0, 1, 2, 3), (3, 2)) - x750 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x750 = np.zeros((navir[1], navir[1]), dtype=types[float]) x750 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x749, (2, 0), (1, 2)) del x749 t3new_abaaba += einsum(x750, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x751 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x751 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x751 += einsum(x750, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x751, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x751, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x751 - x752 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=np.float64) + x752 = np.zeros((naocc[0], naocc[1], navir[0], navir[1]), dtype=types[float]) x752 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x530, (2, 3, 4, 0), (2, 3, 4, 1)) t3new_abaaba += einsum(x752, (0, 1, 2, 3), t3.aaaaaa, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) * -6.0 - x753 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x753 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x753 += einsum(x752, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 2), (4, 1, 5, 6, 3, 7)) t3new_babbab += einsum(x753, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x753, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x753, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x753, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x753 - x754 = np.zeros((naocc[1], naocc[1], naocc[1], nvir[1]), dtype=np.float64) + x754 = np.zeros((naocc[1], naocc[1], naocc[1], nvir[1]), dtype=types[float]) x754 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.vOvO, (2, 3, 1, 4), (0, 3, 4, 2)) - x755 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=np.float64) + x755 = np.zeros((naocc[1], naocc[1], naocc[1], naocc[1]), dtype=types[float]) x755 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x754, (2, 3, 4, 1), (2, 0, 4, 3)) del x754 - x756 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x756 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x756 += einsum(x755, (0, 1, 2, 3), t3.babbab, (2, 4, 3, 5, 6, 7), (4, 1, 0, 6, 5, 7)) * -1.0 t3new_babbab += einsum(x756, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x756, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 del x756 - x757 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x757 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x757 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.ovOV, (2, 1, 3, 4), (0, 3, 4, 2)) - x758 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x758 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x758 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x757, (2, 3, 4, 0), (2, 3, 1, 4)) del x757 t3new_abaaba += einsum(x758, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * -2.0 - x759 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x759 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x759 += einsum(x758, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 2, 6)) t3new_babbab += einsum(x759, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x759, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x759, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x759, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x759 - x760 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x760 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x760 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), v.bbbb.oVvO, (2, 3, 1, 4), (0, 4, 3, 2)) - x761 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=np.float64) + x761 = np.zeros((naocc[1], naocc[1], navir[1], navir[1]), dtype=types[float]) x761 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x760, (2, 3, 4, 0), (2, 3, 1, 4)) del x760 t3new_abaaba += einsum(x761, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 3, 7), (4, 0, 5, 6, 2, 7)) * 2.0 - x762 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x762 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x762 += einsum(x761, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 7, 2, 6)) t3new_babbab += einsum(x762, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x762, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x762, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x762, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x762 - x763 = np.zeros((naocc[1], nvir[1]), dtype=np.float64) + x763 = np.zeros((naocc[1], nvir[1]), dtype=types[float]) x763 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvO, (0, 2, 1, 3), (3, 2)) - x764 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x764 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x764 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x763, (2, 1), (0, 2)) del x763 t3new_abaaba += einsum(x764, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * 2.0 - x765 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x765 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x765 += einsum(x764, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x765, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x765, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x765 - x766 = np.zeros((naocc[1], nvir[1]), dtype=np.float64) + x766 = np.zeros((naocc[1], nvir[1]), dtype=types[float]) x766 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovvO, (0, 1, 2, 3), (3, 2)) - x767 = np.zeros((naocc[1], naocc[1]), dtype=np.float64) + x767 = np.zeros((naocc[1], naocc[1]), dtype=types[float]) x767 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x766, (2, 1), (0, 2)) del x766 t3new_abaaba += einsum(x767, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 0, 3, 4, 5, 6)) * -2.0 - x768 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x768 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x768 += einsum(x767, (0, 1), t3.babbab, (2, 3, 1, 4, 5, 6), (3, 0, 2, 5, 4, 6)) t3new_babbab += einsum(x768, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x768, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x768 - x769 = np.zeros((navir[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x769 = np.zeros((navir[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x769 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), v.bbbb.oVoV, (2, 3, 0, 4), (1, 3, 4, 2)) - x770 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x770 = np.zeros((navir[1], navir[1], navir[1], navir[1]), dtype=types[float]) x770 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x769, (2, 3, 4, 0), (2, 1, 4, 3)) del x769 t3new_babbab += einsum(x770, (0, 1, 2, 3), t3.babbab, (4, 5, 6, 2, 7, 3), (4, 5, 6, 0, 7, 1)) * 2.0 - x771 = np.zeros((navir[1], nocc[1]), dtype=np.float64) + x771 = np.zeros((navir[1], nocc[1]), dtype=types[float]) x771 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovoV, (0, 1, 2, 3), (3, 2)) - x772 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x772 = np.zeros((navir[1], navir[1]), dtype=types[float]) x772 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x771, (2, 0), (1, 2)) del x771 t3new_abaaba += einsum(x772, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * -2.0 - x773 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x773 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x773 += einsum(x772, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x773, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x773, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x773 - x774 = np.zeros((navir[1], nocc[1]), dtype=np.float64) + x774 = np.zeros((navir[1], nocc[1]), dtype=types[float]) x774 += einsum(t1.bb[np.ix_(sob,svb)], (0, 1), v.bbbb.ovoV, (2, 1, 0, 3), (3, 2)) - x775 = np.zeros((navir[1], navir[1]), dtype=np.float64) + x775 = np.zeros((navir[1], navir[1]), dtype=types[float]) x775 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x774, (2, 0), (1, 2)) del x774 t3new_abaaba += einsum(x775, (0, 1), t3.abaaba, (2, 3, 4, 5, 1, 6), (2, 3, 4, 5, 0, 6)) * 2.0 - x776 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x776 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x776 += einsum(x775, (0, 1), t3.babbab, (2, 3, 4, 5, 6, 1), (3, 2, 4, 6, 0, 5)) t3new_babbab += einsum(x776, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x776, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x776 - x777 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x777 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=types[float]) x777 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 0, 5), (1, 3, 4, 5)) - x778 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x778 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x778 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x777, (2, 3, 4, 1), (0, 2, 3, 4)) - x779 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x779 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x779 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x778, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x779, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x779, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x779, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x779, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 del x779 - x780 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x780 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=types[float]) x780 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 0, 2), (1, 3, 4, 5)) - x781 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x781 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x781 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x780, (2, 3, 4, 1), (0, 2, 3, 4)) - x782 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x782 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x782 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x781, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 t3new_babbab += einsum(x782, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x782, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x782, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x782, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) del x782 - x783 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x783 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x783 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x780, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x784 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x784 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x784 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x783, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x783 t3new_babbab += einsum(x784, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4262,9 +4263,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x784, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x784, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x784 - x785 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x785 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x785 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x777, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x786 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x786 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x786 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x785, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x785 t3new_babbab += einsum(x786, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4272,57 +4273,57 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x786, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x786, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x786 - x787 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x787 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x787 += einsum(x11, (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x11 - x788 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x788 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x788 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x787, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x788, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x788, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x788, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x788, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x788 - x789 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x789 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x789 += einsum(x12, (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x12 - x790 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x790 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x790 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x789, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x790, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x790, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x790, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x790, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x790 - x791 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x791 = np.zeros((naocc[1], navir[1], nocc[0], nvir[0]), dtype=types[float]) x791 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.aabb.ovov, (4, 5, 0, 2), (1, 3, 4, 5)) - x792 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x792 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x792 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x791, (2, 3, 4, 1), (0, 2, 3, 4)) - x793 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x793 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x793 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x792, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x793, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x793, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x793, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x793, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x793 - x794 = np.zeros((naocc[1], navir[0], nocc[1], nvir[0]), dtype=np.float64) + x794 = np.zeros((naocc[1], navir[0], nocc[1], nvir[0]), dtype=types[float]) x794 += einsum(t2.abab[np.ix_(soa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.ovov, (0, 4, 5, 3), (1, 2, 5, 4)) * -1.0 - x795 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x795 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x795 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x794, (2, 3, 4, 1), (0, 2, 3, 4)) - x796 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x796 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x796 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x795, (4, 5, 6, 0), (4, 1, 5, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x796, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x796, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x796 - x797 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], nocc[0], nocc[1]), dtype=np.float64) + x797 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], nocc[0], nocc[1]), dtype=types[float]) x797 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 1, 7, 4), (0, 2, 3, 5, 6, 7)) * -1.0 - x798 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x798 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x798 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), x797, (4, 5, 6, 7, 0, 1), (4, 5, 6, 2, 7, 3)) del x797 t3new_babbab += einsum(x798, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x798, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x798 - x799 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x799 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x799 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x791, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 - x800 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x800 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x800 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x799, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x799 t3new_babbab += einsum(x800, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 @@ -4330,44 +4331,44 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x800, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x800, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 del x800 - x801 = np.zeros((naocc[0], naocc[1], nocc[0], nocc[1]), dtype=np.float64) + x801 = np.zeros((naocc[0], naocc[1], nocc[0], nocc[1]), dtype=types[float]) x801 += einsum(t2.abab[np.ix_(sOa,sOb,sva,svb)], (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x802 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x802 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x802 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x801, (4, 5, 6, 0), (4, 5, 1, 2, 3, 6)) * -1.0 - x803 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x803 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x803 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x802, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x802 t3new_babbab += einsum(x803, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x803, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x803 - x804 = np.zeros((naocc[0], navir[1], nocc[0], nvir[1]), dtype=np.float64) + x804 = np.zeros((naocc[0], navir[1], nocc[0], nvir[1]), dtype=types[float]) x804 += einsum(t2.abab[np.ix_(sOa,sob,sva,sVb)], (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (0, 3, 4, 5)) * -1.0 - x805 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x805 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x805 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x804, (4, 5, 6, 2), (4, 0, 1, 3, 5, 6)) * -1.0 - x806 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x806 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x806 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x805, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x805 t3new_babbab += einsum(x806, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x806, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x806 - x807 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x807 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x807 += einsum(x0, (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x808 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x808 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x808 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x807, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x808, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x808, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x808 - x809 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x809 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x809 += einsum(x0, (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x0 - x810 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x810 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x810 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x809, (4, 5, 6, 1), (0, 5, 4, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x810, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x810, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x810 - x811 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], nocc[0], nocc[1]), dtype=np.float64) + x811 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], nocc[0], nocc[1]), dtype=types[float]) x811 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 4, 7, 1), (2, 0, 3, 5, 6, 7)) * -1.0 - x812 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x812 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x812 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), x811, (4, 5, 6, 7, 0, 1), (4, 5, 6, 2, 7, 3)) del x811 t3new_babbab += einsum(x812, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4375,29 +4376,29 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x812, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x812, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x812 - x813 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x813 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=types[float]) x813 += einsum(t2.abab[np.ix_(soa,sOb,sva,sVb)], (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 3, 4, 5)) - x814 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x814 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x814 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x813, (2, 3, 4, 1), (0, 2, 3, 4)) - x815 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x815 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x815 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x814, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x815, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x815, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x815, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x815, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x815 - x816 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x816 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x816 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x804, (2, 3, 4, 1), (2, 0, 3, 4)) - x817 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x817 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x817 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x816, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x817, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) t3new_babbab += einsum(x817, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x817, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x817, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x817 - x818 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x818 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x818 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x794, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 - x819 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x819 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x819 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x818, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x818 t3new_babbab += einsum(x819, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4405,9 +4406,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x819, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x819, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x819 - x820 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x820 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x820 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x801, (4, 5, 0, 6), (4, 5, 1, 2, 3, 6)) * -1.0 - x821 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x821 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x821 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x820, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x820 t3new_babbab += einsum(x821, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4415,9 +4416,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x821, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x821, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x821 - x822 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x822 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x822 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x813, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x823 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x823 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x823 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x822, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x822 t3new_babbab += einsum(x823, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4425,59 +4426,59 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x823, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x823, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x823 - x824 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=np.float64) + x824 = np.zeros((naocc[0], naocc[1], navir[1], nocc[0]), dtype=types[float]) x824 += einsum(x15, (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x15 - x825 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x825 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x825 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x824, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x825, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x825, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) t3new_babbab += einsum(x825, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x825, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x825 - x826 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x826 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=types[float]) x826 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 0, 2), (1, 3, 4, 5)) - x827 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x827 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x827 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x826, (2, 3, 4, 1), (0, 2, 3, 4)) - x828 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x828 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x828 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x827, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x828, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x828, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x828, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x828, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 del x828 - x829 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=np.float64) + x829 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=types[float]) x829 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 5), (0, 2, 4, 5)) - x830 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x830 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x830 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x829, (2, 3, 4, 1), (2, 0, 3, 4)) - x831 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x831 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x831 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x830, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x831, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x831, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x831 - x832 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x832 = np.zeros((naocc[1], navir[1], nocc[1], nvir[1]), dtype=types[float]) x832 += einsum(t2.bbbb[np.ix_(sob,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 0, 5), (1, 3, 4, 5)) - x833 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x833 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x833 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x832, (2, 3, 4, 1), (0, 2, 3, 4)) - x834 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x834 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x834 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x833, (4, 5, 6, 1), (0, 4, 5, 2, 3, 6)) t3new_babbab += einsum(x834, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x834, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x834, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x834, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 del x834 - x835 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=np.float64) + x835 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=types[float]) x835 += einsum(t2.abab[np.ix_(sOa,sob,sVa,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) - x836 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x836 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x836 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x835, (2, 3, 4, 1), (2, 0, 3, 4)) - x837 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x837 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x837 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x836, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x837, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x837, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 del x837 - x838 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], nocc[1], nocc[1]), dtype=np.float64) + x838 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], nocc[1], nocc[1]), dtype=types[float]) x838 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 1, 7, 5), (2, 0, 3, 4, 6, 7)) - x839 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x839 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x839 += einsum(t2.bbbb[np.ix_(sob,sob,sVb,sVb)], (0, 1, 2, 3), x838, (4, 5, 6, 7, 0, 1), (4, 5, 6, 7, 2, 3)) del x838 t3new_babbab += einsum(x839, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 @@ -4485,9 +4486,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x839, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) t3new_babbab += einsum(x839, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x839 - x840 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x840 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x840 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x826, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x841 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x841 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x841 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x840, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x840 t3new_babbab += einsum(x841, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 2.0 @@ -4495,9 +4496,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x841, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x841, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x841 - x842 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x842 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x842 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x832, (4, 5, 6, 3), (0, 1, 4, 2, 5, 6)) - x843 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x843 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x843 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x842, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x842 t3new_babbab += einsum(x843, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 @@ -4505,19 +4506,19 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x843, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x843, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x843 - x844 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x844 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x844 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x829, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 - x845 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x845 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x845 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x844, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x844 t3new_babbab += einsum(x845, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x845, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x845 - x846 = np.zeros((naocc[1], naocc[1], nocc[1], nocc[1]), dtype=np.float64) + x846 = np.zeros((naocc[1], naocc[1], nocc[1], nocc[1]), dtype=types[float]) x846 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,svb)], (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x847 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x847 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x847 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x846, (4, 5, 1, 6), (0, 4, 5, 2, 3, 6)) * -1.0 - x848 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x848 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x848 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x847, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x847 t3new_babbab += einsum(x848, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4525,89 +4526,89 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x848, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x848, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 del x848 - x849 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x849 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x849 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x835, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 - x850 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x850 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x850 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x849, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x849 t3new_babbab += einsum(x850, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x850, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x850 - x851 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x851 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x851 += einsum(x1, (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x852 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x852 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x852 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x851, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x852, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x852, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x852 - x853 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x853 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x853 += einsum(x20, (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 1), (2, 3, 4, 0)) - x854 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x854 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x854 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x853, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x854, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 t3new_babbab += einsum(x854, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x854 - x855 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x855 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x855 += einsum(x1, (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x1 - x856 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x856 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x856 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x855, (4, 5, 6, 1), (0, 5, 4, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x856, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x856, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x856 - x857 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=np.float64) + x857 = np.zeros((naocc[1], naocc[1], navir[1], nocc[1]), dtype=types[float]) x857 += einsum(x20, (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 1, 4), (2, 3, 4, 0)) * -1.0 del x20 - x858 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x858 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x858 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x857, (4, 5, 6, 1), (0, 5, 4, 2, 6, 3)) * -1.0 t3new_babbab += einsum(x858, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 2.0 t3new_babbab += einsum(x858, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -2.0 del x858 - x859 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=np.float64) + x859 = np.zeros((naocc[0], navir[0], nocc[1], nvir[1]), dtype=types[float]) x859 += einsum(t2.aaaa[np.ix_(soa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 3, 4, 5)) - x860 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=np.float64) + x860 = np.zeros((naocc[0], naocc[1], navir[0], nocc[1]), dtype=types[float]) x860 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x859, (2, 3, 4, 1), (2, 0, 3, 4)) - x861 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x861 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x861 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x860, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 t3new_babbab += einsum(x861, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.0 t3new_babbab += einsum(x861, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * 4.0 del x861 - x862 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x862 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x862 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x859, (4, 5, 6, 2), (4, 0, 1, 5, 3, 6)) * -1.0 - x863 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x863 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x863 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x862, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x862 t3new_babbab += einsum(x863, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * 4.0 t3new_babbab += einsum(x863, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -4.0 del x863 - x864 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x864 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[0], nvir[0]), dtype=types[float]) x864 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 7, 2, 1), (0, 3, 4, 5, 6, 7)) * -1.0 - x865 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x865 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x865 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x864, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x864 - x866 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x866 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x866 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x865, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x865 t3new_babbab += einsum(x866, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 t3new_babbab += einsum(x866, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -2.0 del x866 - x867 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x867 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[0], nvir[0]), dtype=types[float]) x867 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 7, 0, 4), (2, 3, 1, 5, 6, 7)) * -1.0 - x868 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x868 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x868 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x867, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x867 - x869 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x869 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x869 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x868, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x868 t3new_babbab += einsum(x869, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -2.0 t3new_babbab += einsum(x869, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * 2.0 del x869 - x870 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], nocc[1], nvir[0]), dtype=np.float64) + x870 = np.zeros((naocc[1], naocc[1], navir[0], navir[1], nocc[1], nvir[0]), dtype=types[float]) x870 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aabb.ovov, (2, 6, 7, 1), (0, 3, 4, 5, 7, 6)) * -1.0 - x871 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x871 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x871 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x870, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x870 - x872 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x872 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x872 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x871, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x871 t3new_babbab += einsum(x872, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4615,12 +4616,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x872, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x872, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x872 - x873 = np.zeros((naocc[0], naocc[1], navir[1], navir[1], nocc[0], nvir[1]), dtype=np.float64) + x873 = np.zeros((naocc[0], naocc[1], navir[1], navir[1], nocc[0], nvir[1]), dtype=types[float]) x873 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 4, 0, 7), (2, 3, 1, 5, 6, 7)) * -1.0 - x874 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=np.float64) + x874 = np.zeros((naocc[0], naocc[1], naocc[1], navir[1], navir[1], nocc[0]), dtype=types[float]) x874 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x873, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x873 - x875 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x875 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x875 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x874, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x874 t3new_babbab += einsum(x875, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) * -1.0 @@ -4628,12 +4629,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x875, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) t3new_babbab += einsum(x875, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) * -1.0 del x875 - x876 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x876 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[1], nvir[1]), dtype=types[float]) x876 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 7, 3, 1), (2, 0, 4, 5, 6, 7)) - x877 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x877 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x877 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x876, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x876 - x878 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x878 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x878 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x877, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x877 t3new_babbab += einsum(x878, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4641,12 +4642,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x878, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 3, 4)) * -1.0 t3new_babbab += einsum(x878, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x878 - x879 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x879 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[1], nvir[1]), dtype=types[float]) x879 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 7, 0, 5), (2, 3, 4, 1, 6, 7)) - x880 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=np.float64) + x880 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], nocc[1]), dtype=types[float]) x880 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x879, (2, 3, 4, 5, 6, 1), (2, 0, 3, 4, 5, 6)) del x879 - x881 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=np.float64) + x881 = np.zeros((naocc[0], naocc[1], naocc[1], navir[0], navir[1], navir[1]), dtype=types[float]) x881 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x880, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 1, 6)) del x880 t3new_babbab += einsum(x881, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 3, 5)) @@ -4654,108 +4655,108 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_babbab += einsum(x881, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -1.0 t3new_babbab += einsum(x881, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 3, 4)) del x881 - x882 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x882 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x882 += einsum(f.aa.OO, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) t3new_abaaba += einsum(x882, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x882, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x882 - x883 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x883 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x883 += einsum(f.aa.VV, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) t3new_abaaba += einsum(x883, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x883, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x883 - x884 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x884 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x884 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aaaa.oOOV, (0, 4, 5, 6), (5, 4, 1, 2, 6, 3)) * -1.0 t3new_abaaba += einsum(x884, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x884, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x884, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x884, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) del x884 - x885 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x885 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x885 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.OVoO, (4, 5, 1, 6), (0, 4, 6, 2, 5, 3)) t3new_abaaba += einsum(x885, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x885, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x885, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x885, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x885 - x886 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x886 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x886 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.OVvV, (4, 5, 3, 6), (0, 4, 1, 2, 5, 6)) t3new_abaaba += einsum(x886, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x886, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x886, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x886, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x886 - x887 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x887 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x887 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.vVOV, (2, 4, 5, 6), (0, 5, 1, 6, 4, 3)) * -1.0 t3new_abaaba += einsum(x887, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x887, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x887, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x887, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x887 - x888 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x888 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x888 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aabb.oOOV, (0, 4, 5, 6), (1, 4, 5, 2, 3, 6)) * -1.0 t3new_abaaba += einsum(x888, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x888, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x888 - x889 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x889 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x889 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.vVOV, (2, 4, 5, 6), (0, 1, 5, 3, 4, 6)) * -1.0 t3new_abaaba += einsum(x889, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x889, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x889 - x890 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x890 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x890 += einsum(v.aabb.OOOO, (0, 1, 2, 3), t3.abaaba, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 7, 6)) t3new_abaaba += einsum(x890, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x890, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x890 - x891 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x891 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x891 += einsum(v.aaaa.OOVV, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (4, 0, 5, 6, 2, 7)) t3new_abaaba += einsum(x891, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x891, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x891, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x891, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x891 - x892 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x892 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x892 += einsum(v.aabb.OOVV, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 3, 7), (4, 0, 5, 6, 7, 2)) t3new_abaaba += einsum(x892, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x892, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x892 - x893 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x893 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x893 += einsum(v.aaaa.OVOV, (0, 1, 2, 3), t3.abaaba, (4, 5, 2, 6, 7, 3), (4, 0, 5, 6, 1, 7)) t3new_abaaba += einsum(x893, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x893, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x893, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x893, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x893 - x894 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x894 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x894 += einsum(v.aabb.VVOO, (0, 1, 2, 3), t3.abaaba, (4, 3, 5, 6, 7, 1), (4, 5, 2, 6, 0, 7)) t3new_abaaba += einsum(x894, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x894, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x894 - x895 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x895 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x895 += einsum(v.aabb.VVVV, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (4, 6, 5, 7, 0, 2)) t3new_abaaba += einsum(x895, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x895, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x895 - x896 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x896 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x896 += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.babbab, (4, 5, 2, 6, 7, 3), (5, 0, 4, 7, 1, 6)) t3new_abaaba += einsum(x896, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x896, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x896, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x896, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x896 - x897 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x897 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x897 += einsum(x299, (0, 1), t3.abaaba, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 6, 5)) del x299 t3new_abaaba += einsum(x897, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x897, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x897 - x898 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x898 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x898 += einsum(x301, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 0), (2, 4, 3, 1, 5, 6)) del x301 t3new_abaaba += einsum(x898, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x898, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x898 - x899 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x899 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x899 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x495, (4, 5, 6, 1), (4, 0, 5, 6, 2, 3)) del x495 t3new_abaaba += einsum(x899, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4763,19 +4764,19 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x899, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x899, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x899 - x900 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x900 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x900 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x493, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x493 t3new_abaaba += einsum(x900, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x900, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x900 - x901 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x901 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x901 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x303, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x303 t3new_abaaba += einsum(x901, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x901, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x901 - x902 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x902 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x902 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x305, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 del x305 t3new_abaaba += einsum(x902, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4783,9 +4784,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x902, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x902, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x902 - x903 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x903 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x903 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), v.aabb.oOoO, (4, 5, 1, 6), (0, 5, 6, 2, 3, 4)) - x904 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x904 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x904 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x903, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x903 t3new_abaaba += einsum(x904, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4793,9 +4794,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x904, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x904, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x904 - x905 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x905 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x905 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), v.aaaa.oOoO, (4, 5, 0, 6), (5, 6, 1, 2, 3, 4)) * -1.0 - x906 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x906 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x906 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x905, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x905 t3new_abaaba += einsum(x906, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4803,9 +4804,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x906, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x906, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x906 - x907 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x907 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x907 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.oOvV, (4, 5, 3, 6), (0, 5, 1, 2, 6, 4)) - x908 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x908 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x908 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x907, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x907 t3new_abaaba += einsum(x908, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -4813,9 +4814,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x908, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x908, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x908 - x909 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x909 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x909 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.oOvV, (4, 5, 2, 6), (0, 5, 1, 6, 3, 4)) * -1.0 - x910 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x910 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x910 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x909, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x909 t3new_abaaba += einsum(x910, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4823,7 +4824,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x910, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x910, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x910 - x911 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x911 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x911 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x311, (4, 5, 6, 0), (4, 5, 1, 2, 6, 3)) * -1.0 del x311 t3new_abaaba += einsum(x911, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -4831,9 +4832,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x911, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x911, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x911 - x912 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x912 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x912 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.ovOV, (4, 2, 5, 6), (0, 5, 1, 6, 3, 4)) * -1.0 - x913 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x913 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x913 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x912, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x912 t3new_abaaba += einsum(x913, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -4841,7 +4842,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x913, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x913, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x913 - x914 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x914 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x914 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x506, (4, 5, 6, 1), (4, 0, 5, 2, 6, 3)) del x506 t3new_abaaba += einsum(x914, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -4849,9 +4850,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x914, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x914, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x914 - x915 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x915 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x915 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.vVvV, (4, 5, 3, 6), (0, 1, 2, 5, 6, 4)) - x916 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x916 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x916 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x915, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x915 t3new_abaaba += einsum(x916, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) @@ -4859,9 +4860,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x916, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x916, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x916 - x917 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x917 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x917 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), v.aaaa.vVvV, (4, 5, 2, 6), (0, 1, 5, 6, 3, 4)) * -1.0 - x918 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x918 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x918 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x917, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x917 t3new_abaaba += einsum(x918, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -4869,21 +4870,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x918, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x918, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x918 - x919 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x919 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x919 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x409, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x409 t3new_abaaba += einsum(x919, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x919, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x919 - x920 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x920 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x920 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.ovOV, (4, 2, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x921 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x921 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x921 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x920, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x920 t3new_abaaba += einsum(x921, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x921, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x921 - x922 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x922 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x922 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x530, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x530 t3new_abaaba += einsum(x922, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) @@ -4891,9 +4892,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x922, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x922, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x922 - x923 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x923 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x923 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), v.aabb.OVov, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) - x924 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x924 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x924 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x923, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x923 t3new_abaaba += einsum(x924, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) @@ -4901,43 +4902,43 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x924, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x924, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x924 - x925 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x925 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x925 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x512, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x512 t3new_abaaba += einsum(x925, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x925, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x925 - x926 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x926 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x926 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), v.aabb.oOoO, (0, 4, 5, 6), (1, 4, 6, 2, 3, 5)) * -1.0 - x927 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x927 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x927 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x926, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x926 t3new_abaaba += einsum(x927, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x927, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x927 - x928 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x928 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x928 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.vVvV, (2, 4, 5, 6), (0, 1, 3, 4, 6, 5)) * -1.0 - x929 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x929 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x929 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x928, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x928 t3new_abaaba += einsum(x929, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x929, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x929 - x930 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x930 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x930 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), v.aabb.vVoO, (2, 4, 5, 6), (0, 1, 6, 3, 4, 5)) * -1.0 - x931 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x931 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x931 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x930, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x930 t3new_abaaba += einsum(x931, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x931, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x931 - x932 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x932 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x932 += einsum(x321, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 5, 6, 7), (0, 1, 4, 5, 7, 6)) del x321 t3new_abaaba += einsum(x932, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x932, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x932 - x933 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x933 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x933 += einsum(x323, (0, 1, 2, 3), t3.abaaba, (4, 5, 0, 6, 7, 3), (4, 1, 5, 2, 6, 7)) del x323 t3new_abaaba += einsum(x933, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 @@ -4945,7 +4946,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x933, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x933, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x933 - x934 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x934 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x934 += einsum(x325, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (4, 0, 5, 2, 6, 7)) del x325 t3new_abaaba += einsum(x934, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 @@ -4953,25 +4954,25 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x934, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x934, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x934 - x935 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x935 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x935 += einsum(x327, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (2, 0, 3, 4, 6, 5)) del x327 t3new_abaaba += einsum(x935, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x935, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x935 - x936 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x936 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x936 += einsum(x329, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (2, 0, 3, 4, 6, 5)) del x329 t3new_abaaba += einsum(x936, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x936, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x936 - x937 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x937 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x937 += einsum(x534, (0, 1, 2, 3), t3.abaaba, (4, 3, 1, 5, 6, 7), (0, 4, 2, 5, 7, 6)) del x534 t3new_abaaba += einsum(x937, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x937, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x937 - x938 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x938 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x938 += einsum(x331, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 2, 7)) del x331 t3new_abaaba += einsum(x938, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -4979,13 +4980,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x938, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x938, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 del x938 - x939 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x939 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x939 += einsum(x536, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 3, 7), (0, 4, 5, 6, 7, 2)) del x536 t3new_abaaba += einsum(x939, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x939, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x939 - x940 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x940 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x940 += einsum(x333, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 2), (0, 4, 5, 6, 3, 7)) del x333 t3new_abaaba += einsum(x940, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -4993,37 +4994,37 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x940, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x940, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x940 - x941 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x941 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x941 += einsum(x538, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 7, 3), (4, 5, 0, 2, 6, 7)) del x538 t3new_abaaba += einsum(x941, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x941, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x941 - x942 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x942 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x942 += einsum(x542, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 7, 2)) del x542 t3new_abaaba += einsum(x942, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x942, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x942 - x943 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x943 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x943 += einsum(x335, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 2, 7, 3), (4, 6, 5, 0, 1, 7)) del x335 t3new_abaaba += einsum(x943, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x943, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x943 - x944 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x944 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x944 += einsum(x337, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 5, 0, 6)) del x337 t3new_abaaba += einsum(x944, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x944, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x944 - x945 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x945 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x945 += einsum(x339, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 0), (2, 4, 3, 5, 1, 6)) del x339 t3new_abaaba += einsum(x945, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x945, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x945 - x946 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x946 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x946 += einsum(x317, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (5, 0, 4, 2, 7, 6)) del x317 t3new_abaaba += einsum(x946, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 @@ -5031,7 +5032,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x946, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x946, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x946 - x947 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x947 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x947 += einsum(x319, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 5, 4, 7, 2, 6)) del x319 t3new_abaaba += einsum(x947, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -5039,43 +5040,43 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x947, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x947, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x947 - x948 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x948 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x948 += einsum(x550, (0, 1, 2, 3), t3.abaaba, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 7, 6)) del x550 t3new_abaaba += einsum(x948, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x948, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x948 - x949 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x949 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x949 += einsum(x558, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 3, 7), (4, 0, 5, 6, 7, 2)) del x558 t3new_abaaba += einsum(x949, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x949, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x949 - x950 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x950 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x950 += einsum(x341, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (2, 0, 3, 4, 6, 5)) del x341 t3new_abaaba += einsum(x950, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x950, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x950 - x951 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x951 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x951 += einsum(x574, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 7, 3), (4, 5, 0, 6, 2, 7)) del x574 t3new_abaaba += einsum(x951, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x951, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x951 - x952 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x952 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x952 += einsum(x576, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (4, 6, 5, 7, 0, 2)) del x576 t3new_abaaba += einsum(x952, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x952, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x952 - x953 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x953 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x953 += einsum(x343, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 5, 0, 6)) del x343 t3new_abaaba += einsum(x953, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x953, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x953 - x954 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x954 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x954 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x604, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x604 t3new_abaaba += einsum(x954, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5083,7 +5084,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x954, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x954, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x954 - x955 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x955 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x955 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x600, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x600 t3new_abaaba += einsum(x955, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) @@ -5091,7 +5092,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x955, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x955, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 del x955 - x956 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x956 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x956 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x612, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x612 t3new_abaaba += einsum(x956, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5099,7 +5100,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x956, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x956, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x956 - x957 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x957 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x957 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x610, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x610 t3new_abaaba += einsum(x957, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5107,7 +5108,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x957, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x957, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x957 - x958 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x958 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x958 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x345, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x345 t3new_abaaba += einsum(x958, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5115,7 +5116,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x958, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x958, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x958 - x959 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x959 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x959 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x622, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x622 t3new_abaaba += einsum(x959, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5123,7 +5124,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x959, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x959, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x959 - x960 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x960 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x960 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x618, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x618 t3new_abaaba += einsum(x960, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5131,7 +5132,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x960, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x960, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x960 - x961 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x961 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x961 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x347, (4, 5, 6, 2), (0, 4, 1, 5, 6, 3)) * -1.0 del x347 t3new_abaaba += einsum(x961, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5139,7 +5140,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x961, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x961, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x961 - x962 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x962 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x962 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x626, (4, 5, 6, 1), (4, 0, 5, 2, 6, 3)) del x626 t3new_abaaba += einsum(x962, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5147,7 +5148,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x962, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x962, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x962 - x963 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x963 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x963 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x628, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x628 t3new_abaaba += einsum(x963, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5155,7 +5156,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x963, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x963, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x963 - x964 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x964 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x964 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x353, (4, 5, 6, 2), (0, 4, 1, 5, 6, 3)) * -1.0 del x353 t3new_abaaba += einsum(x964, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5163,7 +5164,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x964, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x964, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x964 - x965 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x965 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x965 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x349, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x349 t3new_abaaba += einsum(x965, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -5171,13 +5172,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x965, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x965, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 del x965 - x966 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x966 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x966 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x578, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x578 t3new_abaaba += einsum(x966, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x966, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x966 - x967 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x967 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x967 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x351, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x351 t3new_abaaba += einsum(x967, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -5185,13 +5186,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x967, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x967, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x967 - x968 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x968 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x968 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x580, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x580 t3new_abaaba += einsum(x968, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x968, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x968 - x969 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x969 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x969 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x630, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x630 t3new_abaaba += einsum(x969, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5199,25 +5200,25 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x969, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x969, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x969 - x970 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x970 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x970 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x586, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x586 t3new_abaaba += einsum(x970, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x970, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x970 - x971 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x971 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x971 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x582, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x582 t3new_abaaba += einsum(x971, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x971, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x971 - x972 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x972 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x972 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x590, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x590 t3new_abaaba += einsum(x972, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x972, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x972 - x973 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x973 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x973 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x355, (4, 5, 6, 2), (0, 4, 1, 5, 6, 3)) * -1.0 del x355 t3new_abaaba += einsum(x973, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5225,7 +5226,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x973, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x973, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x973 - x974 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x974 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x974 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x632, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x632 t3new_abaaba += einsum(x974, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -5233,7 +5234,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x974, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x974, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x974 - x975 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x975 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x975 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x359, (4, 5, 6, 2), (0, 4, 1, 5, 6, 3)) * -1.0 del x359 t3new_abaaba += einsum(x975, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -5241,7 +5242,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x975, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x975, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x975 - x976 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x976 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x976 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x357, (4, 5, 6, 0), (5, 4, 1, 2, 6, 3)) del x357 t3new_abaaba += einsum(x976, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5249,49 +5250,49 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x976, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x976, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) del x976 - x977 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x977 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x977 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x596, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x596 t3new_abaaba += einsum(x977, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x977, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x977 - x978 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x978 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x978 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x588, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x588 t3new_abaaba += einsum(x978, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x978, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x978 - x979 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x979 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x979 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x592, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x592 t3new_abaaba += einsum(x979, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x979, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x979 - x980 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x980 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x980 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x608, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x608 t3new_abaaba += einsum(x980, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 4.0 t3new_abaaba += einsum(x980, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -4.0 del x980 - x981 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x981 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x981 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x624, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x624 t3new_abaaba += einsum(x981, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -4.0 t3new_abaaba += einsum(x981, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 del x981 - x982 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x982 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x982 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x644, (6, 2, 7, 1, 8, 4), (6, 0, 7, 3, 5, 8)) del x644 t3new_abaaba += einsum(x982, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x982, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x982 - x983 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x983 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x983 += einsum(x646, (0, 1, 2, 3), t3.abaaba, (4, 3, 1, 5, 6, 7), (0, 4, 2, 5, 7, 6)) del x646 t3new_abaaba += einsum(x983, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x983, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x983 - x984 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x984 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x984 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x648, (6, 2, 7, 1, 8, 5), (6, 0, 7, 8, 3, 4)) del x648 t3new_abaaba += einsum(x984, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5299,7 +5300,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x984, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x984, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x984 - x985 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x985 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x985 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x650, (6, 2, 7, 5, 8, 4), (6, 0, 1, 7, 3, 8)) del x650 t3new_abaaba += einsum(x985, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5307,19 +5308,19 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x985, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x985, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x985 - x986 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x986 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x986 += einsum(x652, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 3, 7), (0, 4, 5, 6, 7, 2)) del x652 t3new_abaaba += einsum(x986, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.00000000000002 t3new_abaaba += einsum(x986, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.00000000000002 del x986 - x987 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x987 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x987 += einsum(x365, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) del x365 t3new_abaaba += einsum(x987, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x987, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x987 - x988 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x988 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x988 += einsum(x367, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x367 t3new_abaaba += einsum(x988, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.00000000000002 @@ -5327,31 +5328,31 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x988, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.00000000000002 t3new_abaaba += einsum(x988, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.00000000000002 del x988 - x989 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x989 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x989 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x654, (6, 1, 7, 5, 8, 4), (0, 2, 6, 7, 3, 8)) del x654 t3new_abaaba += einsum(x989, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x989, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x989 - x990 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x990 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x990 += einsum(x660, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 7, 3), (4, 5, 0, 2, 6, 7)) del x660 t3new_abaaba += einsum(x990, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.00000000000002 t3new_abaaba += einsum(x990, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.00000000000002 del x990 - x991 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x991 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x991 += einsum(x662, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 7, 2)) del x662 t3new_abaaba += einsum(x991, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x991, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x991 - x992 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x992 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x992 += einsum(x369, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x369 t3new_abaaba += einsum(x992, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x992, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x992 - x993 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x993 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x993 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x666, (6, 7, 0, 2, 8, 5), (6, 1, 7, 8, 4, 3)) del x666 t3new_abaaba += einsum(x993, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5359,7 +5360,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x993, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x993, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x993 - x994 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x994 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x994 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x668, (6, 7, 0, 2, 8, 5), (6, 1, 7, 8, 4, 3)) del x668 t3new_abaaba += einsum(x994, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5367,7 +5368,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x994, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x994, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x994 - x995 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x995 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x995 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x670, (6, 2, 7, 8, 3, 5), (6, 1, 0, 7, 4, 8)) del x670 t3new_abaaba += einsum(x995, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -5375,7 +5376,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x995, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x995, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x995 - x996 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x996 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x996 += einsum(x361, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 5, 4, 2, 7, 6)) del x361 t3new_abaaba += einsum(x996, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.00000000000002 @@ -5383,7 +5384,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x996, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.00000000000002 t3new_abaaba += einsum(x996, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.00000000000002 del x996 - x997 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x997 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x997 += einsum(x363, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 5, 4, 2, 7, 6)) del x363 t3new_abaaba += einsum(x997, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.00000000000002 @@ -5391,49 +5392,49 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x997, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.00000000000002 t3new_abaaba += einsum(x997, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.00000000000002 del x997 - x998 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x998 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x998 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x634, (6, 2, 1, 7, 5, 8), (6, 0, 7, 3, 4, 8)) * -1.0 del x634 t3new_abaaba += einsum(x998, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -3.0 t3new_abaaba += einsum(x998, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 3.0 del x998 - x999 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x999 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x999 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x636, (6, 1, 2, 7, 5, 8), (6, 0, 7, 3, 4, 8)) del x636 t3new_abaaba += einsum(x999, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -3.0 t3new_abaaba += einsum(x999, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 3.0 del x999 - x1000 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1000 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1000 += einsum(t3.aaaaaa, (0, 1, 2, 3, 4, 5), x638, (2, 6, 7, 5, 4, 8), (0, 1, 6, 7, 3, 8)) * -1.0 del x638 t3new_abaaba += einsum(x1000, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0 t3new_abaaba += einsum(x1000, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 del x1000 - x1001 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1001 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1001 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x377, (6, 7, 0, 2, 8, 5), (7, 6, 1, 8, 3, 4)) * -1.0 del x377 t3new_abaaba += einsum(x1001, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1001, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1001 - x1002 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1002 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1002 += einsum(x379, (0, 1, 2, 3), t3.abaaba, (2, 4, 3, 5, 6, 7), (1, 0, 4, 5, 7, 6)) * -1.0 del x379 t3new_abaaba += einsum(x1002, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1002, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 del x1002 - x1003 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1003 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1003 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x381, (6, 7, 0, 2, 8, 5), (7, 6, 1, 8, 3, 4)) * -1.0 del x381 t3new_abaaba += einsum(x1003, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1003, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1003 - x1004 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1004 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1004 += einsum(t3.abaaba, (0, 1, 2, 3, 4, 5), x383, (6, 2, 7, 8, 3, 5), (6, 0, 1, 7, 8, 4)) del x383 t3new_abaaba += einsum(x1004, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -4.0 t3new_abaaba += einsum(x1004, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.0 del x1004 - x1005 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1005 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1005 += einsum(x385, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x385 t3new_abaaba += einsum(x1005, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.00000000000004 @@ -5441,7 +5442,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1005, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -4.00000000000004 t3new_abaaba += einsum(x1005, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.00000000000004 del x1005 - x1006 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1006 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1006 += einsum(x387, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) del x387 t3new_abaaba += einsum(x1006, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -5449,7 +5450,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1006, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1006, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1006 - x1007 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1007 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1007 += einsum(x389, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x389 t3new_abaaba += einsum(x1007, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -4.00000000000004 @@ -5457,36 +5458,36 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1007, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 4.00000000000004 t3new_abaaba += einsum(x1007, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -4.00000000000004 del x1007 - x1008 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1008 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1008 += einsum(x688, (0, 1), t3.abaaba, (2, 1, 3, 4, 5, 6), (2, 3, 0, 4, 6, 5)) t3new_abaaba += einsum(x1008, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1008, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1008 - x1009 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1009 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1009 += einsum(x393, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x393 t3new_abaaba += einsum(x1009, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1009, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1009 - x1010 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1010 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1010 += einsum(x395, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x395 t3new_abaaba += einsum(x1010, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1010, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1010 - x1011 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1011 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1011 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x371, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 4, 3)) * -1.0 del x371 t3new_abaaba += einsum(x1011, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -4.0 t3new_abaaba += einsum(x1011, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 4.0 del x1011 - x1012 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1012 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1012 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x373, (6, 2, 7, 8, 4, 5), (6, 1, 0, 7, 8, 3)) del x373 t3new_abaaba += einsum(x1012, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 4.0 t3new_abaaba += einsum(x1012, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -4.0 del x1012 - x1013 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1013 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1013 += einsum(x375, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 5, 4, 2, 7, 6)) del x375 t3new_abaaba += einsum(x1013, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.00000000000004 @@ -5494,9 +5495,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1013, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -4.00000000000004 t3new_abaaba += einsum(x1013, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.00000000000004 del x1013 - x1014 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1014 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1014 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aaaa.ovoO, (2, 6, 0, 7), (7, 3, 1, 4, 5, 6)) * -1.0 - x1015 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1015 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1015 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1014, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1014 t3new_abaaba += einsum(x1015, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5504,9 +5505,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1015, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1015, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1015 - x1016 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1016 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1016 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aaaa.ovoO, (0, 6, 2, 7), (7, 3, 1, 4, 5, 6)) * -1.0 - x1017 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1017 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1017 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1016, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1016 t3new_abaaba += einsum(x1017, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5514,7 +5515,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1017, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1017, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1017 - x1018 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1018 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1018 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x401, (4, 5, 6, 2), (0, 4, 1, 5, 6, 3)) * -1.0 del x401 t3new_abaaba += einsum(x1018, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5522,9 +5523,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1018, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1018, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1018 - x1019 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1019 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1019 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aaaa.ovvV, (2, 1, 6, 7), (0, 3, 4, 7, 5, 6)) * -1.0 - x1020 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1020 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1020 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1019, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1019 t3new_abaaba += einsum(x1020, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) @@ -5532,9 +5533,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1020, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1020, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) del x1020 - x1021 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1021 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1021 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.aabb.ovoO, (0, 6, 3, 7), (2, 7, 1, 4, 5, 6)) - x1022 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1022 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1022 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1021, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1021 t3new_abaaba += einsum(x1022, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5542,9 +5543,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1022, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1022, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1022 - x1023 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1023 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1023 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.aabb.ovvV, (0, 6, 5, 7), (2, 3, 1, 4, 7, 6)) - x1024 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1024 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1024 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1023, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1023 t3new_abaaba += einsum(x1024, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5552,9 +5553,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1024, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1024, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1024 - x1025 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1025 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1025 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aaaa.ovvV, (0, 6, 4, 7), (2, 3, 1, 7, 5, 6)) * -1.0 - x1026 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1026 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1026 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1025, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1025 t3new_abaaba += einsum(x1026, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5562,9 +5563,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1026, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1026, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1026 - x1027 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1027 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1027 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aaaa.ovvV, (0, 4, 6, 7), (2, 3, 1, 7, 5, 6)) * -1.0 - x1028 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1028 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1028 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1027, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1027 t3new_abaaba += einsum(x1028, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5572,9 +5573,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1028, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1028, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1028 - x1029 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x1029 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x1029 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.aabb.oOov, (0, 6, 3, 7), (2, 6, 1, 4, 5, 7)) - x1030 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1030 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1030 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1029, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x1029 t3new_abaaba += einsum(x1030, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5582,7 +5583,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1030, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x1030, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1030 - x1031 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1031 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1031 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x712, (4, 5, 6, 3), (0, 4, 1, 5, 2, 6)) del x712 t3new_abaaba += einsum(x1031, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5590,9 +5591,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1031, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x1031, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1031 - x1032 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1032 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1032 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.aabb.vVov, (6, 7, 3, 1), (2, 0, 4, 7, 5, 6)) - x1033 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1033 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1033 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1032, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1032 t3new_abaaba += einsum(x1033, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5600,9 +5601,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1033, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x1033, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x1033 - x1034 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1034 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1034 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.aabb.vVov, (6, 7, 0, 5), (2, 3, 4, 7, 1, 6)) - x1035 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1035 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1035 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1034, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1034 t3new_abaaba += einsum(x1035, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 @@ -5610,59 +5611,59 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1035, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x1035, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x1035 - x1036 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1036 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1036 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aabb.ovvV, (2, 6, 1, 7), (3, 0, 4, 5, 7, 6)) * -1.0 - x1037 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1037 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1037 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1036, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1036 t3new_abaaba += einsum(x1037, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1037, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1037 - x1038 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=np.float64) + x1038 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], navir[1], nvir[0]), dtype=types[float]) x1038 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aabb.ovoO, (2, 6, 0, 7), (3, 7, 4, 5, 1, 6)) * -1.0 - x1039 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1039 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1039 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1038, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1038 t3new_abaaba += einsum(x1039, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1039, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1039 - x1040 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x1040 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x1040 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aabb.ovvV, (0, 4, 6, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x1041 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1041 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1041 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1040, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x1040 t3new_abaaba += einsum(x1041, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1041, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1041 - x1042 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1042 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1042 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x708, (4, 5, 6, 2), (0, 1, 4, 5, 3, 6)) * -1.0 del x708 t3new_abaaba += einsum(x1042, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1042, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1042 - x1043 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x1043 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x1043 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aabb.oOov, (2, 6, 0, 7), (3, 6, 4, 5, 1, 7)) * -1.0 - x1044 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1044 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1044 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1043, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x1043 t3new_abaaba += einsum(x1044, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1044, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1044 - x1045 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=np.float64) + x1045 = np.zeros((naocc[0], naocc[0], navir[0], navir[0], navir[1], nvir[1]), dtype=types[float]) x1045 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aabb.vVov, (4, 6, 0, 7), (2, 3, 5, 6, 1, 7)) * -1.0 - x1046 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1046 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1046 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1045, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x1045 t3new_abaaba += einsum(x1046, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1046, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x1046 - x1047 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1047 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1047 += einsum(x413, (0, 1, 2, 3), t3.abaaba, (3, 4, 2, 5, 6, 7), (1, 0, 4, 5, 7, 6)) del x413 t3new_abaaba += einsum(x1047, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1047, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 del x1047 - x1048 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1048 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1048 += einsum(x416, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x416 t3new_abaaba += einsum(x1048, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5670,7 +5671,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1048, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1048, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1048 - x1049 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1049 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1049 += einsum(x419, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x419 t3new_abaaba += einsum(x1049, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -5678,31 +5679,31 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1049, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1049, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1049 - x1050 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1050 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1050 += einsum(x422, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) del x422 t3new_abaaba += einsum(x1050, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1050, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1050 - x1051 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1051 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1051 += einsum(x425, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) del x425 t3new_abaaba += einsum(x1051, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1051, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1051 - x1052 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1052 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1052 += einsum(x431, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x431 t3new_abaaba += einsum(x1052, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1052, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1052 - x1053 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1053 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1053 += einsum(x434, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x434 t3new_abaaba += einsum(x1053, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1053, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1053 - x1054 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1054 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1054 += einsum(x410, (0, 1, 2, 3), t3.babbab, (4, 5, 1, 6, 7, 3), (0, 5, 4, 2, 7, 6)) del x410 t3new_abaaba += einsum(x1054, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5710,45 +5711,45 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1054, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1054, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1054 - x1055 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1055 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1055 += einsum(x735, (0, 1, 2, 3), t3.abaaba, (4, 3, 1, 5, 6, 7), (0, 4, 2, 5, 7, 6)) del x735 t3new_abaaba += einsum(x1055, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1055, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1055 - x1056 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1056 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1056 += einsum(x738, (0, 1, 2, 3), t3.abaaba, (4, 5, 1, 6, 3, 7), (0, 4, 5, 6, 7, 2)) del x738 t3new_abaaba += einsum(x1056, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1056, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1056 - x1057 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1057 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1057 += einsum(x437, (0, 1), t3.abaaba, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 6, 5)) del x437 t3new_abaaba += einsum(x1057, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1057, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1057 - x1058 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1058 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1058 += einsum(x741, (0, 1, 2, 3), t3.abaaba, (4, 1, 5, 6, 7, 3), (4, 5, 0, 2, 6, 7)) del x741 t3new_abaaba += einsum(x1058, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1058, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1058 - x1059 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1059 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1059 += einsum(x747, (0, 1, 2, 3), t3.abaaba, (4, 5, 6, 7, 3, 1), (4, 6, 5, 0, 7, 2)) del x747 t3new_abaaba += einsum(x1059, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1059, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1059 - x1060 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1060 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1060 += einsum(x440, (0, 1), t3.abaaba, (2, 3, 4, 5, 6, 1), (2, 4, 3, 0, 5, 6)) del x440 t3new_abaaba += einsum(x1060, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1060, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1060 - x1061 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], nocc[0], nocc[1]), dtype=np.float64) + x1061 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], nocc[0], nocc[1]), dtype=types[float]) x1061 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.aabb.ovov, (6, 1, 7, 5), (0, 2, 3, 4, 6, 7)) - x1062 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1062 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1062 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), x1061, (4, 5, 6, 7, 0, 1), (4, 5, 6, 7, 2, 3)) del x1061 t3new_abaaba += einsum(x1062, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5756,7 +5757,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1062, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1062, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1062 - x1063 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1063 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1063 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x795, (4, 5, 6, 1), (4, 0, 5, 2, 6, 3)) del x795 t3new_abaaba += einsum(x1063, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5764,7 +5765,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1063, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1063, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1063 - x1064 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1064 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1064 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x443, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x443 t3new_abaaba += einsum(x1064, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5772,10 +5773,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1064, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1064, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1064 - x1065 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1065 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1065 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x442, (4, 5, 6, 2), (0, 4, 1, 5, 3, 6)) * -1.0 del x442 - x1066 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1066 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1066 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1065, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1065 t3new_abaaba += einsum(x1066, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5783,9 +5784,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1066, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1066, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1066 - x1067 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1067 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1067 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x801, (4, 5, 6, 1), (4, 0, 5, 2, 3, 6)) - x1068 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1068 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1068 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1067, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1067 t3new_abaaba += einsum(x1068, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5793,10 +5794,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1068, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1068, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1068 - x1069 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1069 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1069 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x804, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x804 - x1070 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1070 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1070 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1069, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1069 t3new_abaaba += einsum(x1070, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5804,7 +5805,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1070, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1070, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1070 - x1071 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1071 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1071 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x807, (4, 5, 6, 1), (4, 0, 5, 6, 2, 3)) del x807 t3new_abaaba += einsum(x1071, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5812,9 +5813,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1071, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1071, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x1071 - x1072 = np.zeros((naocc[0], naocc[0], naocc[1], navir[1], nocc[0], nocc[0]), dtype=np.float64) + x1072 = np.zeros((naocc[0], naocc[0], naocc[1], navir[1], nocc[0], nocc[0]), dtype=types[float]) x1072 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aaaa.ovov, (6, 1, 7, 4), (0, 2, 3, 5, 6, 7)) * -1.0 - x1073 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1073 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1073 += einsum(t2.aaaa[np.ix_(soa,soa,sVa,sVa)], (0, 1, 2, 3), x1072, (4, 5, 6, 7, 0, 1), (4, 5, 6, 2, 3, 7)) del x1072 t3new_abaaba += einsum(x1073, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) @@ -5822,7 +5823,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1073, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1073, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1073 - x1074 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1074 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1074 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x448, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x448 t3new_abaaba += einsum(x1074, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -5830,13 +5831,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1074, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1074, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x1074 - x1075 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1075 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1075 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x778, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x778 t3new_abaaba += einsum(x1075, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1075, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1075 - x1076 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1076 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1076 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x451, (4, 5, 6, 0), (4, 5, 1, 6, 2, 3)) * -1.0 del x451 t3new_abaaba += einsum(x1076, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -5844,16 +5845,16 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1076, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1076, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -2.0 del x1076 - x1077 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1077 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1077 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x781, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x781 t3new_abaaba += einsum(x1077, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1077, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1077 - x1078 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1078 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1078 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x447, (4, 5, 6, 2), (0, 4, 1, 5, 3, 6)) * -1.0 del x447 - x1079 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1079 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1079 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1078, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1078 t3new_abaaba += einsum(x1079, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -5861,10 +5862,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1079, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1079, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1079 - x1080 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1080 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1080 += einsum(t2.abab[np.ix_(sOa,sOb,sva,sVb)], (0, 1, 2, 3), x450, (4, 5, 6, 2), (0, 4, 1, 5, 3, 6)) * -1.0 del x450 - x1081 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1081 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1081 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1080, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1080 t3new_abaaba += einsum(x1081, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -5872,10 +5873,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1081, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1081, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1081 - x1082 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1082 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1082 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x457, (4, 5, 0, 6), (4, 5, 1, 2, 3, 6)) del x457 - x1083 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1083 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1083 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1082, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1082 t3new_abaaba += einsum(x1083, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5883,64 +5884,64 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1083, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x1083, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) del x1083 - x1084 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1084 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1084 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x777, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x777 - x1085 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1085 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1085 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1084, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1084 t3new_abaaba += einsum(x1085, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1085, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1085 - x1086 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1086 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1086 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x780, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x780 - x1087 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1087 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1087 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1086, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1086 t3new_abaaba += einsum(x1087, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1087, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 del x1087 - x1088 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1088 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1088 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x787, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x787 t3new_abaaba += einsum(x1088, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1088, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1088 - x1089 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1089 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1089 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x789, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x789 t3new_abaaba += einsum(x1089, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1089, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 del x1089 - x1090 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1090 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1090 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x462, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x462 t3new_abaaba += einsum(x1090, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1090, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x1090 - x1091 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1091 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1091 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x464, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x464 t3new_abaaba += einsum(x1091, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1091, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x1091 - x1092 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1092 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1092 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x792, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x792 t3new_abaaba += einsum(x1092, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -4.0 t3new_abaaba += einsum(x1092, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.0 del x1092 - x1093 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1093 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1093 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x791, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x791 - x1094 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1094 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1094 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1093, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1093 t3new_abaaba += einsum(x1094, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 t3new_abaaba += einsum(x1094, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -4.0 del x1094 - x1095 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1095 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1095 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x836, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x836 t3new_abaaba += einsum(x1095, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5948,7 +5949,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1095, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1095, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x1095 - x1096 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1096 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1096 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x830, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x830 t3new_abaaba += einsum(x1096, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) @@ -5956,10 +5957,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1096, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) t3new_abaaba += einsum(x1096, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -1.0 del x1096 - x1097 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1097 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1097 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x835, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x835 - x1098 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1098 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1098 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1097, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1097 t3new_abaaba += einsum(x1098, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5967,10 +5968,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1098, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1098, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x1098 - x1099 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1099 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1099 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x829, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x829 - x1100 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1100 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1100 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1099, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1099 t3new_abaaba += einsum(x1100, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5978,7 +5979,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1100, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x1100, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x1100 - x1101 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1101 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1101 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x851, (4, 5, 6, 1), (4, 0, 5, 6, 2, 3)) del x851 t3new_abaaba += einsum(x1101, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -5986,7 +5987,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1101, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 t3new_abaaba += einsum(x1101, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) del x1101 - x1102 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1102 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1102 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x853, (4, 5, 6, 1), (4, 0, 5, 6, 2, 3)) del x853 t3new_abaaba += einsum(x1102, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -5994,7 +5995,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1102, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) t3new_abaaba += einsum(x1102, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 del x1102 - x1103 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1103 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1103 += einsum(t2.abab[np.ix_(sOa,sob,sVa,sVb)], (0, 1, 2, 3), x860, (4, 5, 6, 1), (0, 4, 5, 2, 6, 3)) del x860 t3new_abaaba += einsum(x1103, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -6002,33 +6003,33 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1103, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1103, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1103 - x1104 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1104 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1104 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x816, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x816 t3new_abaaba += einsum(x1104, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1104, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1104 - x1105 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], nocc[0], nocc[1]), dtype=np.float64) + x1105 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], nocc[0], nocc[1]), dtype=types[float]) x1105 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aabb.ovov, (6, 4, 7, 1), (2, 3, 0, 5, 6, 7)) * -1.0 - x1106 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1106 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1106 += einsum(t2.abab[np.ix_(soa,sob,sVa,sVb)], (0, 1, 2, 3), x1105, (4, 5, 6, 7, 0, 1), (4, 5, 6, 7, 2, 3)) del x1105 t3new_abaaba += einsum(x1106, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1106, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x1106 - x1107 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1107 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1107 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x801, (4, 5, 0, 6), (4, 1, 5, 2, 3, 6)) * -1.0 del x801 - x1108 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1108 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1108 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1107, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1107 t3new_abaaba += einsum(x1108, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1108, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1108 - x1109 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1109 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1109 += einsum(t2.abab[np.ix_(sOa,sOb,sVa,svb)], (0, 1, 2, 3), x859, (4, 5, 6, 3), (0, 4, 1, 2, 5, 6)) del x859 - x1110 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1110 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1110 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1109, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1109 t3new_abaaba += einsum(x1110, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -6036,33 +6037,33 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1110, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 t3new_abaaba += einsum(x1110, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1110 - x1111 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1111 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1111 += einsum(t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (0, 1, 2, 3), x794, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x794 - x1112 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1112 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1112 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1111, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1111 t3new_abaaba += einsum(x1112, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1112, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 del x1112 - x1113 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1113 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1113 += einsum(t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (0, 1, 2, 3), x824, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x824 t3new_abaaba += einsum(x1113, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1113, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1113 - x1114 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1114 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1114 += einsum(t2.abab[np.ix_(soa,sOb,sVa,sVb)], (0, 1, 2, 3), x466, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x466 t3new_abaaba += einsum(x1114, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 t3new_abaaba += einsum(x1114, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 del x1114 - x1115 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x1115 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=types[float]) x1115 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), t2.abab[np.ix_(soa,sOb,sVa,sVb)], (2, 3, 4, 5), v.aaaa.ovov, (6, 7, 2, 1), (0, 3, 4, 5, 6, 7)) * -1.0 - x1116 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1116 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1116 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1115, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1115 - x1117 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1117 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1117 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1116, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1116 t3new_abaaba += einsum(x1117, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -6070,12 +6071,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1117, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) t3new_abaaba += einsum(x1117, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1117 - x1118 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x1118 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=types[float]) x1118 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), t2.abab[np.ix_(sOa,sOb,sva,sVb)], (2, 3, 4, 5), v.aaaa.ovov, (6, 7, 0, 4), (2, 3, 1, 5, 6, 7)) * -1.0 - x1119 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1119 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1119 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1118, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1118 - x1120 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1120 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1120 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1119, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1119 t3new_abaaba += einsum(x1120, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -1.0 @@ -6083,12 +6084,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1120, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) t3new_abaaba += einsum(x1120, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -1.0 del x1120 - x1121 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x1121 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=types[float]) x1121 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.abab[np.ix_(sOa,sob,sVa,sVb)], (2, 3, 4, 5), v.aabb.ovov, (6, 7, 3, 1), (2, 0, 4, 5, 6, 7)) - x1122 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1122 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1122 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1121, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1121 - x1123 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1123 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1123 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1122, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1122 t3new_abaaba += einsum(x1123, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -6096,12 +6097,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1123, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1123, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1123 - x1124 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=np.float64) + x1124 = np.zeros((naocc[0], naocc[1], navir[0], navir[1], nocc[0], nvir[0]), dtype=types[float]) x1124 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.abab[np.ix_(sOa,sOb,sVa,svb)], (2, 3, 4, 5), v.aabb.ovov, (6, 7, 0, 5), (2, 3, 4, 1, 6, 7)) - x1125 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1125 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1125 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1124, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1124 - x1126 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1126 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1126 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1125, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1125 t3new_abaaba += einsum(x1126, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) @@ -6109,42 +6110,42 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_abaaba += einsum(x1126, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * -1.0 t3new_abaaba += einsum(x1126, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) del x1126 - x1127 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], nocc[1], nvir[0]), dtype=np.float64) + x1127 = np.zeros((naocc[0], naocc[1], navir[0], navir[0], nocc[1], nvir[0]), dtype=types[float]) x1127 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.aaaa[np.ix_(soa,sOa,sVa,sVa)], (2, 3, 4, 5), v.aabb.ovov, (2, 6, 7, 1), (3, 0, 4, 5, 7, 6)) * -1.0 - x1128 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=np.float64) + x1128 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], nocc[1]), dtype=types[float]) x1128 += einsum(t1.aa[np.ix_(sOa,sva)], (0, 1), x1127, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1127 - x1129 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1129 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1129 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1128, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x1128 t3new_abaaba += einsum(x1129, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 t3new_abaaba += einsum(x1129, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 del x1129 - x1130 = np.zeros((naocc[0], naocc[0], navir[0], navir[1], nocc[0], nvir[1]), dtype=np.float64) + x1130 = np.zeros((naocc[0], naocc[0], navir[0], navir[1], nocc[0], nvir[1]), dtype=types[float]) x1130 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.aaaa[np.ix_(sOa,sOa,sva,sVa)], (2, 3, 4, 5), v.aabb.ovov, (6, 4, 0, 7), (2, 3, 5, 1, 6, 7)) * -1.0 - x1131 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=np.float64) + x1131 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[1], nocc[0]), dtype=types[float]) x1131 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1130, (2, 3, 4, 5, 6, 1), (2, 3, 0, 4, 5, 6)) del x1130 - x1132 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=np.float64) + x1132 = np.zeros((naocc[0], naocc[0], naocc[1], navir[0], navir[0], navir[1]), dtype=types[float]) x1132 += einsum(t1.aa[np.ix_(soa,sVa)], (0, 1), x1131, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1131 t3new_abaaba += einsum(x1132, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 t3new_abaaba += einsum(x1132, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 del x1132 - x1133 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1133 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1133 += einsum(f.bb.OO, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) - t3new_bbbbbb = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + t3new_bbbbbb = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) t3new_bbbbbb += einsum(x1133, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1133, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1133, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x1133 - x1134 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1134 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1134 += einsum(f.bb.VV, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) t3new_bbbbbb += einsum(x1134, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 t3new_bbbbbb += einsum(x1134, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1134, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1134 - x1135 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1135 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1135 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.bbbb.oOOV, (0, 4, 5, 6), (1, 5, 4, 2, 3, 6)) * -1.0 t3new_bbbbbb += einsum(x1135, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 2.0 t3new_bbbbbb += einsum(x1135, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -6165,7 +6166,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1135, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_bbbbbb += einsum(x1135, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 del x1135 - x1136 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1136 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1136 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.vVOV, (2, 4, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 t3new_bbbbbb += einsum(x1136, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -2.0 t3new_bbbbbb += einsum(x1136, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 2.0 @@ -6186,7 +6187,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1136, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -2.0 t3new_bbbbbb += einsum(x1136, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 del x1136 - x1137 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1137 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1137 += einsum(v.aabb.OVOV, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 1, 7), (4, 5, 2, 6, 7, 3)) t3new_bbbbbb += einsum(x1137, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1137, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 @@ -6198,13 +6199,13 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1137, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 t3new_bbbbbb += einsum(x1137, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 del x1137 - x1138 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1138 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1138 += einsum(v.bbbb.OOOO, (0, 1, 2, 3), t3.bbbbbb, (4, 3, 1, 5, 6, 7), (4, 0, 2, 5, 6, 7)) * -1.0 t3new_bbbbbb += einsum(x1138, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1138, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1138, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 del x1138 - x1139 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1139 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1139 += einsum(v.bbbb.OOVV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 5, 0, 6, 7, 2)) t3new_bbbbbb += einsum(x1139, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 t3new_bbbbbb += einsum(x1139, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 @@ -6216,7 +6217,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1139, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1139, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 6.0 del x1139 - x1140 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1140 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1140 += einsum(v.bbbb.OVOV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 2, 6, 7, 3), (4, 5, 0, 6, 7, 1)) t3new_bbbbbb += einsum(x1140, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 6.0 t3new_bbbbbb += einsum(x1140, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 @@ -6228,27 +6229,27 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1140, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1140, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x1140 - x1141 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1141 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1141 += einsum(v.bbbb.VVVV, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 1), (4, 5, 6, 7, 0, 2)) * -1.0 t3new_bbbbbb += einsum(x1141, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_bbbbbb += einsum(x1141, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1141, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 del x1141 - x1142 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1142 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1142 += einsum(x489, (0, 1), t3.bbbbbb, (2, 3, 0, 4, 5, 6), (1, 2, 3, 4, 5, 6)) del x489 t3new_bbbbbb += einsum(x1142, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1142, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1142, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x1142 - x1143 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1143 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1143 += einsum(x491, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x491 t3new_bbbbbb += einsum(x1143, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_bbbbbb += einsum(x1143, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1143, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1143 - x1144 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1144 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1144 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x497, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x497 t3new_bbbbbb += einsum(x1144, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 @@ -6261,7 +6262,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1144, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_bbbbbb += einsum(x1144, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x1144 - x1145 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1145 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1145 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x510, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x510 t3new_bbbbbb += einsum(x1145, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -2.0 @@ -6283,9 +6284,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1145, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * -2.0 t3new_bbbbbb += einsum(x1145, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1145 - x1146 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1146 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1146 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), v.bbbb.oOoO, (4, 5, 0, 6), (1, 5, 6, 2, 3, 4)) * -1.0 - x1147 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1147 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1147 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1146, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1146 t3new_bbbbbb += einsum(x1147, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -6307,9 +6308,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1147, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1147, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1147 - x1148 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1148 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1148 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.oOvV, (4, 5, 2, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x1149 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1149 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1149 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1148, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1148 t3new_bbbbbb += einsum(x1149, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -6331,7 +6332,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1149, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 2.0 t3new_bbbbbb += einsum(x1149, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1149 - x1150 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1150 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1150 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x520, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x520 t3new_bbbbbb += einsum(x1150, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -2.0 @@ -6353,9 +6354,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1150, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 t3new_bbbbbb += einsum(x1150, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 2.0 del x1150 - x1151 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1151 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1151 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.ovOV, (4, 2, 5, 6), (0, 1, 5, 3, 6, 4)) * -1.0 - x1152 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1152 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1152 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1151, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1151 t3new_bbbbbb += einsum(x1152, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.0 @@ -6377,9 +6378,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1152, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1152, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 del x1152 - x1153 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1153 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1153 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), v.bbbb.vVvV, (4, 5, 2, 6), (0, 1, 3, 5, 6, 4)) * -1.0 - x1154 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1154 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1154 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1153, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1153 t3new_bbbbbb += einsum(x1154, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -2.0 @@ -6401,21 +6402,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1154, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 4, 5)) * -2.0 t3new_bbbbbb += einsum(x1154, (0, 1, 2, 3, 4, 5), (1, 2, 0, 3, 5, 4)) * 2.0 del x1154 - x1155 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1155 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1155 += einsum(x540, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) del x540 t3new_bbbbbb += einsum(x1155, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1155, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1155, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x1155 - x1156 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1156 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1156 += einsum(x544, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) del x544 t3new_bbbbbb += einsum(x1156, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_bbbbbb += einsum(x1156, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1156, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x1156 - x1157 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1157 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1157 += einsum(x546, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (1, 4, 5, 6, 7, 3)) del x546 t3new_bbbbbb += einsum(x1157, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 2.0 @@ -6428,7 +6429,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1157, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_bbbbbb += einsum(x1157, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -2.0 del x1157 - x1158 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1158 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1158 += einsum(x548, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (4, 5, 1, 3, 6, 7)) del x548 t3new_bbbbbb += einsum(x1158, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -2.0 @@ -6441,7 +6442,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1158, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -2.0 t3new_bbbbbb += einsum(x1158, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 del x1158 - x1159 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1159 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1159 += einsum(x552, (0, 1, 2, 3), t3.bbbbbb, (4, 3, 2, 5, 6, 7), (0, 4, 1, 5, 6, 7)) * -1.0 del x552 t3new_bbbbbb += einsum(x1159, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 @@ -6451,7 +6452,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1159, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1159, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 del x1159 - x1160 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1160 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1160 += einsum(x554, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 0, 6, 7, 3), (4, 5, 1, 2, 6, 7)) del x554 t3new_bbbbbb += einsum(x1160, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * -6.0 @@ -6464,7 +6465,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1160, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -6.0 t3new_bbbbbb += einsum(x1160, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1160 - x1161 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1161 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1161 += einsum(x556, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (4, 5, 0, 2, 6, 7)) del x556 t3new_bbbbbb += einsum(x1161, (0, 1, 2, 3, 4, 5), (2, 1, 0, 3, 5, 4)) * 6.0 @@ -6477,21 +6478,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1161, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 6.0 t3new_bbbbbb += einsum(x1161, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1161 - x1162 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1162 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1162 += einsum(x560, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) del x560 t3new_bbbbbb += einsum(x1162, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1162, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1162, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 del x1162 - x1163 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1163 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1163 += einsum(x562, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (2, 3, 0, 4, 5, 6)) del x562 t3new_bbbbbb += einsum(x1163, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1163, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1163, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x1163 - x1164 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1164 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1164 += einsum(x564, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 6, 7, 2)) del x564 t3new_bbbbbb += einsum(x1164, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -6.0 @@ -6504,7 +6505,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1164, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1164, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * 6.0 del x1164 - x1165 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1165 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1165 += einsum(x566, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 2), (0, 4, 5, 6, 7, 3)) del x566 t3new_bbbbbb += einsum(x1165, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * 6.0 @@ -6517,7 +6518,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1165, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1165, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * -6.0 del x1165 - x1166 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1166 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1166 += einsum(x568, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 2, 3), (4, 5, 6, 0, 7, 1)) del x568 t3new_bbbbbb += einsum(x1166, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 @@ -6527,21 +6528,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1166, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 t3new_bbbbbb += einsum(x1166, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 del x1166 - x1167 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1167 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1167 += einsum(x570, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 5, 6, 0)) del x570 t3new_bbbbbb += einsum(x1167, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 t3new_bbbbbb += einsum(x1167, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1167, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 del x1167 - x1168 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1168 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1168 += einsum(x572, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 0), (2, 3, 4, 5, 6, 1)) del x572 t3new_bbbbbb += einsum(x1168, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 t3new_bbbbbb += einsum(x1168, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1168, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * 6.0 del x1168 - x1169 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1169 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1169 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x584, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x584 t3new_bbbbbb += einsum(x1169, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 @@ -6563,7 +6564,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1169, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 2.0 t3new_bbbbbb += einsum(x1169, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 del x1169 - x1170 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1170 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1170 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x594, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x594 t3new_bbbbbb += einsum(x1170, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -6585,7 +6586,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1170, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 t3new_bbbbbb += einsum(x1170, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * 2.0 del x1170 - x1171 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1171 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1171 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x598, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x598 t3new_bbbbbb += einsum(x1171, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 @@ -6607,7 +6608,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1171, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -4.0 t3new_bbbbbb += einsum(x1171, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 4.0 del x1171 - x1172 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1172 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1172 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x602, (4, 5, 6, 0), (1, 4, 5, 2, 3, 6)) * -1.0 del x602 t3new_bbbbbb += einsum(x1172, (0, 1, 2, 3, 4, 5), (1, 0, 2, 5, 4, 3)) * -4.0 @@ -6629,7 +6630,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1172, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * 4.0 t3new_bbbbbb += einsum(x1172, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * 4.0 del x1172 - x1173 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1173 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1173 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x606, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x606 t3new_bbbbbb += einsum(x1173, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -6651,7 +6652,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1173, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 t3new_bbbbbb += einsum(x1173, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1173 - x1174 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1174 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1174 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x614, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x614 t3new_bbbbbb += einsum(x1174, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -4.0 @@ -6673,7 +6674,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1174, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_bbbbbb += einsum(x1174, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x1174 - x1175 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1175 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1175 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x620, (4, 5, 6, 0), (5, 4, 1, 2, 3, 6)) del x620 t3new_bbbbbb += einsum(x1175, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -2.0 @@ -6695,7 +6696,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1175, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -2.0 t3new_bbbbbb += einsum(x1175, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -2.0 del x1175 - x1176 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1176 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1176 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x616, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x616 t3new_bbbbbb += einsum(x1176, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 4.0 @@ -6717,7 +6718,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1176, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -4.0 t3new_bbbbbb += einsum(x1176, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x1176 - x1177 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1177 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1177 += einsum(x640, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (1, 4, 5, 3, 6, 7)) del x640 t3new_bbbbbb += einsum(x1177, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 2.00000000000002 @@ -6730,7 +6731,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1177, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 2.00000000000002 t3new_bbbbbb += einsum(x1177, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.00000000000002 del x1177 - x1178 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1178 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1178 += einsum(x642, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (1, 4, 5, 3, 6, 7)) del x642 t3new_bbbbbb += einsum(x1178, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.00000000000002 @@ -6743,7 +6744,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1178, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.00000000000002 t3new_bbbbbb += einsum(x1178, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.00000000000002 del x1178 - x1179 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1179 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1179 += einsum(x656, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x656 t3new_bbbbbb += einsum(x1179, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0000000000000595 @@ -6756,21 +6757,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1179, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 6.0000000000000595 t3new_bbbbbb += einsum(x1179, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -6.0000000000000595 del x1179 - x1180 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1180 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1180 += einsum(x658, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x658 t3new_bbbbbb += einsum(x1180, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1180, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1180, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 del x1180 - x1181 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1181 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1181 += einsum(x664, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x664 t3new_bbbbbb += einsum(x1181, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 t3new_bbbbbb += einsum(x1181, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1181, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1181 - x1182 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1182 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1182 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x672, (1, 6, 7, 2, 4, 8), (7, 6, 0, 8, 3, 5)) * -1.0 del x672 t3new_bbbbbb += einsum(x1182, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -4.0 @@ -6783,7 +6784,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1182, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * -4.0 t3new_bbbbbb += einsum(x1182, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 4.0 del x1182 - x1183 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1183 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1183 += einsum(t3.babbab, (0, 1, 2, 3, 4, 5), x674, (1, 6, 4, 7, 8, 5), (6, 0, 2, 7, 8, 3)) del x674 t3new_bbbbbb += einsum(x1183, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * 4.0 @@ -6796,7 +6797,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1183, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 4.0 t3new_bbbbbb += einsum(x1183, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -4.0 del x1183 - x1184 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1184 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1184 += einsum(x676, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (1, 4, 5, 3, 6, 7)) del x676 t3new_bbbbbb += einsum(x1184, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.00000000000004 @@ -6809,7 +6810,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1184, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 4.00000000000004 t3new_bbbbbb += einsum(x1184, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -4.00000000000004 del x1184 - x1185 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1185 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1185 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x678, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 3, 4)) * -1.0 del x678 t3new_bbbbbb += einsum(x1185, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 @@ -6822,7 +6823,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1185, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1185, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 del x1185 - x1186 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1186 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1186 += einsum(x680, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 del x680 t3new_bbbbbb += einsum(x1186, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 @@ -6832,7 +6833,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1186, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 t3new_bbbbbb += einsum(x1186, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 del x1186 - x1187 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1187 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1187 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x682, (6, 7, 1, 2, 8, 5), (7, 6, 0, 8, 3, 4)) * -1.0 del x682 t3new_bbbbbb += einsum(x1187, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 @@ -6845,7 +6846,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1187, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1187, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -6.0 del x1187 - x1188 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1188 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1188 += einsum(t3.bbbbbb, (0, 1, 2, 3, 4, 5), x684, (6, 2, 7, 8, 4, 5), (6, 0, 1, 7, 8, 3)) del x684 t3new_bbbbbb += einsum(x1188, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 3, 5)) * -12.0 @@ -6858,7 +6859,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1188, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -12.0 t3new_bbbbbb += einsum(x1188, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 12.0 del x1188 - x1189 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1189 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1189 += einsum(x686, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x686 t3new_bbbbbb += einsum(x1189, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 12.000000000000123 @@ -6871,7 +6872,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1189, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 12.000000000000123 t3new_bbbbbb += einsum(x1189, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -12.000000000000123 del x1189 - x1190 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1190 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1190 += einsum(x688, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x688 t3new_bbbbbb += einsum(x1190, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 @@ -6881,7 +6882,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1190, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1190, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x1190 - x1191 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1191 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1191 += einsum(x690, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x690 t3new_bbbbbb += einsum(x1191, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -12.000000000000123 @@ -6894,30 +6895,30 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1191, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -12.000000000000123 t3new_bbbbbb += einsum(x1191, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 12.000000000000123 del x1191 - x1192 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1192 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1192 += einsum(x693, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 2), (4, 5, 6, 1, 0, 7)) del x693 t3new_bbbbbb += einsum(x1192, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 t3new_bbbbbb += einsum(x1192, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1192, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1192 - x1193 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1193 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1193 += einsum(x694, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x694 t3new_bbbbbb += einsum(x1193, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_bbbbbb += einsum(x1193, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1193, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1193 - x1194 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1194 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1194 += einsum(x696, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x696 t3new_bbbbbb += einsum(x1194, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_bbbbbb += einsum(x1194, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1194, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1194 - x1195 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1195 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1195 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.bbbb.ovoO, (2, 6, 0, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x1196 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1196 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1196 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1195, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1195 t3new_bbbbbb += einsum(x1196, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -6939,9 +6940,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1196, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1196, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1196 - x1197 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1197 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1197 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.bbbb.ovoO, (0, 6, 2, 7), (3, 7, 1, 4, 5, 6)) * -1.0 - x1198 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1198 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1198 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1197, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1197 t3new_bbbbbb += einsum(x1198, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -2.0 @@ -6963,7 +6964,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1198, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 t3new_bbbbbb += einsum(x1198, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 del x1198 - x1199 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1199 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1199 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x724, (4, 5, 6, 2), (0, 1, 4, 5, 6, 3)) * -1.0 del x724 t3new_bbbbbb += einsum(x1199, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -6985,9 +6986,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1199, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 3, 4)) * 2.0 t3new_bbbbbb += einsum(x1199, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1199 - x1200 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1200 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1200 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.bbbb.ovvV, (2, 1, 6, 7), (0, 3, 4, 5, 7, 6)) * -1.0 - x1201 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1201 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1201 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1200, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1200 t3new_bbbbbb += einsum(x1201, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -2.0 @@ -7009,9 +7010,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1201, (0, 1, 2, 3, 4, 5), (2, 0, 1, 4, 3, 5)) * -2.0 t3new_bbbbbb += einsum(x1201, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * -2.0 del x1201 - x1202 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1202 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1202 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.bbbb.ovvV, (0, 6, 4, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x1203 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1203 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1203 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1202, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1202 t3new_bbbbbb += einsum(x1203, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 @@ -7033,9 +7034,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1203, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -2.0 t3new_bbbbbb += einsum(x1203, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x1203 - x1204 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=np.float64) + x1204 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], navir[1], nvir[1]), dtype=types[float]) x1204 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.bbbb.ovvV, (0, 4, 6, 7), (2, 3, 1, 5, 7, 6)) * -1.0 - x1205 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1205 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1205 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1204, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1204 t3new_bbbbbb += einsum(x1205, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 @@ -7057,21 +7058,21 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1205, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 2.0 t3new_bbbbbb += einsum(x1205, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -2.0 del x1205 - x1206 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1206 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1206 += einsum(x744, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x744 t3new_bbbbbb += einsum(x1206, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1206, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1206, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x1206 - x1207 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1207 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1207 += einsum(x750, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x750 t3new_bbbbbb += einsum(x1207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_bbbbbb += einsum(x1207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1207, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1207 - x1208 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1208 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1208 += einsum(x752, (0, 1, 2, 3), t3.babbab, (4, 0, 5, 6, 2, 7), (1, 4, 5, 3, 6, 7)) del x752 t3new_bbbbbb += einsum(x1208, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -7084,7 +7085,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1208, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.0 t3new_bbbbbb += einsum(x1208, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x1208 - x1209 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1209 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1209 += einsum(x755, (0, 1, 2, 3), t3.bbbbbb, (4, 2, 3, 5, 6, 7), (1, 0, 4, 5, 6, 7)) * -1.0 del x755 t3new_bbbbbb += einsum(x1209, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 3.0 @@ -7094,7 +7095,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1209, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 t3new_bbbbbb += einsum(x1209, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -3.0 del x1209 - x1210 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1210 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1210 += einsum(x758, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x758 t3new_bbbbbb += einsum(x1210, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -6.0 @@ -7107,7 +7108,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1210, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1210, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 6.0 del x1210 - x1211 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1211 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1211 += einsum(x761, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 1, 6, 7, 3), (0, 4, 5, 2, 6, 7)) del x761 t3new_bbbbbb += einsum(x1211, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 6.0 @@ -7120,42 +7121,42 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1211, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1211, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * -6.0 del x1211 - x1212 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1212 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1212 += einsum(x764, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x764 t3new_bbbbbb += einsum(x1212, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1212, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * -6.0 t3new_bbbbbb += einsum(x1212, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * 6.0 del x1212 - x1213 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1213 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1213 += einsum(x767, (0, 1), t3.bbbbbb, (2, 3, 1, 4, 5, 6), (0, 2, 3, 4, 5, 6)) del x767 t3new_bbbbbb += einsum(x1213, (0, 1, 2, 3, 4, 5), (0, 2, 1, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1213, (0, 1, 2, 3, 4, 5), (1, 0, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1213, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 5, 3)) * -6.0 del x1213 - x1214 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1214 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1214 += einsum(x770, (0, 1, 2, 3), t3.bbbbbb, (4, 5, 6, 7, 3, 2), (4, 5, 6, 1, 0, 7)) del x770 t3new_bbbbbb += einsum(x1214, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 3, 5)) * -6.0 t3new_bbbbbb += einsum(x1214, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 6.0 t3new_bbbbbb += einsum(x1214, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1214 - x1215 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1215 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1215 += einsum(x772, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x772 t3new_bbbbbb += einsum(x1215, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 6.0 t3new_bbbbbb += einsum(x1215, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -6.0 t3new_bbbbbb += einsum(x1215, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 6.0 del x1215 - x1216 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1216 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1216 += einsum(x775, (0, 1), t3.bbbbbb, (2, 3, 4, 5, 6, 1), (2, 3, 4, 0, 5, 6)) del x775 t3new_bbbbbb += einsum(x1216, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * -6.0 t3new_bbbbbb += einsum(x1216, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 6.0 t3new_bbbbbb += einsum(x1216, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -6.0 del x1216 - x1217 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1217 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1217 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x809, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x809 t3new_bbbbbb += einsum(x1217, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 @@ -7168,7 +7169,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1217, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_bbbbbb += einsum(x1217, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x1217 - x1218 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1218 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1218 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x814, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x814 t3new_bbbbbb += einsum(x1218, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 2.0 @@ -7190,10 +7191,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1218, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 2.0 t3new_bbbbbb += einsum(x1218, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 del x1218 - x1219 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1219 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1219 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x813, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x813 - x1220 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1220 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1220 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1219, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1219 t3new_bbbbbb += einsum(x1220, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -2.0 @@ -7215,7 +7216,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1220, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -2.0 t3new_bbbbbb += einsum(x1220, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * 2.0 del x1220 - x1221 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1221 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1221 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x827, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x827 t3new_bbbbbb += einsum(x1221, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 @@ -7237,7 +7238,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1221, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 5, 3)) * -4.0 t3new_bbbbbb += einsum(x1221, (0, 1, 2, 3, 4, 5), (2, 1, 0, 4, 3, 5)) * 4.0 del x1221 - x1222 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1222 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1222 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x833, (4, 5, 6, 0), (4, 1, 5, 2, 3, 6)) * -1.0 del x833 t3new_bbbbbb += einsum(x1222, (0, 1, 2, 3, 4, 5), (0, 2, 1, 5, 4, 3)) * -4.0 @@ -7259,9 +7260,9 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1222, (0, 1, 2, 3, 4, 5), (1, 2, 0, 4, 3, 5)) * 4.0 t3new_bbbbbb += einsum(x1222, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 4.0 del x1222 - x1223 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], nocc[1], nocc[1]), dtype=np.float64) + x1223 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], nocc[1], nocc[1]), dtype=types[float]) x1223 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 1, 7, 4), (0, 2, 3, 5, 6, 7)) * -1.0 - x1224 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1224 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1224 += einsum(t2.bbbb[np.ix_(sob,sob,sVb,sVb)], (0, 1, 2, 3), x1223, (4, 5, 6, 7, 0, 1), (4, 5, 6, 7, 2, 3)) del x1223 t3new_bbbbbb += einsum(x1224, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -7283,10 +7284,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1224, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 3, 4)) * -2.0 t3new_bbbbbb += einsum(x1224, (0, 1, 2, 3, 4, 5), (1, 2, 0, 5, 4, 3)) * 2.0 del x1224 - x1225 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1225 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1225 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x826, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x826 - x1226 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1226 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1226 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1225, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1225 t3new_bbbbbb += einsum(x1226, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * -4.0 @@ -7308,10 +7309,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1226, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * 4.0 t3new_bbbbbb += einsum(x1226, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x1226 - x1227 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1227 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1227 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x846, (4, 5, 0, 6), (4, 5, 1, 2, 3, 6)) del x846 - x1228 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1228 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1228 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1227, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1227 t3new_bbbbbb += einsum(x1228, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -2.0 @@ -7333,10 +7334,10 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1228, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1228, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 2.0 del x1228 - x1229 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1229 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1229 += einsum(t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (0, 1, 2, 3), x832, (4, 5, 6, 2), (0, 1, 4, 3, 5, 6)) * -1.0 del x832 - x1230 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1230 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1230 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1229, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1229 t3new_bbbbbb += einsum(x1230, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 4.0 @@ -7358,7 +7359,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1230, (0, 1, 2, 3, 4, 5), (0, 1, 2, 4, 5, 3)) * -4.0 t3new_bbbbbb += einsum(x1230, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x1230 - x1231 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1231 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1231 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x855, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x855 t3new_bbbbbb += einsum(x1231, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * 4.0 @@ -7371,7 +7372,7 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1231, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * 4.0 t3new_bbbbbb += einsum(x1231, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * -4.0 del x1231 - x1232 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1232 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1232 += einsum(t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (0, 1, 2, 3), x857, (4, 5, 6, 0), (5, 4, 1, 6, 2, 3)) del x857 t3new_bbbbbb += einsum(x1232, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 5, 4)) * -4.0 @@ -7384,12 +7385,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1232, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 3, 4)) * -4.0 t3new_bbbbbb += einsum(x1232, (0, 1, 2, 3, 4, 5), (0, 1, 2, 5, 4, 3)) * 4.0 del x1232 - x1233 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x1233 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[1], nvir[1]), dtype=types[float]) x1233 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), t2.bbbb[np.ix_(sob,sOb,sVb,sVb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 7, 2, 1), (0, 3, 4, 5, 6, 7)) * -1.0 - x1234 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1234 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1234 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1233, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1233 - x1235 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1235 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1235 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1234, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1234 t3new_bbbbbb += einsum(x1235, (0, 1, 2, 3, 4, 5), (0, 1, 2, 3, 5, 4)) * 2.0 @@ -7411,12 +7412,12 @@ def update_amps(f=None, v=None, space=None, t1=None, t2=None, t3=None, **kwargs) t3new_bbbbbb += einsum(x1235, (0, 1, 2, 3, 4, 5), (2, 0, 1, 5, 4, 3)) * 2.0 t3new_bbbbbb += einsum(x1235, (0, 1, 2, 3, 4, 5), (2, 1, 0, 5, 4, 3)) * -2.0 del x1235 - x1236 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[1], nvir[1]), dtype=np.float64) + x1236 = np.zeros((naocc[1], naocc[1], navir[1], navir[1], nocc[1], nvir[1]), dtype=types[float]) x1236 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), t2.bbbb[np.ix_(sOb,sOb,svb,sVb)], (2, 3, 4, 5), v.bbbb.ovov, (6, 7, 0, 4), (2, 3, 1, 5, 6, 7)) * -1.0 - x1237 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=np.float64) + x1237 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], nocc[1]), dtype=types[float]) x1237 += einsum(t1.bb[np.ix_(sOb,svb)], (0, 1), x1236, (2, 3, 4, 5, 6, 1), (0, 2, 3, 4, 5, 6)) del x1236 - x1238 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=np.float64) + x1238 = np.zeros((naocc[1], naocc[1], naocc[1], navir[1], navir[1], navir[1]), dtype=types[float]) x1238 += einsum(t1.bb[np.ix_(sob,sVb)], (0, 1), x1237, (2, 3, 4, 5, 6, 0), (2, 3, 4, 1, 5, 6)) del x1237 t3new_bbbbbb += einsum(x1238, (0, 1, 2, 3, 4, 5), (0, 2, 1, 3, 4, 5)) * 2.0 diff --git a/ebcc/codegen/UCCSDxTx.py b/ebcc/codegen/UCCSDxTx.py index 1a43fd6b..b0c08b0e 100644 --- a/ebcc/codegen/UCCSDxTx.py +++ b/ebcc/codegen/UCCSDxTx.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 2), ()) * -1.0 - x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x0 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x1 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(f.bb.ov, (0, 1), (0, 1)) x1 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) x1 += einsum(t1.bb, (0, 1), x0, (0, 2, 1, 3), (2, 3)) * -0.5 del x0 e_cc += einsum(t1.bb, (0, 1), x1, (0, 1), ()) del x1 - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(f.aa.ov, (0, 1), (0, 1)) * 2.0 x3 += einsum(t1.aa, (0, 1), x2, (0, 2, 1, 3), (2, 3)) * -1.0 del x2 @@ -36,51 +37,51 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new = Namespace() # T amplitudes - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x2, (4, 0, 1, 3), (4, 2)) * 2.0 del x2 - x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (0, 4, 2, 3)) - x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x4 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 0, 2), (4, 3)) * -1.0 - x5 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x5 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x5 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x5, (0, 4, 3, 1), (4, 2)) * -2.0 del x5 - x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.abab, (0, 1, 2, 3), (1, 3, 0, 2)) x6 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (2, 3, 0, 1)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x6, (4, 3, 0, 1), (4, 2)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x6, (2, 3, 4, 1), (4, 0)) - x7 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x7, (0, 1), (0, 1)) - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x8 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(t1.aa, (0, 1), x8, (0, 2, 1, 3), (2, 3)) - x10 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x10 += einsum(f.aa.ov, (0, 1), (0, 1)) x10 += einsum(x7, (0, 1), (0, 1)) del x7 @@ -88,12 +89,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x9 t1new_bb += einsum(x10, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) t1new_aa += einsum(x10, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 - x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), x11, (0, 2, 1, 3), (2, 3)) - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum(f.bb.ov, (0, 1), (0, 1)) x13 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -101,25 +102,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x12 t1new_bb += einsum(x13, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_aa += einsum(x13, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) - x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x14 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 del x14 - x15 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x16 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x16 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x18 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x19 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x19 += einsum(t1.bb, (0, 1), x18, (2, 3, 0, 1), (2, 3)) - x20 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x20 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x20 += einsum(t1.bb, (0, 1), x13, (2, 1), (0, 2)) - x21 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x21 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x21 += einsum(f.bb.oo, (0, 1), (0, 1)) x21 += einsum(x15, (0, 1), (1, 0)) x21 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -129,49 +130,49 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t1new_bb += einsum(t1.bb, (0, 1), x21, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x21, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x21 - x22 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x22 += einsum(f.bb.vv, (0, 1), (0, 1)) x22 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(t1.bb, (0, 1), x22, (1, 2), (0, 2)) del x22 - x23 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x23 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 0, 2)) - x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x24 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x24 += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x24, (1, 3, 0, 4), (4, 2)) * -1.0 del x24 - x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x26 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x26, (4, 1, 0, 3), (4, 2)) * -2.0 del x26 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x27, (0, 4, 3, 1), (4, 2)) * -2.0 del x27 - x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x28, (0, 2, 1, 3), (2, 3)) * -1.0 - x29 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x29 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x30 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x31 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x32 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * -1.0 - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(t1.aa, (0, 1), x32, (0, 2, 3, 1), (2, 3)) del x32 - x34 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(t1.aa, (0, 1), x10, (2, 1), (0, 2)) - x35 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x35 += einsum(f.aa.oo, (0, 1), (0, 1)) x35 += einsum(x29, (0, 1), (1, 0)) x35 += einsum(x30, (0, 1), (1, 0)) @@ -181,25 +182,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t1new_aa += einsum(t1.aa, (0, 1), x35, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x35, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x35 - x36 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(f.aa.vv, (0, 1), (0, 1)) x36 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 1, 2, 3), (2, 3)) t1new_aa += einsum(t1.aa, (0, 1), x36, (1, 2), (0, 2)) del x36 - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(t2.aaaa, (0, 1, 2, 3), x38, (4, 5, 1, 0), (4, 5, 2, 3)) * -1.0 - x40 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(f.aa.oo, (0, 1), (0, 1)) x40 += einsum(x34, (0, 1), (0, 1)) del x34 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(x40, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x40 - x42 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x42 += einsum(x29, (0, 1), (1, 0)) del x29 x42 += einsum(x30, (0, 1), (1, 0)) @@ -208,10 +209,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x31 x42 += einsum(x33, (0, 1), (1, 0)) * -1.0 del x33 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(x42, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x42 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(x37, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x37 x44 += einsum(x39, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -223,59 +224,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) del x44 - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x46 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (3, 4, 0, 2)) t2new_abab += einsum(x46, (0, 1, 2, 3), (2, 0, 3, 1)) - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t2.abab, (0, 1, 2, 3), x46, (1, 3, 4, 5), (4, 0, 2, 5)) - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x48 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(x28, (0, 1, 2, 3), x48, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x28 - x50 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x51 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x50 - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.abab, (0, 1, 2, 3), x51, (1, 3, 4, 5), (0, 4, 2, 5)) del x51 - x53 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x53 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(t1.aa, (0, 1), x53, (2, 3, 1, 4), (0, 2, 3, 4)) del x53 - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(t2.aaaa, (0, 1, 2, 3), x54, (4, 1, 3, 5), (0, 4, 2, 5)) * -2.0 del x54 - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa, (0, 1), x38, (2, 3, 4, 0), (2, 4, 3, 1)) del x38 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), x45, (2, 3, 1, 4), (0, 2, 3, 4)) - x59 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 3, 4, 5), (4, 0, 5, 2)) del x23 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x60 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t2.aaaa, (0, 1, 2, 3), x60, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x62 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) - x63 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x63 += einsum(t2.aaaa, (0, 1, 2, 3), x62, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x62 - x64 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x64 += einsum(x56, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x56 x64 += einsum(x57, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -288,10 +289,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x61 x64 += einsum(x63, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x63 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), x64, (2, 0, 3, 4), (2, 3, 1, 4)) del x64 - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) del x45 x66 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -309,60 +310,60 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x66, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x66 - x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t1.aa, (0, 1), x67, (2, 3, 1, 4), (0, 2, 3, 4)) del x67 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.aaaa, (0, 1, 2, 3), x8, (1, 4, 3, 5), (4, 0, 5, 2)) - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t2.aaaa, (0, 1, 2, 3), x69, (1, 4, 3, 5), (0, 4, 2, 5)) * -4.0 del x69 - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x74 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x74 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x75 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(t1.aa, (0, 1), x74, (0, 1, 2, 3), (2, 3)) del x74 - x76 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x76 += einsum(x71, (0, 1), (1, 0)) * -1.0 x76 += einsum(x72, (0, 1), (1, 0)) x76 += einsum(x73, (0, 1), (1, 0)) * 2.0 x76 += einsum(x75, (0, 1), (1, 0)) * -1.0 - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(x76, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x76 - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(x10, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x80 += einsum(t1.aa, (0, 1), x25, (2, 3, 4, 1), (2, 0, 4, 3)) del x25 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x81 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x81 += einsum(x80, (0, 1, 2, 3), (3, 1, 2, 0)) - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum(t1.aa, (0, 1), x81, (0, 2, 3, 4), (2, 3, 4, 1)) del x81 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(x78, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x78 x83 += einsum(x79, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x79 x83 += einsum(x82, (0, 1, 2, 3), (1, 0, 2, 3)) del x82 - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum(t1.aa, (0, 1), x83, (0, 2, 3, 4), (2, 3, 1, 4)) del x83 - x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) del x68 x85 += einsum(x70, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -374,15 +375,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x85, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x85 - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x87 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(t2.abab, (0, 1, 2, 3), x11, (1, 4, 3, 5), (4, 5, 0, 2)) del x11 - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum(t2.abab, (0, 1, 2, 3), x87, (1, 3, 4, 5), (0, 4, 2, 5)) * -1.0 del x87 - x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x89 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x89 += einsum(x86, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x86 @@ -391,36 +392,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x89, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x90 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x91 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x91 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x91 += einsum(x90, (0, 1, 2, 3), (3, 1, 0, 2)) x91 += einsum(x80, (0, 1, 2, 3), (3, 1, 0, 2)) del x80 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x91, (0, 4, 5, 1), (5, 4, 2, 3)) * -2.0 del x91 - x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t1.aa, (0, 1), x90, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x90 x92 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 x92 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) * 0.5 t2new_aaaa += einsum(t1.aa, (0, 1), x92, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x92 - x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x94 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x95 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x96 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x96 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(t1.bb, (0, 1), x96, (2, 3, 1, 4), (0, 2, 3, 4)) - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x98 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x98 += einsum(x93, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -431,13 +432,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x18 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x98, (1, 4, 3, 5), (0, 4, 2, 5)) del x98 - x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x99 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x99 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x100 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x100 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) - x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x101 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x101 += einsum(x48, (0, 1, 2, 3), x99, (0, 4, 2, 5), (4, 1, 5, 3)) * -2.0 @@ -448,14 +449,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x60 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x101, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x101 - x102 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x102 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x102 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x102 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 4), (4, 1, 2, 3)) x102 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (3, 4, 2, 0)) * -1.0 x102 += einsum(v.aabb.ovov, (0, 1, 2, 3), x6, (2, 4, 5, 1), (3, 4, 0, 5)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x102, (3, 4, 0, 5), (5, 1, 2, 4)) del x102 - x103 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x103 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x103 += einsum(t1.aa, (0, 1), v.aabb.ooov, (2, 0, 3, 4), (3, 4, 2, 1)) * -1.0 x103 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -463,37 +464,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x48 t2new_abab += einsum(t2.bbbb, (0, 1, 2, 3), x103, (1, 3, 4, 5), (4, 0, 5, 2)) * 2.0 del x103 - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 x104 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - x105 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (0, 4, 2, 3)) - x106 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x106 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x106 += einsum(x105, (0, 1, 2, 3), (0, 1, 2, 3)) x106 += einsum(t1.bb, (0, 1), x4, (0, 2, 3, 4), (2, 1, 3, 4)) * -1.0 del x4 t2new_abab += einsum(x104, (0, 1, 2, 3), x106, (4, 5, 0, 2), (1, 4, 3, 5)) del x104, x106 - x107 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x107 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x107 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) - x108 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x108 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (4, 0, 2, 3)) x108 += einsum(t1.aa, (0, 1), x107, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 del x107 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x108, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x108 - x109 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[1], nvir[1], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 x109 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 4), (4, 1, 2, 3)) x109 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 2, 3, 4), (3, 4, 2, 1)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x109, (3, 4, 2, 5), (0, 1, 5, 4)) * -1.0 del x109 - x110 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x110 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 4, 1), (0, 4, 2, 3)) - x111 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x111 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x111 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x111 += einsum(x110, (0, 1, 2, 3), (1, 0, 3, 2)) x111 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (2, 1, 3, 4), (3, 4, 2, 0)) @@ -501,16 +502,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x6 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x111, (1, 4, 0, 5), (5, 4, 2, 3)) del x111 - x112 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x113 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x114 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x115 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x115 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x115 += einsum(t1.bb, (0, 1), x96, (0, 2, 1, 3), (2, 3)) del x96 - x116 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x116 += einsum(x112, (0, 1), (1, 0)) * -1.0 x116 += einsum(x113, (0, 1), (1, 0)) * 2.0 @@ -519,7 +520,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x116 += einsum(t1.bb, (0, 1), x13, (0, 2), (2, 1)) t2new_abab += einsum(x116, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x116 - x117 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x117 += einsum(x71, (0, 1), (1, 0)) * -1.0 del x71 @@ -533,16 +534,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x10 t2new_abab += einsum(x117, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x117 - x118 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x118 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x118 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 - x119 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x119 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x119 += einsum(x110, (0, 1, 2, 3), (0, 1, 3, 2)) del x110 x119 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (1, 5, 4, 0)) - x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x120 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x120 += einsum(t1.aa, (0, 1), v.aabb.vvoo, (2, 1, 3, 4), (3, 4, 0, 2)) x120 += einsum(t1.bb, (0, 1), x118, (2, 1, 3, 4), (2, 0, 3, 4)) @@ -551,34 +552,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x119 t2new_abab += einsum(t1.bb, (0, 1), x120, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x120 - x121 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nvir[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x121 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (2, 3, 0, 1)) x121 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (3, 4, 0, 2)) t2new_abab += einsum(t1.bb, (0, 1), x121, (1, 2, 3, 4), (3, 0, 4, 2)) del x121 - x122 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x122 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x122 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x122 += einsum(t1.bb, (0, 1), v.aabb.oovv, (2, 3, 4, 1), (0, 4, 2, 3)) t2new_abab += einsum(t1.aa, (0, 1), x122, (2, 3, 0, 4), (4, 2, 1, 3)) * -1.0 del x122 - x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(t1.bb, (0, 1), x123, (2, 3, 1, 4), (0, 2, 3, 4)) del x123 - x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(t2.bbbb, (0, 1, 2, 3), x94, (1, 4, 5, 3), (0, 4, 2, 5)) del x94 - x126 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), x125, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x125 - x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x127 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 4, 2, 5), (1, 3, 4, 5)) del x8 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(t2.abab, (0, 1, 2, 3), x127, (4, 5, 0, 2), (1, 4, 3, 5)) * -1.0 del x127 - x129 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(x112, (0, 1), (1, 0)) * -1.0 del x112 x129 += einsum(x113, (0, 1), (1, 0)) * 2.0 @@ -587,34 +588,34 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x114 x129 += einsum(x115, (0, 1), (0, 1)) * -1.0 del x115 - x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(x129, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x129 - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 2, 5, 3), (0, 1, 4, 5)) - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(x13, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) * -2.0 del x13 - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x134 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x134 += einsum(x133, (0, 1, 2, 3), (3, 1, 2, 0)) del x133 - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), x134, (0, 2, 3, 4), (2, 3, 4, 1)) del x134 - x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x136 += einsum(x131, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x131 x136 += einsum(x132, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x132 x136 += einsum(x135, (0, 1, 2, 3), (1, 0, 2, 3)) del x135 - x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x137 += einsum(t1.bb, (0, 1), x136, (0, 2, 3, 4), (2, 3, 1, 4)) del x136 - x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x138 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) del x124 x138 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -628,51 +629,51 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x138, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x138, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x138 - x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x139 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum(t2.abab, (0, 1, 2, 3), x105, (4, 5, 0, 2), (4, 1, 3, 5)) del x105 - x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x141 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x141 += einsum(x93, (0, 1, 2, 3), (1, 0, 3, 2)) - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(t2.bbbb, (0, 1, 2, 3), x141, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x141 - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(t2.bbbb, (0, 1, 2, 3), x97, (4, 1, 3, 5), (0, 4, 2, 5)) * -2.0 del x97 - x144 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x144 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x145 += einsum(t1.bb, (0, 1), x144, (2, 3, 4, 0), (2, 4, 3, 1)) - x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x146 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x147 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 0, 2), (4, 1, 5, 3)) del x3 - x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x148 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x149 += einsum(t2.bbbb, (0, 1, 2, 3), x148, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x148 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x150 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) del x1 - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 += einsum(t2.bbbb, (0, 1, 2, 3), x150, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x150 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x152 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x152 += einsum(x139, (0, 1, 2, 3), (0, 1, 2, 3)) - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum(t1.bb, (0, 1), x152, (2, 3, 1, 4), (0, 2, 3, 4)) del x152 - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum(x145, (0, 1, 2, 3), (0, 2, 1, 3)) del x145 x154 += einsum(x146, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -685,10 +686,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x151 x154 += einsum(x153, (0, 1, 2, 3), (0, 2, 1, 3)) del x153 - x155 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x155 += einsum(t1.bb, (0, 1), x154, (2, 0, 3, 4), (2, 3, 1, 4)) del x154 - x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x156 += einsum(x139, (0, 1, 2, 3), (0, 1, 2, 3)) del x139 x156 += einsum(x93, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -706,17 +707,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x156, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x156, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x156 - x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(t2.bbbb, (0, 1, 2, 3), x144, (4, 5, 0, 1), (4, 5, 2, 3)) del x144 - x158 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x158 += einsum(f.bb.oo, (0, 1), (0, 1)) x158 += einsum(x20, (0, 1), (0, 1)) del x20 - x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x159 += einsum(x158, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x158 - x160 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x160 += einsum(x15, (0, 1), (1, 0)) del x15 x160 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -725,10 +726,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x17 x160 += einsum(x19, (0, 1), (1, 0)) * -1.0 del x19 - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(x160, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x160 - x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x162 += einsum(x157, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x157 x162 += einsum(x159, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -738,32 +739,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x162, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x162, (0, 1, 2, 3), (1, 0, 2, 3)) del x162 - x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x163 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x164 += einsum(x163, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x163 t2new_bbbb += einsum(x164, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x164, (0, 1, 2, 3), (0, 1, 2, 3)) del x164 - x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_bbbb += einsum(x165, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) del x165 - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x166 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - x167 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x167 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x167 += einsum(v.bbbb.ovov, (0, 1, 2, 3), x166, (4, 5, 3, 1), (0, 5, 2, 4)) del x166 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x167, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 del x167 - x168 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x168 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x169 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x169 += einsum(t1.bb, (0, 1), x168, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x168 x169 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 diff --git a/ebcc/codegen/UDCD.py b/ebcc/codegen/UDCD.py index 69776a52..32f0e6bc 100644 --- a/ebcc/codegen/UDCD.py +++ b/ebcc/codegen/UDCD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy @@ -16,31 +17,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new = Namespace() # T amplitudes - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) * 2.0 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.oooo, (4, 0, 5, 1), (4, 5, 2, 3)) * 2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvoo, (4, 2, 5, 1), (0, 5, 4, 3)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.oovv, (4, 0, 5, 3), (4, 1, 2, 5)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.oooo, (4, 0, 5, 1), (4, 5, 2, 3)) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.oooo, (4, 1, 5, 0), (4, 5, 2, 3)) * -2.0 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(x1, (0, 1), (0, 1)) x3 += einsum(x2, (0, 1), (0, 1)) * 0.5 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(x3, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x3 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(x0, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x0 x5 += einsum(x4, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -48,26 +49,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x5, (0, 1, 2, 3), (1, 0, 2, 3)) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum(t2.aaaa, (0, 1, 2, 3), x6, (4, 1, 5, 3), (4, 0, 5, 2)) - x8 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x8 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 1, 5, 3), (4, 0, 5, 2)) del x8 - x10 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 4, 1, 3), (2, 4)) - x11 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x12 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(x10, (0, 1), (0, 1)) x12 += einsum(x11, (0, 1), (0, 1)) * 0.5 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(x12, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 4, 0)) * -2.0 del x12 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x7 x14 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -77,25 +78,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x14, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x14 - x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x15 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x16 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x16 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x15 t2new_aaaa += einsum(x16, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x16, (0, 1, 2, 3), (0, 1, 2, 3)) del x16 - x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x18 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x18 += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum(t2.aaaa, (0, 1, 2, 3), x18, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x18 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) del x17 x20 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -105,42 +106,42 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_aaaa += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) del x20 - x21 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x21 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (0, 4, 2, 5)) t2new_abab += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x22 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x23 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x23 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x23 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (4, 1, 5, 3)) * 0.5 x23 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x23 - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x24 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x24 += einsum(x6, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x6 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x24, (0, 4, 2, 5), (4, 1, 5, 3)) del x24 - x25 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x25 += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x25 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 t2new_abab += einsum(t2.bbbb, (0, 1, 2, 3), x25, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x25 - x26 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x26 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x27 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x27 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x28 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x28 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x28 += einsum(x26, (0, 1), (1, 0)) * 0.5 x28 += einsum(x27, (0, 1), (1, 0)) t2new_abab += einsum(x28, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x28 - x29 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x29 += einsum(f.aa.vv, (0, 1), (0, 1)) * -2.0 x29 += einsum(x10, (0, 1), (1, 0)) * 2.0 del x10 @@ -148,17 +149,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): del x11 t2new_abab += einsum(x29, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -0.5 del x29 - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x32 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x32 += einsum(f.bb.oo, (0, 1), (0, 1)) * 2.0 x32 += einsum(x30, (0, 1), (1, 0)) x32 += einsum(x31, (0, 1), (1, 0)) * 2.0 t2new_abab += einsum(x32, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -0.5 del x32 - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(f.aa.oo, (0, 1), (0, 1)) x33 += einsum(x1, (0, 1), (1, 0)) del x1 @@ -166,17 +167,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): del x2 t2new_abab += einsum(x33, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x33 - x34 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x34 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x35 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x35 += einsum(x30, (0, 1), (0, 1)) del x30 x35 += einsum(x31, (0, 1), (0, 1)) * 2.0 del x31 - x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x36 += einsum(x35, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) * -1.0 del x35 - x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x37 += einsum(x34, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x34 x37 += einsum(x36, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -184,18 +185,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) del x37 - x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum(t2.bbbb, (0, 1, 2, 3), x22, (4, 1, 5, 3), (4, 0, 5, 2)) del x22 - x39 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x39 += einsum(x26, (0, 1), (0, 1)) del x26 x39 += einsum(x27, (0, 1), (0, 1)) * 2.0 del x27 - x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x40 += einsum(x39, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 del x39 - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) * -4.0 del x38 x41 += einsum(x40, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -203,22 +204,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x41, (0, 1, 2, 3), (0, 1, 3, 2)) del x41 - x42 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x42 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) - x43 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x43 += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x43 += einsum(x42, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x42 - x44 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x44 += einsum(t2.abab, (0, 1, 2, 3), x43, (0, 4, 2, 5), (4, 1, 5, 3)) del x43 - x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x45 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x45 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x46 += einsum(t2.bbbb, (0, 1, 2, 3), x45, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x45 - x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x47 += einsum(x44, (0, 1, 2, 3), (1, 0, 3, 2)) del x44 x47 += einsum(x46, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -228,14 +229,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): t2new_bbbb += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x47, (0, 1, 2, 3), (1, 0, 3, 2)) del x47 - x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x49 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x49 += einsum(t2.abab, (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 0, 2), (4, 1, 5, 3)) - x50 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x50 += einsum(t2.abab, (0, 1, 2, 3), x49, (0, 4, 2, 5), (4, 1, 5, 3)) del x49 - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x51 += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x48 diff --git a/ebcc/codegen/UDCSD.py b/ebcc/codegen/UDCSD.py index bcfc066b..a341c958 100644 --- a/ebcc/codegen/UDCSD.py +++ b/ebcc/codegen/UDCSD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -9,20 +10,20 @@ def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): e_cc += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 2, 1, 3), ()) e_cc += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 2), ()) * -1.0 e_cc += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 3), ()) - x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x0 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x1 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(f.aa.ov, (0, 1), (0, 1)) * 2.0 x1 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) * 2.0 x1 += einsum(t1.aa, (0, 1), x0, (0, 2, 3, 1), (2, 3)) * -1.0 del x0 e_cc += einsum(t1.aa, (0, 1), x1, (0, 1), ()) * 0.5 del x1 - x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x2 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x2 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(f.bb.ov, (0, 1), (0, 1)) * 2.0 x3 += einsum(t1.bb, (0, 1), x2, (0, 2, 1, 3), (2, 3)) * -1.0 del x2 @@ -36,51 +37,51 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x2 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x2, (4, 0, 1, 3), (4, 2)) * 2.0 del x2 - x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (0, 2, 3, 4)) - x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x4 += einsum(v.aabb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x4 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x4, (0, 4, 1, 3), (4, 2)) * -1.0 del x4 - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x5 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_aa += einsum(v.aaaa.ovvv, (0, 1, 2, 3), x5, (0, 4, 1, 3), (4, 2)) * 2.0 del x5 - x6 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x6 += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) x6 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) t1new_aa += einsum(v.aabb.vvov, (0, 1, 2, 3), x6, (4, 2, 1, 3), (4, 0)) t1new_bb += einsum(v.aabb.ovvv, (0, 1, 2, 3), x6, (0, 4, 1, 3), (4, 2)) del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x7 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum(t1.aa, (0, 1), x7, (0, 2, 3, 1), (2, 3)) del x7 - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(f.aa.ov, (0, 1), (0, 1)) x9 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -88,16 +89,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x8 t1new_aa += einsum(x9, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x9, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) - x10 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x10 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x10, (0, 1), (0, 1)) - x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x11 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x12 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), x11, (0, 2, 1, 3), (2, 3)) del x11 - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum(f.bb.ov, (0, 1), (0, 1)) x13 += einsum(x10, (0, 1), (0, 1)) del x10 @@ -105,25 +106,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x12 t1new_aa += einsum(x13, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x13, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x14 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x14, (0, 2, 1, 3), (2, 3)) * -1.0 del x14 - x15 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x15 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 0, 1), (2, 3)) - x16 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x16 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x17 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x18 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x19 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x19 += einsum(t1.aa, (0, 1), x18, (2, 3, 0, 1), (2, 3)) - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(t1.aa, (0, 1), x9, (2, 1), (0, 2)) - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(f.aa.oo, (0, 1), (0, 1)) x21 += einsum(x15, (0, 1), (1, 0)) x21 += einsum(x16, (0, 1), (1, 0)) * 2.0 @@ -132,48 +133,48 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x21 += einsum(x20, (0, 1), (1, 0)) t1new_aa += einsum(t1.aa, (0, 1), x21, (0, 2), (2, 1)) * -1.0 del x21 - x22 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(f.aa.vv, (0, 1), (0, 1)) x22 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (0, 2, 3, 1), (2, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x22, (1, 2), (0, 2)) del x22 - x23 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x23 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (2, 0, 4, 3)) - x24 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x24 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (0, 2, 3, 1)) x24 += einsum(x23, (0, 1, 2, 3), (0, 2, 1, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x24, (0, 1, 4, 2), (4, 3)) * -1.0 - x25 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x25 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) - x26 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x26 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x26 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x26, (4, 0, 1, 3), (4, 2)) * 2.0 del x26 - x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x27 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x27 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) * 0.5 t1new_bb += einsum(v.bbbb.ovvv, (0, 1, 2, 3), x27, (0, 4, 1, 3), (4, 2)) * 2.0 del x27 - x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x28 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x28, (0, 2, 1, 3), (2, 3)) * -1.0 - x29 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x29 += einsum(t1.aa, (0, 1), v.aabb.ovoo, (0, 1, 2, 3), (2, 3)) - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x32 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x32 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) - x33 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x33 += einsum(t1.bb, (0, 1), x32, (2, 3, 0, 1), (2, 3)) del x32 - x34 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x34 += einsum(t1.bb, (0, 1), x13, (2, 1), (0, 2)) - x35 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x35 += einsum(f.bb.oo, (0, 1), (0, 1)) x35 += einsum(x29, (0, 1), (1, 0)) x35 += einsum(x30, (0, 1), (1, 0)) @@ -182,70 +183,70 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x35 += einsum(x34, (0, 1), (1, 0)) t1new_bb += einsum(t1.bb, (0, 1), x35, (0, 2), (2, 1)) * -1.0 del x35 - x36 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x36 += einsum(f.bb.vv, (0, 1), (0, 1)) x36 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (0, 2, 3, 1), (2, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x36, (1, 2), (0, 2)) del x36 - x37 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(t1.aa, (0, 1), v.aaaa.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(t1.aa, (0, 1), x37, (2, 3, 1, 4), (0, 2, 3, 4)) del x37 - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(t2.aaaa, (0, 1, 2, 3), x39, (4, 1, 5, 3), (4, 0, 5, 2)) - x41 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x41 += einsum(t2.abab, (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(t2.abab, (0, 1, 2, 3), x41, (4, 1, 5, 3), (4, 0, 5, 2)) del x41 - x43 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 1), (2, 3)) - x44 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x45 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x46 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x46 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x47 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(t1.aa, (0, 1), x46, (0, 1, 2, 3), (2, 3)) - x48 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(x43, (0, 1), (1, 0)) * -1.0 x48 += einsum(x44, (0, 1), (1, 0)) x48 += einsum(x45, (0, 1), (1, 0)) * 0.5 x48 += einsum(x47, (0, 1), (1, 0)) * -1.0 del x47 - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(x48, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x48 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(x9, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -2.0 - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x52 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 0, 4, 3)) - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x53 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x53 += einsum(x52, (0, 1, 2, 3), (3, 1, 2, 0)) del x52 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x53, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(t1.aa, (0, 1), x53, (0, 2, 3, 4), (2, 3, 4, 1)) del x53 - x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(x50, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x50 x55 += einsum(x51, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x51 x55 += einsum(x54, (0, 1, 2, 3), (1, 0, 2, 3)) del x54 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum(t1.aa, (0, 1), x55, (0, 2, 3, 4), (2, 3, 1, 4)) del x55 - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(x38, (0, 1, 2, 3), (0, 1, 2, 3)) del x38 x57 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -259,27 +260,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x57, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x57 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.aaaa, (0, 1, 2, 3), x58, (4, 5, 0, 1), (4, 5, 2, 3)) - x60 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x60 += einsum(f.aa.oo, (0, 1), (0, 1)) x60 += einsum(x20, (0, 1), (0, 1)) del x20 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(x60, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x60 - x62 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x62 += einsum(x15, (0, 1), (1, 0)) x62 += einsum(x16, (0, 1), (1, 0)) x62 += einsum(x17, (0, 1), (1, 0)) * 0.5 x62 += einsum(x19, (0, 1), (1, 0)) * -1.0 del x19 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(x62, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x62 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(x59, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x59 x64 += einsum(x61, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -289,58 +290,58 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x64, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x64, (0, 1, 2, 3), (1, 0, 2, 3)) del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x67 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x67 += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (0, 3, 2, 4)) t2new_abab += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t2.abab, (0, 1, 2, 3), x67, (4, 1, 5, 3), (4, 0, 2, 5)) - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x69 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x69 += einsum(x66, (0, 1, 2, 3), (1, 0, 3, 2)) - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t2.aaaa, (0, 1, 2, 3), x69, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x69 - x71 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x71 += einsum(v.aaaa.ovvv, (0, 1, 2, 3), (0, 2, 1, 3)) - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t1.aa, (0, 1), x71, (2, 3, 1, 4), (0, 2, 3, 4)) del x71 - x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), x72, (4, 1, 3, 5), (0, 4, 2, 5)) * -2.0 del x72 - x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x74 += einsum(t1.aa, (0, 1), x58, (2, 3, 4, 0), (2, 4, 3, 1)) del x58 - x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x75 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ooov, (4, 5, 1, 3), (0, 4, 5, 2)) - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(t2.abab, (0, 1, 2, 3), x3, (4, 5, 1, 3), (4, 0, 5, 2)) - x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x77 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x77 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(t2.aaaa, (0, 1, 2, 3), x77, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x77 - x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x79 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.aaaa, (0, 1, 2, 3), x79, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x79 - x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x81 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x81 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) - x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x82 += einsum(t1.aa, (0, 1), x81, (2, 3, 1, 4), (0, 2, 3, 4)) del x81 - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(x74, (0, 1, 2, 3), (0, 2, 1, 3)) del x74 x83 += einsum(x75, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -353,10 +354,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x80 x83 += einsum(x82, (0, 1, 2, 3), (0, 2, 1, 3)) del x82 - x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x84 += einsum(t1.aa, (0, 1), x83, (2, 0, 3, 4), (2, 3, 1, 4)) del x83 - x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x85 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) del x65 x85 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -374,40 +375,40 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x85, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x85, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x85 - x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x86 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) t2new_aaaa += einsum(x86, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x86, (0, 1, 2, 3), (1, 0, 2, 3)) del x86 - x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x87 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x88 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x88 += einsum(x87, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x87 t2new_aaaa += einsum(x88, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) del x88 - x89 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x89 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum(t1.aa, (0, 1), x89, (2, 3, 0, 4), (2, 3, 4, 1)) * -2.0 del x89 x90 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x90 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (2, 0, 1, 3)) t2new_aaaa += einsum(t1.aa, (0, 1), x90, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x90 - x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x91 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 2, 5)) - x92 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x92 += einsum(v.bbbb.ovvv, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x93 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x93 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x93 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) x93 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * 0.5 x94 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 x94 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (4, 1, 5, 3)) * 0.5 @@ -417,13 +418,13 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x93 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x94, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x94 - x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x95 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x95 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x95 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x95 += einsum(x1, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x1 - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x96 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x96 += einsum(x39, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 @@ -433,10 +434,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x95 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x96, (0, 4, 2, 5), (4, 1, 5, 3)) del x96 - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x97 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x98 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x98 += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x98 += einsum(t1.aa, (0, 1), v.aabb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 x98 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -444,52 +445,52 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x98 += einsum(v.aabb.ovov, (0, 1, 2, 3), x97, (0, 4, 1, 5), (4, 2, 5, 3)) * 2.0 t2new_abab += einsum(t2.bbbb, (0, 1, 2, 3), x98, (4, 1, 5, 3), (4, 0, 5, 2)) * 2.0 del x98 - x99 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x99 += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (2, 0, 3, 4)) - x100 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x100 += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x100 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) x100 += einsum(t1.bb, (0, 1), x24, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x24 t2new_abab += einsum(x100, (0, 1, 2, 3), x97, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x97, x100 - x101 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x101 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 4, 1), (0, 4, 2, 3)) - x102 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x102 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (0, 2, 3, 1)) x102 += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) - x103 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x103 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x103 += einsum(x101, (0, 1, 2, 3), (1, 0, 3, 2)) x103 += einsum(t1.aa, (0, 1), x102, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x103, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x103 - x104 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x104 += einsum(v.aabb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x104 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) del x3 - x105 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x105 += einsum(v.aabb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x105 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (2, 1, 3, 4), (2, 0, 3, 4)) x105 += einsum(t1.bb, (0, 1), x104, (2, 3, 0, 4), (3, 2, 4, 1)) * -1.0 del x104 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x105, (0, 4, 3, 5), (4, 1, 2, 5)) * -1.0 del x105 - x106 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x106 += einsum(v.aabb.vvvv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x106 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 2, 3, 4), (2, 1, 3, 4)) x106 += einsum(t1.bb, (0, 1), v.aabb.vvov, (2, 3, 0, 4), (2, 3, 4, 1)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x106, (2, 4, 3, 5), (0, 1, 4, 5)) * -1.0 del x106 - x107 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), v.aabb.ovvv, (0, 1, 2, 3), (2, 3)) - x108 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x108 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x109 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x109 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x110 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(t1.bb, (0, 1), x92, (0, 1, 2, 3), (2, 3)) - x111 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x111 += einsum(x107, (0, 1), (1, 0)) * -1.0 x111 += einsum(x108, (0, 1), (1, 0)) * 0.5 @@ -498,7 +499,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x111 += einsum(t1.bb, (0, 1), x13, (0, 2), (2, 1)) t2new_abab += einsum(x111, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x111 - x112 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x112 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x112 += einsum(f.aa.vv, (0, 1), (0, 1)) * -2.0 x112 += einsum(x43, (0, 1), (1, 0)) * -2.0 del x43 @@ -511,16 +512,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x112 += einsum(t1.aa, (0, 1), x9, (0, 2), (2, 1)) * 2.0 t2new_abab += einsum(x112, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -0.5 del x112 - x113 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x113 += einsum(t1.bb, (0, 1), v.aabb.ooov, (2, 3, 4, 1), (2, 3, 0, 4)) - x114 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x114 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x114 += einsum(v.aabb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x114 += einsum(x113, (0, 1, 2, 3), (1, 0, 3, 2)) x114 += einsum(t1.aa, (0, 1), x102, (2, 3, 4, 1), (2, 0, 4, 3)) del x102 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x114, (0, 4, 1, 5), (4, 5, 2, 3)) del x114 - x115 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x115 += einsum(f.bb.oo, (0, 1), (0, 1)) x115 += einsum(x29, (0, 1), (1, 0)) x115 += einsum(x30, (0, 1), (1, 0)) * 0.5 @@ -529,7 +530,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs x115 += einsum(x34, (0, 1), (1, 0)) t2new_abab += einsum(x115, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x115 - x116 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x116 += einsum(f.aa.oo, (0, 1), (0, 1)) * 2.0 x116 += einsum(x15, (0, 1), (1, 0)) * 2.0 del x15 @@ -543,16 +544,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x9 t2new_abab += einsum(x116, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -0.5 del x116 - x117 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(v.aabb.vvoo, (0, 1, 2, 3), (2, 3, 0, 1)) x117 += einsum(x101, (0, 1, 2, 3), (0, 1, 3, 2)) del x101 - x118 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x118 += einsum(v.aabb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x118 += einsum(x113, (0, 1, 2, 3), (1, 0, 2, 3)) del x113 x118 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (4, 0, 1, 5)) - x119 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x119 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (0, 2, 3, 1)) x119 += einsum(x23, (0, 1, 2, 3), (0, 2, 1, 3)) x119 += einsum(t1.aa, (0, 1), x117, (2, 3, 1, 4), (0, 3, 2, 4)) @@ -561,66 +562,66 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x118 t2new_abab += einsum(t1.bb, (0, 1), x119, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x119 - x120 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x120 += einsum(v.aabb.ovvv, (0, 1, 2, 3), (0, 1, 2, 3)) x120 += einsum(t1.aa, (0, 1), v.aabb.vvvv, (2, 1, 3, 4), (0, 2, 3, 4)) t2new_abab += einsum(t1.bb, (0, 1), x120, (2, 3, 1, 4), (2, 0, 3, 4)) del x120 - x121 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x121 += einsum(v.aabb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x121 += einsum(t1.bb, (0, 1), v.aabb.oovv, (2, 3, 4, 1), (2, 3, 0, 4)) t2new_abab += einsum(t1.aa, (0, 1), x121, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x121 - x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x122 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x123 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(t2.abab, (0, 1, 2, 3), x99, (0, 4, 2, 5), (4, 1, 3, 5)) del x99 - x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x124 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(x124, (0, 1, 2, 3), x28, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x28, x124 - x126 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) - x127 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x127 += einsum(v.aabb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x127 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x126 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(t2.abab, (0, 1, 2, 3), x127, (0, 4, 2, 5), (1, 4, 3, 5)) del x127 - x129 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(t1.bb, (0, 1), x92, (2, 1, 3, 4), (0, 2, 3, 4)) del x92 - x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(t2.bbbb, (0, 1, 2, 3), x129, (4, 1, 5, 3), (0, 4, 2, 5)) * -2.0 del x129 - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovoo, (0, 2, 4, 5), (1, 4, 5, 3)) - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x132 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 3, 4, 1), (0, 2, 3, 4)) - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), x132, (2, 3, 4, 0), (2, 4, 3, 1)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x134 += einsum(t1.bb, (0, 1), x122, (2, 3, 1, 4), (0, 2, 3, 4)) - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t2.abab, (0, 1, 2, 3), x23, (0, 4, 5, 2), (4, 1, 5, 3)) del x23 - x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x136 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 1, 2, 3)) x136 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x137 += einsum(t2.bbbb, (0, 1, 2, 3), x136, (4, 5, 1, 3), (0, 4, 5, 2)) * 2.0 del x136 - x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x138 += einsum(x25, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x138 += einsum(x25, (0, 1, 2, 3), (0, 2, 1, 3)) - x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x139 += einsum(t2.bbbb, (0, 1, 2, 3), x138, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x138 - x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x140 += einsum(x131, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x131 x140 += einsum(x133, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -633,10 +634,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x137 x140 += einsum(x139, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x139 - x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum(t1.bb, (0, 1), x140, (2, 0, 3, 4), (2, 3, 1, 4)) del x140 - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(x122, (0, 1, 2, 3), (0, 1, 2, 3)) del x122 x142 += einsum(x123, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -654,14 +655,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x142, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x142, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x142 - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x144 += einsum(t2.abab, (0, 1, 2, 3), v.aaaa.ovov, (4, 5, 0, 2), (4, 1, 5, 3)) - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(t2.abab, (0, 1, 2, 3), x144, (0, 4, 2, 5), (4, 1, 5, 3)) del x144 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x146 += einsum(x143, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x143 @@ -670,19 +671,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x146, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x146, (0, 1, 2, 3), (0, 1, 2, 3)) del x146 - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x148 += einsum(t2.bbbb, (0, 1, 2, 3), x132, (4, 5, 0, 1), (4, 5, 2, 3)) del x132 - x149 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x149 += einsum(f.bb.oo, (0, 1), (0, 1)) x149 += einsum(x34, (0, 1), (0, 1)) del x34 - x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x150 += einsum(x149, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x149 - x151 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x151 += einsum(x29, (0, 1), (1, 0)) del x29 x151 += einsum(x30, (0, 1), (1, 0)) * 0.5 @@ -691,10 +692,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x31 x151 += einsum(x33, (0, 1), (1, 0)) * -1.0 del x33 - x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x152 += einsum(x151, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x151 - x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x153 += einsum(x147, (0, 1, 2, 3), (0, 1, 3, 2)) del x147 x153 += einsum(x148, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 @@ -706,15 +707,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x153, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x153, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x153 - x154 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x154 += einsum(t1.bb, (0, 1), v.bbbb.vvvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x155 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x155 += einsum(t1.bb, (0, 1), x154, (2, 3, 1, 4), (0, 2, 3, 4)) del x154 - x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x156 += einsum(t2.bbbb, (0, 1, 2, 3), x91, (4, 1, 5, 3), (0, 4, 2, 5)) del x91 - x157 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(x107, (0, 1), (1, 0)) * -1.0 del x107 x157 += einsum(x108, (0, 1), (1, 0)) * 0.5 @@ -723,36 +724,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x109 x157 += einsum(x110, (0, 1), (1, 0)) * -1.0 del x110 - x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum(x157, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x157 - x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x159 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 - x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x160 += einsum(x13, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) * -2.0 del x13 - x161 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x161 += einsum(t1.bb, (0, 1), x25, (2, 3, 4, 1), (2, 0, 4, 3)) del x25 - x162 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x162 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x162 += einsum(x161, (0, 1, 2, 3), (3, 1, 2, 0)) del x161 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x162, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 - x163 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x163 += einsum(t1.bb, (0, 1), x162, (0, 2, 3, 4), (2, 3, 4, 1)) del x162 - x164 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x164 += einsum(x159, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 del x159 x164 += einsum(x160, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x160 x164 += einsum(x163, (0, 1, 2, 3), (1, 0, 2, 3)) del x163 - x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(t1.bb, (0, 1), x164, (0, 2, 3, 4), (2, 3, 1, 4)) del x164 - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(x155, (0, 1, 2, 3), (0, 1, 2, 3)) del x155 x166 += einsum(x156, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -764,9 +765,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x166, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x166, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x166 - x167 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x167 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 2, 5, 3), (0, 1, 4, 5)) - x168 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x168 += einsum(t1.bb, (0, 1), x167, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 del x167 x168 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) * -0.5 diff --git a/ebcc/codegen/UDFCC2.py b/ebcc/codegen/UDFCC2.py index 7a493613..dc1ded26 100644 --- a/ebcc/codegen/UDFCC2.py +++ b/ebcc/codegen/UDFCC2.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x1 = np.zeros((naux,), dtype=np.float64) + x1 = np.zeros((naux,), dtype=types[float]) x1 += einsum(x0, (0,), (0,)) x1 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) * 0.5 - x2 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x2 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x2 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) x2 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) x2 += einsum(x1, (0,), t1.bb, (1, 2), (1, 2, 0)) @@ -18,23 +19,23 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.abb.xov, (0, 1, 2), x2, (1, 2, 0), ()) del x2 - x3 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x4 += einsum(f.bb.ov, (0, 1), (0, 1)) * 2.0 x4 += einsum(v.abb.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -1.0 del x3 e_cc += einsum(t1.bb, (0, 1), x4, (0, 1), ()) * 0.5 del x4 - x5 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x5 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(f.aa.ov, (0, 1), (0, 1)) * 2.0 x6 += einsum(v.aaa.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) * -1.0 del x5 e_cc += einsum(t1.aa, (0, 1), x6, (0, 1), ()) * 0.5 del x6 - x7 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x7 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) x7 += einsum(x0, (0,), t1.aa, (1, 2), (1, 2, 0)) * 0.5 del x0 @@ -48,29 +49,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.vv, (0, 1), t1.aa, (2, 1), (2, 0)) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.vv, (0, 1), t1.bb, (2, 1), (2, 0)) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - x0 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x3 = np.zeros((naux,), dtype=np.float64) + x3 = np.zeros((naux,), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x4 = np.zeros((naux,), dtype=np.float64) + x4 = np.zeros((naux,), dtype=types[float]) x4 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x5 = np.zeros((naux,), dtype=np.float64) + x5 = np.zeros((naux,), dtype=types[float]) x5 += einsum(x3, (0,), (0,)) del x3 x5 += einsum(x4, (0,), (0,)) del x4 - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x6 += einsum(x1, (0, 1, 2), (0, 1, 2)) x6 += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 3, 2, 4), (3, 4, 0)) * 2.0 @@ -78,28 +79,28 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x6 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) t1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x6, (3, 2, 0), (3, 1)) del x6 - x7 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x8 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x8 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x8 += einsum(x7, (0, 1, 2), (1, 0, 2)) - x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(v.aaa.xov, (0, 1, 2), x8, (3, 4, 0), (1, 3, 4, 2)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x9, (0, 1, 4, 3), (4, 2)) * 2.0 - x10 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x10 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x10 += einsum(x7, (0, 1, 2), (0, 1, 2)) - x11 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x11 += einsum(v.abb.xov, (0, 1, 2), x10, (3, 4, 0), (4, 3, 1, 2)) del x10 t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x11, (0, 4, 1, 3), (4, 2)) * -1.0 del x11 - x12 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x12 += einsum(v.aaa.xov, (0, 1, 2), x7, (1, 3, 0), (3, 2)) - x13 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x13 += einsum(x5, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) t1new_aa += einsum(x13, (0, 1), (0, 1)) - x14 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x14 += einsum(f.aa.ov, (0, 1), (0, 1)) x14 += einsum(x12, (0, 1), (0, 1)) * -1.0 x14 += einsum(x13, (0, 1), (0, 1)) @@ -107,14 +108,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t1new_aa += einsum(x14, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x14, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) del x14 - x15 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x15 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x16 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(v.abb.xov, (0, 1, 2), x15, (1, 3, 0), (3, 2)) - x17 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x17 += einsum(x5, (0,), v.abb.xov, (0, 1, 2), (1, 2)) t1new_bb += einsum(x17, (0, 1), (0, 1)) - x18 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x18 += einsum(f.bb.ov, (0, 1), (0, 1)) x18 += einsum(x16, (0, 1), (0, 1)) * -1.0 x18 += einsum(x17, (0, 1), (0, 1)) @@ -122,17 +123,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t1new_aa += einsum(x18, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x18, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 del x18 - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x19 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) * 2.0 x19 += einsum(x1, (0, 1, 2), (0, 1, 2)) del x1 x19 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x20 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(f.aa.ov, (0, 1), (0, 1)) x20 += einsum(x12, (0, 1), (0, 1)) * -1.0 del x12 - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x21 += einsum(v.aaa.xov, (0, 1, 2), x19, (3, 2, 0), (1, 3)) * 0.5 del x19 @@ -141,14 +142,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x20 t1new_aa += einsum(t1.aa, (0, 1), x21, (0, 2), (2, 1)) * -2.0 del x21 - x22 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x22 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) - x23 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x23 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x23 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x24 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x24 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x25 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x25 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x25 += einsum(x22, (0, 1, 2), (0, 1, 2)) * -1.0 x25 += einsum(x23, (0, 1, 2), (0, 1, 2)) x25 += einsum(v.abb.xov, (0, 1, 2), x24, (1, 3, 2, 4), (3, 4, 0)) * 2.0 @@ -156,31 +157,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x25 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) t1new_bb += einsum(v.abb.xvv, (0, 1, 2), x25, (3, 2, 0), (3, 1)) del x25 - x26 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x26 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x26 += einsum(x15, (0, 1, 2), (0, 1, 2)) - x27 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x27 += einsum(v.aaa.xov, (0, 1, 2), x26, (3, 4, 0), (1, 4, 3, 2)) del x26 t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x27, (0, 1, 4, 2), (4, 3)) * -1.0 del x27 - x28 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x28 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x28 += einsum(x15, (0, 1, 2), (1, 0, 2)) - x29 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x29 += einsum(v.abb.xov, (0, 1, 2), x28, (3, 4, 0), (1, 3, 4, 2)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x29, (0, 1, 4, 3), (4, 2)) * 2.0 - x30 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x30 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x30 += einsum(x22, (0, 1, 2), (0, 1, 2)) * -1.0 x30 += einsum(x23, (0, 1, 2), (0, 1, 2)) del x23 x30 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) * 2.0 x30 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x31 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x31 += einsum(f.bb.ov, (0, 1), (0, 1)) x31 += einsum(x16, (0, 1), (0, 1)) * -1.0 del x16 - x32 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x32 += einsum(f.bb.oo, (0, 1), (0, 1)) x32 += einsum(v.abb.xov, (0, 1, 2), x30, (3, 2, 0), (1, 3)) del x30 @@ -190,48 +191,48 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x31 t1new_bb += einsum(t1.bb, (0, 1), x32, (0, 2), (2, 1)) * -1.0 del x32 - x33 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x33 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x34 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x34 += einsum(f.aa.oo, (0, 1), (0, 1)) x34 += einsum(x33, (0, 1), (0, 1)) del x33 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(x34, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(x34, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x34 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(x35, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_aaaa += einsum(x35, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x35 - x36 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x36 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x36 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(x36, (0, 1, 2), x36, (3, 4, 2), (0, 3, 1, 4)) - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x38 += einsum(f.aa.ov, (0, 1), t2.aaaa, (2, 3, 4, 1), (0, 2, 3, 4)) - x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x39 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(x7, (0, 1, 2), x7, (3, 4, 2), (0, 3, 1, 4)) - x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(x39, (0, 1, 2, 3), (3, 2, 1, 0)) del x39 x41 += einsum(x40, (0, 1, 2, 3), (2, 3, 1, 0)) del x40 - x42 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x42 += einsum(t1.aa, (0, 1), x41, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x41 - x43 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x43 += einsum(x38, (0, 1, 2, 3), (0, 2, 1, 3)) del x38 x43 += einsum(x42, (0, 1, 2, 3), (0, 2, 1, 3)) del x42 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(t1.aa, (0, 1), x43, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x43 - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(x37, (0, 1, 2, 3), (0, 1, 2, 3)) del x37 x45 += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -239,32 +240,32 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x45, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x45 - x46 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x46 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) * -1.0 x46 += einsum(x0, (0, 1, 2), (0, 1, 2)) del x0 - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(x36, (0, 1, 2), x46, (3, 4, 2), (0, 3, 1, 4)) del x46 - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x48 += einsum(v.aaa.xoo, (0, 1, 2), x7, (3, 4, 0), (3, 1, 2, 4)) - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum(t1.aa, (0, 1), x48, (2, 3, 4, 0), (2, 3, 4, 1)) del x48 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(x36, (0, 1, 2), x7, (3, 4, 2), (3, 0, 4, 1)) del x7 - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(x49, (0, 1, 2, 3), (0, 2, 1, 3)) del x49 x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) del x50 x51 += einsum(x9, (0, 1, 2, 3), (2, 0, 1, 3)) del x9 - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(t1.aa, (0, 1), x51, (2, 3, 0, 4), (2, 3, 1, 4)) del x51 - x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(x47, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x47 x53 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -274,11 +275,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x53, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x53, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x53 - x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum(x54, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x54 x56 += einsum(x55, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -286,70 +287,70 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x56, (0, 1, 2, 3), (0, 1, 3, 2)) del x56 - x57 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x57 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x57 += einsum(x36, (0, 1, 2), (0, 1, 2)) del x36 x57 += einsum(t1.aa, (0, 1), x8, (0, 2, 3), (2, 1, 3)) * -1.0 del x8 - x58 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x58 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x58 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x59 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x59 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x59 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x59 += einsum(x58, (0, 1, 2), (0, 1, 2)) x59 += einsum(t1.bb, (0, 1), x28, (0, 2, 3), (2, 1, 3)) * -1.0 del x28 t2new_abab += einsum(x57, (0, 1, 2), x59, (3, 4, 2), (0, 3, 1, 4)) del x57, x59 - x60 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x60 += einsum(f.bb.vv, (0, 1), (0, 1)) x60 += einsum(f.bb.ov, (0, 1), t1.bb, (0, 2), (1, 2)) * -1.0 t2new_abab += einsum(x60, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) del x60 - x61 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(f.aa.vv, (0, 1), (0, 1)) x61 += einsum(f.aa.ov, (0, 1), t1.aa, (0, 2), (1, 2)) * -1.0 t2new_abab += einsum(x61, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) del x61 - x62 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x62 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x63 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x63 += einsum(f.bb.oo, (0, 1), (0, 1)) x63 += einsum(x62, (0, 1), (0, 1)) del x62 t2new_abab += einsum(x63, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 - x64 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x64 += einsum(x63, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x63 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(x64, (0, 1, 2, 3), (1, 0, 3, 2)) t2new_bbbb += einsum(x64, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x64 - x65 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x65 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x65 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) * -1.0 x65 += einsum(x22, (0, 1, 2), (0, 1, 2)) del x22 - x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum(x58, (0, 1, 2), x65, (3, 4, 2), (0, 3, 1, 4)) del x65 - x67 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x67 += einsum(v.abb.xoo, (0, 1, 2), x15, (3, 4, 0), (3, 1, 2, 4)) - x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x68 += einsum(t1.bb, (0, 1), x67, (2, 3, 4, 0), (2, 3, 4, 1)) del x67 - x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x69 += einsum(x15, (0, 1, 2), x58, (3, 4, 2), (0, 3, 1, 4)) - x70 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x70 += einsum(x68, (0, 1, 2, 3), (0, 2, 1, 3)) del x68 x70 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) del x69 x70 += einsum(x29, (0, 1, 2, 3), (2, 0, 1, 3)) del x29 - x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x71 += einsum(t1.bb, (0, 1), x70, (2, 3, 0, 4), (2, 3, 1, 4)) del x70 - x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x72 += einsum(x66, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x66 x72 += einsum(x71, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -359,33 +360,33 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x72, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x72, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x72 - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(x58, (0, 1, 2), x58, (3, 4, 2), (0, 3, 1, 4)) del x58 - x74 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x74 += einsum(f.bb.ov, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) - x75 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x75 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) - x76 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x76 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x76 += einsum(x15, (0, 1, 2), x15, (3, 4, 2), (0, 3, 1, 4)) del x15 - x77 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x77 += einsum(x75, (0, 1, 2, 3), (3, 2, 1, 0)) del x75 x77 += einsum(x76, (0, 1, 2, 3), (2, 3, 1, 0)) del x76 - x78 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x78 += einsum(t1.bb, (0, 1), x77, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x77 - x79 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x79 += einsum(x74, (0, 1, 2, 3), (0, 2, 1, 3)) del x74 x79 += einsum(x78, (0, 1, 2, 3), (0, 2, 1, 3)) del x78 - x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x80 += einsum(t1.bb, (0, 1), x79, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x79 - x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x81 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) del x73 x81 += einsum(x80, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -393,11 +394,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x81, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x81 - x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(x82, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x82 x84 += einsum(x83, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -419,51 +420,51 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new = Namespace() # L amplitudes - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum(f.aa.ov, (0, 1), (1, 0)) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum(f.bb.ov, (0, 1), (1, 0)) - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) - x2 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x3 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x4 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x5 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x5 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x7 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x7 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x7 += einsum(x4, (0, 1, 2), (0, 1, 2)) x7 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 x7 += einsum(x6, (0, 1, 2), (0, 1, 2)) - x8 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x8 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x8 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x9 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x9 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x9 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x10 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x10 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x11 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x11 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x11 += einsum(x8, (0, 1, 2), (0, 1, 2)) x11 += einsum(x9, (0, 1, 2), (0, 1, 2)) x11 += einsum(x10, (0, 1, 2), (0, 1, 2)) * 2.0 - x12 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x13 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x14 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(x12, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) * 0.5 - x15 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x15 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x15 += einsum(x2, (0, 1, 2), (0, 1, 2)) - x16 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x16 += einsum(v.aaa.xoo, (0, 1, 2), x0, (3, 1, 2, 4), (3, 4, 0)) * -1.0 x16 += einsum(v.abb.xoo, (0, 1, 2), x1, (3, 1, 2, 4), (3, 4, 0)) * -0.5 x16 += einsum(x2, (0, 1, 2), x0, (0, 3, 1, 4), (3, 4, 2)) @@ -475,59 +476,59 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x16 += einsum(l1.aa, (0, 1), x15, (1, 2, 3), (2, 0, 3)) * -0.5 l1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x16, (3, 2, 0), (1, 3)) * 2.0 del x16 - x17 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x17 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x17 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 2, 3, 4)) - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(v.aaa.xov, (0, 1, 2), x2, (3, 4, 0), (3, 1, 4, 2)) - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) x20 += einsum(x18, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 x20 += einsum(x19, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x20 += einsum(x19, (0, 1, 2, 3), (2, 0, 1, 3)) - x21 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x21 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x21 += einsum(x8, (0, 1, 2), (0, 1, 2)) - x22 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x22 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x22 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x22 += einsum(x3, (0, 1, 2), (0, 1, 2)) - x23 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x23 += einsum(v.aaa.xov, (0, 1, 2), x22, (3, 4, 0), (1, 4, 3, 2)) - x24 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x24 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x24 += einsum(x2, (0, 1, 2), (1, 0, 2)) - x25 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x25 += einsum(v.abb.xov, (0, 1, 2), x24, (3, 4, 0), (3, 4, 1, 2)) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(x1, (0, 1, 2, 3), x25, (4, 0, 2, 5), (3, 5, 4, 1)) l2new_abab += einsum(l1.aa, (0, 1), x25, (2, 1, 3, 4), (0, 4, 2, 3)) * -1.0 - x26 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 3, 0), (3, 2)) - x27 = np.zeros((naux,), dtype=np.float64) + x27 = np.zeros((naux,), dtype=types[float]) x27 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x28 = np.zeros((naux,), dtype=np.float64) + x28 = np.zeros((naux,), dtype=types[float]) x28 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x29 = np.zeros((naux,), dtype=np.float64) + x29 = np.zeros((naux,), dtype=types[float]) x29 += einsum(x27, (0,), (0,)) del x27 x29 += einsum(x28, (0,), (0,)) del x28 - x30 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x30 += einsum(x29, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) - x31 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(f.aa.ov, (0, 1), (0, 1)) x31 += einsum(x26, (0, 1), (0, 1)) * -1.0 x31 += einsum(x30, (0, 1), (0, 1)) l2new_abab += einsum(l1.bb, (0, 1), x31, (2, 3), (3, 0, 2, 1)) - x32 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x32 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x33 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x33 += einsum(t2.abab, (0, 1, 2, 3), x32, (4, 5, 2, 3), (0, 4, 1, 5)) - x34 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x34 += einsum(x33, (0, 1, 2, 3), (0, 1, 3, 2)) x34 += einsum(x22, (0, 1, 2), x24, (3, 4, 2), (4, 3, 1, 0)) - x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x35 += einsum(t2.abab, (0, 1, 2, 3), x17, (4, 2, 3, 5), (4, 0, 1, 5)) x35 += einsum(t2.abab, (0, 1, 2, 3), x20, (0, 4, 5, 2), (5, 4, 1, 3)) * -1.0 del x20 @@ -540,28 +541,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x34 l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x35, (4, 2, 3, 1), (0, 4)) * -1.0 del x35 - x36 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x37 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) x37 += einsum(x18, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 x37 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x37 += einsum(x19, (0, 1, 2, 3), (0, 2, 1, 3)) - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x40 += einsum(x2, (0, 1, 2), x2, (3, 4, 2), (0, 3, 1, 4)) - x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(v.aaa.xoo, (0, 1, 2), x2, (3, 4, 0), (3, 1, 2, 4)) - x42 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x42 += einsum(x38, (0, 1, 2, 3), (3, 2, 1, 0)) x42 += einsum(t2.aaaa, (0, 1, 2, 3), x39, (4, 5, 3, 2), (5, 4, 0, 1)) * -1.0 x42 += einsum(x40, (0, 1, 2, 3), (2, 3, 1, 0)) x42 += einsum(x41, (0, 1, 2, 3), (1, 3, 0, 2)) x42 += einsum(x41, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x43 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x43 += einsum(v.aaa.xoo, (0, 1, 2), x4, (3, 4, 0), (1, 2, 3, 4)) * -1.0 x43 += einsum(t2.aaaa, (0, 1, 2, 3), x36, (4, 2, 5, 3), (4, 0, 1, 5)) * -1.0 x43 += einsum(x2, (0, 1, 2), x4, (3, 4, 2), (1, 3, 0, 4)) @@ -575,101 +576,101 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x42 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x43, (4, 2, 3, 1), (0, 4)) * 2.0 del x43 - x44 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x44 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (2, 4, 1, 5)) - x45 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x45 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) l2new_abab += einsum(x17, (0, 1, 2, 3), x45, (4, 0, 5, 2), (1, 3, 4, 5)) * -1.0 del x17 l2new_abab += einsum(x31, (0, 1), x45, (2, 0, 3, 4), (1, 4, 2, 3)) * -1.0 - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), x0, (2, 3, 4, 1), (3, 2, 4, 0)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(x39, (0, 1, 2, 3), x46, (4, 5, 0, 1), (3, 2, 5, 4)) * 2.0 - x47 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x47 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 0, 3, 4)) l2new_abab += einsum(x32, (0, 1, 2, 3), x47, (4, 0, 5, 1), (2, 3, 4, 5)) del x32 - x48 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x48 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) - x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum(t2.aaaa, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x50 += einsum(t2.abab, (0, 1, 2, 3), x45, (4, 5, 1, 3), (4, 5, 0, 2)) - x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x51 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x49 x51 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x50 - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) x52 += einsum(x0, (0, 1, 2, 3), (1, 0, 2, 3)) x52 += einsum(t1.aa, (0, 1), x48, (2, 0, 3, 4), (2, 3, 4, 1)) x52 += einsum(x51, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x52 += einsum(x51, (0, 1, 2, 3), (0, 2, 1, 3)) del x51 - x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) x53 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) * 0.25 - x54 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x54 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (2, 4, 3, 5)) - x55 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x55 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (1, 2, 3, 4)) x55 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) x55 += einsum(t2.abab, (0, 1, 2, 3), x0, (4, 0, 5, 2), (4, 5, 1, 3)) * -2.0 x55 += einsum(t2.bbbb, (0, 1, 2, 3), x45, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 x55 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 1, 5, 2), (4, 0, 5, 3)) * -1.0 x55 += einsum(t1.bb, (0, 1), x54, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 - x56 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x58 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(t2.aaaa, (0, 1, 2, 3), x0, (0, 1, 4, 3), (4, 2)) * -1.0 - x59 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.abab, (0, 1, 2, 3), x45, (0, 4, 1, 3), (4, 2)) - x60 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x60 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) l1new_aa += einsum(x30, (0, 1), x60, (2, 0), (1, 2)) * -1.0 - x61 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x61 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x62 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x62 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x63 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x63 += einsum(x60, (0, 1), (0, 1)) x63 += einsum(x61, (0, 1), (0, 1)) * 2.0 x63 += einsum(x62, (0, 1), (0, 1)) l1new_aa += einsum(f.aa.ov, (0, 1), x63, (2, 0), (1, 2)) * -1.0 - x64 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x64 += einsum(t1.aa, (0, 1), x63, (0, 2), (2, 1)) - x65 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x65 += einsum(x56, (0, 1), (0, 1)) * -2.0 x65 += einsum(x57, (0, 1), (0, 1)) * -1.0 x65 += einsum(x58, (0, 1), (0, 1)) * 2.0 x65 += einsum(x59, (0, 1), (0, 1)) x65 += einsum(x64, (0, 1), (0, 1)) - x66 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x66 += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) del x48 x66 += einsum(x46, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 - x67 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x67 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) x67 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) - x68 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x68 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x68 += einsum(l1.aa, (0, 1), v.aaa.xvv, (2, 3, 0), (1, 3, 2)) - x69 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x69 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x69 += einsum(x68, (0, 1, 2), (0, 1, 2)) x69 += einsum(x63, (0, 1), v.aaa.xov, (2, 1, 3), (0, 3, 2)) * -1.0 del x63 - x70 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x70 += einsum(x60, (0, 1), (0, 1)) * 0.5 x70 += einsum(x61, (0, 1), (0, 1)) x70 += einsum(x62, (0, 1), (0, 1)) * 0.5 - x71 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x71 += einsum(x61, (0, 1), (0, 1)) x71 += einsum(x62, (0, 1), (0, 1)) * 0.5 - x72 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x72 += einsum(x4, (0, 1, 2), x0, (3, 0, 4, 1), (4, 3, 2)) * -2.0 x72 += einsum(v.abb.xvv, (0, 1, 2), x44, (3, 4, 2, 1), (4, 3, 0)) del x44 @@ -697,27 +698,27 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x71 l1new_aa += einsum(v.aaa.xov, (0, 1, 2), x72, (1, 3, 0), (2, 3)) * -1.0 del x72 - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x74 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(x73, (0, 1), (0, 1)) del x73 x74 += einsum(x12, (0, 1), (1, 0)) * 2.0 del x12 x74 += einsum(x13, (0, 1), (1, 0)) del x13 - x75 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x75 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x76 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x76 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x76 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x77 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x77 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x78 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x78 += einsum(x75, (0, 1), (0, 1)) * 0.5 del x75 x78 += einsum(x76, (0, 1), (0, 1)) * 0.5 x78 += einsum(x77, (0, 1), (0, 1)) - x79 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x79 += einsum(l1.aa, (0, 1), (1, 0)) * -1.0 x79 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x79 += einsum(x56, (0, 1), (0, 1)) * -2.0 @@ -730,29 +731,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x59 x79 += einsum(x64, (0, 1), (0, 1)) del x64 - x80 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x80 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x81 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x81 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x82 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x82 += einsum(t2.abab, (0, 1, 2, 3), x1, (0, 1, 4, 2), (4, 3)) - x83 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x83 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x84 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x84 += einsum(t2.bbbb, (0, 1, 2, 3), x83, (0, 1, 4, 3), (4, 2)) * -1.0 - x85 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x85 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) - x86 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x86 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x87 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x87 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x88 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x88 += einsum(x85, (0, 1), (0, 1)) * 0.5 x88 += einsum(x86, (0, 1), (0, 1)) * 0.5 x88 += einsum(x87, (0, 1), (0, 1)) - x89 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x89 += einsum(t1.bb, (0, 1), x88, (0, 2), (2, 1)) * 2.0 - x90 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x90 += einsum(l1.bb, (0, 1), (1, 0)) * -1.0 x90 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x90 += einsum(x80, (0, 1), (0, 1)) * -1.0 @@ -760,17 +761,17 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x90 += einsum(x82, (0, 1), (0, 1)) x90 += einsum(x84, (0, 1), (0, 1)) * 2.0 x90 += einsum(x89, (0, 1), (0, 1)) - x91 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x91 += einsum(x60, (0, 1), (0, 1)) * 0.5 x91 += einsum(x61, (0, 1), (0, 1)) del x61 x91 += einsum(x62, (0, 1), (1, 0)) * 0.5 del x62 - x92 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x92 += einsum(x85, (0, 1), (0, 1)) x92 += einsum(x86, (0, 1), (1, 0)) x92 += einsum(x87, (0, 1), (0, 1)) * 2.0 - x93 = np.zeros((naux,), dtype=np.float64) + x93 = np.zeros((naux,), dtype=types[float]) x93 += einsum(x74, (0, 1), v.aaa.xvv, (2, 0, 1), (2,)) x93 += einsum(x78, (0, 1), v.abb.xvv, (2, 1, 0), (2,)) * 2.0 x93 += einsum(x79, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) * -1.0 @@ -779,20 +780,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x93 += einsum(x92, (0, 1), v.abb.xoo, (2, 1, 0), (2,)) * -1.0 l1new_aa += einsum(x93, (0,), v.aaa.xov, (0, 1, 2), (2, 1)) del x93 - x94 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x94 += einsum(x29, (0,), v.aaa.xvv, (0, 1, 2), (1, 2)) - x95 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x95 += einsum(f.aa.vv, (0, 1), (0, 1)) x95 += einsum(x94, (0, 1), (1, 0)) l1new_aa += einsum(l1.aa, (0, 1), x95, (0, 2), (2, 1)) del x95 - x96 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x96 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x96 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) * -1.0 x96 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 del x5 x96 += einsum(x6, (0, 1, 2), (0, 1, 2)) del x6 - x97 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x97 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x97 += einsum(v.aaa.xov, (0, 1, 2), x96, (3, 2, 0), (3, 1)) * 0.5 del x96 @@ -800,12 +801,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x97 += einsum(t1.aa, (0, 1), x31, (2, 1), (0, 2)) * 0.5 l1new_aa += einsum(l1.aa, (0, 1), x97, (1, 2), (0, 2)) * -2.0 del x97 - x98 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(x76, (0, 1), (0, 1)) del x76 x98 += einsum(x77, (0, 1), (0, 1)) * 2.0 del x77 - x99 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x99 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x99 += einsum(v.aaa.xoo, (0, 1, 2), x45, (1, 2, 3, 4), (3, 4, 0)) * -0.5 x99 += einsum(v.abb.xoo, (0, 1, 2), x83, (1, 3, 2, 4), (3, 4, 0)) x99 += einsum(x2, (0, 1, 2), x45, (0, 1, 3, 4), (3, 4, 2)) * -0.5 @@ -819,47 +820,47 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x99 += einsum(l1.bb, (0, 1), x22, (1, 2, 3), (2, 0, 3)) * -0.5 l1new_bb += einsum(v.abb.xvv, (0, 1, 2), x99, (3, 2, 0), (1, 3)) * 2.0 del x99 - x100 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x100 += einsum(v.abb.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_abab += einsum(x1, (0, 1, 2, 3), x100, (2, 4, 3, 5), (4, 5, 0, 1)) * -1.0 - x101 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x101 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x102 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x102 += einsum(v.abb.xov, (0, 1, 2), x3, (3, 4, 0), (3, 1, 4, 2)) - x103 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x103 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) x103 += einsum(x101, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 x103 += einsum(x102, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x103 += einsum(x102, (0, 1, 2, 3), (2, 0, 1, 3)) - x104 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x104 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x104 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x104 += einsum(x4, (0, 1, 2), (0, 1, 2)) - x105 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x105 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x105 += einsum(x3, (0, 1, 2), (1, 0, 2)) - x106 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x106 += einsum(v.aaa.xov, (0, 1, 2), x105, (3, 4, 0), (1, 3, 4, 2)) l2new_abab += einsum(x106, (0, 1, 2, 3), x45, (4, 0, 2, 5), (3, 5, 4, 1)) l2new_abab += einsum(l1.bb, (0, 1), x106, (2, 3, 1, 4), (4, 0, 2, 3)) * -1.0 - x107 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x107 += einsum(v.abb.xov, (0, 1, 2), x15, (3, 4, 0), (4, 3, 1, 2)) - x108 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x108 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x108 += einsum(v.abb.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) - x109 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x109 += einsum(x29, (0,), v.abb.xov, (0, 1, 2), (1, 2)) l1new_bb += einsum(x109, (0, 1), x85, (2, 0), (1, 2)) * -1.0 - x110 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x110 += einsum(f.bb.ov, (0, 1), (0, 1)) x110 += einsum(x108, (0, 1), (0, 1)) * -1.0 x110 += einsum(x109, (0, 1), (0, 1)) l2new_abab += einsum(x110, (0, 1), x1, (2, 3, 0, 4), (4, 1, 2, 3)) * -1.0 l2new_abab += einsum(l1.aa, (0, 1), x110, (2, 3), (0, 3, 1, 2)) - x111 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x111 += einsum(x33, (0, 1, 2, 3), (1, 0, 2, 3)) del x33 x111 += einsum(x105, (0, 1, 2), x15, (3, 4, 2), (4, 3, 1, 0)) del x15 - x112 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x112 += einsum(t2.abab, (0, 1, 2, 3), x100, (4, 2, 5, 3), (0, 4, 1, 5)) del x100 x112 += einsum(t2.abab, (0, 1, 2, 3), x103, (1, 4, 5, 3), (0, 5, 4, 2)) * -1.0 @@ -873,28 +874,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x111 l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x112, (2, 4, 3, 0), (1, 4)) * -1.0 del x112 - x113 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(v.abb.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x114 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x114 += einsum(x101, (0, 1, 2, 3), (1, 2, 0, 3)) x114 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) x114 += einsum(x102, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x115 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x115 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x115 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) - x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x116 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x117 += einsum(x3, (0, 1, 2), x3, (3, 4, 2), (0, 3, 1, 4)) - x118 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x118 += einsum(v.abb.xoo, (0, 1, 2), x3, (3, 4, 0), (3, 1, 2, 4)) - x119 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x119 += einsum(x115, (0, 1, 2, 3), (3, 2, 1, 0)) x119 += einsum(t2.bbbb, (0, 1, 2, 3), x116, (4, 5, 2, 3), (5, 4, 0, 1)) x119 += einsum(x117, (0, 1, 2, 3), (2, 3, 1, 0)) x119 += einsum(x118, (0, 1, 2, 3), (1, 3, 0, 2)) x119 += einsum(x118, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x120 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x120 += einsum(v.abb.xoo, (0, 1, 2), x8, (3, 4, 0), (1, 2, 3, 4)) * -1.0 x120 += einsum(t2.bbbb, (0, 1, 2, 3), x113, (4, 2, 3, 5), (4, 0, 1, 5)) * -1.0 x120 += einsum(x3, (0, 1, 2), x8, (3, 4, 2), (1, 3, 0, 4)) @@ -909,41 +910,41 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x119 l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x120, (4, 2, 3, 1), (0, 4)) * 2.0 del x120 - x121 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) - x122 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x122 += einsum(t1.bb, (0, 1), x83, (2, 3, 4, 1), (2, 3, 0, 4)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(x116, (0, 1, 2, 3), x122, (4, 5, 0, 1), (3, 2, 5, 4)) * 2.0 - x123 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x123 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x123 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - x124 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x124 += einsum(t2.abab, (0, 1, 2, 3), x1, (0, 4, 5, 2), (4, 5, 1, 3)) - x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x125 += einsum(t2.bbbb, (0, 1, 2, 3), x83, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x126 += einsum(x124, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x124 x126 += einsum(x125, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x125 - x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x127 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) x127 += einsum(x83, (0, 1, 2, 3), (1, 0, 2, 3)) x127 += einsum(t1.bb, (0, 1), x123, (2, 0, 3, 4), (2, 3, 4, 1)) x127 += einsum(x126, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x127 += einsum(x126, (0, 1, 2, 3), (0, 2, 1, 3)) del x126 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) x128 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) * 4.0 - x129 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x129 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (2, 1, 3, 4)) x129 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x129 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 x129 += einsum(t2.abab, (0, 1, 2, 3), x45, (0, 4, 5, 3), (4, 5, 1, 2)) * -1.0 x129 += einsum(t1.aa, (0, 1), x54, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 x129 += einsum(t2.abab, (0, 1, 2, 3), x83, (4, 1, 5, 3), (0, 4, 5, 2)) * -2.0 - x130 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x130 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x130 += einsum(x80, (0, 1), (0, 1)) * -1.0 del x80 @@ -955,31 +956,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x84 x130 += einsum(x89, (0, 1), (0, 1)) del x89 - x131 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x131 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) del x54 x131 += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) - x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x132 += einsum(x123, (0, 1, 2, 3), (1, 0, 3, 2)) del x123 x132 += einsum(x122, (0, 1, 2, 3), (2, 1, 0, 3)) - x133 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x133 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x133 += einsum(l1.bb, (0, 1), v.abb.xvv, (2, 3, 0), (1, 3, 2)) - x134 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x134 += einsum(x133, (0, 1, 2), (0, 1, 2)) x134 += einsum(x88, (0, 1), v.abb.xov, (2, 1, 3), (0, 3, 2)) * -2.0 del x88 - x135 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x135 += einsum(x85, (0, 1), (0, 1)) x135 += einsum(x86, (0, 1), (0, 1)) x135 += einsum(x87, (0, 1), (0, 1)) * 2.0 l1new_bb += einsum(f.bb.ov, (0, 1), x135, (2, 0), (1, 2)) * -1.0 - x136 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x136 += einsum(x86, (0, 1), (0, 1)) * 0.5 del x86 x136 += einsum(x87, (0, 1), (0, 1)) del x87 - x137 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x137 += einsum(v.aaa.xvv, (0, 1, 2), x121, (3, 4, 1, 2), (4, 3, 0)) * 0.25 del x121 x137 += einsum(x4, (0, 1, 2), x1, (0, 3, 4, 1), (4, 3, 2)) * 0.25 @@ -1008,7 +1009,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x136 l1new_bb += einsum(v.abb.xov, (0, 1, 2), x137, (1, 3, 0), (2, 3)) * -4.0 del x137 - x138 = np.zeros((naux,), dtype=np.float64) + x138 = np.zeros((naux,), dtype=types[float]) x138 += einsum(x74, (0, 1), v.aaa.xvv, (2, 0, 1), (2,)) * 0.5 del x74 x138 += einsum(x78, (0, 1), v.abb.xvv, (2, 1, 0), (2,)) @@ -1023,25 +1024,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x92 l1new_bb += einsum(x138, (0,), v.abb.xov, (0, 1, 2), (2, 1)) * 2.0 del x138 - x139 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x139 += einsum(x29, (0,), v.abb.xvv, (0, 1, 2), (1, 2)) - x140 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x140 += einsum(f.bb.vv, (0, 1), (0, 1)) x140 += einsum(x139, (0, 1), (1, 0)) l1new_bb += einsum(l1.bb, (0, 1), x140, (0, 2), (2, 1)) del x140 - x141 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x141 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x141 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) * -0.5 x141 += einsum(x9, (0, 1, 2), (0, 1, 2)) * 0.5 del x9 x141 += einsum(x10, (0, 1, 2), (0, 1, 2)) del x10 - x142 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x142 += einsum(x29, (0,), v.abb.xoo, (0, 1, 2), (1, 2)) - x143 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x143 += einsum(t1.bb, (0, 1), x110, (2, 1), (2, 0)) del x110 - x144 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x144 += einsum(f.bb.oo, (0, 1), (0, 1)) x144 += einsum(v.abb.xov, (0, 1, 2), x141, (3, 2, 0), (3, 1)) * 2.0 del x141 @@ -1049,73 +1050,73 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x144 += einsum(x143, (0, 1), (1, 0)) l1new_bb += einsum(l1.bb, (0, 1), x144, (1, 2), (0, 2)) * -1.0 del x144 - x145 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x145 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x145 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x145, (4, 5, 0, 1), (4, 5, 2, 3)) * -2.0 del x145 - x146 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x146 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x146 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (3, 1, 2, 4)) l2new_abab += einsum(x146, (0, 1, 2, 3), x83, (4, 1, 2, 5), (3, 5, 0, 4)) * -2.0 - x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x147 += einsum(x1, (0, 1, 2, 3), x146, (4, 1, 2, 5), (0, 4, 3, 5)) del x146 - x148 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x148 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x148 += einsum(v.aaa.xov, (0, 1, 2), x3, (3, 4, 0), (1, 3, 4, 2)) l2new_abab += einsum(x148, (0, 1, 2, 3), x83, (4, 1, 2, 5), (3, 5, 0, 4)) * -2.0 - x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x149 += einsum(x1, (0, 1, 2, 3), x148, (4, 1, 2, 5), (0, 4, 3, 5)) del x148 - x150 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x150 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x150 += einsum(x104, (0, 1, 2), l2.aaaa, (3, 1, 4, 0), (4, 3, 2)) - x151 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x151 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x151 += einsum(x21, (0, 1, 2), l2.abab, (3, 1, 4, 0), (4, 3, 2)) * 0.5 - x152 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x152 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x152 += einsum(x150, (0, 1, 2), (0, 1, 2)) x152 += einsum(x151, (0, 1, 2), (0, 1, 2)) - x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x153 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x153 += einsum(v.aaa.xov, (0, 1, 2), x152, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x152 - x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x154 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x154 += einsum(v.aaa.xvv, (0, 1, 2), x24, (3, 4, 0), (3, 4, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x154, (4, 2, 5, 0), (5, 1, 4, 3)) * -1.0 - x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x155 += einsum(l2.aaaa, (0, 1, 2, 3), x154, (4, 3, 5, 1), (4, 2, 5, 0)) * 2.0 del x154 - x156 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x156 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x156 += einsum(x60, (0, 1), v.aaa.xov, (2, 1, 3), (0, 3, 2)) del x60 - x157 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x157 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x157 += einsum(x68, (0, 1, 2), (0, 1, 2)) x157 += einsum(x156, (0, 1, 2), (0, 1, 2)) * -1.0 - x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x158 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x158 += einsum(v.aaa.xov, (0, 1, 2), x157, (3, 4, 0), (3, 1, 4, 2)) del x157 - x159 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x159 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) x159 += einsum(x19, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x159, (0, 1, 2, 3), x45, (0, 2, 4, 5), (3, 5, 1, 4)) * -1.0 - x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x160 += einsum(x0, (0, 1, 2, 3), x159, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x159 - x161 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x161 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x161 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) x161 += einsum(x18, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x162 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x162 += einsum(x0, (0, 1, 2, 3), x161, (0, 2, 4, 5), (4, 1, 5, 3)) * 2.0 del x161 - x163 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x163 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x163 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x163 += einsum(x19, (0, 1, 2, 3), (0, 1, 2, 3)) del x19 - x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x164 += einsum(l1.aa, (0, 1), x163, (1, 2, 3, 4), (2, 3, 4, 0)) del x163 - x165 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x165 += einsum(x26, (0, 1), (0, 1)) * -1.0 del x26 x165 += einsum(x30, (0, 1), (0, 1)) del x30 - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum(f.aa.ov, (0, 1), l1.aa, (2, 3), (0, 3, 1, 2)) x166 += einsum(x147, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x147 @@ -1139,25 +1140,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x166, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x166, (0, 1, 2, 3), (3, 2, 1, 0)) del x166 - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x168 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x168 += einsum(f.aa.ov, (0, 1), x0, (2, 3, 0, 4), (2, 3, 1, 4)) - x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x169 += einsum(x0, (0, 1, 2, 3), x36, (2, 4, 3, 5), (1, 0, 4, 5)) del x36 - x170 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x170 += einsum(v.aaa.xov, (0, 1, 2), x4, (1, 3, 0), (2, 3)) del x4 - x171 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x171 += einsum(x170, (0, 1), (0, 1)) * -1.0 x171 += einsum(x94, (0, 1), (1, 0)) - x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x172 += einsum(x171, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x171 - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum(x165, (0, 1), x0, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum(x167, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x167 x174 += einsum(x39, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -1173,31 +1174,31 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x174, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new_aaaa += einsum(x174, (0, 1, 2, 3), (3, 2, 0, 1)) del x174 - x175 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x175 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x176 += einsum(x175, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) del x175 - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum(l2.aaaa, (0, 1, 2, 3), x41, (3, 4, 2, 5), (4, 5, 0, 1)) * -1.0 del x41 - x178 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x178 += einsum(v.aaa.xoo, (0, 1, 2), x2, (2, 3, 0), (1, 3)) - x179 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x179 += einsum(x29, (0,), v.aaa.xoo, (0, 1, 2), (1, 2)) del x29 - x180 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x180 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x180 += einsum(t1.aa, (0, 1), x165, (2, 1), (2, 0)) del x165 - x181 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x181 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x181 += einsum(x178, (0, 1), (0, 1)) * -1.0 x181 += einsum(x179, (0, 1), (1, 0)) x181 += einsum(x180, (0, 1), (1, 0)) del x180 - x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x182 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x182 += einsum(x181, (0, 1), l2.aaaa, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x181 - x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x183 += einsum(x176, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x176 x183 += einsum(x177, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1207,40 +1208,40 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x183, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x183, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x183 - x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x184 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x184, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x184, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x184 - x185 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x185 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x185 += einsum(x38, (0, 1, 2, 3), (3, 2, 1, 0)) del x38 x185 += einsum(x40, (0, 1, 2, 3), (0, 3, 1, 2)) del x40 l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x185, (3, 4, 2, 5), (0, 1, 4, 5)) * 2.0 del x185 - x186 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x186 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x186, (4, 0, 1, 5), (4, 5, 2, 3)) del x186 - x187 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum(v.abb.xov, (0, 1, 2), x2, (3, 4, 0), (3, 4, 1, 2)) del x2 l2new_abab += einsum(x0, (0, 1, 2, 3), x187, (1, 2, 4, 5), (3, 5, 0, 4)) * -2.0 - x188 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) l2new_abab += einsum(x0, (0, 1, 2, 3), x188, (1, 2, 4, 5), (3, 5, 0, 4)) * -2.0 del x0 - x189 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x189 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x189 += einsum(x85, (0, 1), v.abb.xov, (2, 1, 3), (0, 3, 2)) del x85 - x190 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x190 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x190 += einsum(x104, (0, 1, 2), l2.abab, (1, 3, 0, 4), (4, 3, 2)) del x104 - x191 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x191 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x191 += einsum(x21, (0, 1, 2), l2.bbbb, (3, 1, 4, 0), (4, 3, 2)) * 2.0 del x21 - x192 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x192 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x192 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x192 += einsum(x133, (0, 1, 2), (0, 1, 2)) x192 += einsum(x189, (0, 1, 2), (0, 1, 2)) * -1.0 @@ -1248,7 +1249,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x192 += einsum(x191, (0, 1, 2), (0, 1, 2)) l2new_abab += einsum(v.aaa.xov, (0, 1, 2), x192, (3, 4, 0), (2, 4, 1, 3)) del x192 - x193 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x193 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x193 += einsum(x68, (0, 1, 2), (0, 1, 2)) * 0.5 del x68 x193 += einsum(x156, (0, 1, 2), (0, 1, 2)) * -0.5 @@ -1259,23 +1260,23 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x151 l2new_abab += einsum(v.abb.xov, (0, 1, 2), x193, (3, 4, 0), (4, 2, 3, 1)) * 2.0 del x193 - x194 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x194 += einsum(v.aaa.xvv, (0, 1, 2), x105, (3, 4, 0), (4, 3, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x194, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x194 - x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x195 += einsum(v.abb.xvv, (0, 1, 2), x105, (3, 4, 0), (3, 4, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x195, (4, 3, 5, 1), (0, 5, 2, 4)) * -1.0 - x196 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum(v.abb.xvv, (0, 1, 2), x24, (3, 4, 0), (4, 3, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x196, (2, 4, 1, 5), (0, 5, 4, 3)) * -1.0 del x196 - x197 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x197 += einsum(x105, (0, 1, 2), x24, (3, 4, 2), (4, 3, 1, 0)) del x24, x105 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x197, (2, 4, 3, 5), (0, 1, 4, 5)) del x197 - x198 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x198 += einsum(f.aa.vv, (0, 1), (0, 1)) x198 += einsum(x170, (0, 1), (1, 0)) * -1.0 del x170 @@ -1283,34 +1284,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x94 l2new_abab += einsum(x198, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) del x198 - x199 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x199 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x199 += einsum(v.abb.xov, (0, 1, 2), x8, (1, 3, 0), (2, 3)) del x8 - x200 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x200 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x200 += einsum(f.bb.vv, (0, 1), (0, 1)) x200 += einsum(x199, (0, 1), (1, 0)) * -1.0 x200 += einsum(x139, (0, 1), (1, 0)) l2new_abab += einsum(x200, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) del x200 - x201 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x201 += einsum(x18, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x201 += einsum(x18, (0, 1, 2, 3), (1, 2, 0, 3)) del x18 l2new_abab += einsum(x201, (0, 1, 2, 3), x45, (0, 2, 4, 5), (3, 5, 1, 4)) * -1.0 del x201 - x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x202 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x202 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x202 += einsum(x101, (0, 1, 2, 3), (1, 2, 0, 3)) l2new_abab += einsum(x1, (0, 1, 2, 3), x202, (1, 4, 2, 5), (3, 5, 0, 4)) * -1.0 - x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x203 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x203 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) x203 += einsum(x102, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x1, (0, 1, 2, 3), x203, (1, 4, 2, 5), (3, 5, 0, 4)) * -1.0 del x1 - x204 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x204 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x204 += einsum(v.abb.xoo, (0, 1, 2), x3, (2, 3, 0), (1, 3)) del x3 - x205 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x205 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x205 += einsum(f.bb.oo, (0, 1), (0, 1)) x205 += einsum(x204, (0, 1), (0, 1)) * -1.0 x205 += einsum(x142, (0, 1), (1, 0)) @@ -1318,7 +1319,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x143 l2new_abab += einsum(x205, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x205 - x206 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x206 += einsum(f.aa.oo, (0, 1), (0, 1)) x206 += einsum(x178, (0, 1), (0, 1)) * -1.0 del x178 @@ -1328,55 +1329,55 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x31 l2new_abab += einsum(x206, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x206 - x207 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x207 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x207 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x207, (4, 5, 0, 1), (4, 5, 2, 3)) * -2.0 del x207 - x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(x188, (0, 1, 2, 3), x45, (0, 1, 4, 5), (4, 2, 5, 3)) del x188 - x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x209 += einsum(x187, (0, 1, 2, 3), x45, (0, 1, 4, 5), (4, 2, 5, 3)) del x45, x187 - x210 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x210 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x210 += einsum(x190, (0, 1, 2), (0, 1, 2)) del x190 x210 += einsum(x191, (0, 1, 2), (0, 1, 2)) del x191 - x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x211 += einsum(v.abb.xov, (0, 1, 2), x210, (3, 4, 0), (3, 1, 4, 2)) del x210 - x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x212 += einsum(l2.bbbb, (0, 1, 2, 3), x195, (4, 3, 5, 1), (4, 2, 5, 0)) * 2.0 del x195 - x213 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x213 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x213 += einsum(x133, (0, 1, 2), (0, 1, 2)) del x133 x213 += einsum(x189, (0, 1, 2), (0, 1, 2)) * -1.0 del x189 - x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x214 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x214 += einsum(v.abb.xov, (0, 1, 2), x213, (3, 4, 0), (3, 1, 4, 2)) del x213 - x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x215 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x215 += einsum(x203, (0, 1, 2, 3), x83, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x203 - x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x216 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x216 += einsum(x202, (0, 1, 2, 3), x83, (0, 4, 2, 5), (1, 4, 3, 5)) * 2.0 del x202 - x217 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x217 += einsum(x101, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x101 x217 += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) del x102 - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum(l1.bb, (0, 1), x217, (1, 2, 3, 4), (2, 3, 4, 0)) del x217 - x219 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x219 += einsum(x108, (0, 1), (0, 1)) * -1.0 del x108 x219 += einsum(x109, (0, 1), (0, 1)) del x109 - x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x220 += einsum(f.bb.ov, (0, 1), l1.bb, (2, 3), (0, 3, 1, 2)) x220 += einsum(x208, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x208 @@ -1400,25 +1401,25 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x220, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x220, (0, 1, 2, 3), (3, 2, 1, 0)) del x220 - x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x222 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x222 += einsum(f.bb.ov, (0, 1), x83, (2, 3, 0, 4), (2, 3, 1, 4)) - x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x223 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x223 += einsum(x113, (0, 1, 2, 3), x83, (4, 5, 0, 2), (5, 4, 1, 3)) del x113 - x224 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x224 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x224 += einsum(x199, (0, 1), (0, 1)) * -1.0 del x199 x224 += einsum(x139, (0, 1), (1, 0)) del x139 - x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x225 += einsum(x224, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x224 - x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x226 += einsum(x219, (0, 1), x83, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x83 - x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x227 += einsum(x221, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x221 x227 += einsum(x116, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -1434,28 +1435,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x227, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 l2new_bbbb += einsum(x227, (0, 1, 2, 3), (3, 2, 0, 1)) del x227 - x228 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x228 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x228 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x229 += einsum(x228, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) del x228 - x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum(l2.bbbb, (0, 1, 2, 3), x118, (3, 4, 2, 5), (4, 5, 0, 1)) * -1.0 del x118 - x231 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x231 += einsum(t1.bb, (0, 1), x219, (2, 1), (2, 0)) del x219 - x232 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x232 += einsum(x204, (0, 1), (0, 1)) * -1.0 del x204 x232 += einsum(x142, (0, 1), (1, 0)) del x142 x232 += einsum(x231, (0, 1), (1, 0)) del x231 - x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x233 += einsum(x232, (0, 1), l2.bbbb, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x232 - x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x234 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x234 += einsum(x229, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x229 x234 += einsum(x230, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1465,12 +1466,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x234, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x234, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x234 - x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x235 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x235, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x235, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x235 - x236 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x236 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x236 += einsum(x115, (0, 1, 2, 3), (3, 2, 1, 0)) del x115 x236 += einsum(x117, (0, 1, 2, 3), (0, 3, 1, 2)) @@ -1494,57 +1495,57 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_aa_ov += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) rdm1_f_aa_ov += einsum(t1.aa, (0, 1), (0, 1)) rdm1_f_aa_ov += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) * 2.0 - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_bb_ov += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_bb_ov += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) rdm1_f_bb_ov += einsum(t1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_aa_vo += einsum(l1.aa, (0, 1), (0, 1)) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_bb_vo += einsum(l1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) rdm1_f_aa_vv += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm1_f_aa_oo += einsum(x0, (0, 1), (1, 0)) * -1.0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x1, (0, 1), (1, 0)) * -1.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x2, (0, 1), (1, 0)) * -2.0 - x3 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x3 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm1_f_bb_oo += einsum(x3, (0, 1), (1, 0)) * -1.0 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) rdm1_f_bb_oo += einsum(x4, (0, 1), (1, 0)) * -2.0 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) rdm1_f_bb_oo += einsum(x5, (0, 1), (1, 0)) * -1.0 - x6 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) rdm1_f_aa_ov += einsum(t2.abab, (0, 1, 2, 3), x6, (0, 4, 1, 3), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_aa_ov += einsum(t2.aaaa, (0, 1, 2, 3), x7, (1, 0, 4, 3), (4, 2)) * -2.0 del x7 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(x0, (0, 1), (0, 1)) * 0.5 del x0 x8 += einsum(x2, (0, 1), (0, 1)) @@ -1553,15 +1554,15 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x1 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), x8, (0, 2), (2, 1)) * -2.0 del x8 - x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.bbbb, (0, 1, 2, 3), x9, (1, 0, 4, 3), (4, 2)) * -2.0 del x9 - x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x10 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.abab, (0, 1, 2, 3), x10, (0, 1, 4, 2), (4, 3)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(x3, (0, 1), (0, 1)) del x3 x11 += einsum(x5, (0, 1), (0, 1)) @@ -1587,177 +1588,177 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovoo += einsum(delta.aa.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vooo += einsum(delta.bb.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(l1.bb, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(l1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovvv += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vovv += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 3, 4), (0, 2, 3, 4)) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvvo += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_aaaa_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_aaaa_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(x3, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) * 0.5 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 2, 1)) * -2.0 - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x7 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (2, 4, 3, 5)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x7, (0, 1, 2, 3), (1, 3, 0, 2)) - x8 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x8 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_abab_vooo += einsum(x8, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(t1.aa, (0, 1), x8, (0, 2, 3, 4), (4, 3, 1, 2)) * -1.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 1, 4, 5), (5, 4, 2, 3)) * -1.0 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x9 += einsum(t1.aa, (0, 1), x8, (2, 3, 4, 1), (2, 0, 3, 4)) rdm2_f_abab_oooo += einsum(x9, (0, 1, 2, 3), (1, 3, 0, 2)) - x10 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x10 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -1.0 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x12 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x12 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum(delta.bb.oo, (0, 1), (0, 1)) * -1.0 x13 += einsum(x10, (0, 1), (0, 1)) x13 += einsum(x11, (0, 1), (0, 1)) x13 += einsum(x12, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x13, (2, 3), (0, 3, 1, 2)) * -1.0 del x13 - x14 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x14 += einsum(x6, (0, 1), (0, 1)) x14 += einsum(x3, (0, 1), (0, 1)) * 2.0 x14 += einsum(x4, (0, 1), (0, 1)) rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x14, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_abab_oovv += einsum(x14, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x15, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_bbbb_ovoo += einsum(x16, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x16, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t1.bb, (0, 1), x16, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_bbbb_oooo += einsum(x17, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(x11, (0, 1), (0, 1)) x18 += einsum(x12, (0, 1), (0, 1)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 2, 1)) * -1.0 - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ooov += einsum(x19, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oovo += einsum(x19, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x20 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x21 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x22 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x23 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) rdm2_f_abab_ovoo += einsum(x23, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(t1.bb, (0, 1), x23, (2, 3, 0, 4), (3, 4, 2, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x23, (0, 4, 1, 5), (4, 5, 2, 3)) * -1.0 - x24 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(t2.abab, (0, 1, 2, 3), x23, (0, 4, 1, 3), (4, 2)) - x25 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(t1.aa, (0, 1), x14, (0, 2), (2, 1)) * 0.5 - x26 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(x20, (0, 1), (0, 1)) * -1.0 x26 += einsum(x21, (0, 1), (0, 1)) * -0.5 x26 += einsum(x22, (0, 1), (0, 1)) @@ -1768,11 +1769,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_ooov += einsum(delta.aa.oo, (0, 1), x26, (2, 3), (2, 0, 1, 3)) * 2.0 rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x26, (2, 3), (0, 2, 3, 1)) * 2.0 rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x26, (2, 3), (2, 0, 3, 1)) * -2.0 - x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(t2.abab, (0, 1, 2, 3), x23, (4, 5, 1, 3), (4, 5, 0, 2)) - x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(delta.aa.oo, (0, 1), t1.aa, (2, 3), (0, 1, 2, 3)) x29 += einsum(x27, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 x29 += einsum(x28, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1782,52 +1783,52 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovo += einsum(x29, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovo += einsum(x29, (0, 1, 2, 3), (2, 0, 3, 1)) del x29 - x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x30 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x30 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x30, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x31 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_aaaa_ooov += einsum(x31, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_oovo += einsum(x31, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x31 - x32 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x32 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 1, 5, 2), (4, 0, 5, 3)) - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ooov += einsum(x32, (0, 1, 2, 3), (1, 2, 0, 3)) - x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x33 += einsum(t2.bbbb, (0, 1, 2, 3), x23, (4, 5, 1, 3), (4, 5, 0, 2)) rdm2_f_abab_ooov += einsum(x33, (0, 1, 2, 3), (1, 2, 0, 3)) * -2.0 - x34 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x34 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (1, 2, 3, 4)) rdm2_f_abab_ooov += einsum(x34, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x35 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 0, 5, 2), (4, 5, 1, 3)) * -1.0 rdm2_f_abab_ooov += einsum(x35, (0, 1, 2, 3), (1, 2, 0, 3)) * -2.0 - x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x36 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x36 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) del x9 rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x36, (2, 3, 0, 4), (3, 4, 2, 1)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x36, (0, 4, 1, 5), (4, 5, 2, 3)) - x37 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x37 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x38 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x39 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x39 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 1, 4, 2), (4, 3)) - x40 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x40 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * -1.0 - x41 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x41 += einsum(x10, (0, 1), (0, 1)) * 0.5 x41 += einsum(x11, (0, 1), (0, 1)) * 0.5 x41 += einsum(x12, (0, 1), (0, 1)) - x42 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x42 += einsum(t1.bb, (0, 1), x41, (0, 2), (2, 1)) * 2.0 - x43 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x43 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x43 += einsum(x37, (0, 1), (0, 1)) * -1.0 x43 += einsum(x38, (0, 1), (0, 1)) * -2.0 @@ -1836,7 +1837,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x43 += einsum(x42, (0, 1), (0, 1)) rdm2_f_abab_ooov += einsum(delta.aa.oo, (0, 1), x43, (2, 3), (0, 2, 1, 3)) * -1.0 del x43 - x44 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x44 += einsum(x6, (0, 1), (0, 1)) * 0.5 x44 += einsum(x3, (0, 1), (0, 1)) del x3 @@ -1844,13 +1845,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x4 rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x44, (2, 3), (3, 0, 2, 1)) * -2.0 del x44 - x45 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x45 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ooov += einsum(x45, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oovo += einsum(x45, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x46 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x46 += einsum(x37, (0, 1), (0, 1)) * -1.0 x46 += einsum(x38, (0, 1), (0, 1)) * -2.0 x46 += einsum(x39, (0, 1), (0, 1)) @@ -1861,11 +1862,11 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_ooov += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (2, 0, 1, 3)) rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (0, 2, 3, 1)) rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x46, (2, 3), (2, 0, 3, 1)) * -1.0 - x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x47 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 4, 5, 2), (4, 5, 1, 3)) - x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x48 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum(delta.bb.oo, (0, 1), t1.bb, (2, 3), (0, 1, 2, 3)) x49 += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x49 += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 @@ -1875,38 +1876,38 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovo += einsum(x49, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovo += einsum(x49, (0, 1, 2, 3), (2, 0, 3, 1)) del x49 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x50 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) del x15 x50 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x50, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_bbbb_ooov += einsum(x51, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_oovo += einsum(x51, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x51 - x52 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x52 += einsum(t2.abab, (0, 1, 2, 3), x23, (0, 4, 5, 3), (4, 5, 1, 2)) - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oovo += einsum(x52, (0, 1, 2, 3), (0, 2, 3, 1)) - x53 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x53 += einsum(t2.aaaa, (0, 1, 2, 3), x8, (1, 4, 5, 3), (0, 4, 5, 2)) rdm2_f_abab_oovo += einsum(x53, (0, 1, 2, 3), (0, 2, 3, 1)) * -2.0 - x54 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x54 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (2, 1, 3, 4)) rdm2_f_abab_oovo += einsum(x54, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x55 += einsum(t2.abab, (0, 1, 2, 3), x16, (4, 1, 5, 3), (0, 4, 5, 2)) * -1.0 rdm2_f_abab_oovo += einsum(x55, (0, 1, 2, 3), (0, 2, 3, 1)) * -2.0 - x56 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x56 += einsum(t1.aa, (0, 1), x36, (0, 2, 3, 4), (2, 3, 4, 1)) del x36 rdm2_f_abab_oovo += einsum(x56, (0, 1, 2, 3), (0, 2, 3, 1)) - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa, (0, 1), x14, (0, 2), (2, 1)) del x14 - x58 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x58 += einsum(x20, (0, 1), (0, 1)) * -2.0 del x20 @@ -1921,7 +1922,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_abab_oovo += einsum(delta.bb.oo, (0, 1), x58, (2, 3), (2, 0, 3, 1)) * -1.0 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x58, (2, 3), (2, 0, 3, 1)) * -1.0 del x58 - x59 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x59 += einsum(x10, (0, 1), (0, 1)) x59 += einsum(x11, (0, 1), (0, 1)) del x11 @@ -1930,20 +1931,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x59, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_abab_oovv += einsum(x59, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x59 - x60 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x60 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (4, 3, 5, 1)) rdm2_f_abab_ovvo += einsum(x60, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(t2.abab, (0, 1, 2, 3), x60, (4, 1, 5, 3), (4, 0, 5, 2)) - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(x27, (0, 1, 2, 3), (0, 1, 2, 3)) del x27 x62 += einsum(x28, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x28 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(t1.aa, (0, 1), x62, (0, 2, 3, 4), (2, 3, 1, 4)) * 4.0 del x62 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x61 x64 += einsum(x63, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -1955,34 +1956,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_aaaa_oovv += einsum(x64, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x64 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(t1.aa, (0, 1), x19, (0, 2, 3, 4), (2, 3, 1, 4)) del x19 - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x66, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x66, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x66, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x66, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(t2.aaaa, (0, 1, 2, 3), x66, (1, 4, 3, 5), (0, 4, 2, 5)) - x68 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x68 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (4, 2, 5, 0)) rdm2_f_abab_ovvo += einsum(x68, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.abab, (0, 1, 2, 3), x68, (4, 1, 5, 3), (4, 0, 5, 2)) - x70 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(x70, (0, 1), (0, 1)) x72 += einsum(x71, (0, 1), (0, 1)) * 0.5 rdm2_f_abab_oovv += einsum(x72, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 - x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(x72, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -4.0 del x72 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x65 x74 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -1994,13 +1995,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x74, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x74, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x74 - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(x6, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) del x6 - x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x76 += einsum(x5, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 del x5 - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x75 x77 += einsum(x76, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2008,35 +2009,35 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_aaaa_oovv += einsum(x77, (0, 1, 2, 3), (1, 0, 2, 3)) del x77 - x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x78 += einsum(t1.aa, (0, 1), x30, (0, 2, 3, 4), (2, 4, 3, 1)) del x30 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), x78, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x78 - x79 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x79, (1, 4, 2, 5), (0, 4, 5, 3)) rdm2_f_abab_vovo += einsum(x79, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x79, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x79 - x80 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x80 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x80, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x80 - x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x81 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x81, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x81, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x81, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x81, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x82 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x82 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) del x66 x82 += einsum(x81, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x81 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x82, (0, 4, 2, 5), (4, 1, 5, 3)) * 4.0 - x83 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x83 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) del x54 x83 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -2049,16 +2050,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x56 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x83, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x83 - x84 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x85 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x85 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x86 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x86 += einsum(x84, (0, 1), (0, 1)) * 0.5 x86 += einsum(x85, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x86, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x86 - x87 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x87 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) del x34 x87 += einsum(x35, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -2069,7 +2070,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x32 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x87, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x87 - x88 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x88 += einsum(x37, (0, 1), (0, 1)) * -0.5 del x37 x88 += einsum(x38, (0, 1), (0, 1)) * -1.0 @@ -2082,23 +2083,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x41 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x88, (2, 3), (0, 2, 1, 3)) * -2.0 del x88 - x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x89 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x89, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x89, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x89, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x89, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x90 += einsum(t2.bbbb, (0, 1, 2, 3), x89, (1, 4, 3, 5), (4, 0, 5, 2)) - x91 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x91 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) del x47 x91 += einsum(x48, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x48 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(t1.bb, (0, 1), x91, (0, 2, 3, 4), (2, 3, 1, 4)) del x91 - x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x93 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x90 x93 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2110,13 +2111,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x93, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_bbbb_oovv += einsum(x93, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x93 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(x10, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) del x10 - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(x18, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x18 - x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(x94, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x94 x96 += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2124,24 +2125,24 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x96, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_bbbb_oovv += einsum(x96, (0, 1, 2, 3), (1, 0, 2, 3)) del x96 - x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(t1.bb, (0, 1), x45, (0, 2, 3, 4), (2, 3, 1, 4)) del x45 - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_bbbb_ovov += einsum(x98, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x98, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x98, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x98, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x99 += einsum(t2.bbbb, (0, 1, 2, 3), x98, (1, 4, 3, 5), (4, 0, 5, 2)) - x100 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x100 += einsum(x84, (0, 1), (0, 1)) x100 += einsum(x85, (0, 1), (0, 1)) * 2.0 - x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x101 += einsum(x100, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x100 - x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x102 += einsum(x97, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x97 x102 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2151,32 +2152,32 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x102, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x102, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x102 - x103 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x103 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (2, 4, 0, 5)) rdm2_f_abab_voov += einsum(x103, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 - x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x104 += einsum(t2.abab, (0, 1, 2, 3), x103, (0, 4, 2, 5), (4, 1, 5, 3)) - x105 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) x105 += einsum(x104, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x104 rdm2_f_bbbb_oovv += einsum(x105, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_bbbb_oovv += einsum(x105, (0, 1, 2, 3), (0, 1, 2, 3)) del x105 - x106 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x106 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x106 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 4, 3, 1)) del x50 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), x106, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x106 - x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_aaaa_ovov += einsum(x107, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x107, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_aaaa_voov += einsum(x107, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vovo += einsum(x107, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x109 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(x108, (0, 1), (0, 1)) x109 += einsum(x70, (0, 1), (0, 1)) * 2.0 x109 += einsum(x71, (0, 1), (0, 1)) @@ -2184,14 +2185,14 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_voov += einsum(delta.aa.oo, (0, 1), x109, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x109, (2, 3), (2, 0, 3, 1)) rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x109, (2, 3), (2, 0, 3, 1)) - x110 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (2, 4, 1, 5)) rdm2_f_abab_ovov += einsum(x110, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x110, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x110 - x111 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x112 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(x111, (0, 1), (0, 1)) * 0.5 x112 += einsum(x84, (0, 1), (0, 1)) * 0.5 x112 += einsum(x85, (0, 1), (0, 1)) @@ -2200,13 +2201,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x112, (2, 3), (2, 0, 3, 1)) * 2.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x112, (2, 3), (0, 2, 1, 3)) * 2.0 del x112 - x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t1.bb, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_bbbb_ovov += einsum(x113, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_ovvo += einsum(x113, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_bbbb_voov += einsum(x113, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vovo += einsum(x113, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x114 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x114 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x114 += einsum(x111, (0, 1), (0, 1)) del x111 x114 += einsum(x84, (0, 1), (0, 1)) @@ -2215,7 +2216,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x85 rdm2_f_bbbb_ovov += einsum(delta.bb.oo, (0, 1), x114, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x114, (2, 3), (2, 0, 1, 3)) * -1.0 - x115 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x115 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x115 += einsum(x108, (0, 1), (0, 1)) * 0.5 del x108 x115 += einsum(x70, (0, 1), (0, 1)) @@ -2225,40 +2226,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_ovvo += einsum(delta.aa.oo, (0, 1), x115, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x115, (2, 3), (2, 0, 3, 1)) * 2.0 del x115 - x116 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x116 += einsum(t1.aa, (0, 1), x23, (0, 2, 3, 4), (2, 3, 1, 4)) del x23 rdm2_f_abab_ovvo += einsum(x116, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 - x117 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x117 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_abab_voov += einsum(x117, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 - x118 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x118 += einsum(t1.bb, (0, 1), x8, (2, 0, 3, 4), (2, 3, 4, 1)) del x8 rdm2_f_abab_voov += einsum(x118, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovvv += einsum(x119, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vovv += einsum(x119, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x119 - x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 rdm2_f_aaaa_ovvv += einsum(x120, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x120, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x120 - x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(t1.aa, (0, 1), x107, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x107 rdm2_f_aaaa_ovvv += einsum(x121, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x121, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x121 - x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum(t1.aa, (0, 1), x82, (0, 2, 3, 4), (2, 1, 3, 4)) * 4.0 del x82 - x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x123 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x123 += einsum(x122, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x122 x123 += einsum(t1.aa, (0, 1), x109, (2, 3), (0, 2, 1, 3)) @@ -2268,7 +2269,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_vovv += einsum(x123, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_vovv += einsum(x123, (0, 1, 2, 3), (1, 0, 3, 2)) del x123 - x124 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x124 += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x60 x124 += einsum(x116, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -2277,34 +2278,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x68 rdm2_f_abab_ovvv += einsum(t1.bb, (0, 1), x124, (2, 0, 3, 4), (2, 4, 3, 1)) del x124 - x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovvv += einsum(x125, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vovv += einsum(x125, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x125 - x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 5), (4, 5, 2, 3)) del x16 rdm2_f_bbbb_ovvv += einsum(x126, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x126, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x126 - x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(t1.bb, (0, 1), x113, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x113 rdm2_f_bbbb_ovvv += einsum(x127, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x127, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x127 - x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(x89, (0, 1, 2, 3), (0, 1, 2, 3)) del x89 x128 += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x98 - x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(t1.bb, (0, 1), x128, (0, 2, 3, 4), (2, 1, 3, 4)) del x128 - x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x130 += einsum(x129, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x129 x130 += einsum(t1.bb, (0, 1), x114, (2, 3), (0, 2, 1, 3)) @@ -2314,7 +2315,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_vovv += einsum(x130, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_bbbb_vovv += einsum(x130, (0, 1, 2, 3), (1, 0, 3, 2)) del x130 - x131 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x131 += einsum(x103, (0, 1, 2, 3), (0, 1, 2, 3)) del x103 x131 += einsum(x117, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2323,25 +2324,25 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x118 rdm2_f_abab_vovv += einsum(t1.aa, (0, 1), x131, (0, 2, 3, 4), (3, 2, 1, 4)) * 2.0 del x131 - x132 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x132 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x132 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvov += einsum(x132, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvvo += einsum(x132, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_aaaa_vvvv += einsum(t1.aa, (0, 1), x132, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x132 - x133 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvov += einsum(x133, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_abab_vvvv += einsum(t1.aa, (0, 1), x133, (0, 2, 3, 4), (2, 3, 1, 4)) del x133 - x134 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x134 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvov += einsum(x134, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvvo += einsum(x134, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_bbbb_vvvv += einsum(t1.bb, (0, 1), x134, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x134 diff --git a/ebcc/codegen/UDFCCD.py b/ebcc/codegen/UDFCCD.py index 31512a9b..7e56a21e 100644 --- a/ebcc/codegen/UDFCCD.py +++ b/ebcc/codegen/UDFCCD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x0 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) e_cc = 0 e_cc += einsum(v.abb.xov, (0, 1, 2), x0, (1, 2, 0), ()) del x0 - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) x1 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) e_cc += einsum(v.aaa.xov, (0, 1, 2), x1, (1, 2, 0), ()) @@ -22,37 +23,37 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new = Namespace() # T amplitudes - x0 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x0, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x0 - x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x1 x3 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x3, (0, 1, 2, 3), (0, 1, 3, 2)) del x3 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x5 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x5 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x7 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x7 += einsum(x5, (0, 1, 2), (0, 1, 2)) x7 += einsum(x6, (0, 1, 2), (0, 1, 2)) * 0.5 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(v.aaa.xov, (0, 1, 2), x7, (3, 2, 0), (3, 1)) - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum(x8, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) * -4.0 del x8 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(x4, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x4 x10 += einsum(x9, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -60,31 +61,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x10, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x10, (0, 1, 2, 3), (1, 0, 2, 3)) del x10 - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) x11 += einsum(x2, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(t2.aaaa, (0, 1, 2, 3), x11, (1, 4, 3, 5), (4, 0, 5, 2)) del x11 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(t2.aaaa, (0, 1, 2, 3), x12, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x12 - x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x14 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x15 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x15 += einsum(x14, (0, 1, 2, 3), (1, 0, 2, 3)) x15 += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x16 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x16 += einsum(t2.abab, (0, 1, 2, 3), x15, (1, 4, 3, 5), (0, 4, 2, 5)) - x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(t2.abab, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 0, 5, 2)) * -1.0 del x16 - x18 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(v.aaa.xov, (0, 1, 2), x7, (1, 3, 0), (3, 2)) - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum(x18, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -4.0 del x18 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x13 x20 += einsum(x17, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -94,24 +95,24 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x20, (0, 1, 2, 3), (0, 1, 3, 2)) del x20 - x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x21 += einsum(v.aaa.xov, (0, 1, 2), x6, (3, 4, 0), (3, 1, 4, 2)) - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x23 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x23 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x23 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x23 += einsum(x6, (0, 1, 2), (0, 1, 2)) - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(v.aaa.xov, (0, 1, 2), x23, (3, 4, 0), (3, 1, 4, 2)) del x23 - x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x25 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x25 += einsum(x24, (0, 1, 2, 3), (1, 0, 3, 2)) del x24 - x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(t2.aaaa, (0, 1, 2, 3), x25, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x25 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) del x21 x27 += einsum(x26, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -121,111 +122,111 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x27, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x27, (0, 1, 2, 3), (1, 0, 3, 2)) del x27 - x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x28 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) x28 += einsum(t2.aaaa, (0, 1, 2, 3), x2, (4, 5, 2, 3), (5, 0, 4, 1)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x28, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x28 - x29 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x29 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x29, (4, 0, 5, 3), (4, 1, 2, 5)) * -1.0 del x29 - x30 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x30 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x30 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x30, (4, 2, 5, 3), (0, 1, 4, 5)) del x30 - x31 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x31 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x31 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x31 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 del x5 x31 += einsum(x6, (0, 1, 2), (0, 1, 2)) del x6 - x32 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x32 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x32 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x33 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x33 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x33 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x34 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x34 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x34 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x34 += einsum(x32, (0, 1, 2), (0, 1, 2)) x34 += einsum(x33, (0, 1, 2), (0, 1, 2)) * 2.0 t2new_abab += einsum(x31, (0, 1, 2), x34, (3, 4, 2), (0, 3, 1, 4)) del x31, x34 - x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x35 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x36 += einsum(x35, (0, 1, 2, 3), (1, 0, 3, 2)) x36 += einsum(t2.bbbb, (0, 1, 2, 3), x14, (1, 4, 5, 3), (4, 0, 5, 2)) * 2.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x36, (1, 4, 3, 5), (0, 4, 2, 5)) * -1.0 del x36 - x37 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x37 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x38 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) x38 += einsum(t2.abab, (0, 1, 2, 3), x37, (0, 4, 5, 3), (4, 1, 5, 2)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x38, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x38 - x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(x22, (0, 1, 2, 3), (1, 0, 3, 2)) del x22 x39 += einsum(t2.aaaa, (0, 1, 2, 3), x2, (4, 1, 3, 5), (4, 0, 5, 2)) * 2.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x39, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x39 - x40 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x40 += einsum(v.aaa.xov, (0, 1, 2), x7, (1, 3, 0), (2, 3)) * 2.0 t2new_abab += einsum(x40, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x40 - x41 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x41 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x41 += einsum(x32, (0, 1, 2), (0, 1, 2)) x41 += einsum(x33, (0, 1, 2), (0, 1, 2)) * 2.0 - x42 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x42 += einsum(v.abb.xov, (0, 1, 2), x41, (1, 3, 0), (3, 2)) - x43 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x43 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x43 += einsum(x42, (0, 1), (1, 0)) t2new_abab += einsum(x43, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x43 - x44 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x44 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 2, 3, 4)) x44 += einsum(t2.abab, (0, 1, 2, 3), x37, (4, 5, 2, 3), (4, 0, 5, 1)) del x37 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x44, (0, 4, 1, 5), (4, 5, 2, 3)) del x44 - x45 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x45 += einsum(f.aa.oo, (0, 1), (0, 1)) x45 += einsum(v.aaa.xov, (0, 1, 2), x7, (3, 2, 0), (1, 3)) * 2.0 del x7 t2new_abab += einsum(x45, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x45 - x46 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x46 += einsum(v.abb.xov, (0, 1, 2), x41, (3, 2, 0), (3, 1)) del x41 - x47 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x47 += einsum(f.bb.oo, (0, 1), (0, 1)) x47 += einsum(x46, (0, 1), (1, 0)) t2new_abab += einsum(x47, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x47 - x48 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x48, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x48 - x49 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x49 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x49 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x49 += einsum(x33, (0, 1, 2), (0, 1, 2)) * 2.0 del x33 - x50 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x50 += einsum(x32, (0, 1, 2), x49, (3, 4, 2), (0, 3, 1, 4)) del x32, x49 - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum(x35, (0, 1, 2, 3), (1, 0, 3, 2)) del x35 x51 += einsum(x14, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x52 += einsum(t2.bbbb, (0, 1, 2, 3), x51, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x51 - x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum(x50, (0, 1, 2, 3), (0, 1, 2, 3)) del x50 x53 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -235,12 +236,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x53, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x53, (0, 1, 2, 3), (1, 0, 3, 2)) del x53 - x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x54 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum(x46, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x46 - x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum(x54, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x54 x56 += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -248,16 +249,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x56, (0, 1, 2, 3), (1, 0, 2, 3)) del x56 - x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum(t2.bbbb, (0, 1, 2, 3), x15, (1, 4, 3, 5), (4, 0, 5, 2)) del x15 - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x58 += einsum(t2.bbbb, (0, 1, 2, 3), x57, (1, 4, 3, 5), (0, 4, 2, 5)) * -4.0 del x57 - x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x59 += einsum(x42, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 4, 0)) * -2.0 del x42 - x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x60 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x58 x60 += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -265,19 +266,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x60, (0, 1, 2, 3), (0, 1, 3, 2)) del x60 - x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x61 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(x2, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x62 += einsum(x2, (0, 1, 2, 3), (1, 0, 3, 2)) del x2 - x63 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x63 += einsum(t2.abab, (0, 1, 2, 3), x62, (0, 4, 5, 2), (4, 1, 5, 3)) del x62 - x64 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x64 += einsum(t2.abab, (0, 1, 2, 3), x63, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x63 - x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x61, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x61 x65 += einsum(x14, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -286,7 +287,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x65, (0, 1, 2, 3), (0, 1, 3, 2)) del x65 - x66 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x66 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) x66 += einsum(t2.bbbb, (0, 1, 2, 3), x14, (4, 5, 2, 3), (5, 0, 4, 1)) del x14 @@ -303,32 +304,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new = Namespace() # L amplitudes - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) - x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x1 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(x0, (0, 1, 2, 3), x1, (2, 3, 4, 5), (5, 4, 1, 0)) * 2.0 del x0 - x2 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x2, (4, 1, 5, 0), (5, 4, 2, 3)) * -2.0 del x2 - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x4 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x4 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x5 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x5 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(x4, (0, 1, 2), (0, 1, 2)) x6 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 0.5 - x7 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x7 += einsum(v.aaa.xov, (0, 1, 2), x6, (1, 3, 0), (2, 3)) - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum(x7, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) * -4.0 del x7 - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum(x3, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x3 x9 += einsum(x1, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -337,81 +338,81 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new_aaaa += einsum(x9, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_aaaa += einsum(x9, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x9 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x10, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x10, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x10 - x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x11 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(x1, (0, 1, 2, 3), x11, (4, 1, 5, 2), (4, 0, 5, 3)) del x11 - x13 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x13 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x13 += einsum(x4, (0, 1, 2), (0, 1, 2)) * 2.0 del x4 x13 += einsum(x5, (0, 1, 2), (0, 1, 2)) del x5 - x14 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x14 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x14 += einsum(x13, (0, 1, 2), l2.aaaa, (3, 1, 4, 0), (4, 3, 2)) - x15 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x15 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x16 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x16 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x16 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x17 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x17 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x17 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x17 += einsum(x15, (0, 1, 2), (0, 1, 2)) x17 += einsum(x16, (0, 1, 2), (0, 1, 2)) * 2.0 - x18 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x18 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x18 += einsum(x17, (0, 1, 2), l2.abab, (3, 1, 4, 0), (4, 3, 2)) * 0.5 - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(x14, (0, 1, 2), (0, 1, 2)) del x14 x19 += einsum(x18, (0, 1, 2), (0, 1, 2)) del x18 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(v.aaa.xov, (0, 1, 2), x19, (3, 4, 0), (1, 3, 2, 4)) * 2.0 del x19 - x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x21 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 3, 5), (0, 4, 2, 5)) - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 3, 2)) x23 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(l2.aaaa, (0, 1, 2, 3), x23, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x23 - x25 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x25 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x26 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x26 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x27 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x27 += einsum(x25, (0, 1), (0, 1)) del x25 x27 += einsum(x26, (0, 1), (0, 1)) * 0.5 del x26 - x28 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x28 += einsum(x27, (0, 1), v.aaa.xov, (2, 1, 3), (0, 3, 2)) - x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x29 += einsum(v.aaa.xov, (0, 1, 2), x28, (3, 4, 0), (1, 3, 2, 4)) * -2.0 del x28 - x30 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x30 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x31 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x31 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x32 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(x30, (0, 1), (0, 1)) del x30 x32 += einsum(x31, (0, 1), (0, 1)) * 0.5 del x31 - x33 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x33 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x33 += einsum(x32, (0, 1), v.aaa.xov, (2, 3, 1), (3, 0, 2)) * 2.0 del x32 - x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum(v.aaa.xov, (0, 1, 2), x33, (3, 4, 0), (1, 3, 2, 4)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(x12, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x12 x35 += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -427,38 +428,38 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new_aaaa += einsum(x35, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x35, (0, 1, 2, 3), (3, 2, 1, 0)) del x35 - x36 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(v.aaa.xov, (0, 1, 2), x6, (3, 2, 0), (1, 3)) - x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(x36, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) * -4.0 del x36 l2new_aaaa += einsum(x37, (0, 1, 2, 3), (2, 3, 1, 0)) l2new_aaaa += einsum(x37, (0, 1, 2, 3), (2, 3, 0, 1)) * -1.0 del x37 - x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x38 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) x38 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 5, 2, 3), (0, 1, 5, 4)) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x38, (3, 2, 4, 5), (0, 1, 5, 4)) * -2.0 del x38 - x39 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x39 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x39, (4, 3, 5, 1), (0, 5, 2, 4)) * -1.0 - x40 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x40 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (2, 4, 3, 5)) - x41 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x41 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) l2new_abab += einsum(x40, (0, 1, 2, 3), x41, (1, 3, 4, 5), (4, 5, 0, 2)) del x40 - x42 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x42 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (4, 2, 5, 0)) l2new_abab += einsum(x1, (0, 1, 2, 3), x42, (1, 4, 2, 5), (3, 5, 0, 4)) * -2.0 del x1, x42 - x43 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x43 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x43, (4, 0, 5, 1), (4, 5, 2, 3)) del x43 - x44 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x44 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x44 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x44 += einsum(x13, (0, 1, 2), l2.aaaa, (3, 1, 4, 0), (4, 3, 2)) * 2.0 x44 += einsum(x17, (0, 1, 2), l2.abab, (3, 1, 4, 0), (4, 3, 2)) @@ -468,140 +469,140 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non del x27 l2new_abab += einsum(v.abb.xov, (0, 1, 2), x44, (3, 4, 0), (4, 2, 3, 1)) del x44 - x45 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x45 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x46 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x46 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x47 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x47 += einsum(x45, (0, 1), (0, 1)) del x45 x47 += einsum(x46, (0, 1), (0, 1)) * 2.0 del x46 - x48 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x48 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x48 += einsum(x47, (0, 1), v.abb.xov, (2, 3, 1), (3, 0, 2)) * 0.5 del x47 - x49 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x49 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x50 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x50 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x51 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x51 += einsum(x49, (0, 1), (0, 1)) del x49 x51 += einsum(x50, (0, 1), (0, 1)) * 2.0 del x50 - x52 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x52 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x52 += einsum(x13, (0, 1, 2), l2.abab, (1, 3, 0, 4), (4, 3, 2)) * 0.5 x52 += einsum(x17, (0, 1, 2), l2.bbbb, (3, 1, 4, 0), (4, 3, 2)) x52 += einsum(x48, (0, 1, 2), (0, 1, 2)) * -1.0 x52 += einsum(x51, (0, 1), v.abb.xov, (2, 1, 3), (0, 3, 2)) * -0.5 l2new_abab += einsum(v.aaa.xov, (0, 1, 2), x52, (3, 4, 0), (2, 4, 1, 3)) * 2.0 del x52 - x53 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x53 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (2, 4, 0, 5)) x53 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) - x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x54 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) l2new_abab += einsum(x53, (0, 1, 2, 3), x54, (1, 4, 5, 3), (2, 5, 0, 4)) * -2.0 del x53 - x55 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) x55 += einsum(t2.abab, (0, 1, 2, 3), x41, (0, 4, 5, 3), (1, 4, 2, 5)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x55, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x55 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum(x21, (0, 1, 2, 3), (1, 0, 3, 2)) * 0.5 del x21 x56 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) del x22 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x56, (2, 4, 0, 5), (5, 1, 4, 3)) * -2.0 del x56 - x57 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) x57 += einsum(t2.abab, (0, 1, 2, 3), x41, (4, 1, 2, 5), (0, 4, 3, 5)) * -1.0 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x57, (2, 4, 1, 5), (0, 5, 4, 3)) * -1.0 del x57 - x58 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x58 += einsum(v.aaa.xov, (0, 1, 2), x6, (1, 3, 0), (3, 2)) * 2.0 l2new_abab += einsum(x58, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x58 - x59 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x59 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x59 += einsum(x15, (0, 1, 2), (0, 1, 2)) del x15 x59 += einsum(x16, (0, 1, 2), (0, 1, 2)) * 2.0 del x16 - x60 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x60 += einsum(f.bb.vv, (0, 1), (0, 1)) * -0.5 x60 += einsum(v.abb.xov, (0, 1, 2), x59, (1, 3, 0), (3, 2)) * 0.5 l2new_abab += einsum(x60, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x60 - x61 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x61 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 2, 3, 4)) x61 += einsum(t2.abab, (0, 1, 2, 3), x41, (4, 5, 2, 3), (0, 4, 1, 5)) del x41 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x61, (2, 4, 3, 5), (0, 1, 4, 5)) del x61 - x62 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x62 += einsum(f.aa.oo, (0, 1), (0, 1)) x62 += einsum(v.aaa.xov, (0, 1, 2), x6, (3, 2, 0), (3, 1)) * 2.0 del x6 l2new_abab += einsum(x62, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x62 - x63 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x63 += einsum(v.abb.xov, (0, 1, 2), x59, (3, 2, 0), (1, 3)) - x64 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x64 += einsum(f.bb.oo, (0, 1), (0, 1)) x64 += einsum(x63, (0, 1), (1, 0)) l2new_abab += einsum(x64, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x64 - x65 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x65 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(x54, (0, 1, 2, 3), x65, (4, 5, 0, 1), (3, 2, 5, 4)) * 2.0 del x65 - x66 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x66, (4, 1, 5, 0), (5, 4, 2, 3)) * -2.0 del x66 - x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x67 += einsum(l2.bbbb, (0, 1, 2, 3), x39, (4, 3, 5, 1), (2, 4, 0, 5)) del x39 - x68 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x68 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x68 += einsum(x13, (0, 1, 2), l2.abab, (1, 3, 0, 4), (4, 3, 2)) del x13 - x69 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x69 += einsum(x17, (0, 1, 2), l2.bbbb, (3, 1, 4, 0), (4, 3, 2)) * 2.0 del x17 - x70 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x70 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x70 += einsum(x68, (0, 1, 2), (0, 1, 2)) del x68 x70 += einsum(x69, (0, 1, 2), (0, 1, 2)) del x69 - x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x71 += einsum(v.abb.xov, (0, 1, 2), x70, (3, 4, 0), (1, 3, 2, 4)) del x70 - x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x72 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) - x74 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x74 += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x72 x74 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) del x73 - x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x75 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x75 += einsum(x54, (0, 1, 2, 3), x74, (4, 0, 5, 3), (4, 1, 5, 2)) * 4.0 del x74 - x76 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x76 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x76 += einsum(x51, (0, 1), v.abb.xov, (2, 1, 3), (0, 3, 2)) del x51 - x77 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x77 += einsum(v.abb.xov, (0, 1, 2), x76, (3, 4, 0), (1, 3, 2, 4)) * -1.0 del x76 - x78 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x78 += einsum(v.abb.xov, (0, 1, 2), x48, (3, 4, 0), (1, 3, 2, 4)) * -2.0 del x48 - x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x79 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x67 x79 += einsum(x71, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -617,15 +618,15 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new_bbbb += einsum(x79, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x79, (0, 1, 2, 3), (3, 2, 1, 0)) del x79 - x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x80 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x81 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x81 += einsum(v.abb.xov, (0, 1, 2), x59, (1, 3, 0), (2, 3)) del x59 - x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(x81, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 2, 0)) * -2.0 del x81 - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(x80, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x80 x83 += einsum(x54, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -634,18 +635,18 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, l2=Non l2new_bbbb += einsum(x83, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_bbbb += einsum(x83, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x83 - x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(x63, (0, 1), l2.bbbb, (2, 3, 4, 1), (4, 0, 2, 3)) * -2.0 del x63 l2new_bbbb += einsum(x84, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_bbbb += einsum(x84, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 del x84 - x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x85 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x85, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x85, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x85 - x86 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x86 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) x86 += einsum(t2.bbbb, (0, 1, 2, 3), x54, (4, 5, 2, 3), (0, 1, 5, 4)) del x54 diff --git a/ebcc/codegen/UDFCCSD.py b/ebcc/codegen/UDFCCSD.py index 9692a3d6..1af43689 100644 --- a/ebcc/codegen/UDFCCSD.py +++ b/ebcc/codegen/UDFCCSD.py @@ -1,16 +1,17 @@ # Code generated by qwick. -import numpy as np +from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x1 = np.zeros((naux,), dtype=np.float64) + x1 = np.zeros((naux,), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) x1 += einsum(x0, (0,), (0,)) * 2.0 - x2 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x2 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) x2 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) x2 += einsum(x1, (0,), t1.aa, (1, 2), (1, 2, 0)) * 0.5 @@ -18,23 +19,23 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 2, 0), ()) del x2 - x3 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x4 += einsum(f.aa.ov, (0, 1), (0, 1)) * 2.0 x4 += einsum(v.aaa.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -1.0 del x3 e_cc += einsum(t1.aa, (0, 1), x4, (0, 1), ()) * 0.5 del x4 - x5 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x5 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x6 += einsum(f.bb.ov, (0, 1), (0, 1)) x6 += einsum(v.abb.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) * -0.5 del x5 e_cc += einsum(t1.bb, (0, 1), x6, (0, 1), ()) del x6 - x7 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x7 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) x7 += einsum(x0, (0,), t1.bb, (1, 2), (1, 2, 0)) * 0.5 del x0 @@ -48,29 +49,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) t1new_aa += einsum(f.aa.vv, (0, 1), t1.aa, (2, 1), (2, 0)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.vv, (0, 1), t1.bb, (2, 1), (2, 0)) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - x0 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x3 = np.zeros((naux,), dtype=np.float64) + x3 = np.zeros((naux,), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x4 = np.zeros((naux,), dtype=np.float64) + x4 = np.zeros((naux,), dtype=types[float]) x4 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x5 = np.zeros((naux,), dtype=np.float64) + x5 = np.zeros((naux,), dtype=types[float]) x5 += einsum(x3, (0,), (0,)) del x3 x5 += einsum(x4, (0,), (0,)) del x4 - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x6 += einsum(x1, (0, 1, 2), (0, 1, 2)) x6 += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 3, 2, 4), (3, 4, 0)) * 2.0 @@ -78,66 +79,66 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x6 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) t1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x6, (3, 2, 0), (3, 1)) del x6 - x7 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x8 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x8 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x8 += einsum(x7, (0, 1, 2), (0, 1, 2)) - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(v.abb.xov, (0, 1, 2), x8, (3, 4, 0), (4, 3, 1, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x9, (0, 4, 1, 3), (4, 2)) * -1.0 del x9 - x10 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x10 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x10 += einsum(x7, (0, 1, 2), (1, 0, 2)) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(v.aaa.xov, (0, 1, 2), x10, (3, 4, 0), (1, 3, 4, 2)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x11, (0, 1, 4, 3), (4, 2)) * 2.0 - x12 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum(v.abb.xov, (0, 1, 2), x12, (1, 3, 0), (3, 2)) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum(x5, (0,), v.abb.xov, (0, 1, 2), (1, 2)) t1new_bb += einsum(x14, (0, 1), (0, 1)) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum(f.bb.ov, (0, 1), (0, 1)) x15 += einsum(x13, (0, 1), (0, 1)) * -1.0 x15 += einsum(x14, (0, 1), (0, 1)) del x14 t1new_aa += einsum(x15, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x15, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 - x16 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x16 += einsum(v.aaa.xov, (0, 1, 2), x7, (1, 3, 0), (3, 2)) - x17 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x17 += einsum(x5, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) t1new_aa += einsum(x17, (0, 1), (0, 1)) - x18 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(f.aa.ov, (0, 1), (0, 1)) x18 += einsum(x16, (0, 1), (0, 1)) * -1.0 x18 += einsum(x17, (0, 1), (0, 1)) del x17 t1new_aa += einsum(x18, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x18, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x20 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x20 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x20 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x20 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x20 += einsum(x1, (0, 1, 2), (0, 1, 2)) x20 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(v.aaa.xov, (0, 1, 2), x20, (3, 2, 0), (1, 3)) del x20 - x22 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x22 += einsum(x5, (0,), v.aaa.xoo, (0, 1, 2), (1, 2)) - x23 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(f.aa.ov, (0, 1), (0, 1)) x23 += einsum(x16, (0, 1), (0, 1)) * -1.0 del x16 - x24 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x24 += einsum(t1.aa, (0, 1), x23, (2, 1), (0, 2)) - x25 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x25 += einsum(f.aa.oo, (0, 1), (0, 1)) x25 += einsum(x21, (0, 1), (0, 1)) del x21 @@ -145,59 +146,59 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x25 += einsum(x24, (0, 1), (1, 0)) del x24 t1new_aa += einsum(t1.aa, (0, 1), x25, (0, 2), (2, 1)) * -1.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(x25, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x25 - x26 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x26 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x26 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) - x27 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x27 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x27 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x28 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x28 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x29 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x29 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x29 += einsum(v.abb.xov, (0, 1, 2), x28, (1, 3, 2, 4), (3, 4, 0)) del x28 - x30 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x30 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x30 += einsum(x26, (0, 1, 2), (0, 1, 2)) * -0.5 x30 += einsum(x27, (0, 1, 2), (0, 1, 2)) * 0.5 x30 += einsum(x29, (0, 1, 2), (0, 1, 2)) x30 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) * 0.5 t1new_bb += einsum(v.abb.xvv, (0, 1, 2), x30, (3, 2, 0), (3, 1)) * 2.0 del x30 - x31 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x31 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x31 += einsum(x12, (0, 1, 2), (1, 0, 2)) - x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x32 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x32 += einsum(v.abb.xov, (0, 1, 2), x31, (3, 4, 0), (4, 1, 3, 2)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x32, (4, 0, 1, 3), (4, 2)) * 2.0 del x32 - x33 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x33 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x33 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x33 += einsum(x12, (0, 1, 2), (0, 1, 2)) - x34 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x34 += einsum(v.aaa.xov, (0, 1, 2), x33, (3, 4, 0), (1, 4, 3, 2)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x34, (0, 1, 4, 2), (4, 3)) * -1.0 del x34 - x35 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x35 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x35 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x36 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x36 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x36 += einsum(x26, (0, 1, 2), (0, 1, 2)) * -1.0 x36 += einsum(x27, (0, 1, 2), (0, 1, 2)) x36 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 x36 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x37 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(v.abb.xov, (0, 1, 2), x36, (3, 2, 0), (1, 3)) * 0.5 del x36 - x38 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x38 += einsum(x5, (0,), v.abb.xoo, (0, 1, 2), (1, 2)) * 0.5 - x39 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x39 += einsum(f.bb.ov, (0, 1), (0, 1)) x39 += einsum(x13, (0, 1), (0, 1)) * -1.0 del x13 - x40 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x40 += einsum(t1.bb, (0, 1), x39, (2, 1), (0, 2)) * 0.5 - x41 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x41 += einsum(f.bb.oo, (0, 1), (0, 1)) * 0.5 x41 += einsum(x37, (0, 1), (0, 1)) del x37 @@ -208,87 +209,87 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t1new_bb += einsum(t1.bb, (0, 1), x41, (0, 2), (2, 1)) * -2.0 t2new_abab += einsum(x41, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x41 - x42 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x42, (4, 3, 5, 2), (0, 1, 4, 5)) * 2.0 del x42 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x44 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x44 += einsum(t2.aaaa, (0, 1, 2, 3), x43, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x45 += einsum(t1.aa, (0, 1), x44, (2, 3, 4, 0), (2, 3, 4, 1)) t2new_aaaa += einsum(t1.aa, (0, 1), x45, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x45 - x46 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x46 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(x46, (0, 1, 2), x46, (3, 4, 2), (0, 3, 1, 4)) - x48 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x48 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x48 += einsum(x46, (0, 1, 2), (0, 1, 2)) x48 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x48 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x49 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(v.aaa.xov, (0, 1, 2), x48, (1, 3, 0), (2, 3)) del x48 - x50 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(x5, (0,), v.aaa.xvv, (0, 1, 2), (1, 2)) - x51 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(x49, (0, 1), (0, 1)) del x49 x51 += einsum(x50, (0, 1), (1, 0)) * -1.0 - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(x51, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x51 - x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x53 += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) - x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.aaaa, (0, 1, 2, 3), x53, (1, 4, 5, 3), (0, 4, 2, 5)) del x53 - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(t2.aaaa, (0, 1, 2, 3), x54, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x54 - x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum(x56, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x57 += einsum(x56, (0, 1, 2, 3), (1, 0, 3, 2)) - x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x58 += einsum(t2.abab, (0, 1, 2, 3), x57, (1, 4, 5, 3), (0, 4, 2, 5)) del x57 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.abab, (0, 1, 2, 3), x58, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 del x58 - x60 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(t2.aaaa, (0, 1, 2, 3), x60, (4, 2, 5, 3), (0, 1, 4, 5)) del x60 - x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(x18, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x63 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x63 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) - x64 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x64 += einsum(x7, (0, 1, 2), x7, (3, 4, 2), (0, 3, 1, 4)) - x65 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x65 += einsum(x63, (0, 1, 2, 3), (3, 2, 1, 0)) x65 += einsum(x64, (0, 1, 2, 3), (2, 3, 1, 0)) - x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x66 += einsum(t1.aa, (0, 1), x65, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x65 - x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x67 += einsum(x61, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x61 x67 += einsum(x62, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x62 x67 += einsum(x66, (0, 1, 2, 3), (0, 2, 1, 3)) del x66 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t1.aa, (0, 1), x67, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x67 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) del x47 x69 += einsum(x52, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -302,73 +303,73 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x69, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x69 - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(v.aaa.xov, (0, 1, 2), x1, (3, 4, 0), (3, 1, 4, 2)) - x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(v.aaa.xvv, (0, 1, 2), x7, (3, 4, 0), (3, 4, 1, 2)) - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(t2.aaaa, (0, 1, 2, 3), x71, (4, 1, 5, 3), (4, 0, 2, 5)) del x71 - x73 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x73 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x73 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) * 0.5 x73 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -0.5 x73 += einsum(x19, (0, 1, 2), (0, 1, 2)) x73 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(x46, (0, 1, 2), x73, (3, 4, 2), (0, 3, 1, 4)) * 2.0 del x73 - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x76 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x76 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x76 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x76 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(v.aaa.xov, (0, 1, 2), x76, (3, 4, 0), (1, 3, 2, 4)) del x76 - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum(x75, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x75 x78 += einsum(x77, (0, 1, 2, 3), (0, 1, 2, 3)) del x77 - x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(t2.aaaa, (0, 1, 2, 3), x78, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x78 - x80 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x80 += einsum(v.aaa.xoo, (0, 1, 2), x7, (3, 4, 0), (3, 1, 2, 4)) - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum(t1.aa, (0, 1), x80, (2, 3, 4, 0), (2, 3, 4, 1)) - x82 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x82 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(t2.abab, (0, 1, 2, 3), x82, (4, 5, 1, 3), (0, 5, 4, 2)) del x82 - x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x84 += einsum(x46, (0, 1, 2), x7, (3, 4, 2), (3, 0, 4, 1)) - x85 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x85 += einsum(v.abb.xov, (0, 1, 2), x7, (3, 4, 0), (3, 4, 1, 2)) - x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum(t2.abab, (0, 1, 2, 3), x85, (4, 5, 1, 3), (4, 0, 5, 2)) del x85 - x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 2, 3, 4)) - x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x88 += einsum(x87, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x88 += einsum(x87, (0, 1, 2, 3), (2, 1, 0, 3)) del x87 - x89 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x89 += einsum(t2.aaaa, (0, 1, 2, 3), x88, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x88 - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum(v.aaa.xov, (0, 1, 2), x7, (3, 4, 0), (3, 1, 4, 2)) del x7 - x91 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x91 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x91 += einsum(x90, (0, 1, 2, 3), (0, 2, 1, 3)) del x90 - x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t2.aaaa, (0, 1, 2, 3), x91, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x91 - x93 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x93 += einsum(x81, (0, 1, 2, 3), (0, 2, 1, 3)) del x81 x93 += einsum(x83, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -383,10 +384,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x92 x93 += einsum(x11, (0, 1, 2, 3), (2, 0, 1, 3)) del x11 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 += einsum(t1.aa, (0, 1), x93, (2, 3, 0, 4), (2, 3, 1, 4)) del x93 - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x70 x95 += einsum(x72, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -402,36 +403,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x95, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x95 - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum(t2.aaaa, (0, 1, 2, 3), x80, (4, 0, 5, 1), (4, 5, 2, 3)) del x80 - x97 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x97 += einsum(t1.aa, (0, 1), x18, (2, 1), (0, 2)) del x18 - x98 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x98 += einsum(f.aa.oo, (0, 1), (0, 1)) x98 += einsum(x97, (0, 1), (0, 1)) del x97 - x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x99 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x99 += einsum(x98, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x98 - x100 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x100 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x100 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 del x0 x100 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x100 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x101 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x101 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x101 += einsum(v.aaa.xov, (0, 1, 2), x100, (3, 2, 0), (1, 3)) del x100 - x102 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x102 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x102 += einsum(x101, (0, 1), (0, 1)) del x101 x102 += einsum(x22, (0, 1), (1, 0)) del x22 - x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x103 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x103 += einsum(x102, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x102 - x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x104 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x104 += einsum(x96, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x96 x104 += einsum(x99, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -441,16 +442,16 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x104, (0, 1, 2, 3), (1, 0, 2, 3)) del x104 - x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x105 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(x105, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x105 x106 += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x106, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x106, (0, 1, 2, 3), (0, 1, 3, 2)) del x106 - x107 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x107 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x107 += einsum(x63, (0, 1, 2, 3), (3, 2, 1, 0)) del x63 x107 += einsum(x44, (0, 1, 2, 3), (2, 1, 3, 0)) @@ -459,88 +460,88 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x64 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x107, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x107 - x108 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x108 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x108 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x108 += einsum(x46, (0, 1, 2), (0, 1, 2)) x108 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x108 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x109 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x109 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x109 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x110 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x110 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x110 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x110 += einsum(x109, (0, 1, 2), (0, 1, 2)) x110 += einsum(x27, (0, 1, 2), (0, 1, 2)) x110 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 t2new_abab += einsum(x108, (0, 1, 2), x110, (3, 4, 2), (0, 3, 1, 4)) del x108, x110 - x111 = np.zeros((nvir[0], nvir[0], naux), dtype=np.float64) + x111 = np.zeros((nvir[0], nvir[0], naux), dtype=types[float]) x111 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 3), (1, 3, 2)) - x112 = np.zeros((nvir[0], nvir[0], naux), dtype=np.float64) + x112 = np.zeros((nvir[0], nvir[0], naux), dtype=types[float]) x112 += einsum(v.aaa.xvv, (0, 1, 2), (1, 2, 0)) x112 += einsum(x111, (0, 1, 2), (0, 1, 2)) * -1.0 del x111 - x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x113 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x113 += einsum(v.aaa.xov, (0, 1, 2), x8, (3, 4, 0), (4, 3, 1, 2)) - x114 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x114 += einsum(t2.aaaa, (0, 1, 2, 3), x43, (1, 4, 5, 3), (4, 0, 5, 2)) x114 += einsum(x112, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) * 0.5 x114 += einsum(t1.aa, (0, 1), x113, (0, 2, 3, 4), (3, 2, 4, 1)) * 0.5 del x113 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x114, (0, 4, 2, 5), (4, 1, 5, 3)) * -2.0 del x114 - x115 = np.zeros((nvir[1], nvir[1], naux), dtype=np.float64) + x115 = np.zeros((nvir[1], nvir[1], naux), dtype=types[float]) x115 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 3), (1, 3, 2)) - x116 = np.zeros((nvir[1], nvir[1], naux), dtype=np.float64) + x116 = np.zeros((nvir[1], nvir[1], naux), dtype=types[float]) x116 += einsum(v.abb.xvv, (0, 1, 2), (1, 2, 0)) x116 += einsum(x115, (0, 1, 2), (0, 1, 2)) * -1.0 del x115 - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x117 += einsum(v.abb.xov, (0, 1, 2), x33, (3, 4, 0), (4, 3, 1, 2)) - x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x118 += einsum(t2.bbbb, (0, 1, 2, 3), x56, (1, 4, 5, 3), (4, 0, 5, 2)) * 2.0 x118 += einsum(x116, (0, 1, 2), x33, (3, 4, 2), (4, 3, 1, 0)) x118 += einsum(t1.bb, (0, 1), x117, (0, 2, 3, 4), (3, 2, 4, 1)) del x117 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x118, (1, 4, 3, 5), (0, 4, 2, 5)) * -1.0 del x118 - x119 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x119 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x119 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x120 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(t2.abab, (0, 1, 2, 3), x119, (0, 4, 5, 3), (4, 1, 5, 2)) x120 += einsum(x112, (0, 1, 2), x33, (3, 4, 2), (4, 3, 1, 0)) * -1.0 del x112 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x120, (1, 4, 2, 5), (0, 4, 5, 3)) del x120 - x121 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x121 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x121 += einsum(x116, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x121, (0, 4, 3, 5), (4, 1, 2, 5)) * -1.0 del x121 - x122 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x122 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x123 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x123 += einsum(t1.aa, (0, 1), x122, (0, 2, 3, 4), (2, 1, 4, 3)) del x122 x123 += einsum(v.aaa.xvv, (0, 1, 2), x116, (3, 4, 0), (1, 2, 4, 3)) * -1.0 del x116 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x123, (2, 4, 3, 5), (0, 1, 4, 5)) * -1.0 del x123 - x124 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x124 += einsum(t2.abab, (0, 1, 2, 3), x119, (4, 5, 2, 3), (4, 0, 5, 1)) del x119 x124 += einsum(x33, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) - x125 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x125 += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) x125 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) t2new_abab += einsum(x124, (0, 1, 2, 3), x125, (0, 2, 4, 5), (1, 3, 4, 5)) del x124, x125 - x126 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x126 += einsum(x109, (0, 1, 2), (0, 1, 2)) x126 += einsum(x27, (0, 1, 2), (0, 1, 2)) x126 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 x126 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x127 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(x5, (0,), v.abb.xvv, (0, 1, 2), (1, 2)) - x128 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x128 += einsum(v.abb.xov, (0, 1, 2), x126, (1, 3, 0), (2, 3)) del x126 @@ -549,14 +550,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x39 t2new_abab += einsum(x128, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x128 - x129 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x129 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x129 += einsum(x46, (0, 1, 2), (0, 1, 2)) x129 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 del x19 x129 += einsum(x1, (0, 1, 2), (0, 1, 2)) del x1 x129 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x130 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x130 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x130 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x130 += einsum(v.aaa.xov, (0, 1, 2), x129, (1, 3, 0), (2, 3)) del x129 @@ -566,98 +567,98 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x23 t2new_abab += einsum(x130, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x130 - x131 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x131 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x131 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x131 += einsum(x109, (0, 1, 2), (0, 1, 2)) - x132 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(v.abb.xov, (0, 1, 2), x10, (3, 4, 0), (4, 3, 1, 2)) del x10 - x133 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x133 += einsum(x131, (0, 1, 2), x8, (3, 4, 2), (4, 3, 0, 1)) del x8, x131 x133 += einsum(t2.bbbb, (0, 1, 2, 3), x132, (4, 5, 1, 3), (5, 4, 0, 2)) * 2.0 del x132 t2new_abab += einsum(t1.aa, (0, 1), x133, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x133 - x134 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x134 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x134 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x134 += einsum(x46, (0, 1, 2), (0, 1, 2)) del x46 - x135 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x135 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x135 += einsum(v.aaa.xov, (0, 1, 2), x31, (3, 4, 0), (1, 4, 3, 2)) del x31 - x136 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x136 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x136 += einsum(x134, (0, 1, 2), x33, (3, 4, 2), (0, 4, 3, 1)) del x33, x134 x136 += einsum(t2.aaaa, (0, 1, 2, 3), x135, (1, 4, 5, 3), (0, 5, 4, 2)) * 2.0 del x135 t2new_abab += einsum(t1.bb, (0, 1), x136, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x136 - x137 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x137 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x137, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x137 - x138 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x138 += einsum(t2.bbbb, (0, 1, 2, 3), x56, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x139 += einsum(t1.bb, (0, 1), x138, (2, 3, 4, 0), (2, 3, 4, 1)) t2new_bbbb += einsum(t1.bb, (0, 1), x139, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x139 - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum(x109, (0, 1, 2), x109, (3, 4, 2), (0, 3, 1, 4)) - x141 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x141 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x141 += einsum(x109, (0, 1, 2), (0, 1, 2)) x141 += einsum(x27, (0, 1, 2), (0, 1, 2)) x141 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 - x142 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(v.abb.xov, (0, 1, 2), x141, (1, 3, 0), (3, 2)) del x141 - x143 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(x142, (0, 1), (1, 0)) del x142 x143 += einsum(x127, (0, 1), (1, 0)) * -1.0 del x127 - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum(x143, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x143 - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(x56, (0, 1, 2, 3), (1, 0, 2, 3)) x145 += einsum(x56, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(t2.bbbb, (0, 1, 2, 3), x145, (1, 4, 3, 5), (4, 0, 5, 2)) del x145 - x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x147 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x147 += einsum(t2.bbbb, (0, 1, 2, 3), x146, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x146 - x148 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x148 += einsum(v.abb.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x149 += einsum(t2.bbbb, (0, 1, 2, 3), x148, (4, 2, 5, 3), (0, 1, 4, 5)) del x148 - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x150 += einsum(x15, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x151 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) - x152 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x152 += einsum(x12, (0, 1, 2), x12, (3, 4, 2), (0, 3, 1, 4)) - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x153 += einsum(x151, (0, 1, 2, 3), (3, 2, 1, 0)) x153 += einsum(x152, (0, 1, 2, 3), (2, 3, 1, 0)) - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum(t1.bb, (0, 1), x153, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x153 - x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x155 += einsum(x149, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x149 x155 += einsum(x150, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x150 x155 += einsum(x154, (0, 1, 2, 3), (0, 2, 1, 3)) del x154 - x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x156 += einsum(t1.bb, (0, 1), x155, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x155 - x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(x140, (0, 1, 2, 3), (0, 1, 2, 3)) del x140 x157 += einsum(x144, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -669,19 +670,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x157, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x157, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x157 - x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x158 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x159 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x159 += einsum(x43, (0, 1, 2, 3), (1, 0, 2, 3)) x159 += einsum(x43, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x43 - x160 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x160 += einsum(t2.abab, (0, 1, 2, 3), x159, (0, 4, 2, 5), (4, 1, 5, 3)) del x159 - x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x161 += einsum(t2.abab, (0, 1, 2, 3), x160, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x160 - x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x162 += einsum(x158, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x158 x162 += einsum(x56, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -691,39 +692,39 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x162, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x162, (0, 1, 2, 3), (0, 1, 3, 2)) del x162 - x163 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x163 += einsum(v.abb.xoo, (0, 1, 2), x12, (3, 4, 0), (3, 1, 2, 4)) - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(t2.bbbb, (0, 1, 2, 3), x163, (4, 0, 5, 1), (4, 5, 2, 3)) - x165 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x165 += einsum(t1.bb, (0, 1), x15, (2, 1), (0, 2)) del x15 - x166 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x166 += einsum(f.bb.oo, (0, 1), (0, 1)) x166 += einsum(x165, (0, 1), (0, 1)) del x165 - x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x167 += einsum(x166, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) * -2.0 del x166 - x168 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x168 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x168 += einsum(x26, (0, 1, 2), (0, 1, 2)) * -1.0 x168 += einsum(x27, (0, 1, 2), (0, 1, 2)) x168 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 - x169 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x169 += einsum(v.abb.xov, (0, 1, 2), x168, (3, 2, 0), (3, 1)) del x168 - x170 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x170 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x170 += einsum(x5, (0,), v.abb.xoo, (0, 1, 2), (1, 2)) del x5 - x171 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x171 += einsum(x169, (0, 1), (1, 0)) del x169 x171 += einsum(x170, (0, 1), (1, 0)) del x170 - x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x172 += einsum(x171, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -2.0 del x171 - x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x173 += einsum(x164, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x164 x173 += einsum(x167, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -733,73 +734,73 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x173, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x173, (0, 1, 2, 3), (1, 0, 2, 3)) del x173 - x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x174 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x175 += einsum(t2.bbbb, (0, 1, 2, 3), x174, (4, 1, 5, 3), (0, 4, 2, 5)) del x174 - x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 += einsum(v.abb.xvv, (0, 1, 2), x12, (3, 4, 0), (3, 4, 1, 2)) - x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x177 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x177 += einsum(t2.bbbb, (0, 1, 2, 3), x176, (4, 1, 5, 3), (4, 0, 2, 5)) del x176 - x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(x27, (0, 1, 2), x35, (3, 4, 2), (0, 3, 1, 4)) - x179 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x179 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x179 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x179 += einsum(x26, (0, 1, 2), (0, 1, 2)) * -1.0 x179 += einsum(x27, (0, 1, 2), (0, 1, 2)) x179 += einsum(x35, (0, 1, 2), (0, 1, 2)) * 2.0 del x35 - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum(x109, (0, 1, 2), x179, (3, 4, 2), (3, 0, 4, 1)) del x179 - x181 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x181 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x181 += einsum(x26, (0, 1, 2), (0, 1, 2)) * -0.5 del x26 x181 += einsum(x27, (0, 1, 2), (0, 1, 2)) * 0.5 del x27 x181 += einsum(x29, (0, 1, 2), (0, 1, 2)) del x29 - x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x182 += einsum(v.abb.xov, (0, 1, 2), x181, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x181 - x183 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x183 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (3, 1, 2, 4)) - x184 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x184 += einsum(t2.abab, (0, 1, 2, 3), x183, (0, 4, 5, 2), (1, 5, 4, 3)) del x183 - x185 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x185 += einsum(t1.bb, (0, 1), x163, (2, 3, 4, 0), (2, 3, 4, 1)) del x163 - x186 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x186 += einsum(x109, (0, 1, 2), x12, (3, 4, 2), (3, 0, 4, 1)) del x109 - x187 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x187 += einsum(v.aaa.xov, (0, 1, 2), x12, (3, 4, 0), (1, 3, 4, 2)) - x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum(t2.abab, (0, 1, 2, 3), x187, (0, 4, 5, 2), (4, 1, 5, 3)) del x187 - x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x189 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x190 += einsum(x189, (0, 1, 2, 3), (1, 0, 2, 3)) x190 += einsum(x189, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 del x189 - x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x191 += einsum(t2.bbbb, (0, 1, 2, 3), x190, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x190 - x192 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x192 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x192 += einsum(v.abb.xov, (0, 1, 2), x12, (3, 4, 0), (3, 1, 4, 2)) del x12 - x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x193 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x193 += einsum(x192, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x193 += einsum(x192, (0, 1, 2, 3), (0, 2, 1, 3)) del x192 - x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x194 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x194 += einsum(t2.bbbb, (0, 1, 2, 3), x193, (4, 1, 5, 3), (4, 5, 0, 2)) * 2.0 del x193 - x195 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x195 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x195 += einsum(x184, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x184 x195 += einsum(x185, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -812,10 +813,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x191 x195 += einsum(x194, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x194 - x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x196 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x196 += einsum(t1.bb, (0, 1), x195, (2, 0, 3, 4), (2, 3, 4, 1)) del x195 - x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x197 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x197 += einsum(x175, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x175 x197 += einsum(x177, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -833,7 +834,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x197, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x197, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x197 - x198 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x198 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x198 += einsum(x151, (0, 1, 2, 3), (3, 2, 1, 0)) del x151 x198 += einsum(x138, (0, 1, 2, 3), (2, 1, 3, 0)) @@ -856,57 +857,57 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new = Namespace() # L amplitudes - l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + l1new_aa = np.zeros((nvir[0], nocc[0]), dtype=types[float]) l1new_aa += einsum(f.aa.ov, (0, 1), (1, 0)) - l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + l1new_bb = np.zeros((nvir[1], nocc[1]), dtype=types[float]) l1new_bb += einsum(f.bb.ov, (0, 1), (1, 0)) - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x1 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) - x2 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x3 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x4 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x5 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x5 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x7 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x7 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x7 += einsum(x4, (0, 1, 2), (0, 1, 2)) x7 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 x7 += einsum(x6, (0, 1, 2), (0, 1, 2)) - x8 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x8 += einsum(x7, (0, 1, 2), l2.aaaa, (3, 1, 4, 0), (4, 3, 2)) * 0.5 - x9 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x9 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x10 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x10 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x11 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x11 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x11 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x12 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x12 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x12 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x12 += einsum(x9, (0, 1, 2), (0, 1, 2)) x12 += einsum(x10, (0, 1, 2), (0, 1, 2)) x12 += einsum(x11, (0, 1, 2), (0, 1, 2)) * 2.0 - x13 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x13 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x13 += einsum(x12, (0, 1, 2), l2.abab, (3, 1, 4, 0), (4, 3, 2)) * 0.25 - x14 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x15 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x15 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x16 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x16 += einsum(x14, (0, 1), (0, 1)) x16 += einsum(x15, (0, 1), (0, 1)) * 0.5 - x17 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x17 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x17 += einsum(x16, (0, 1), v.aaa.xov, (2, 3, 1), (3, 0, 2)) * 0.5 - x18 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x18 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x18 += einsum(x2, (0, 1, 2), (0, 1, 2)) - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(v.aaa.xoo, (0, 1, 2), x0, (1, 3, 2, 4), (3, 4, 0)) * 0.5 x19 += einsum(v.abb.xoo, (0, 1, 2), x1, (3, 1, 2, 4), (3, 4, 0)) * -0.25 x19 += einsum(x2, (0, 1, 2), x0, (0, 3, 1, 4), (3, 4, 2)) * 0.5 @@ -917,59 +918,59 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x19 += einsum(l1.aa, (0, 1), x18, (1, 2, 3), (2, 0, 3)) * -0.25 l1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x19, (3, 2, 0), (1, 3)) * 4.0 del x19 - x20 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x20 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x20 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x21 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 2, 3, 4)) - x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(v.aaa.xov, (0, 1, 2), x2, (3, 4, 0), (3, 1, 4, 2)) - x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x23 += einsum(x21, (0, 1, 2, 3), (1, 2, 0, 3)) x23 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) x23 += einsum(x22, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x24 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x24 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x24 += einsum(x9, (0, 1, 2), (0, 1, 2)) - x25 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x25 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x25 += einsum(x3, (0, 1, 2), (0, 1, 2)) - x26 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x26 += einsum(v.aaa.xov, (0, 1, 2), x25, (3, 4, 0), (1, 4, 3, 2)) - x27 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x27 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x27 += einsum(x2, (0, 1, 2), (1, 0, 2)) - x28 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x28 += einsum(v.abb.xov, (0, 1, 2), x27, (3, 4, 0), (3, 4, 1, 2)) - l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + l2new_abab = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) l2new_abab += einsum(x1, (0, 1, 2, 3), x28, (4, 0, 2, 5), (3, 5, 4, 1)) l2new_abab += einsum(l1.aa, (0, 1), x28, (2, 1, 3, 4), (0, 4, 2, 3)) * -1.0 - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 3, 0), (3, 2)) - x30 = np.zeros((naux,), dtype=np.float64) + x30 = np.zeros((naux,), dtype=types[float]) x30 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x31 = np.zeros((naux,), dtype=np.float64) + x31 = np.zeros((naux,), dtype=types[float]) x31 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x32 = np.zeros((naux,), dtype=np.float64) + x32 = np.zeros((naux,), dtype=types[float]) x32 += einsum(x30, (0,), (0,)) del x30 x32 += einsum(x31, (0,), (0,)) del x31 - x33 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x33 += einsum(x32, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) - x34 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x34 += einsum(f.aa.ov, (0, 1), (0, 1)) x34 += einsum(x29, (0, 1), (0, 1)) * -1.0 x34 += einsum(x33, (0, 1), (0, 1)) l2new_abab += einsum(l1.bb, (0, 1), x34, (2, 3), (3, 0, 2, 1)) - x35 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x35 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x36 += einsum(t2.abab, (0, 1, 2, 3), x35, (4, 5, 2, 3), (0, 4, 1, 5)) - x37 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(x36, (0, 1, 2, 3), (0, 1, 3, 2)) x37 += einsum(x25, (0, 1, 2), x27, (3, 4, 2), (4, 3, 1, 0)) - x38 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(t2.abab, (0, 1, 2, 3), x20, (4, 2, 5, 3), (4, 0, 1, 5)) x38 += einsum(t2.abab, (0, 1, 2, 3), x23, (4, 5, 0, 2), (5, 4, 1, 3)) * -1.0 del x23 @@ -983,30 +984,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x37 l1new_aa += einsum(l2.abab, (0, 1, 2, 3), x38, (4, 2, 3, 1), (0, 4)) * -1.0 del x38 - x39 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) x40 += einsum(x21, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 x40 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x40 += einsum(x22, (0, 1, 2, 3), (0, 2, 1, 3)) - x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x41 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x43 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x43 += einsum(t2.aaaa, (0, 1, 2, 3), x42, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x44 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x44 += einsum(x2, (0, 1, 2), x2, (3, 4, 2), (0, 3, 1, 4)) - x45 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x45 += einsum(v.aaa.xoo, (0, 1, 2), x2, (3, 4, 0), (3, 1, 2, 4)) - x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x46 += einsum(x41, (0, 1, 2, 3), (3, 2, 1, 0)) x46 += einsum(x43, (0, 1, 2, 3), (2, 3, 1, 0)) x46 += einsum(x44, (0, 1, 2, 3), (2, 3, 1, 0)) x46 += einsum(x45, (0, 1, 2, 3), (1, 3, 0, 2)) x46 += einsum(x45, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x47 += einsum(v.aaa.xoo, (0, 1, 2), x4, (3, 4, 0), (1, 2, 3, 4)) * -1.0 x47 += einsum(t2.aaaa, (0, 1, 2, 3), x39, (4, 2, 3, 5), (4, 0, 1, 5)) * -1.0 x47 += einsum(x2, (0, 1, 2), x4, (3, 4, 2), (1, 3, 0, 4)) @@ -1020,104 +1021,104 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x46 l1new_aa += einsum(l2.aaaa, (0, 1, 2, 3), x47, (4, 2, 3, 1), (0, 4)) * 2.0 del x47 - x48 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (2, 4, 1, 5)) - x49 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x49 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) l2new_abab += einsum(x20, (0, 1, 2, 3), x49, (4, 0, 5, 2), (1, 3, 4, 5)) * -1.0 del x20 l2new_abab += einsum(x34, (0, 1), x49, (2, 0, 3, 4), (1, 4, 2, 3)) * -1.0 - x50 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x50 += einsum(t1.aa, (0, 1), x0, (2, 3, 4, 1), (3, 2, 4, 0)) - x51 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x51 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 0, 3, 4)) - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x52 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(t2.aaaa, (0, 1, 2, 3), x0, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x54 += einsum(t2.abab, (0, 1, 2, 3), x49, (4, 5, 1, 3), (4, 5, 0, 2)) - x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x55 += einsum(x53, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x53 x55 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x54 - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x56 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) x56 += einsum(x0, (0, 1, 2, 3), (1, 0, 2, 3)) x56 += einsum(t1.aa, (0, 1), x52, (2, 0, 3, 4), (2, 3, 4, 1)) x56 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x56 += einsum(x55, (0, 1, 2, 3), (0, 2, 1, 3)) del x55 - x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x57 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) x58 += einsum(x57, (0, 1, 2, 3), (0, 1, 3, 2)) * 0.25 - x59 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x59 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (2, 4, 3, 5)) - x60 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x60 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (1, 2, 3, 4)) x60 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) x60 += einsum(t2.abab, (0, 1, 2, 3), x0, (4, 0, 5, 2), (4, 5, 1, 3)) * -2.0 x60 += einsum(t2.bbbb, (0, 1, 2, 3), x49, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 x60 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 1, 5, 2), (4, 0, 5, 3)) * -1.0 x60 += einsum(t1.bb, (0, 1), x59, (2, 3, 0, 4), (2, 3, 4, 1)) * -1.0 - x61 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x61 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x62 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x62 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x63 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x63 += einsum(t2.aaaa, (0, 1, 2, 3), x0, (0, 1, 4, 3), (4, 2)) * -1.0 - x64 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x64 += einsum(t2.abab, (0, 1, 2, 3), x49, (0, 4, 1, 3), (4, 2)) - x65 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x65 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) l1new_aa += einsum(x33, (0, 1), x65, (2, 0), (1, 2)) * -1.0 - x66 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x66 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x67 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x67 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x68 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x68 += einsum(x65, (0, 1), (0, 1)) x68 += einsum(x66, (0, 1), (0, 1)) * 2.0 x68 += einsum(x67, (0, 1), (0, 1)) - x69 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x69 += einsum(t1.aa, (0, 1), x68, (0, 2), (2, 1)) - x70 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x70 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x70 += einsum(x61, (0, 1), (0, 1)) * -2.0 x70 += einsum(x62, (0, 1), (0, 1)) * -1.0 x70 += einsum(x63, (0, 1), (0, 1)) * 2.0 x70 += einsum(x64, (0, 1), (0, 1)) x70 += einsum(x69, (0, 1), (0, 1)) - x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x71 += einsum(x52, (0, 1, 2, 3), (1, 0, 3, 2)) x71 += einsum(x50, (0, 1, 2, 3), (2, 1, 0, 3)) - x72 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x72 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) x72 += einsum(x51, (0, 1, 2, 3), (0, 1, 2, 3)) l2new_abab += einsum(x35, (0, 1, 2, 3), x72, (4, 0, 5, 1), (2, 3, 4, 5)) - x73 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x73 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x73 += einsum(l1.aa, (0, 1), v.aaa.xvv, (2, 3, 0), (1, 3, 2)) - x74 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x74 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x74 += einsum(x68, (0, 1), v.aaa.xov, (2, 1, 3), (0, 3, 2)) - x75 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x75 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x75 += einsum(x73, (0, 1, 2), (0, 1, 2)) x75 += einsum(x74, (0, 1, 2), (0, 1, 2)) * -1.0 del x74 - x76 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x76 += einsum(x65, (0, 1), (0, 1)) * 0.5 del x65 x76 += einsum(x66, (0, 1), (0, 1)) x76 += einsum(x67, (0, 1), (0, 1)) * 0.5 l1new_aa += einsum(f.aa.ov, (0, 1), x76, (2, 0), (1, 2)) * -2.0 - x77 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x77 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x77 += einsum(x66, (0, 1), (0, 1)) del x66 x77 += einsum(x67, (0, 1), (0, 1)) * 0.5 del x67 - x78 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x78 += einsum(x4, (0, 1, 2), x0, (3, 0, 4, 1), (4, 3, 2)) * -1.0 x78 += einsum(v.abb.xvv, (0, 1, 2), x48, (3, 4, 1, 2), (4, 3, 0)) * 0.5 del x48 @@ -1142,33 +1143,33 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x77 l1new_aa += einsum(v.aaa.xov, (0, 1, 2), x78, (1, 3, 0), (2, 3)) * -2.0 del x78 - x79 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x80 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(x79, (0, 1), (0, 1)) del x79 x80 += einsum(x14, (0, 1), (1, 0)) * 2.0 del x14 x80 += einsum(x15, (0, 1), (0, 1)) del x15 - x81 = np.zeros((naux,), dtype=np.float64) + x81 = np.zeros((naux,), dtype=types[float]) x81 += einsum(x80, (0, 1), v.aaa.xvv, (2, 0, 1), (2,)) del x80 - x82 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x83 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x84 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x85 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x85 += einsum(x82, (0, 1), (0, 1)) del x82 x85 += einsum(x83, (0, 1), (1, 0)) x85 += einsum(x84, (0, 1), (1, 0)) * 2.0 - x86 = np.zeros((naux,), dtype=np.float64) + x86 = np.zeros((naux,), dtype=types[float]) x86 += einsum(x85, (0, 1), v.abb.xvv, (2, 1, 0), (2,)) del x85 - x87 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(l1.aa, (0, 1), (1, 0)) * -1.0 x87 += einsum(t1.aa, (0, 1), (0, 1)) * -1.0 x87 += einsum(x61, (0, 1), (0, 1)) * -2.0 @@ -1181,32 +1182,32 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x64 x87 += einsum(x69, (0, 1), (0, 1)) del x69 - x88 = np.zeros((naux,), dtype=np.float64) + x88 = np.zeros((naux,), dtype=types[float]) x88 += einsum(x87, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) del x87 - x89 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x89 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x90 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x90 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x91 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x91 += einsum(t2.abab, (0, 1, 2, 3), x1, (0, 1, 4, 2), (4, 3)) - x92 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x92 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x93 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x93 += einsum(t2.bbbb, (0, 1, 2, 3), x92, (0, 1, 4, 3), (4, 2)) * -1.0 - x94 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x94 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) - x95 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x95 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x96 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x96 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x97 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x97 += einsum(x94, (0, 1), (0, 1)) * 0.5 x97 += einsum(x95, (0, 1), (0, 1)) * 0.5 x97 += einsum(x96, (0, 1), (0, 1)) - x98 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x98 += einsum(t1.bb, (0, 1), x97, (0, 2), (2, 1)) * 2.0 - x99 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x99 += einsum(l1.bb, (0, 1), (1, 0)) * -1.0 x99 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x99 += einsum(x89, (0, 1), (0, 1)) * -1.0 @@ -1214,20 +1215,20 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x99 += einsum(x91, (0, 1), (0, 1)) x99 += einsum(x93, (0, 1), (0, 1)) * 2.0 x99 += einsum(x98, (0, 1), (0, 1)) - x100 = np.zeros((naux,), dtype=np.float64) + x100 = np.zeros((naux,), dtype=types[float]) x100 += einsum(x99, (0, 1), v.abb.xov, (2, 0, 1), (2,)) del x99 - x101 = np.zeros((naux,), dtype=np.float64) + x101 = np.zeros((naux,), dtype=types[float]) x101 += einsum(x76, (0, 1), v.aaa.xoo, (2, 1, 0), (2,)) * 2.0 del x76 - x102 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x102 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x102 += einsum(x94, (0, 1), (0, 1)) x102 += einsum(x95, (0, 1), (1, 0)) x102 += einsum(x96, (0, 1), (0, 1)) * 2.0 - x103 = np.zeros((naux,), dtype=np.float64) + x103 = np.zeros((naux,), dtype=types[float]) x103 += einsum(x102, (0, 1), v.abb.xoo, (2, 0, 1), (2,)) del x102 - x104 = np.zeros((naux,), dtype=np.float64) + x104 = np.zeros((naux,), dtype=types[float]) x104 += einsum(x81, (0,), (0,)) del x81 x104 += einsum(x86, (0,), (0,)) @@ -1243,29 +1244,29 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l1new_aa += einsum(x104, (0,), v.aaa.xov, (0, 1, 2), (2, 1)) l1new_bb += einsum(x104, (0,), v.abb.xov, (0, 1, 2), (2, 1)) del x104 - x105 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x105 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x105 += einsum(x32, (0,), v.aaa.xvv, (0, 1, 2), (1, 2)) - x106 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(f.aa.vv, (0, 1), (0, 1)) x106 += einsum(x105, (0, 1), (1, 0)) l1new_aa += einsum(l1.aa, (0, 1), x106, (0, 2), (2, 1)) del x106 - x107 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x107 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x107 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) - x108 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x108 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x108 += einsum(x107, (0, 1, 2), (0, 1, 2)) * -1.0 del x107 x108 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 x108 += einsum(x6, (0, 1, 2), (0, 1, 2)) - x109 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x109 += einsum(v.aaa.xov, (0, 1, 2), x108, (3, 2, 0), (3, 1)) del x108 - x110 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x110 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x110 += einsum(x32, (0,), v.aaa.xoo, (0, 1, 2), (1, 2)) - x111 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x111 += einsum(t1.aa, (0, 1), x34, (2, 1), (0, 2)) del x34 - x112 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x112 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x112 += einsum(f.aa.oo, (0, 1), (0, 1)) x112 += einsum(x109, (0, 1), (0, 1)) x112 += einsum(x110, (0, 1), (1, 0)) @@ -1274,14 +1275,14 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l1new_aa += einsum(l1.aa, (0, 1), x112, (1, 2), (0, 2)) * -1.0 l2new_abab += einsum(x112, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x112 - x113 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(x83, (0, 1), (0, 1)) del x83 x113 += einsum(x84, (0, 1), (0, 1)) * 2.0 del x84 - x114 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x114 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x114 += einsum(x113, (0, 1), v.abb.xov, (2, 3, 1), (3, 0, 2)) * 0.5 - x115 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x115 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x115 += einsum(v.aaa.xoo, (0, 1, 2), x49, (1, 2, 3, 4), (3, 4, 0)) * -0.5 x115 += einsum(v.abb.xoo, (0, 1, 2), x92, (1, 3, 2, 4), (3, 4, 0)) x115 += einsum(x2, (0, 1, 2), x49, (0, 1, 3, 4), (3, 4, 2)) * -0.5 @@ -1292,46 +1293,46 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x115 += einsum(l1.bb, (0, 1), x25, (1, 2, 3), (2, 0, 3)) * -0.5 l1new_bb += einsum(v.abb.xvv, (0, 1, 2), x115, (3, 2, 0), (1, 3)) * 2.0 del x115 - x116 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[1], nvir[0], nvir[0], nvir[1]), dtype=types[float]) x116 += einsum(v.abb.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) l2new_abab += einsum(x1, (0, 1, 2, 3), x116, (2, 4, 3, 5), (4, 5, 0, 1)) * -1.0 - x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x117 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x118 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x118 += einsum(v.abb.xov, (0, 1, 2), x3, (3, 4, 0), (3, 1, 4, 2)) - x119 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x119 += einsum(x117, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x119 += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) x119 += einsum(x118, (0, 1, 2, 3), (0, 1, 2, 3)) x119 += einsum(x118, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x120 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x120 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x120 += einsum(x4, (0, 1, 2), (0, 1, 2)) - x121 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x121 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x121 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x121 += einsum(x3, (0, 1, 2), (1, 0, 2)) - x122 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x122 += einsum(v.aaa.xov, (0, 1, 2), x121, (3, 4, 0), (1, 3, 4, 2)) l2new_abab += einsum(x122, (0, 1, 2, 3), x49, (4, 0, 2, 5), (3, 5, 4, 1)) l2new_abab += einsum(l1.bb, (0, 1), x122, (2, 3, 1, 4), (4, 0, 2, 3)) * -1.0 - x123 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x123 += einsum(v.abb.xov, (0, 1, 2), x18, (3, 4, 0), (4, 3, 1, 2)) - x124 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x124 += einsum(v.abb.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) - x125 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x125 += einsum(x32, (0,), v.abb.xov, (0, 1, 2), (1, 2)) l1new_bb += einsum(x125, (0, 1), x94, (2, 0), (1, 2)) * -1.0 - x126 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x126 += einsum(f.bb.ov, (0, 1), (0, 1)) x126 += einsum(x124, (0, 1), (0, 1)) * -1.0 x126 += einsum(x125, (0, 1), (0, 1)) l2new_abab += einsum(x126, (0, 1), x1, (2, 3, 0, 4), (4, 1, 2, 3)) * -1.0 l2new_abab += einsum(l1.aa, (0, 1), x126, (2, 3), (0, 3, 1, 2)) - x127 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x127 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x127 += einsum(x36, (0, 1, 2, 3), (1, 0, 2, 3)) x127 += einsum(x121, (0, 1, 2), x18, (3, 4, 2), (4, 3, 1, 0)) del x18 - x128 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x128 += einsum(t2.abab, (0, 1, 2, 3), x116, (4, 5, 2, 3), (0, 4, 1, 5)) del x116 x128 += einsum(t2.abab, (0, 1, 2, 3), x119, (4, 5, 1, 3), (0, 5, 4, 2)) * -1.0 @@ -1346,30 +1347,30 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x127 l1new_bb += einsum(l2.abab, (0, 1, 2, 3), x128, (2, 4, 3, 0), (1, 4)) * -1.0 del x128 - x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(v.abb.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x130 += einsum(x117, (0, 1, 2, 3), (1, 0, 2, 3)) x130 += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 x130 += einsum(x118, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x130 += einsum(x118, (0, 1, 2, 3), (0, 2, 1, 3)) - x131 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x131 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x131 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) - x132 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x132 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x133 += einsum(t2.bbbb, (0, 1, 2, 3), x132, (4, 5, 3, 2), (0, 1, 5, 4)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x134 += einsum(x3, (0, 1, 2), x3, (3, 4, 2), (0, 3, 1, 4)) - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x135 += einsum(v.abb.xoo, (0, 1, 2), x3, (3, 4, 0), (3, 1, 2, 4)) - x136 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x136 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x136 += einsum(x131, (0, 1, 2, 3), (3, 2, 1, 0)) x136 += einsum(x133, (0, 1, 2, 3), (2, 3, 1, 0)) x136 += einsum(x134, (0, 1, 2, 3), (2, 3, 1, 0)) x136 += einsum(x135, (0, 1, 2, 3), (1, 3, 0, 2)) x136 += einsum(x135, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x137 += einsum(v.abb.xoo, (0, 1, 2), x9, (3, 4, 0), (1, 2, 3, 4)) * -1.0 x137 += einsum(t2.bbbb, (0, 1, 2, 3), x129, (4, 2, 3, 5), (4, 0, 1, 5)) * -1.0 x137 += einsum(x3, (0, 1, 2), x9, (3, 4, 2), (1, 3, 0, 4)) @@ -1384,41 +1385,41 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x136 l1new_bb += einsum(l2.bbbb, (0, 1, 2, 3), x137, (4, 2, 3, 1), (0, 4)) * 2.0 del x137 - x138 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x138 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) - x139 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x139 += einsum(t1.bb, (0, 1), x92, (2, 3, 4, 1), (2, 3, 0, 4)) - x140 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x140 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) - x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x141 += einsum(t2.abab, (0, 1, 2, 3), x1, (0, 4, 5, 2), (4, 5, 1, 3)) - x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x142 += einsum(t2.bbbb, (0, 1, 2, 3), x92, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x143 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x143 += einsum(x141, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x141 x143 += einsum(x142, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x142 - x144 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x144 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) x144 += einsum(x92, (0, 1, 2, 3), (1, 0, 2, 3)) x144 += einsum(t1.bb, (0, 1), x140, (2, 0, 3, 4), (2, 3, 4, 1)) x144 += einsum(x143, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x144 += einsum(x143, (0, 1, 2, 3), (0, 2, 1, 3)) del x143 - x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x145 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x145 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(x145, (0, 1, 2, 3), (0, 1, 2, 3)) x146 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 5, 0)) * 4.0 - x147 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x147 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x147 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (2, 1, 3, 4)) x147 += einsum(x1, (0, 1, 2, 3), (0, 1, 2, 3)) x147 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 x147 += einsum(t2.abab, (0, 1, 2, 3), x49, (0, 4, 5, 3), (4, 5, 1, 2)) * -1.0 x147 += einsum(t1.aa, (0, 1), x59, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 x147 += einsum(t2.abab, (0, 1, 2, 3), x92, (4, 1, 5, 3), (0, 4, 5, 2)) * -2.0 - x148 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x148 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x148 += einsum(x89, (0, 1), (0, 1)) * -1.0 del x89 @@ -1430,33 +1431,33 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x93 x148 += einsum(x98, (0, 1), (0, 1)) del x98 - x149 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x149 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x149 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) del x59 x149 += einsum(x51, (0, 1, 2, 3), (1, 0, 2, 3)) - x150 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x150 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x150 += einsum(x140, (0, 1, 2, 3), (1, 0, 3, 2)) x150 += einsum(x139, (0, 1, 2, 3), (2, 1, 0, 3)) - x151 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x151 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x151 += einsum(l1.bb, (0, 1), v.abb.xvv, (2, 3, 0), (1, 3, 2)) - x152 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x152 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x152 += einsum(x97, (0, 1), v.abb.xov, (2, 1, 3), (0, 3, 2)) * 2.0 del x97 - x153 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x153 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x153 += einsum(x151, (0, 1, 2), (0, 1, 2)) x153 += einsum(x152, (0, 1, 2), (0, 1, 2)) * -1.0 - x154 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x154 += einsum(x94, (0, 1), (0, 1)) del x94 x154 += einsum(x95, (0, 1), (0, 1)) x154 += einsum(x96, (0, 1), (0, 1)) * 2.0 l1new_bb += einsum(f.bb.ov, (0, 1), x154, (2, 0), (1, 2)) * -1.0 - x155 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x155 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x155 += einsum(x95, (0, 1), (0, 1)) * 0.5 del x95 x155 += einsum(x96, (0, 1), (0, 1)) del x96 - x156 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x156 += einsum(v.aaa.xvv, (0, 1, 2), x138, (3, 4, 1, 2), (4, 3, 0)) del x138 x156 += einsum(x4, (0, 1, 2), x1, (0, 3, 4, 1), (4, 3, 2)) @@ -1483,67 +1484,67 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x155 l1new_bb += einsum(v.abb.xov, (0, 1, 2), x156, (1, 3, 0), (2, 3)) * -1.0 del x156 - x157 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x157 += einsum(x32, (0,), v.abb.xvv, (0, 1, 2), (1, 2)) - x158 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x158 += einsum(f.bb.vv, (0, 1), (0, 1)) x158 += einsum(x157, (0, 1), (1, 0)) l1new_bb += einsum(l1.bb, (0, 1), x158, (0, 2), (2, 1)) del x158 - x159 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x159 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x159 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) - x160 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x160 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x160 += einsum(x159, (0, 1, 2), (0, 1, 2)) * -0.5 del x159 x160 += einsum(x10, (0, 1, 2), (0, 1, 2)) * 0.5 x160 += einsum(x11, (0, 1, 2), (0, 1, 2)) - x161 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x161 += einsum(v.abb.xov, (0, 1, 2), x160, (3, 2, 0), (3, 1)) * 2.0 - x162 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x162 += einsum(x32, (0,), v.abb.xoo, (0, 1, 2), (1, 2)) - x163 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x163 += einsum(f.bb.oo, (0, 1), (0, 1)) x163 += einsum(x161, (0, 1), (0, 1)) x163 += einsum(x162, (0, 1), (1, 0)) x163 += einsum(t1.bb, (0, 1), x126, (2, 1), (0, 2)) l1new_bb += einsum(l1.bb, (0, 1), x163, (1, 2), (0, 2)) * -1.0 del x163 - x164 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x164 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x164 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) - l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + l2new_aaaa = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x164, (4, 5, 0, 1), (4, 5, 2, 3)) * -2.0 del x164 - x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x165 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x165 += einsum(f.aa.vv, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) - x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x166 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x166 += einsum(f.aa.ov, (0, 1), x0, (2, 3, 0, 4), (2, 3, 1, 4)) - x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x167 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x167 += einsum(x0, (0, 1, 2, 3), x39, (2, 4, 3, 5), (1, 0, 4, 5)) del x39 - x168 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x168 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x168 += einsum(x4, (0, 1, 2), (0, 1, 2)) del x4 x168 += einsum(x5, (0, 1, 2), (0, 1, 2)) * 2.0 del x5 x168 += einsum(x6, (0, 1, 2), (0, 1, 2)) del x6 - x169 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x169 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x169 += einsum(v.aaa.xov, (0, 1, 2), x168, (1, 3, 0), (3, 2)) del x168 - x170 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x170 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x170 += einsum(x169, (0, 1), (1, 0)) x170 += einsum(x105, (0, 1), (1, 0)) * -1.0 - x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x171 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x171 += einsum(x170, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x170 - x172 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x172 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x172 += einsum(x29, (0, 1), (0, 1)) * -1.0 del x29 x172 += einsum(x33, (0, 1), (0, 1)) del x33 - x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x173 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x173 += einsum(x172, (0, 1), x0, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 - x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x174 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x174 += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x165 x174 += einsum(x42, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1558,77 +1559,77 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x174, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_aaaa += einsum(x174, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x174 - x175 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x175 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x175 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (3, 1, 2, 4)) l2new_abab += einsum(x175, (0, 1, 2, 3), x92, (4, 1, 2, 5), (3, 5, 0, 4)) * -2.0 - x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x176 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x176 += einsum(x1, (0, 1, 2, 3), x175, (4, 1, 2, 5), (0, 4, 3, 5)) del x175 - x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x177 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x177 += einsum(x42, (0, 1, 2, 3), x57, (4, 0, 5, 3), (4, 1, 5, 2)) del x57 - x178 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x178 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x178 += einsum(v.aaa.xov, (0, 1, 2), x3, (3, 4, 0), (1, 3, 4, 2)) del x3 l2new_abab += einsum(x178, (0, 1, 2, 3), x92, (4, 1, 2, 5), (3, 5, 0, 4)) * -2.0 - x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x179 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x179 += einsum(x1, (0, 1, 2, 3), x178, (4, 1, 2, 5), (0, 4, 3, 5)) del x178 - x180 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x180 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x180 += einsum(x7, (0, 1, 2), l2.aaaa, (3, 1, 4, 0), (4, 3, 2)) - x181 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x181 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x181 += einsum(x12, (0, 1, 2), l2.abab, (3, 1, 4, 0), (4, 3, 2)) * 0.5 - x182 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x182 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x182 += einsum(x180, (0, 1, 2), (0, 1, 2)) del x180 x182 += einsum(x181, (0, 1, 2), (0, 1, 2)) del x181 - x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x183 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x183 += einsum(v.aaa.xov, (0, 1, 2), x182, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x182 - x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x184 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x184 += einsum(t2.aaaa, (0, 1, 2, 3), x42, (4, 1, 3, 5), (0, 4, 2, 5)) - x185 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x185 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x185 += einsum(v.aaa.xvv, (0, 1, 2), x27, (3, 4, 0), (3, 4, 1, 2)) - x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x186 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x186 += einsum(x184, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x184 x186 += einsum(x185, (0, 1, 2, 3), (1, 0, 3, 2)) del x185 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x186, (2, 4, 0, 5), (5, 1, 4, 3)) * -1.0 - x187 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x187 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x187 += einsum(l2.aaaa, (0, 1, 2, 3), x186, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x186 - x188 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x188 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x188 += einsum(v.aaa.xov, (0, 1, 2), x75, (3, 4, 0), (1, 3, 2, 4)) del x75 - x189 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x189 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x189 += einsum(x16, (0, 1), v.aaa.xov, (2, 3, 1), (3, 0, 2)) * 2.0 del x16 - x190 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x190 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x190 += einsum(v.aaa.xov, (0, 1, 2), x189, (3, 4, 0), (3, 1, 4, 2)) * -1.0 del x189 - x191 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x191 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x191 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x191 += einsum(x22, (0, 1, 2, 3), (0, 2, 1, 3)) - x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x192 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x192 += einsum(x0, (0, 1, 2, 3), x191, (0, 2, 4, 5), (4, 1, 5, 3)) * 2.0 del x191 - x193 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x193 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x193 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x193 += einsum(x21, (0, 1, 2, 3), (1, 2, 0, 3)) l2new_abab += einsum(x193, (0, 1, 2, 3), x49, (0, 2, 4, 5), (3, 5, 1, 4)) * -1.0 - x194 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x194 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x194 += einsum(x0, (0, 1, 2, 3), x193, (0, 4, 2, 5), (4, 1, 5, 3)) * 2.0 del x193 - x195 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x195 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x195 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x21 x195 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) - x196 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x196 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x196 += einsum(l1.aa, (0, 1), x195, (1, 2, 3, 4), (2, 3, 4, 0)) del x195 - x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x197 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x197 += einsum(f.aa.ov, (0, 1), l1.aa, (2, 3), (0, 3, 1, 2)) x197 += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x176 @@ -1656,33 +1657,33 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x197, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_aaaa += einsum(x197, (0, 1, 2, 3), (3, 2, 1, 0)) del x197 - x198 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x198 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x198 += einsum(f.aa.oo, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_aaaa += einsum(x198, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_aaaa += einsum(x198, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x198 - x199 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x199 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x199 += einsum(f.aa.ov, (0, 1), t1.aa, (2, 1), (0, 2)) - x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x200 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x200 += einsum(x199, (0, 1), l2.aaaa, (2, 3, 4, 1), (0, 4, 2, 3)) del x199 - x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x201 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x201 += einsum(l2.aaaa, (0, 1, 2, 3), x45, (2, 4, 3, 5), (4, 5, 0, 1)) del x45 - x202 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x202 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x202 += einsum(t1.aa, (0, 1), x172, (2, 1), (2, 0)) del x172 - x203 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x203 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x203 += einsum(x109, (0, 1), (0, 1)) del x109 x203 += einsum(x110, (0, 1), (1, 0)) del x110 x203 += einsum(x202, (0, 1), (1, 0)) del x202 - x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x204 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x204 += einsum(x203, (0, 1), l2.aaaa, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x203 - x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x205 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x205 += einsum(x200, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x200 x205 += einsum(x201, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1692,7 +1693,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_aaaa += einsum(x205, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_aaaa += einsum(x205, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x205 - x206 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x206 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x206 += einsum(x41, (0, 1, 2, 3), (3, 2, 1, 0)) del x41 x206 += einsum(x43, (0, 1, 2, 3), (0, 3, 1, 2)) @@ -1701,34 +1702,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x44 l2new_aaaa += einsum(l2.aaaa, (0, 1, 2, 3), x206, (2, 4, 3, 5), (0, 1, 4, 5)) * -2.0 del x206 - x207 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x207 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x207 += einsum(x52, (0, 1, 2, 3), (1, 0, 3, 2)) del x52 x207 += einsum(x50, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x50 l2new_aaaa += einsum(x207, (0, 1, 2, 3), x42, (2, 3, 4, 5), (5, 4, 1, 0)) * 2.0 del x207 - x208 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x208 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x208 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x208, (4, 0, 1, 5), (4, 5, 2, 3)) del x208 - x209 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x209 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x209 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (4, 2, 5, 0)) l2new_abab += einsum(x209, (0, 1, 2, 3), x42, (4, 0, 2, 5), (5, 3, 4, 1)) * -2.0 del x42, x209 - x210 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x210 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x210 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (2, 4, 0, 5)) l2new_abab += einsum(x132, (0, 1, 2, 3), x210, (4, 1, 5, 2), (5, 3, 4, 0)) * -2.0 del x210 - x211 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x211 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x211 += einsum(v.abb.xov, (0, 1, 2), x2, (3, 4, 0), (3, 4, 1, 2)) del x2 l2new_abab += einsum(x0, (0, 1, 2, 3), x211, (1, 2, 4, 5), (3, 5, 0, 4)) * -2.0 - x212 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x212 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x212 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) l2new_abab += einsum(x0, (0, 1, 2, 3), x212, (1, 2, 4, 5), (3, 5, 0, 4)) * -2.0 del x0 - x213 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x213 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x213 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) * 0.25 x213 += einsum(x73, (0, 1, 2), (0, 1, 2)) * 0.25 del x73 @@ -1742,13 +1743,13 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x68 l2new_abab += einsum(v.abb.xov, (0, 1, 2), x213, (3, 4, 0), (4, 2, 3, 1)) * 4.0 del x213 - x214 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x214 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x214 += einsum(x7, (0, 1, 2), l2.abab, (1, 3, 0, 4), (4, 3, 2)) del x7 - x215 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x215 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x215 += einsum(x12, (0, 1, 2), l2.bbbb, (3, 1, 4, 0), (4, 3, 2)) * 2.0 del x12 - x216 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x216 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x216 += einsum(x151, (0, 1, 2), (0, 1, 2)) del x151 x216 += einsum(x214, (0, 1, 2), (0, 1, 2)) @@ -1759,35 +1760,35 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x152 l2new_abab += einsum(v.aaa.xov, (0, 1, 2), x216, (3, 4, 0), (2, 4, 1, 3)) del x216 - x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x217 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x217 += einsum(t2.bbbb, (0, 1, 2, 3), x132, (4, 1, 3, 5), (0, 4, 2, 5)) - x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x218 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x218 += einsum(v.abb.xvv, (0, 1, 2), x121, (3, 4, 0), (3, 4, 1, 2)) - x219 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x219 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x219 += einsum(x217, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x217 x219 += einsum(x218, (0, 1, 2, 3), (1, 0, 3, 2)) del x218 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x219, (3, 4, 1, 5), (0, 5, 2, 4)) * -1.0 - x220 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x220 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x220 += einsum(t2.abab, (0, 1, 2, 3), x35, (0, 4, 5, 3), (1, 4, 2, 5)) * -1.0 x220 += einsum(v.aaa.xvv, (0, 1, 2), x121, (3, 4, 0), (4, 3, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x220, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x220 - x221 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x221 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x221 += einsum(t2.abab, (0, 1, 2, 3), x35, (4, 1, 2, 5), (0, 4, 3, 5)) * -1.0 del x35 x221 += einsum(v.abb.xvv, (0, 1, 2), x27, (3, 4, 0), (4, 3, 1, 2)) l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x221, (2, 4, 1, 5), (0, 5, 4, 3)) * -1.0 del x221 - x222 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x222 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x222 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) del x36 x222 += einsum(x121, (0, 1, 2), x27, (3, 4, 2), (4, 3, 1, 0)) del x27, x121 l2new_abab += einsum(l2.abab, (0, 1, 2, 3), x222, (2, 4, 3, 5), (0, 1, 4, 5)) del x222 - x223 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x223 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x223 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x223 += einsum(x169, (0, 1), (0, 1)) del x169 @@ -1795,34 +1796,34 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x105 l2new_abab += einsum(x223, (0, 1), l2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 del x223 - x224 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x224 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x224 += einsum(x9, (0, 1, 2), (0, 1, 2)) * 0.5 x224 += einsum(x10, (0, 1, 2), (0, 1, 2)) * 0.5 x224 += einsum(x11, (0, 1, 2), (0, 1, 2)) - x225 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x225 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x225 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x225 += einsum(v.abb.xov, (0, 1, 2), x224, (1, 3, 0), (3, 2)) * 2.0 del x224 x225 += einsum(x157, (0, 1), (1, 0)) * -1.0 l2new_abab += einsum(x225, (0, 1), l2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x225 - x226 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x226 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x226 += einsum(x118, (0, 1, 2, 3), (0, 1, 2, 3)) x226 += einsum(x118, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 l2new_abab += einsum(x1, (0, 1, 2, 3), x226, (1, 4, 2, 5), (3, 5, 0, 4)) * -1.0 del x226 - x227 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x227 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x227 += einsum(x117, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x227 += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) l2new_abab += einsum(x1, (0, 1, 2, 3), x227, (1, 4, 2, 5), (3, 5, 0, 4)) * -1.0 del x1, x227 - x228 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x228 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x228 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) x228 += einsum(x22, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x22 l2new_abab += einsum(x228, (0, 1, 2, 3), x49, (0, 2, 4, 5), (3, 5, 1, 4)) * -1.0 del x228 - x229 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x229 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x229 += einsum(f.bb.oo, (0, 1), (0, 1)) * 0.5 x229 += einsum(v.abb.xov, (0, 1, 2), x160, (3, 2, 0), (3, 1)) del x160 @@ -1832,44 +1833,44 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x126 l2new_abab += einsum(x229, (0, 1), l2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x229 - x230 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x230 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x230 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) - l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + l2new_bbbb = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x230, (4, 5, 0, 1), (4, 5, 2, 3)) * -2.0 del x230 - x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x231 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x231 += einsum(f.bb.vv, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) - x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x232 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x232 += einsum(f.bb.ov, (0, 1), x92, (2, 3, 0, 4), (2, 3, 1, 4)) - x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x233 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x233 += einsum(x129, (0, 1, 2, 3), x92, (4, 5, 0, 2), (5, 4, 1, 3)) del x129 - x234 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x234 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x234 += einsum(x9, (0, 1, 2), (0, 1, 2)) del x9 x234 += einsum(x10, (0, 1, 2), (0, 1, 2)) del x10 x234 += einsum(x11, (0, 1, 2), (0, 1, 2)) * 2.0 del x11 - x235 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x235 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x235 += einsum(v.abb.xov, (0, 1, 2), x234, (1, 3, 0), (3, 2)) del x234 - x236 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x236 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x236 += einsum(x235, (0, 1), (1, 0)) del x235 x236 += einsum(x157, (0, 1), (1, 0)) * -1.0 del x157 - x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x237 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x237 += einsum(x236, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) * -2.0 del x236 - x238 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x238 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x238 += einsum(x124, (0, 1), (0, 1)) * -1.0 del x124 x238 += einsum(x125, (0, 1), (0, 1)) del x125 - x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x239 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x239 += einsum(x238, (0, 1), x92, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 - x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x240 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x240 += einsum(x231, (0, 1, 2, 3), (1, 0, 2, 3)) * 2.0 del x231 x240 += einsum(x132, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -1884,53 +1885,53 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x240, (0, 1, 2, 3), (2, 3, 0, 1)) l2new_bbbb += einsum(x240, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 del x240 - x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x241 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x241 += einsum(x212, (0, 1, 2, 3), x49, (0, 1, 4, 5), (4, 2, 5, 3)) del x212 - x242 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x242 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x242 += einsum(x211, (0, 1, 2, 3), x49, (0, 1, 4, 5), (4, 2, 5, 3)) del x49, x211 - x243 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x243 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x243 += einsum(x132, (0, 1, 2, 3), x145, (4, 0, 5, 3), (4, 1, 5, 2)) del x145 - x244 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x244 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x244 += einsum(x214, (0, 1, 2), (0, 1, 2)) del x214 x244 += einsum(x215, (0, 1, 2), (0, 1, 2)) del x215 - x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x245 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x245 += einsum(v.abb.xov, (0, 1, 2), x244, (3, 4, 0), (3, 1, 4, 2)) del x244 - x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x246 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x246 += einsum(l2.bbbb, (0, 1, 2, 3), x219, (3, 4, 1, 5), (4, 2, 5, 0)) * 2.0 del x219 - x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x247 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x247 += einsum(v.abb.xov, (0, 1, 2), x153, (3, 4, 0), (3, 1, 4, 2)) del x153 - x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x248 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x248 += einsum(v.abb.xov, (0, 1, 2), x114, (3, 4, 0), (3, 1, 4, 2)) * -2.0 del x114 - x249 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x249 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x249 += einsum(x118, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x249 += einsum(x118, (0, 1, 2, 3), (0, 2, 1, 3)) - x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x250 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x250 += einsum(x249, (0, 1, 2, 3), x92, (0, 4, 1, 5), (2, 4, 3, 5)) * 2.0 del x249 - x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x251 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x251 += einsum(x117, (0, 1, 2, 3), (1, 0, 2, 3)) x251 += einsum(x117, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x252 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x252 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x252 += einsum(x251, (0, 1, 2, 3), x92, (0, 4, 1, 5), (2, 4, 3, 5)) * 2.0 del x92, x251 - x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x253 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x253 += einsum(x117, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 del x117 x253 += einsum(x118, (0, 1, 2, 3), (0, 1, 2, 3)) del x118 - x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x254 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x254 += einsum(l1.bb, (0, 1), x253, (1, 2, 3, 4), (2, 3, 4, 0)) del x253 - x255 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x255 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x255 += einsum(f.bb.ov, (0, 1), l1.bb, (2, 3), (0, 3, 1, 2)) x255 += einsum(x241, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x241 @@ -1958,28 +1959,28 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x255, (0, 1, 2, 3), (2, 3, 1, 0)) * -1.0 l2new_bbbb += einsum(x255, (0, 1, 2, 3), (3, 2, 1, 0)) del x255 - x256 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x256 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x256 += einsum(f.bb.ov, (0, 1), t1.bb, (2, 1), (0, 2)) - x257 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x257 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x257 += einsum(x256, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) del x256 - x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x258 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x258 += einsum(l2.bbbb, (0, 1, 2, 3), x135, (2, 4, 3, 5), (4, 5, 0, 1)) del x135 - x259 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x259 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x259 += einsum(t1.bb, (0, 1), x238, (2, 1), (2, 0)) del x238 - x260 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x260 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x260 += einsum(x161, (0, 1), (0, 1)) del x161 x260 += einsum(x162, (0, 1), (1, 0)) del x162 x260 += einsum(x259, (0, 1), (1, 0)) del x259 - x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x261 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x261 += einsum(x260, (0, 1), l2.bbbb, (2, 3, 4, 0), (1, 4, 2, 3)) * -2.0 del x260 - x262 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x262 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x262 += einsum(x257, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x257 x262 += einsum(x258, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 @@ -1989,12 +1990,12 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non l2new_bbbb += einsum(x262, (0, 1, 2, 3), (3, 2, 0, 1)) l2new_bbbb += einsum(x262, (0, 1, 2, 3), (3, 2, 1, 0)) * -1.0 del x262 - x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x263 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x263 += einsum(f.bb.oo, (0, 1), l2.bbbb, (2, 3, 4, 1), (0, 4, 2, 3)) l2new_bbbb += einsum(x263, (0, 1, 2, 3), (3, 2, 0, 1)) * -2.0 l2new_bbbb += einsum(x263, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 del x263 - x264 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x264 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x264 += einsum(x131, (0, 1, 2, 3), (3, 2, 1, 0)) del x131 x264 += einsum(x133, (0, 1, 2, 3), (0, 3, 1, 2)) @@ -2003,7 +2004,7 @@ def update_lams(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x134 l2new_bbbb += einsum(l2.bbbb, (0, 1, 2, 3), x264, (2, 4, 3, 5), (0, 1, 4, 5)) * -2.0 del x264 - x265 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x265 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x265 += einsum(x140, (0, 1, 2, 3), (1, 0, 3, 2)) del x140 x265 += einsum(x139, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -2027,57 +2028,57 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM1 - rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_oo = np.zeros((nocc[0], nocc[0]), dtype=types[float]) rdm1_f_aa_oo += einsum(delta.aa.oo, (0, 1), (0, 1)) - rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_oo = np.zeros((nocc[1], nocc[1]), dtype=types[float]) rdm1_f_bb_oo += einsum(delta.bb.oo, (0, 1), (0, 1)) - rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_ov = np.zeros((nocc[0], nvir[0]), dtype=types[float]) rdm1_f_aa_ov += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), (0, 1)) rdm1_f_aa_ov += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_ov = np.zeros((nocc[1], nvir[1]), dtype=types[float]) rdm1_f_bb_ov += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) * 2.0 rdm1_f_bb_ov += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) rdm1_f_bb_ov += einsum(t1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=np.float64) + rdm1_f_aa_vo = np.zeros((nvir[0], nocc[0]), dtype=types[float]) rdm1_f_aa_vo += einsum(l1.aa, (0, 1), (0, 1)) - rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=np.float64) + rdm1_f_bb_vo = np.zeros((nvir[1], nocc[1]), dtype=types[float]) rdm1_f_bb_vo += einsum(l1.bb, (0, 1), (0, 1)) - rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + rdm1_f_aa_vv = np.zeros((nvir[0], nvir[0]), dtype=types[float]) rdm1_f_aa_vv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) * 2.0 rdm1_f_aa_vv += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) rdm1_f_aa_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + rdm1_f_bb_vv = np.zeros((nvir[1], nvir[1]), dtype=types[float]) rdm1_f_bb_vv += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) rdm1_f_bb_vv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) rdm1_f_bb_vv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x0, (0, 1), (1, 0)) * -1.0 - x1 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) rdm1_f_aa_oo += einsum(x1, (0, 1), (1, 0)) * -2.0 - x2 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm1_f_aa_oo += einsum(x2, (0, 1), (1, 0)) * -1.0 - x3 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x3 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm1_f_bb_oo += einsum(x3, (0, 1), (1, 0)) * -1.0 - x4 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x4 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) rdm1_f_bb_oo += einsum(x4, (0, 1), (1, 0)) * -1.0 - x5 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x5 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) rdm1_f_bb_oo += einsum(x5, (0, 1), (1, 0)) * -2.0 - x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_aa_ov += einsum(t2.aaaa, (0, 1, 2, 3), x6, (0, 1, 4, 3), (4, 2)) * 2.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) rdm1_f_aa_ov += einsum(t2.abab, (0, 1, 2, 3), x7, (0, 4, 1, 3), (4, 2)) * -1.0 del x7 - x8 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x8 += einsum(x2, (0, 1), (0, 1)) del x2 x8 += einsum(x1, (0, 1), (0, 1)) * 2.0 @@ -2086,15 +2087,15 @@ def make_rdm1_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x0 rdm1_f_aa_ov += einsum(t1.aa, (0, 1), x8, (0, 2), (2, 1)) * -1.0 del x8 - x9 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.abab, (0, 1, 2, 3), x9, (0, 1, 4, 2), (4, 3)) * -1.0 del x9 - x10 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x10 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm1_f_bb_ov += einsum(t2.bbbb, (0, 1, 2, 3), x10, (1, 0, 4, 3), (4, 2)) * -2.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(x3, (0, 1), (0, 1)) del x3 x11 += einsum(x4, (0, 1), (0, 1)) @@ -2120,181 +2121,181 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non delta.bb = Namespace(oo=np.eye(nocc[1]), vv=np.eye(nvir[1])) # RDM2 - rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oooo = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), delta.aa.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oooo = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), delta.bb.oo, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovoo = np.zeros((nocc[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 1, 3)) rdm2_f_aaaa_ovoo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovoo = np.zeros((nocc[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovoo += einsum(delta.aa.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovoo = np.zeros((nocc[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 1, 3)) rdm2_f_bbbb_ovoo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vooo = np.zeros((nvir[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_aaaa_vooo += einsum(delta.aa.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vooo = np.zeros((nvir[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vooo += einsum(delta.bb.oo, (0, 1), l1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vooo = np.zeros((nvir[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_bbbb_vooo += einsum(delta.bb.oo, (0, 1), l1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_oovv = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_oovv = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_oovv = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovov = np.zeros((nocc[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovov = np.zeros((nocc[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 1, 3)) * -1.0 - rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_ovvo = np.zeros((nocc[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_ovvo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_ovvo = np.zeros((nocc[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_ovvo += einsum(l1.bb, (0, 1), t1.aa, (2, 3), (2, 0, 3, 1)) - rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_ovvo = np.zeros((nocc[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_ovvo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (2, 0, 3, 1)) - rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_voov = np.zeros((nvir[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_voov += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 1, 3)) - rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_voov = np.zeros((nvir[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_voov += einsum(l1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_voov = np.zeros((nvir[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_voov += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) - rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vovo = np.zeros((nvir[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vovo += einsum(l1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vovo = np.zeros((nvir[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vovo += einsum(l1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -1.0 - rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvoo = np.zeros((nvir[0], nvir[0], nocc[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvoo += einsum(l2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvoo = np.zeros((nvir[0], nvir[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvoo += einsum(l2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) - rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvoo = np.zeros((nvir[1], nvir[1], nocc[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvoo += einsum(l2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 - rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovvv = np.zeros((nocc[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovvv += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vovv = np.zeros((nvir[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vovv += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 3, 4), (0, 2, 3, 4)) - rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vvvo = np.zeros((nvir[0], nvir[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vvvo += einsum(t1.aa, (0, 1), l2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) - rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvvv = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvvv += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvvv = np.zeros((nvir[0], nvir[1], nvir[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvvv += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 5), (0, 1, 4, 5)) - rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvvv = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvvv += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 5), (0, 1, 4, 5)) * 2.0 - x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x0 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_aaaa_oooo += einsum(x0, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_aaaa_ovoo += einsum(x1, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_aaaa_vooo += einsum(x1, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t1.aa, (0, 1), x1, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_aaaa_oooo += einsum(x2, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x3 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x3 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 0, 1), (2, 4)) - x4 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x4 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 1), (2, 4)) - x5 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x5 += einsum(x3, (0, 1), (0, 1)) x5 += einsum(x4, (0, 1), (0, 1)) * 0.5 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 1, 2)) * -2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (0, 3, 2, 1)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 1, 2)) * 2.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x5, (2, 3), (3, 0, 2, 1)) * -2.0 - x6 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x6 += einsum(l1.aa, (0, 1), t1.aa, (2, 0), (1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 1, 2)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (0, 3, 2, 1)) rdm2_f_aaaa_oooo += einsum(delta.aa.oo, (0, 1), x6, (2, 3), (3, 0, 2, 1)) * -1.0 - x7 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x7 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 0, 1), (2, 4, 3, 5)) - rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oooo = np.zeros((nocc[0], nocc[1], nocc[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oooo += einsum(x7, (0, 1, 2, 3), (1, 3, 0, 2)) - x8 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x8 += einsum(t1.bb, (0, 1), l2.abab, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_abab_vooo += einsum(x8, (0, 1, 2, 3), (3, 2, 0, 1)) * -1.0 - rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_vovo = np.zeros((nvir[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_vovo += einsum(t1.aa, (0, 1), x8, (0, 2, 3, 4), (4, 3, 1, 2)) * -1.0 rdm2_f_abab_vovv += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 1, 4, 5), (5, 4, 2, 3)) * -1.0 - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x9 += einsum(t1.aa, (0, 1), x8, (2, 3, 4, 1), (2, 0, 3, 4)) rdm2_f_abab_oooo += einsum(x9, (0, 1, 2, 3), (1, 3, 0, 2)) - x10 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x10 += einsum(delta.aa.oo, (0, 1), (0, 1)) * -1.0 x10 += einsum(x6, (0, 1), (0, 1)) x10 += einsum(x3, (0, 1), (0, 1)) * 2.0 x10 += einsum(x4, (0, 1), (0, 1)) rdm2_f_abab_oooo += einsum(delta.bb.oo, (0, 1), x10, (2, 3), (3, 0, 2, 1)) * -1.0 del x10 - x11 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x11 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x11 += einsum(l1.bb, (0, 1), t1.bb, (2, 0), (1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x11, (2, 3), (3, 0, 2, 1)) * -1.0 - x12 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x12 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 1), (3, 4)) - x13 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x13 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 0, 1), (2, 4)) - x14 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x14 += einsum(x11, (0, 1), (0, 1)) x14 += einsum(x12, (0, 1), (0, 1)) x14 += einsum(x13, (0, 1), (0, 1)) * 2.0 rdm2_f_abab_oooo += einsum(delta.aa.oo, (0, 1), x14, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_abab_oovv += einsum(x14, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x14 - x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x15 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 0, 1), (2, 3, 4, 5)) rdm2_f_bbbb_oooo += einsum(x15, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x16 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 1, 3, 4), (3, 4, 0, 2)) rdm2_f_bbbb_ovoo += einsum(x16, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 rdm2_f_bbbb_vooo += einsum(x16, (0, 1, 2, 3), (3, 2, 1, 0)) * 2.0 - x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t1.bb, (0, 1), x16, (2, 3, 4, 1), (2, 3, 0, 4)) rdm2_f_bbbb_oooo += einsum(x17, (0, 1, 2, 3), (2, 3, 1, 0)) * -2.0 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(x12, (0, 1), (0, 1)) x18 += einsum(x13, (0, 1), (0, 1)) * 2.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 1, 2)) * -1.0 rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (0, 3, 2, 1)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 1, 2)) rdm2_f_bbbb_oooo += einsum(delta.bb.oo, (0, 1), x18, (2, 3), (3, 0, 2, 1)) * -1.0 - x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x19 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ooov = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ooov += einsum(x19, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_oovo = np.zeros((nocc[0], nocc[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_oovo += einsum(x19, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x20 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x21 += einsum(t1.aa, (0, 1), l2.abab, (1, 2, 3, 4), (3, 0, 4, 2)) rdm2_f_abab_ovoo += einsum(x21, (0, 1, 2, 3), (1, 3, 0, 2)) * -1.0 - rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ovov = np.zeros((nocc[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ovov += einsum(t1.bb, (0, 1), x21, (2, 3, 0, 4), (3, 4, 2, 1)) * -1.0 rdm2_f_abab_ovvv += einsum(t2.abab, (0, 1, 2, 3), x21, (0, 4, 1, 5), (4, 5, 2, 3)) * -1.0 - x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.abab, (0, 1, 2, 3), x21, (4, 5, 1, 3), (4, 5, 0, 2)) - x23 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x23 += einsum(x6, (0, 1), (0, 1)) x23 += einsum(x3, (0, 1), (0, 1)) * 2.0 del x3 x23 += einsum(x4, (0, 1), (0, 1)) del x4 - rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_ooov = np.zeros((nocc[0], nocc[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x23, (2, 3), (3, 0, 2, 1)) * -1.0 rdm2_f_abab_oovv += einsum(x23, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -1.0 - x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x24 += einsum(delta.aa.oo, (0, 1), t1.aa, (2, 3), (0, 1, 2, 3)) x24 += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 x24 += einsum(x22, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 @@ -2304,17 +2305,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovo += einsum(x24, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_aaaa_oovo += einsum(x24, (0, 1, 2, 3), (2, 0, 3, 1)) del x24 - x25 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x25 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 0), (2, 3)) - x26 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x26 += einsum(l1.bb, (0, 1), t2.abab, (2, 1, 3, 0), (2, 3)) - x27 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x27 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 3), (4, 2)) * -1.0 - x28 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(t2.abab, (0, 1, 2, 3), x21, (0, 4, 1, 3), (4, 2)) - x29 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x29 += einsum(t1.aa, (0, 1), x23, (0, 2), (2, 1)) * 0.5 - x30 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x30 += einsum(x25, (0, 1), (0, 1)) * -1.0 x30 += einsum(x26, (0, 1), (0, 1)) * -0.5 x30 += einsum(x27, (0, 1), (0, 1)) @@ -2324,53 +2325,53 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_ooov += einsum(delta.aa.oo, (0, 1), x30, (2, 3), (2, 0, 1, 3)) * 2.0 rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x30, (2, 3), (0, 2, 3, 1)) * 2.0 rdm2_f_aaaa_oovo += einsum(delta.aa.oo, (0, 1), x30, (2, 3), (2, 0, 3, 1)) * -2.0 - x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x31 += einsum(x0, (0, 1, 2, 3), (1, 0, 3, 2)) del x0 x31 += einsum(x2, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x2 rdm2_f_aaaa_oovv += einsum(t2.aaaa, (0, 1, 2, 3), x31, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x32 += einsum(t1.aa, (0, 1), x31, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_aaaa_ooov += einsum(x32, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_oovo += einsum(x32, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x32 - x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x33 += einsum(t2.abab, (0, 1, 2, 3), x1, (4, 0, 5, 2), (4, 5, 1, 3)) * -1.0 rdm2_f_abab_ooov += einsum(x33, (0, 1, 2, 3), (1, 2, 0, 3)) * -2.0 - x34 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x34 += einsum(l1.aa, (0, 1), t2.abab, (2, 3, 0, 4), (1, 2, 3, 4)) rdm2_f_abab_ooov += einsum(x34, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x35 += einsum(t2.abab, (0, 1, 2, 3), x8, (4, 1, 5, 2), (4, 0, 5, 3)) rdm2_f_abab_ooov += einsum(x35, (0, 1, 2, 3), (1, 2, 0, 3)) - x36 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x36 += einsum(t2.bbbb, (0, 1, 2, 3), x21, (4, 5, 1, 3), (4, 5, 0, 2)) rdm2_f_abab_ooov += einsum(x36, (0, 1, 2, 3), (1, 2, 0, 3)) * -2.0 - x37 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(x7, (0, 1, 2, 3), (0, 1, 2, 3)) del x7 x37 += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) del x9 rdm2_f_abab_ooov += einsum(t1.bb, (0, 1), x37, (2, 3, 0, 4), (3, 4, 2, 1)) - rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=np.float64) + rdm2_f_abab_oovo = np.zeros((nocc[0], nocc[1], nvir[0], nocc[1]), dtype=types[float]) rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x37, (0, 2, 3, 4), (2, 4, 1, 3)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x37, (0, 4, 1, 5), (4, 5, 2, 3)) - x38 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x38 += einsum(l1.aa, (0, 1), t2.abab, (1, 2, 0, 3), (2, 3)) - x39 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x39 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 0), (2, 3)) - x40 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x40 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 1, 4, 2), (4, 3)) - x41 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x41 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 3), (4, 2)) * -1.0 - x42 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x42 += einsum(x11, (0, 1), (0, 1)) * 0.5 x42 += einsum(x12, (0, 1), (0, 1)) * 0.5 x42 += einsum(x13, (0, 1), (0, 1)) - x43 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x43 += einsum(t1.bb, (0, 1), x42, (0, 2), (2, 1)) * 2.0 - x44 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x44 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x44 += einsum(t1.bb, (0, 1), (0, 1)) * -1.0 x44 += einsum(x38, (0, 1), (0, 1)) * -1.0 x44 += einsum(x39, (0, 1), (0, 1)) * -2.0 @@ -2379,17 +2380,17 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x44 += einsum(x43, (0, 1), (0, 1)) rdm2_f_abab_ooov += einsum(delta.aa.oo, (0, 1), x44, (2, 3), (0, 2, 1, 3)) * -1.0 del x44 - x45 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x45 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 3, 4, 0), (1, 2, 3, 4)) - rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ooov = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ooov += einsum(x45, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_oovo = np.zeros((nocc[1], nocc[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_oovo += einsum(x45, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x46 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x46 += einsum(t2.abab, (0, 1, 2, 3), x8, (0, 4, 5, 2), (4, 5, 1, 3)) - x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x47 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (4, 1, 5, 3), (4, 5, 0, 2)) * -1.0 - x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x48 += einsum(delta.bb.oo, (0, 1), t1.bb, (2, 3), (0, 1, 2, 3)) x48 += einsum(x46, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x48 += einsum(x47, (0, 1, 2, 3), (1, 0, 2, 3)) * -4.0 @@ -2399,7 +2400,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovo += einsum(x48, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_oovo += einsum(x48, (0, 1, 2, 3), (2, 0, 3, 1)) del x48 - x49 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x49 += einsum(x38, (0, 1), (0, 1)) * -1.0 x49 += einsum(x39, (0, 1), (0, 1)) * -2.0 x49 += einsum(x40, (0, 1), (0, 1)) @@ -2410,30 +2411,30 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_ooov += einsum(delta.bb.oo, (0, 1), x49, (2, 3), (2, 0, 1, 3)) rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x49, (2, 3), (0, 2, 3, 1)) rdm2_f_bbbb_oovo += einsum(delta.bb.oo, (0, 1), x49, (2, 3), (2, 0, 3, 1)) * -1.0 - x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x50 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x50 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) del x15 x50 += einsum(x17, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x17 rdm2_f_bbbb_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x50, (0, 1, 4, 5), (5, 4, 2, 3)) * -2.0 - x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x51 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 rdm2_f_bbbb_ooov += einsum(x51, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_oovo += einsum(x51, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 del x51 - x52 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x52 += einsum(l1.bb, (0, 1), t2.abab, (2, 3, 4, 0), (2, 1, 3, 4)) rdm2_f_abab_oovo += einsum(x52, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 - x53 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x53 += einsum(t2.abab, (0, 1, 2, 3), x16, (4, 1, 5, 3), (0, 4, 5, 2)) * -1.0 rdm2_f_abab_oovo += einsum(x53, (0, 1, 2, 3), (0, 2, 3, 1)) * -2.0 - x54 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x54 += einsum(t2.abab, (0, 1, 2, 3), x21, (0, 4, 5, 3), (4, 5, 1, 2)) rdm2_f_abab_oovo += einsum(x54, (0, 1, 2, 3), (0, 2, 3, 1)) - x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x55 += einsum(t2.aaaa, (0, 1, 2, 3), x8, (1, 4, 5, 3), (0, 4, 5, 2)) rdm2_f_abab_oovo += einsum(x55, (0, 1, 2, 3), (0, 2, 3, 1)) * -2.0 - x56 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x56 += einsum(delta.bb.oo, (0, 1), (0, 1)) * -1.0 x56 += einsum(x11, (0, 1), (0, 1)) x56 += einsum(x12, (0, 1), (0, 1)) @@ -2442,7 +2443,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x13 rdm2_f_abab_oovo += einsum(t1.aa, (0, 1), x56, (2, 3), (0, 3, 1, 2)) * -1.0 del x56 - x57 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(x25, (0, 1), (0, 1)) * -2.0 x57 += einsum(x26, (0, 1), (0, 1)) * -1.0 x57 += einsum(x27, (0, 1), (0, 1)) * 2.0 @@ -2451,23 +2452,23 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x23 rdm2_f_abab_oovo += einsum(delta.bb.oo, (0, 1), x57, (2, 3), (2, 0, 3, 1)) * -1.0 del x57 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x58, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_aaaa_ovvo += einsum(x58, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_aaaa_voov += einsum(x58, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_aaaa_vovo += einsum(x58, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t2.aaaa, (0, 1, 2, 3), x58, (1, 4, 3, 5), (0, 4, 2, 5)) - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x60 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) del x20 x60 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x22 - x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x61 += einsum(t1.aa, (0, 1), x60, (0, 2, 3, 4), (2, 3, 1, 4)) * 4.0 del x60 - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(x59, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x59 x62 += einsum(x61, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2479,13 +2480,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x62, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_aaaa_oovv += einsum(x62, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x62 - x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x63 += einsum(x6, (0, 1), t2.aaaa, (2, 0, 3, 4), (1, 2, 3, 4)) del x6 - x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x64 += einsum(x5, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 del x5 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(x63, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x63 x65 += einsum(x64, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2493,34 +2494,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x65, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_aaaa_oovv += einsum(x65, (0, 1, 2, 3), (1, 0, 2, 3)) del x65 - x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x66 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x66 += einsum(t1.aa, (0, 1), x19, (0, 2, 3, 4), (2, 3, 1, 4)) del x19 - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_aaaa_ovov += einsum(x67, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_aaaa_ovvo += einsum(x67, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_aaaa_voov += einsum(x67, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_aaaa_vovo += einsum(x67, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x68 += einsum(t2.aaaa, (0, 1, 2, 3), x67, (1, 4, 3, 5), (0, 4, 2, 5)) - x69 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x69 += einsum(l2.bbbb, (0, 1, 2, 3), t2.abab, (4, 3, 5, 1), (4, 2, 5, 0)) rdm2_f_abab_ovvo += einsum(x69, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(t2.abab, (0, 1, 2, 3), x69, (4, 1, 5, 3), (4, 0, 5, 2)) - x71 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(l2.aaaa, (0, 1, 2, 3), t2.aaaa, (2, 3, 4, 1), (0, 4)) - x72 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 4, 1), (0, 4)) - x73 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(x71, (0, 1), (0, 1)) x73 += einsum(x72, (0, 1), (0, 1)) * 0.5 rdm2_f_abab_oovv += einsum(x73, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 - x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(x73, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -4.0 del x73 - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x66 x75 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2532,32 +2533,32 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_aaaa_oovv += einsum(x75, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x75 - x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x76 += einsum(t1.aa, (0, 1), x31, (0, 2, 3, 4), (2, 4, 3, 1)) del x31 rdm2_f_aaaa_oovv += einsum(t1.aa, (0, 1), x76, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x76 - x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x77 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x77 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 5, 1), (3, 4, 0, 5)) rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x77, (1, 4, 2, 5), (0, 4, 5, 3)) rdm2_f_abab_vovo += einsum(x77, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x77, (0, 2, 3, 4), (3, 2, 4, 1)) * -1.0 del x77 - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum(x67, (0, 1, 2, 3), (0, 1, 2, 3)) del x67 x78 += einsum(x58, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.25 del x58 rdm2_f_abab_oovv += einsum(t2.abab, (0, 1, 2, 3), x78, (0, 4, 2, 5), (4, 1, 5, 3)) * 4.0 - x79 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x79 += einsum(l2.abab, (0, 1, 2, 3), t2.aaaa, (4, 2, 5, 0), (4, 3, 5, 1)) rdm2_f_abab_ovvo += einsum(x79, (0, 1, 2, 3), (0, 3, 2, 1)) * 2.0 - x80 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x80 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) x80 += einsum(x69, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_abab_oovv += einsum(t2.bbbb, (0, 1, 2, 3), x80, (4, 1, 5, 3), (4, 0, 5, 2)) * 4.0 del x80 - x81 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x81 += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) * 0.5 del x34 x81 += einsum(x33, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2570,16 +2571,16 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x37 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x81, (0, 2, 3, 4), (2, 3, 1, 4)) * -2.0 del x81 - x82 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 3, 0, 4), (1, 4)) - x83 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (2, 3, 4, 1), (0, 4)) - x84 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(x82, (0, 1), (0, 1)) * 0.5 x84 += einsum(x83, (0, 1), (0, 1)) rdm2_f_abab_oovv += einsum(x84, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x84 - x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x85 += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) del x52 x85 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 @@ -2590,7 +2591,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x53 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x85, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x85 - x86 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x86 += einsum(t1.aa, (0, 1), (0, 1)) * -0.5 x86 += einsum(x25, (0, 1), (0, 1)) * -1.0 del x25 @@ -2604,7 +2605,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x29 rdm2_f_abab_oovv += einsum(t1.bb, (0, 1), x86, (2, 3), (2, 0, 3, 1)) * -2.0 del x86 - x87 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x87 += einsum(x38, (0, 1), (0, 1)) * -0.5 del x38 x87 += einsum(x39, (0, 1), (0, 1)) * -1.0 @@ -2617,35 +2618,35 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x42 rdm2_f_abab_oovv += einsum(t1.aa, (0, 1), x87, (2, 3), (0, 2, 1, 3)) * -2.0 del x87 - x88 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x88 += einsum(l2.aaaa, (0, 1, 2, 3), t2.abab, (3, 4, 1, 5), (2, 4, 0, 5)) rdm2_f_abab_voov += einsum(x88, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 - x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x89 += einsum(t2.abab, (0, 1, 2, 3), x88, (0, 4, 2, 5), (4, 1, 5, 3)) - x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x90 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) x90 += einsum(x89, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x89 rdm2_f_bbbb_oovv += einsum(x90, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 rdm2_f_bbbb_oovv += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) del x90 - x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x91 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (2, 4, 0, 5), (3, 4, 1, 5)) rdm2_f_bbbb_ovov += einsum(x91, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_bbbb_ovvo += einsum(x91, (0, 1, 2, 3), (1, 2, 3, 0)) rdm2_f_bbbb_voov += einsum(x91, (0, 1, 2, 3), (2, 1, 0, 3)) rdm2_f_bbbb_vovo += einsum(x91, (0, 1, 2, 3), (2, 1, 3, 0)) * -1.0 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(t2.bbbb, (0, 1, 2, 3), x91, (1, 4, 3, 5), (4, 0, 5, 2)) - x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x93 += einsum(x46, (0, 1, 2, 3), (0, 1, 2, 3)) del x46 x93 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x47 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(t1.bb, (0, 1), x93, (0, 2, 3, 4), (2, 3, 1, 4)) del x93 - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(x92, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 del x92 x95 += einsum(x94, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2657,13 +2658,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) rdm2_f_bbbb_oovv += einsum(x95, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x95 - x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x96 += einsum(x11, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) del x11 - x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x97 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x97 += einsum(x18, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x18 - x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x98 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x98 += einsum(x96, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x96 x98 += einsum(x97, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -2671,24 +2672,24 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x98, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 rdm2_f_bbbb_oovv += einsum(x98, (0, 1, 2, 3), (1, 0, 2, 3)) del x98 - x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x99 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x99 += einsum(t1.bb, (0, 1), x45, (0, 2, 3, 4), (2, 3, 1, 4)) del x45 - x100 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x100 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x100 += einsum(l2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_bbbb_ovov += einsum(x100, (0, 1, 2, 3), (1, 2, 0, 3)) * -4.0 rdm2_f_bbbb_ovvo += einsum(x100, (0, 1, 2, 3), (1, 2, 3, 0)) * 4.0 rdm2_f_bbbb_voov += einsum(x100, (0, 1, 2, 3), (2, 1, 0, 3)) * 4.0 rdm2_f_bbbb_vovo += einsum(x100, (0, 1, 2, 3), (2, 1, 3, 0)) * -4.0 - x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x101 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x101 += einsum(t2.bbbb, (0, 1, 2, 3), x100, (1, 4, 3, 5), (0, 4, 2, 5)) - x102 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x102 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x102 += einsum(x82, (0, 1), (0, 1)) x102 += einsum(x83, (0, 1), (0, 1)) * 2.0 - x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x103 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x103 += einsum(x102, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x102 - x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x104 += einsum(x99, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x99 x104 += einsum(x101, (0, 1, 2, 3), (0, 1, 2, 3)) * 8.0 @@ -2698,20 +2699,20 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_oovv += einsum(x104, (0, 1, 2, 3), (0, 1, 2, 3)) rdm2_f_bbbb_oovv += einsum(x104, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x104 - x105 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x105 += einsum(t1.bb, (0, 1), x50, (0, 2, 3, 4), (2, 4, 3, 1)) del x50 rdm2_f_bbbb_oovv += einsum(t1.bb, (0, 1), x105, (0, 2, 3, 4), (2, 3, 4, 1)) * -2.0 del x105 - x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x106 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x106 += einsum(t1.aa, (0, 1), x1, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_aaaa_ovov += einsum(x106, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_aaaa_ovvo += einsum(x106, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_aaaa_voov += einsum(x106, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_aaaa_vovo += einsum(x106, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x107 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x107 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x107 += einsum(l1.aa, (0, 1), t1.aa, (1, 2), (0, 2)) - x108 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x108 += einsum(x107, (0, 1), (0, 1)) x108 += einsum(x71, (0, 1), (0, 1)) * 2.0 x108 += einsum(x72, (0, 1), (0, 1)) @@ -2719,14 +2720,14 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_voov += einsum(delta.aa.oo, (0, 1), x108, (2, 3), (2, 0, 1, 3)) * -1.0 rdm2_f_abab_vovo += einsum(delta.bb.oo, (0, 1), x108, (2, 3), (2, 0, 3, 1)) rdm2_f_abab_vovv += einsum(t1.bb, (0, 1), x108, (2, 3), (2, 0, 3, 1)) - x109 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x109 += einsum(l2.abab, (0, 1, 2, 3), t2.abab, (4, 3, 0, 5), (2, 4, 1, 5)) rdm2_f_abab_ovov += einsum(x109, (0, 1, 2, 3), (1, 2, 0, 3)) * -1.0 rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x109, (0, 2, 3, 4), (2, 3, 1, 4)) * -1.0 del x109 - x110 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x110 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x110 += einsum(l1.bb, (0, 1), t1.bb, (1, 2), (0, 2)) - x111 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(x110, (0, 1), (0, 1)) x111 += einsum(x82, (0, 1), (0, 1)) x111 += einsum(x83, (0, 1), (0, 1)) * 2.0 @@ -2734,13 +2735,13 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_ovvo += einsum(delta.bb.oo, (0, 1), x111, (2, 3), (0, 2, 3, 1)) * -1.0 rdm2_f_bbbb_vovo += einsum(delta.bb.oo, (0, 1), x111, (2, 3), (2, 0, 3, 1)) rdm2_f_abab_ovvv += einsum(t1.aa, (0, 1), x111, (2, 3), (0, 2, 1, 3)) - x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(t1.bb, (0, 1), x16, (2, 0, 3, 4), (2, 3, 4, 1)) rdm2_f_bbbb_ovov += einsum(x112, (0, 1, 2, 3), (1, 2, 0, 3)) * 2.0 rdm2_f_bbbb_ovvo += einsum(x112, (0, 1, 2, 3), (1, 2, 3, 0)) * -2.0 rdm2_f_bbbb_voov += einsum(x112, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 rdm2_f_bbbb_vovo += einsum(x112, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 - x113 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(x110, (0, 1), (0, 1)) * 0.5 del x110 x113 += einsum(x82, (0, 1), (0, 1)) * 0.5 @@ -2750,7 +2751,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_ovov += einsum(delta.bb.oo, (0, 1), x113, (2, 3), (0, 2, 1, 3)) * 2.0 rdm2_f_bbbb_voov += einsum(delta.bb.oo, (0, 1), x113, (2, 3), (2, 0, 1, 3)) * -2.0 del x113 - x114 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x114 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x114 += einsum(x107, (0, 1), (0, 1)) * 0.5 del x107 x114 += einsum(x71, (0, 1), (0, 1)) @@ -2760,40 +2761,40 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_ovvo += einsum(delta.aa.oo, (0, 1), x114, (2, 3), (0, 2, 3, 1)) * -2.0 rdm2_f_aaaa_vovo += einsum(delta.aa.oo, (0, 1), x114, (2, 3), (2, 0, 3, 1)) * 2.0 del x114 - x115 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x115 += einsum(t1.aa, (0, 1), x21, (0, 2, 3, 4), (2, 3, 1, 4)) del x21 rdm2_f_abab_ovvo += einsum(x115, (0, 1, 2, 3), (0, 3, 2, 1)) * -1.0 - x116 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x116 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x116 += einsum(l2.abab, (0, 1, 2, 3), t2.bbbb, (4, 3, 5, 1), (2, 4, 0, 5)) rdm2_f_abab_voov += einsum(x116, (0, 1, 2, 3), (2, 1, 0, 3)) * 2.0 - x117 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x117 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x117 += einsum(t1.bb, (0, 1), x8, (2, 0, 3, 4), (2, 3, 4, 1)) del x8 rdm2_f_abab_voov += einsum(x117, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 - x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x118 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x118 += einsum(l1.aa, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_ovvv = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_ovvv += einsum(x118, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vovv = np.zeros((nvir[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vovv += einsum(x118, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x118 - x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x119 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x119 += einsum(t2.aaaa, (0, 1, 2, 3), x1, (0, 1, 4, 5), (4, 5, 2, 3)) del x1 rdm2_f_aaaa_ovvv += einsum(x119, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x119, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x119 - x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x120 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x120 += einsum(t1.aa, (0, 1), x106, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x106 rdm2_f_aaaa_ovvv += einsum(x120, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_aaaa_vovv += einsum(x120, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x120 - x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x121 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x121 += einsum(t1.aa, (0, 1), x78, (0, 2, 3, 4), (2, 1, 3, 4)) * 4.0 del x78 - x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x122 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x122 += einsum(x121, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x121 x122 += einsum(t1.aa, (0, 1), x108, (2, 3), (0, 2, 1, 3)) @@ -2803,7 +2804,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_aaaa_vovv += einsum(x122, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_aaaa_vovv += einsum(x122, (0, 1, 2, 3), (1, 0, 3, 2)) del x122 - x123 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x123 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x123 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) del x79 x123 += einsum(x115, (0, 1, 2, 3), (0, 1, 2, 3)) * -0.5 @@ -2812,34 +2813,34 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x69 rdm2_f_abab_ovvv += einsum(t1.bb, (0, 1), x123, (2, 0, 3, 4), (2, 4, 3, 1)) * 2.0 del x123 - x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x124 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x124 += einsum(l1.bb, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) - rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_ovvv = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_ovvv += einsum(x124, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 - rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vovv = np.zeros((nvir[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vovv += einsum(x124, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x124 - x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x125 += einsum(t2.bbbb, (0, 1, 2, 3), x16, (0, 1, 4, 5), (4, 5, 2, 3)) del x16 rdm2_f_bbbb_ovvv += einsum(x125, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x125, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x125 - x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x126 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x126 += einsum(t1.bb, (0, 1), x112, (0, 2, 3, 4), (2, 3, 4, 1)) * -1.0 del x112 rdm2_f_bbbb_ovvv += einsum(x126, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 rdm2_f_bbbb_vovv += einsum(x126, (0, 1, 2, 3), (1, 0, 3, 2)) * 2.0 del x126 - x127 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x127 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x127 += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) del x91 x127 += einsum(x100, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x100 - x128 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x128 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x128 += einsum(t1.bb, (0, 1), x127, (0, 2, 3, 4), (2, 1, 3, 4)) del x127 - x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x129 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x129 += einsum(x128, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x128 x129 += einsum(t1.bb, (0, 1), x111, (2, 3), (0, 2, 1, 3)) @@ -2849,7 +2850,7 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non rdm2_f_bbbb_vovv += einsum(x129, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 rdm2_f_bbbb_vovv += einsum(x129, (0, 1, 2, 3), (1, 0, 3, 2)) del x129 - x130 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x130 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x130 += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) del x88 x130 += einsum(x116, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -2858,25 +2859,25 @@ def make_rdm2_f(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x117 rdm2_f_abab_vovv += einsum(t1.aa, (0, 1), x130, (0, 2, 3, 4), (3, 2, 1, 4)) * 2.0 del x130 - x131 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x131 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x131 += einsum(t1.aa, (0, 1), l2.aaaa, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=np.float64) + rdm2_f_aaaa_vvov = np.zeros((nvir[0], nvir[0], nocc[0], nvir[0]), dtype=types[float]) rdm2_f_aaaa_vvov += einsum(x131, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=np.float64) + rdm2_f_aaaa_vvvo = np.zeros((nvir[0], nvir[0], nvir[0], nocc[0]), dtype=types[float]) rdm2_f_aaaa_vvvo += einsum(x131, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_aaaa_vvvv += einsum(t1.aa, (0, 1), x131, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x131 - x132 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x132 += einsum(t1.bb, (0, 1), l2.abab, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=np.float64) + rdm2_f_abab_vvov = np.zeros((nvir[0], nvir[1], nocc[0], nvir[1]), dtype=types[float]) rdm2_f_abab_vvov += einsum(x132, (0, 1, 2, 3), (1, 2, 0, 3)) rdm2_f_abab_vvvv += einsum(t1.aa, (0, 1), x132, (0, 2, 3, 4), (2, 3, 1, 4)) del x132 - x133 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x133 += einsum(t1.bb, (0, 1), l2.bbbb, (2, 3, 4, 0), (4, 2, 3, 1)) - rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=np.float64) + rdm2_f_bbbb_vvov = np.zeros((nvir[1], nvir[1], nocc[1], nvir[1]), dtype=types[float]) rdm2_f_bbbb_vvov += einsum(x133, (0, 1, 2, 3), (2, 1, 0, 3)) * -2.0 - rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=np.float64) + rdm2_f_bbbb_vvvo = np.zeros((nvir[1], nvir[1], nvir[1], nocc[1]), dtype=types[float]) rdm2_f_bbbb_vvvo += einsum(x133, (0, 1, 2, 3), (2, 1, 3, 0)) * 2.0 rdm2_f_bbbb_vvvv += einsum(t1.bb, (0, 1), x133, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x133 diff --git a/ebcc/codegen/UDFDCD.py b/ebcc/codegen/UDFDCD.py index 1b5b183d..557afc13 100644 --- a/ebcc/codegen/UDFDCD.py +++ b/ebcc/codegen/UDFDCD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x0 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x0 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) e_cc = 0 e_cc += einsum(v.abb.xov, (0, 1, 2), x0, (1, 2, 0), ()) del x0 - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) x1 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) e_cc += einsum(v.aaa.xov, (0, 1, 2), x1, (1, 2, 0), ()) @@ -22,31 +23,31 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new = Namespace() # T amplitudes - x0 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x0 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x0, (4, 3, 5, 2), (0, 1, 4, 5)) * 2.0 del x0 - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 1, 5, 0), (5, 4, 2, 3)) * -2.0 del x1 - x2 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x2 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x3 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x3 += einsum(x2, (0, 1, 2), x2, (3, 4, 2), (0, 3, 1, 4)) - x4 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x4 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x4 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x5 += einsum(x4, (0, 1, 2), x4, (3, 4, 2), (0, 3, 1, 4)) - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(x2, (0, 1, 2), (0, 1, 2)) x6 += einsum(x4, (0, 1, 2), (0, 1, 2)) * 0.5 - x7 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x7 += einsum(v.aaa.xov, (0, 1, 2), x6, (1, 3, 0), (3, 2)) - x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x8 += einsum(x7, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 4, 0)) * -2.0 - x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x9 += einsum(x3, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 del x3 x9 += einsum(x5, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -56,14 +57,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x9, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x9, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x9 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x11 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x11 += einsum(v.aaa.xov, (0, 1, 2), x6, (3, 2, 0), (3, 1)) - x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x12 += einsum(x11, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) * -2.0 del x11 - x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x13 += einsum(x10, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x10 x13 += einsum(x12, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -71,27 +72,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x13, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x13, (0, 1, 2, 3), (1, 0, 2, 3)) del x13 - x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x14 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x14 += einsum(v.aaa.xov, (0, 1, 2), x4, (3, 4, 0), (3, 1, 4, 2)) - x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x15 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x15, (4, 0, 5, 2), (4, 1, 5, 3)) * -1.0 - x16 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x16 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x16 += einsum(x4, (0, 1, 2), (0, 1, 2)) - x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x17 += einsum(v.aaa.xov, (0, 1, 2), x16, (3, 4, 0), (3, 1, 4, 2)) del x16 - x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x18 += einsum(x15, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x15 x18 += einsum(x17, (0, 1, 2, 3), (1, 0, 3, 2)) del x17 - x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x19 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x19 += einsum(t2.aaaa, (0, 1, 2, 3), x18, (1, 4, 3, 5), (4, 0, 5, 2)) * 2.0 del x18 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(x14, (0, 1, 2, 3), (0, 1, 2, 3)) del x14 x20 += einsum(x19, (0, 1, 2, 3), (1, 0, 3, 2)) @@ -101,11 +102,11 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x20, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x20, (0, 1, 2, 3), (1, 0, 3, 2)) del x20 - x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x21 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x22 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x23 += einsum(x21, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x21 x23 += einsum(x22, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -113,82 +114,82 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_aaaa += einsum(x23, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x23, (0, 1, 2, 3), (0, 1, 3, 2)) del x23 - x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x24 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x24 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x24, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 - x25 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x25 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x25, (4, 0, 5, 3), (4, 1, 2, 5)) * -1.0 del x25 - x26 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x26 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x26, (4, 0, 5, 1), (4, 5, 2, 3)) del x26 - x27 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x27 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x27 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x27, (4, 2, 5, 3), (0, 1, 4, 5)) del x27 - x28 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x28 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x28, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 del x28 - x29 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x29 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x29 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x29 += einsum(x2, (0, 1, 2), (0, 1, 2)) * 2.0 del x2 x29 += einsum(x4, (0, 1, 2), (0, 1, 2)) del x4 - x30 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x30 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x30 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x31 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x31 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x31 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x32 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x32 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x32 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x32 += einsum(x30, (0, 1, 2), (0, 1, 2)) x32 += einsum(x31, (0, 1, 2), (0, 1, 2)) * 2.0 t2new_abab += einsum(x29, (0, 1, 2), x32, (3, 4, 2), (0, 3, 1, 4)) del x29, x32 - x33 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x33 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x33 += einsum(x30, (0, 1, 2), (0, 1, 2)) x33 += einsum(x31, (0, 1, 2), (0, 1, 2)) * 2.0 - x34 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x34 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x34 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x34 += einsum(v.abb.xov, (0, 1, 2), x33, (1, 3, 0), (2, 3)) * 0.5 t2new_abab += einsum(x34, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x34 - x35 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x35 += einsum(x7, (0, 1), (1, 0)) del x7 t2new_abab += einsum(x35, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x35 - x36 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x36 += einsum(f.aa.oo, (0, 1), (0, 1)) * 2.0 x36 += einsum(v.aaa.xov, (0, 1, 2), x6, (3, 2, 0), (1, 3)) * 2.0 del x6 t2new_abab += einsum(x36, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -0.5 del x36 - x37 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(f.bb.oo, (0, 1), (0, 1)) x37 += einsum(v.abb.xov, (0, 1, 2), x33, (3, 2, 0), (1, 3)) * 0.5 t2new_abab += einsum(x37, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x37 - x38 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x38, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x38 - x39 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x39 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x39 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x39, (4, 0, 5, 1), (5, 4, 2, 3)) * 2.0 del x39 - x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x40 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x40 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x41 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x41 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x42 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x42 += einsum(x30, (0, 1, 2), x30, (3, 4, 2), (0, 3, 1, 4)) - x43 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x43 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x43 += einsum(x40, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x40 x43 += einsum(x41, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -197,21 +198,21 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x43, (0, 1, 2, 3), (0, 1, 3, 2)) del x43 - x44 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x44 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x44 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x44 += einsum(x31, (0, 1, 2), (0, 1, 2)) * 2.0 - x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x45 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x45 += einsum(x30, (0, 1, 2), x44, (3, 4, 2), (0, 3, 1, 4)) del x30, x44 - x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x46 += einsum(x24, (0, 1, 2, 3), (1, 0, 3, 2)) del x24 x46 += einsum(x41, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x41 - x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x47 += einsum(t2.bbbb, (0, 1, 2, 3), x46, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x46 - x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x48 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x48 += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) del x45 x48 += einsum(x47, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -221,15 +222,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x48, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x48, (0, 1, 2, 3), (1, 0, 3, 2)) del x48 - x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x49 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x49 += einsum(x31, (0, 1, 2), x31, (3, 4, 2), (0, 3, 1, 4)) del x31 - x50 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x50 += einsum(v.abb.xov, (0, 1, 2), x33, (1, 3, 0), (3, 2)) - x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x51 += einsum(x50, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 4, 0)) * -1.0 del x50 - x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x52 += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -4.0 del x49 x52 += einsum(x51, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -237,15 +238,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t2=None, **kwar t2new_bbbb += einsum(x52, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x52, (0, 1, 2, 3), (0, 1, 3, 2)) del x52 - x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x53 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x53 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x54 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x54 += einsum(v.abb.xov, (0, 1, 2), x33, (3, 2, 0), (3, 1)) del x33 - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum(x54, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -1.0 del x54 - x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum(x53, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x53 x56 += einsum(x55, (0, 1, 2, 3), (0, 1, 3, 2)) diff --git a/ebcc/codegen/UDFDCSD.py b/ebcc/codegen/UDFDCSD.py index 053dc3c8..4cc95414 100644 --- a/ebcc/codegen/UDFDCSD.py +++ b/ebcc/codegen/UDFDCSD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((naux,), dtype=np.float64) + x0 = np.zeros((naux,), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x1 = np.zeros((naux,), dtype=np.float64) + x1 = np.zeros((naux,), dtype=types[float]) x1 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) x1 += einsum(x0, (0,), (0,)) * 2.0 - x2 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x2 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) x2 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) x2 += einsum(x1, (0,), t1.aa, (1, 2), (1, 2, 0)) * 0.5 @@ -18,23 +19,23 @@ def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, ** e_cc = 0 e_cc += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 2, 0), ()) del x2 - x3 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x3 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x4 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x4 += einsum(f.bb.ov, (0, 1), (0, 1)) x4 += einsum(v.abb.xov, (0, 1, 2), x3, (1, 3, 0), (3, 2)) * -0.5 del x3 e_cc += einsum(t1.bb, (0, 1), x4, (0, 1), ()) del x4 - x5 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x5 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x6 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x6 += einsum(f.aa.ov, (0, 1), (0, 1)) x6 += einsum(v.aaa.xov, (0, 1, 2), x5, (1, 3, 0), (3, 2)) * -0.5 del x5 e_cc += einsum(t1.aa, (0, 1), x6, (0, 1), ()) del x6 - x7 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x7 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x7 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) x7 += einsum(x0, (0,), t1.bb, (1, 2), (1, 2, 0)) * 0.5 del x0 @@ -48,29 +49,29 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.vv, (0, 1), t1.aa, (2, 1), (2, 0)) t1new_aa += einsum(f.aa.ov, (0, 1), (0, 1)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.vv, (0, 1), t1.bb, (2, 1), (2, 0)) t1new_bb += einsum(f.bb.ov, (0, 1), (0, 1)) - x0 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x2 += einsum(t2.aaaa, (0, 1, 2, 3), (0, 1, 2, 3)) x2 += einsum(t1.aa, (0, 1), t1.aa, (2, 3), (0, 2, 3, 1)) * -0.5 - x3 = np.zeros((naux,), dtype=np.float64) + x3 = np.zeros((naux,), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x4 = np.zeros((naux,), dtype=np.float64) + x4 = np.zeros((naux,), dtype=types[float]) x4 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x5 = np.zeros((naux,), dtype=np.float64) + x5 = np.zeros((naux,), dtype=types[float]) x5 += einsum(x3, (0,), (0,)) del x3 x5 += einsum(x4, (0,), (0,)) del x4 - x6 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x6 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x6 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x6 += einsum(x1, (0, 1, 2), (0, 1, 2)) x6 += einsum(v.aaa.xov, (0, 1, 2), x2, (1, 3, 2, 4), (3, 4, 0)) * 2.0 @@ -78,61 +79,61 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x6 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) t1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x6, (3, 2, 0), (3, 1)) del x6 - x7 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x7 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x8 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x8 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x8 += einsum(x7, (0, 1, 2), (0, 1, 2)) - x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x9 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x9 += einsum(v.abb.xov, (0, 1, 2), x8, (3, 4, 0), (4, 3, 1, 2)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x9, (0, 4, 1, 3), (4, 2)) * -1.0 del x9 - x10 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x10 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x10 += einsum(x7, (0, 1, 2), (1, 0, 2)) - x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x11 += einsum(v.aaa.xov, (0, 1, 2), x10, (3, 4, 0), (1, 3, 4, 2)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x11, (0, 1, 4, 3), (4, 2)) * 2.0 - x12 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x12 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x13 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x13 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x13 += einsum(v.abb.xov, (0, 1, 2), x12, (1, 3, 0), (3, 2)) - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum(x5, (0,), v.abb.xov, (0, 1, 2), (1, 2)) t1new_bb += einsum(x14, (0, 1), (0, 1)) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum(f.bb.ov, (0, 1), (0, 1)) x15 += einsum(x13, (0, 1), (0, 1)) * -1.0 x15 += einsum(x14, (0, 1), (0, 1)) del x14 t1new_aa += einsum(x15, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x15, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 - x16 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x16 += einsum(v.aaa.xov, (0, 1, 2), x7, (1, 3, 0), (3, 2)) - x17 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x17 += einsum(x5, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) t1new_aa += einsum(x17, (0, 1), (0, 1)) - x18 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(f.aa.ov, (0, 1), (0, 1)) x18 += einsum(x16, (0, 1), (0, 1)) * -1.0 x18 += einsum(x17, (0, 1), (0, 1)) del x17 t1new_aa += einsum(x18, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x18, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x20 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x20 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x20 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x20 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x20 += einsum(x1, (0, 1, 2), (0, 1, 2)) x20 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x21 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x21 += einsum(x5, (0,), v.aaa.xoo, (0, 1, 2), (1, 2)) - x22 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(f.aa.ov, (0, 1), (0, 1)) x22 += einsum(x16, (0, 1), (0, 1)) * -1.0 del x16 - x23 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x23 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x23 += einsum(f.aa.oo, (0, 1), (0, 1)) x23 += einsum(v.aaa.xov, (0, 1, 2), x20, (3, 2, 0), (1, 3)) del x20 @@ -140,50 +141,50 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x23 += einsum(t1.aa, (0, 1), x22, (2, 1), (2, 0)) t1new_aa += einsum(t1.aa, (0, 1), x23, (0, 2), (2, 1)) * -1.0 del x23 - x24 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x24 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) - x25 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x25 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x25 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x26 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x26 += einsum(t2.bbbb, (0, 1, 2, 3), (0, 1, 2, 3)) x26 += einsum(t1.bb, (0, 1), t1.bb, (2, 3), (0, 2, 3, 1)) * -0.5 - x27 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x27 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x27 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -1.0 x27 += einsum(x25, (0, 1, 2), (0, 1, 2)) x27 += einsum(v.abb.xov, (0, 1, 2), x26, (1, 3, 2, 4), (3, 4, 0)) * 2.0 x27 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) t1new_bb += einsum(v.abb.xvv, (0, 1, 2), x27, (3, 2, 0), (3, 1)) del x27 - x28 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x28 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x28 += einsum(x12, (0, 1, 2), (1, 0, 2)) - x29 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x29 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x29 += einsum(v.abb.xov, (0, 1, 2), x28, (3, 4, 0), (4, 1, 3, 2)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x29, (4, 0, 1, 3), (4, 2)) * 2.0 del x29 - x30 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x30 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x30 += einsum(x12, (0, 1, 2), (0, 1, 2)) - x31 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x31 += einsum(v.aaa.xov, (0, 1, 2), x30, (3, 4, 0), (1, 4, 3, 2)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x31, (0, 1, 4, 2), (4, 3)) * -1.0 del x31 - x32 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x32 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x32 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - x33 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x33 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x33 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -1.0 x33 += einsum(x25, (0, 1, 2), (0, 1, 2)) x33 += einsum(x32, (0, 1, 2), (0, 1, 2)) * 2.0 x33 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x34 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x34 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x34 += einsum(x5, (0,), v.abb.xoo, (0, 1, 2), (1, 2)) - x35 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x35 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x35 += einsum(f.bb.ov, (0, 1), (0, 1)) x35 += einsum(x13, (0, 1), (0, 1)) * -1.0 del x13 - x36 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x36 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x36 += einsum(t1.bb, (0, 1), x35, (2, 1), (0, 2)) - x37 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x37 += einsum(f.bb.oo, (0, 1), (0, 1)) x37 += einsum(v.abb.xov, (0, 1, 2), x33, (3, 2, 0), (1, 3)) del x33 @@ -191,72 +192,72 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x37 += einsum(x36, (0, 1), (1, 0)) t1new_bb += einsum(t1.bb, (0, 1), x37, (0, 2), (2, 1)) * -1.0 del x37 - x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x39 += einsum(t2.aaaa, (0, 1, 2, 3), x38, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x40 += einsum(t1.aa, (0, 1), x39, (2, 3, 4, 0), (2, 3, 4, 1)) del x39 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t1.aa, (0, 1), x40, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x40 - x41 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x41, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x41 - x42 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x42 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x42 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(x42, (0, 1, 2), x42, (3, 4, 2), (0, 3, 1, 4)) - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(x19, (0, 1, 2), x19, (3, 4, 2), (0, 3, 1, 4)) - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(x1, (0, 1, 2), x1, (3, 4, 2), (0, 3, 1, 4)) - x46 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x46 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x46 += einsum(x42, (0, 1, 2), (0, 1, 2)) x46 += einsum(x19, (0, 1, 2), (0, 1, 2)) x46 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 - x47 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x47 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x47 += einsum(v.aaa.xov, (0, 1, 2), x46, (1, 3, 0), (2, 3)) del x46 - x48 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(x5, (0,), v.aaa.xvv, (0, 1, 2), (1, 2)) - x49 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(x47, (0, 1), (0, 1)) del x47 x49 += einsum(x48, (0, 1), (1, 0)) * -1.0 - x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x50 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x50 += einsum(x49, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x49 - x51 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x52 += einsum(t2.aaaa, (0, 1, 2, 3), x51, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 del x51 - x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x53 += einsum(x18, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) * -1.0 - x54 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x54 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) - x55 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x55 += einsum(x7, (0, 1, 2), x7, (3, 4, 2), (0, 3, 1, 4)) - x56 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x56 += einsum(x54, (0, 1, 2, 3), (3, 2, 1, 0)) x56 += einsum(x55, (0, 1, 2, 3), (2, 3, 1, 0)) - x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x57 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x57 += einsum(t1.aa, (0, 1), x56, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x56 - x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x58 += einsum(x52, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x52 x58 += einsum(x53, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x53 x58 += einsum(x57, (0, 1, 2, 3), (0, 2, 1, 3)) del x57 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(t1.aa, (0, 1), x58, (0, 2, 3, 4), (2, 3, 1, 4)) * 2.0 del x58 - x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x60 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) del x43 x60 += einsum(x44, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -270,36 +271,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x60, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_aaaa += einsum(x60, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x60 - x61 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x61 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x61 += einsum(v.aaa.xoo, (0, 1, 2), x7, (3, 4, 0), (3, 1, 2, 4)) - x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(t2.aaaa, (0, 1, 2, 3), x61, (4, 0, 5, 1), (4, 5, 2, 3)) - x63 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x63 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x63 += einsum(t1.aa, (0, 1), x18, (2, 1), (0, 2)) del x18 - x64 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x64 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x64 += einsum(f.aa.oo, (0, 1), (0, 1)) x64 += einsum(x63, (0, 1), (0, 1)) del x63 - x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x65 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x65 += einsum(x64, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x64 - x66 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x66 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x66 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 x66 += einsum(x19, (0, 1, 2), (0, 1, 2)) x66 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 - x67 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x67 += einsum(v.aaa.xov, (0, 1, 2), x66, (3, 2, 0), (1, 3)) del x66 - x68 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x68 += einsum(x67, (0, 1), (0, 1)) del x67 x68 += einsum(x21, (0, 1), (1, 0)) del x21 - x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x69 += einsum(x68, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x68 - x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x70 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x70 += einsum(x62, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x62 x70 += einsum(x65, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 @@ -309,72 +310,72 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x70, (0, 1, 2, 3), (1, 0, 2, 3)) del x70 - x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x71 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x71 += einsum(v.aaa.xov, (0, 1, 2), x1, (3, 4, 0), (3, 1, 4, 2)) - x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x72 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x72 += einsum(v.aaa.xvv, (0, 1, 2), x7, (3, 4, 0), (3, 4, 1, 2)) - x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x73 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x73 += einsum(t2.aaaa, (0, 1, 2, 3), x72, (4, 1, 5, 3), (4, 0, 2, 5)) del x72 - x74 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x74 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x74 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) * 0.5 x74 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -0.5 x74 += einsum(x19, (0, 1, 2), (0, 1, 2)) x74 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 - x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x75 += einsum(x42, (0, 1, 2), x74, (3, 4, 2), (0, 3, 1, 4)) * 2.0 del x74 - x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x76 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x77 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x77 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x77 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x77 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x78 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x78 += einsum(v.aaa.xov, (0, 1, 2), x77, (3, 4, 0), (1, 3, 2, 4)) del x77 - x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x79 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x79 += einsum(x76, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x76 x79 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) del x78 - x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x80 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x80 += einsum(t2.aaaa, (0, 1, 2, 3), x79, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x79 - x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x81 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x81 += einsum(t1.aa, (0, 1), x61, (2, 3, 4, 0), (2, 3, 4, 1)) del x61 - x82 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x82 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x83 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x83 += einsum(t2.abab, (0, 1, 2, 3), x82, (4, 5, 1, 3), (0, 5, 4, 2)) del x82 - x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x84 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x84 += einsum(x42, (0, 1, 2), x7, (3, 4, 2), (3, 0, 4, 1)) - x85 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x85 += einsum(v.abb.xov, (0, 1, 2), x7, (3, 4, 0), (3, 4, 1, 2)) - x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x86 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x86 += einsum(t2.abab, (0, 1, 2, 3), x85, (4, 5, 1, 3), (4, 0, 5, 2)) del x85 - x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x87 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x87 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 2, 3, 4)) - x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x88 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x88 += einsum(x87, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x88 += einsum(x87, (0, 1, 2, 3), (2, 1, 0, 3)) del x87 - x89 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x89 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x89 += einsum(t2.aaaa, (0, 1, 2, 3), x88, (1, 4, 5, 3), (0, 4, 5, 2)) * 2.0 del x88 - x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x90 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x90 += einsum(v.aaa.xov, (0, 1, 2), x7, (3, 4, 0), (3, 1, 4, 2)) del x7 - x91 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x91 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x91 += einsum(x90, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x91 += einsum(x90, (0, 1, 2, 3), (0, 2, 1, 3)) del x90 - x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x92 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x92 += einsum(t2.aaaa, (0, 1, 2, 3), x91, (4, 1, 5, 3), (0, 4, 5, 2)) * 2.0 del x91 - x93 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x93 += einsum(x81, (0, 1, 2, 3), (0, 2, 1, 3)) del x81 x93 += einsum(x83, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 @@ -389,10 +390,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x92 x93 += einsum(x11, (0, 1, 2, 3), (2, 0, 1, 3)) del x11 - x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x94 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x94 += einsum(t1.aa, (0, 1), x93, (2, 3, 0, 4), (2, 3, 1, 4)) del x93 - x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x95 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x95 += einsum(x71, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x71 x95 += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -408,9 +409,9 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x95, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x95, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x95 - x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x96 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x96 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x97 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x97 += einsum(x96, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x96 x97 += einsum(x38, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -418,87 +419,87 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x97, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x97, (0, 1, 2, 3), (0, 1, 3, 2)) del x97 - x98 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x98 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x98 += einsum(x54, (0, 1, 2, 3), (3, 2, 1, 0)) del x54 x98 += einsum(x55, (0, 1, 2, 3), (2, 1, 3, 0)) del x55 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x98, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x98 - x99 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x99 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x99 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x99 += einsum(x42, (0, 1, 2), (0, 1, 2)) x99 += einsum(x19, (0, 1, 2), (0, 1, 2)) * 2.0 x99 += einsum(x1, (0, 1, 2), (0, 1, 2)) - x100 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x100 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x100 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x101 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x101 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x101 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) * 0.5 x101 += einsum(x100, (0, 1, 2), (0, 1, 2)) * 0.5 x101 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 x101 += einsum(x32, (0, 1, 2), (0, 1, 2)) - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(x101, (0, 1, 2), x99, (3, 4, 2), (3, 0, 4, 1)) * 2.0 del x101, x99 - x102 = np.zeros((nvir[1], nvir[1], naux), dtype=np.float64) + x102 = np.zeros((nvir[1], nvir[1], naux), dtype=types[float]) x102 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 3), (1, 3, 2)) - x103 = np.zeros((nvir[1], nvir[1], naux), dtype=np.float64) + x103 = np.zeros((nvir[1], nvir[1], naux), dtype=types[float]) x103 += einsum(v.abb.xvv, (0, 1, 2), (1, 2, 0)) x103 += einsum(x102, (0, 1, 2), (0, 1, 2)) * -1.0 del x102 - x104 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x104 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x104 += einsum(v.abb.xov, (0, 1, 2), x30, (3, 4, 0), (4, 3, 1, 2)) - x105 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x105 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x105 += einsum(x103, (0, 1, 2), x30, (3, 4, 2), (4, 3, 1, 0)) x105 += einsum(t1.bb, (0, 1), x104, (0, 2, 3, 4), (3, 2, 4, 1)) del x104 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x105, (1, 4, 3, 5), (0, 4, 2, 5)) * -1.0 del x105 - x106 = np.zeros((nvir[0], nvir[0], naux), dtype=np.float64) + x106 = np.zeros((nvir[0], nvir[0], naux), dtype=types[float]) x106 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 3), (1, 3, 2)) - x107 = np.zeros((nvir[0], nvir[0], naux), dtype=np.float64) + x107 = np.zeros((nvir[0], nvir[0], naux), dtype=types[float]) x107 += einsum(v.aaa.xvv, (0, 1, 2), (1, 2, 0)) x107 += einsum(x106, (0, 1, 2), (0, 1, 2)) * -1.0 del x106 - x108 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x108 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x108 += einsum(v.aaa.xov, (0, 1, 2), x8, (3, 4, 0), (4, 3, 1, 2)) - x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x109 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x109 += einsum(x107, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) x109 += einsum(t1.aa, (0, 1), x108, (0, 2, 3, 4), (3, 2, 4, 1)) del x108 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x109, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x109 - x110 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x110 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x110 += einsum(x107, (0, 1, 2), x30, (3, 4, 2), (4, 3, 1, 0)) del x107 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x110, (1, 4, 2, 5), (0, 4, 5, 3)) * -1.0 del x110 - x111 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x111 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x111 += einsum(x103, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x111, (0, 4, 3, 5), (4, 1, 2, 5)) * -1.0 del x111 - x112 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x112 = np.zeros((nocc[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x112 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x113 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x113 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x113 += einsum(t1.aa, (0, 1), x112, (0, 2, 3, 4), (2, 1, 4, 3)) del x112 x113 += einsum(v.aaa.xvv, (0, 1, 2), x103, (3, 4, 0), (1, 2, 4, 3)) * -1.0 del x103 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x113, (2, 4, 3, 5), (0, 1, 4, 5)) * -1.0 del x113 - x114 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x114 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x114 += einsum(x30, (0, 1, 2), x8, (3, 4, 2), (4, 3, 1, 0)) - x115 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x115 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x115 += einsum(t2.abab, (0, 1, 2, 3), (0, 1, 2, 3)) x115 += einsum(t1.aa, (0, 1), t1.bb, (2, 3), (0, 2, 1, 3)) t2new_abab += einsum(x114, (0, 1, 2, 3), x115, (0, 2, 4, 5), (1, 3, 4, 5)) del x114, x115 - x116 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x116 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x116 += einsum(x42, (0, 1, 2), (0, 1, 2)) x116 += einsum(x19, (0, 1, 2), (0, 1, 2)) x116 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 x116 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x117 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x117 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x117 += einsum(f.aa.vv, (0, 1), (0, 1)) * -1.0 x117 += einsum(v.aaa.xov, (0, 1, 2), x116, (1, 3, 0), (2, 3)) del x116 @@ -507,14 +508,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x117 += einsum(t1.aa, (0, 1), x22, (0, 2), (2, 1)) t2new_abab += einsum(x117, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -1.0 del x117 - x118 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x118 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x118 += einsum(x100, (0, 1, 2), (0, 1, 2)) x118 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 x118 += einsum(x32, (0, 1, 2), (0, 1, 2)) x118 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x119 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x119 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x119 += einsum(x5, (0,), v.abb.xvv, (0, 1, 2), (1, 2)) - x120 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x120 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x120 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x120 += einsum(v.abb.xov, (0, 1, 2), x118, (1, 3, 0), (2, 3)) del x118 @@ -523,12 +524,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x35 t2new_abab += einsum(x120, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x120 - x121 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x121 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x121 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -1.0 x121 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 x121 += einsum(x32, (0, 1, 2), (0, 1, 2)) x121 += einsum(x5, (0,), t1.bb, (1, 2), (1, 2, 0)) - x122 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x122 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x122 += einsum(f.bb.oo, (0, 1), (0, 1)) x122 += einsum(v.abb.xov, (0, 1, 2), x121, (3, 2, 0), (1, 3)) del x121 @@ -537,7 +538,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x36 t2new_abab += einsum(x122, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x122 - x123 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x123 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x123 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 del x0 x123 += einsum(x19, (0, 1, 2), (0, 1, 2)) @@ -545,7 +546,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non x123 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 0.5 del x1 x123 += einsum(x5, (0,), t1.aa, (1, 2), (1, 2, 0)) - x124 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x124 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x124 += einsum(f.aa.oo, (0, 1), (0, 1)) * 2.0 x124 += einsum(v.aaa.xov, (0, 1, 2), x123, (3, 2, 0), (1, 3)) * 2.0 del x123 @@ -555,19 +556,19 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x22 t2new_abab += einsum(x124, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -0.5 del x124 - x125 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x125 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x125 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x126 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x126 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x126 += einsum(t2.abab, (0, 1, 2, 3), x125, (4, 5, 2, 3), (0, 4, 1, 5)) del x125 - x127 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x127 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x127 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x127 += einsum(x42, (0, 1, 2), (0, 1, 2)) del x42 - x128 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x128 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x128 += einsum(v.aaa.xov, (0, 1, 2), x28, (3, 4, 0), (1, 4, 3, 2)) del x28 - x129 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x129 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x129 += einsum(t1.aa, (0, 1), x126, (2, 0, 3, 4), (2, 4, 3, 1)) * -1.0 del x126 x129 += einsum(x127, (0, 1, 2), x30, (3, 4, 2), (0, 4, 3, 1)) @@ -576,38 +577,38 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x128 t2new_abab += einsum(t1.bb, (0, 1), x129, (2, 0, 3, 4), (2, 3, 4, 1)) * -1.0 del x129 - x130 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x130 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x130 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x130 += einsum(x100, (0, 1, 2), (0, 1, 2)) - x131 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x131 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x131 += einsum(v.abb.xov, (0, 1, 2), x10, (3, 4, 0), (4, 3, 1, 2)) del x10 - x132 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x132 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x132 += einsum(x130, (0, 1, 2), x8, (3, 4, 2), (4, 3, 0, 1)) * 0.5 del x8, x130 x132 += einsum(t2.bbbb, (0, 1, 2, 3), x131, (4, 5, 1, 3), (5, 4, 0, 2)) del x131 t2new_abab += einsum(t1.aa, (0, 1), x132, (0, 2, 3, 4), (2, 3, 1, 4)) * -2.0 del x132 - x133 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x133 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x133 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x134 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x134 += einsum(t2.bbbb, (0, 1, 2, 3), x133, (4, 5, 2, 3), (0, 1, 5, 4)) * -1.0 - x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x135 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x135 += einsum(t1.bb, (0, 1), x134, (2, 3, 4, 0), (2, 3, 4, 1)) del x134 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t1.bb, (0, 1), x135, (2, 3, 0, 4), (2, 3, 1, 4)) * 2.0 del x135 - x136 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x136 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x136 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x136, (4, 3, 5, 2), (0, 1, 4, 5)) * 2.0 del x136 - x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x137 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x137 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x138 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x138 += einsum(x25, (0, 1, 2), x25, (3, 4, 2), (0, 3, 1, 4)) - x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x139 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x139 += einsum(x137, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x137 x139 += einsum(x133, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -617,72 +618,72 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x139, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x139, (0, 1, 2, 3), (0, 1, 3, 2)) del x139 - x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x140 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x140 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x141 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x141 += einsum(t2.bbbb, (0, 1, 2, 3), x140, (4, 1, 5, 3), (0, 4, 2, 5)) del x140 - x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x142 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x142 += einsum(v.abb.xvv, (0, 1, 2), x12, (3, 4, 0), (3, 4, 1, 2)) - x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x143 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x143 += einsum(t2.bbbb, (0, 1, 2, 3), x142, (4, 1, 5, 3), (4, 0, 2, 5)) del x142 - x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x144 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x144 += einsum(x25, (0, 1, 2), x32, (3, 4, 2), (0, 3, 1, 4)) - x145 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x145 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x145 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x145 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -1.0 x145 += einsum(x25, (0, 1, 2), (0, 1, 2)) x145 += einsum(x32, (0, 1, 2), (0, 1, 2)) * 2.0 - x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x146 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x146 += einsum(x100, (0, 1, 2), x145, (3, 4, 2), (3, 0, 4, 1)) del x145 - x147 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x147 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x147 += einsum(v.abb.xov, (0, 1, 2), x26, (1, 3, 2, 4), (3, 4, 0)) del x26 - x148 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x148 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x148 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -0.5 x148 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 x148 += einsum(x147, (0, 1, 2), (0, 1, 2)) del x147 - x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x149 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x149 += einsum(v.abb.xov, (0, 1, 2), x148, (3, 4, 0), (3, 1, 4, 2)) * 2.0 del x148 - x150 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x150 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x150 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xov, (0, 3, 4), (3, 1, 2, 4)) - x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x151 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x151 += einsum(t2.abab, (0, 1, 2, 3), x150, (0, 4, 5, 2), (1, 5, 4, 3)) del x150 - x152 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x152 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x152 += einsum(v.abb.xoo, (0, 1, 2), x12, (3, 4, 0), (3, 1, 2, 4)) - x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x153 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x153 += einsum(t1.bb, (0, 1), x152, (2, 3, 4, 0), (2, 3, 4, 1)) - x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x154 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x154 += einsum(x100, (0, 1, 2), x12, (3, 4, 2), (3, 0, 4, 1)) - x155 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x155 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x155 += einsum(v.aaa.xov, (0, 1, 2), x12, (3, 4, 0), (1, 3, 4, 2)) - x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x156 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x156 += einsum(t2.abab, (0, 1, 2, 3), x155, (0, 4, 5, 2), (4, 1, 5, 3)) del x155 - x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x157 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x157 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 2, 3, 4)) - x158 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x158 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x158 += einsum(x157, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x158 += einsum(x157, (0, 1, 2, 3), (2, 1, 0, 3)) del x157 - x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x159 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x159 += einsum(t2.bbbb, (0, 1, 2, 3), x158, (1, 4, 5, 3), (4, 5, 0, 2)) * 2.0 del x158 - x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x160 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x160 += einsum(v.abb.xov, (0, 1, 2), x12, (3, 4, 0), (3, 1, 4, 2)) - x161 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x161 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x161 += einsum(x160, (0, 1, 2, 3), (0, 1, 2, 3)) x161 += einsum(x160, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x160 - x162 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x162 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x162 += einsum(t2.bbbb, (0, 1, 2, 3), x161, (4, 5, 1, 3), (4, 5, 0, 2)) * 2.0 del x161 - x163 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x163 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x163 += einsum(x151, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x151 x163 += einsum(x153, (0, 1, 2, 3), (0, 2, 1, 3)) @@ -695,10 +696,10 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x159 x163 += einsum(x162, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x162 - x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x164 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x164 += einsum(t1.bb, (0, 1), x163, (2, 0, 3, 4), (2, 3, 4, 1)) del x163 - x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x165 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x165 += einsum(x141, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x141 x165 += einsum(x143, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -716,35 +717,35 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x165, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_bbbb += einsum(x165, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 del x165 - x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x166 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x166 += einsum(t2.bbbb, (0, 1, 2, 3), x152, (4, 0, 5, 1), (4, 5, 2, 3)) del x152 - x167 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x167 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x167 += einsum(t1.bb, (0, 1), x15, (2, 1), (0, 2)) - x168 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x168 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x168 += einsum(f.bb.oo, (0, 1), (0, 1)) x168 += einsum(x167, (0, 1), (0, 1)) del x167 - x169 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x169 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x169 += einsum(x168, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) * -2.0 del x168 - x170 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x170 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x170 += einsum(x24, (0, 1, 2), (0, 1, 2)) * -1.0 del x24 x170 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 x170 += einsum(x32, (0, 1, 2), (0, 1, 2)) - x171 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x171 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x171 += einsum(v.abb.xov, (0, 1, 2), x170, (3, 2, 0), (3, 1)) del x170 - x172 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x172 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x172 += einsum(x171, (0, 1), (1, 0)) del x171 x172 += einsum(x34, (0, 1), (1, 0)) del x34 - x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x173 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x173 += einsum(x172, (0, 1), t2.bbbb, (2, 0, 3, 4), (1, 2, 3, 4)) * -2.0 del x172 - x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x174 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x174 += einsum(x166, (0, 1, 2, 3), (0, 1, 3, 2)) * -2.0 del x166 x174 += einsum(x169, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 @@ -754,58 +755,58 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x174, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x174, (0, 1, 2, 3), (1, 0, 2, 3)) del x174 - x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x175 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x175 += einsum(x100, (0, 1, 2), x100, (3, 4, 2), (0, 3, 1, 4)) - x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x176 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x176 += einsum(x32, (0, 1, 2), x32, (3, 4, 2), (0, 3, 1, 4)) - x177 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x177 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x177 += einsum(x100, (0, 1, 2), (0, 1, 2)) del x100 x177 += einsum(x25, (0, 1, 2), (0, 1, 2)) * 0.5 del x25 x177 += einsum(x32, (0, 1, 2), (0, 1, 2)) del x32 - x178 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x178 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x178 += einsum(v.abb.xov, (0, 1, 2), x177, (1, 3, 0), (3, 2)) del x177 - x179 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x179 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x179 += einsum(x178, (0, 1), (1, 0)) del x178 x179 += einsum(x119, (0, 1), (1, 0)) * -1.0 del x119 - x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x180 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x180 += einsum(x179, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 1, 4)) * -2.0 del x179 - x181 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x181 = np.zeros((nocc[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x181 += einsum(v.abb.xov, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x182 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x182 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x182 += einsum(t2.bbbb, (0, 1, 2, 3), x181, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 del x181 - x183 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x183 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x183 += einsum(x15, (0, 1), t2.bbbb, (2, 3, 4, 1), (0, 2, 3, 4)) * -1.0 del x15 - x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x184 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x184 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) - x185 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x185 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x185 += einsum(x12, (0, 1, 2), x12, (3, 4, 2), (0, 3, 1, 4)) del x12 - x186 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x186 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x186 += einsum(x184, (0, 1, 2, 3), (3, 2, 1, 0)) x186 += einsum(x185, (0, 1, 2, 3), (2, 3, 1, 0)) - x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x187 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x187 += einsum(t1.bb, (0, 1), x186, (0, 2, 3, 4), (2, 3, 4, 1)) * 0.5 del x186 - x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x188 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x188 += einsum(x182, (0, 1, 2, 3), (2, 1, 0, 3)) * -1.0 del x182 x188 += einsum(x183, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 del x183 x188 += einsum(x187, (0, 1, 2, 3), (0, 2, 1, 3)) del x187 - x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x189 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x189 += einsum(t1.bb, (0, 1), x188, (0, 2, 3, 4), (2, 3, 4, 1)) * 2.0 del x188 - x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x190 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x190 += einsum(x175, (0, 1, 2, 3), (0, 1, 2, 3)) del x175 x190 += einsum(x176, (0, 1, 2, 3), (0, 1, 2, 3)) * 4.0 @@ -817,7 +818,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x190, (0, 1, 2, 3), (0, 1, 2, 3)) t2new_bbbb += einsum(x190, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 del x190 - x191 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x191 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x191 += einsum(x184, (0, 1, 2, 3), (3, 2, 1, 0)) del x184 x191 += einsum(x185, (0, 1, 2, 3), (2, 1, 3, 0)) diff --git a/ebcc/codegen/UDFQCISD.py b/ebcc/codegen/UDFQCISD.py index b6275b24..28978f85 100644 --- a/ebcc/codegen/UDFQCISD.py +++ b/ebcc/codegen/UDFQCISD.py @@ -2,15 +2,16 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x0 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) e_cc = 0 e_cc += einsum(v.aaa.xov, (0, 1, 2), x0, (1, 2, 0), ()) del x0 - x1 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x1 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x1 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) x1 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) e_cc += einsum(v.abb.xov, (0, 1, 2), x1, (1, 2, 0), ()) @@ -23,57 +24,57 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(f.aa.vv, (0, 1), t1.aa, (2, 1), (2, 0)) - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.vv, (0, 1), t1.bb, (2, 1), (2, 0)) - x0 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x0 += einsum(t1.aa, (0, 1), v.aaa.xoo, (2, 3, 0), (3, 1, 2)) - x1 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x1 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x1 += einsum(v.aaa.xov, (0, 1, 2), t2.aaaa, (3, 1, 4, 2), (3, 4, 0)) - x2 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x2 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x2 += einsum(v.abb.xov, (0, 1, 2), t2.abab, (3, 1, 4, 2), (3, 4, 0)) - x3 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x3 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x3 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -0.5 x3 += einsum(x1, (0, 1, 2), (0, 1, 2)) x3 += einsum(x2, (0, 1, 2), (0, 1, 2)) * 0.5 t1new_aa += einsum(v.aaa.xvv, (0, 1, 2), x3, (3, 2, 0), (3, 1)) * 2.0 del x3 - x4 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x4 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 3, 1), (0, 3, 2)) - x5 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x5 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x5 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x5 += einsum(x4, (0, 1, 2), (0, 1, 2)) - x6 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nocc[1], nvir[1]), dtype=types[float]) x6 += einsum(v.abb.xov, (0, 1, 2), x5, (3, 4, 0), (4, 3, 1, 2)) del x5 t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x6, (0, 4, 1, 3), (4, 2)) * -1.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], naux), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], naux), dtype=types[float]) x7 += einsum(v.aaa.xoo, (0, 1, 2), (1, 2, 0)) x7 += einsum(x4, (0, 1, 2), (1, 0, 2)) - x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x8 += einsum(v.aaa.xov, (0, 1, 2), x7, (3, 4, 0), (4, 1, 3, 2)) del x7 t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x8, (4, 0, 1, 3), (4, 2)) * 2.0 del x8 - x9 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x9 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x9 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 3, 1), (0, 3, 2)) - x10 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x10 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x10 += einsum(v.abb.xov, (0, 1, 2), x9, (1, 3, 0), (3, 2)) - x11 = np.zeros((naux,), dtype=np.float64) + x11 = np.zeros((naux,), dtype=types[float]) x11 += einsum(t1.aa, (0, 1), v.aaa.xov, (2, 0, 1), (2,)) - x12 = np.zeros((naux,), dtype=np.float64) + x12 = np.zeros((naux,), dtype=types[float]) x12 += einsum(t1.bb, (0, 1), v.abb.xov, (2, 0, 1), (2,)) - x13 = np.zeros((naux,), dtype=np.float64) + x13 = np.zeros((naux,), dtype=types[float]) x13 += einsum(x11, (0,), (0,)) del x11 x13 += einsum(x12, (0,), (0,)) del x12 - x14 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x14 += einsum(x13, (0,), v.abb.xov, (0, 1, 2), (1, 2)) t1new_bb += einsum(x14, (0, 1), (0, 1)) - x15 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x15 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x15 += einsum(f.bb.ov, (0, 1), (0, 1)) x15 += einsum(x10, (0, 1), (0, 1)) * -1.0 del x10 @@ -82,14 +83,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t1new_aa += einsum(x15, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x15, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 del x15 - x16 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x16 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x16 += einsum(v.aaa.xov, (0, 1, 2), x4, (1, 3, 0), (3, 2)) del x4 - x17 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x17 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x17 += einsum(x13, (0,), v.aaa.xov, (0, 1, 2), (1, 2)) del x13 t1new_aa += einsum(x17, (0, 1), (0, 1)) - x18 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x18 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x18 += einsum(f.aa.ov, (0, 1), (0, 1)) x18 += einsum(x16, (0, 1), (0, 1)) * -1.0 del x16 @@ -98,86 +99,86 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t1new_aa += einsum(x18, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x18, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) del x18 - x19 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x19 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x19 += einsum(x1, (0, 1, 2), (0, 1, 2)) x19 += einsum(x2, (0, 1, 2), (0, 1, 2)) * 0.5 - x20 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x20 += einsum(f.aa.oo, (0, 1), (0, 1)) x20 += einsum(v.aaa.xov, (0, 1, 2), x19, (3, 2, 0), (1, 3)) * 2.0 t1new_aa += einsum(t1.aa, (0, 1), x20, (0, 2), (2, 1)) * -1.0 del x20 - x21 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x21 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x21 += einsum(t1.bb, (0, 1), v.abb.xoo, (2, 3, 0), (3, 1, 2)) - x22 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x22 += einsum(v.aaa.xov, (0, 1, 2), t2.abab, (1, 3, 2, 4), (3, 4, 0)) - x23 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x23 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x23 += einsum(v.abb.xov, (0, 1, 2), t2.bbbb, (3, 1, 4, 2), (3, 4, 0)) - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(x1, (0, 1, 2), x23, (3, 4, 2), (0, 3, 1, 4)) * 4.0 - x24 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x24 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x24 += einsum(x21, (0, 1, 2), (0, 1, 2)) * -0.5 x24 += einsum(x22, (0, 1, 2), (0, 1, 2)) * 0.5 x24 += einsum(x23, (0, 1, 2), (0, 1, 2)) t1new_bb += einsum(v.abb.xvv, (0, 1, 2), x24, (3, 2, 0), (3, 1)) * 2.0 - x25 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x25 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x25 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x25 += einsum(x9, (0, 1, 2), (0, 1, 2)) - x26 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[1], nocc[1], nvir[0]), dtype=types[float]) x26 += einsum(v.aaa.xov, (0, 1, 2), x25, (3, 4, 0), (1, 4, 3, 2)) del x25 t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x26, (0, 1, 4, 2), (4, 3)) * -1.0 del x26 - x27 = np.zeros((nocc[1], nocc[1], naux), dtype=np.float64) + x27 = np.zeros((nocc[1], nocc[1], naux), dtype=types[float]) x27 += einsum(v.abb.xoo, (0, 1, 2), (1, 2, 0)) x27 += einsum(x9, (0, 1, 2), (1, 0, 2)) del x9 - x28 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x28 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x28 += einsum(v.abb.xov, (0, 1, 2), x27, (3, 4, 0), (4, 1, 3, 2)) del x27 t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x28, (4, 0, 1, 3), (4, 2)) * 2.0 del x28 - x29 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x29 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x29 += einsum(x22, (0, 1, 2), (0, 1, 2)) x29 += einsum(x23, (0, 1, 2), (0, 1, 2)) * 2.0 - x30 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x30 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x30 += einsum(v.abb.xov, (0, 1, 2), x29, (3, 2, 0), (1, 3)) - x31 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x31 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x31 += einsum(f.bb.oo, (0, 1), (0, 1)) x31 += einsum(x30, (0, 1), (0, 1)) t1new_bb += einsum(t1.bb, (0, 1), x31, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x31, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x31 - x32 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=np.float64) + x32 = np.zeros((nvir[0], nvir[0], nvir[0], nvir[0]), dtype=types[float]) x32 += einsum(v.aaa.xvv, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x32, (4, 2, 5, 3), (0, 1, 4, 5)) * -2.0 del x32 - x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x33 += einsum(v.aaa.xov, (0, 1, 2), v.aaa.xov, (0, 3, 4), (1, 3, 2, 4)) - x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum(x33, (0, 1, 2, 3), (1, 0, 2, 3)) x34 += einsum(x33, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(t2.aaaa, (0, 1, 2, 3), x34, (1, 4, 3, 5), (0, 4, 2, 5)) - x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(t2.aaaa, (0, 1, 2, 3), x35, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x35 - x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x37 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x37 += einsum(v.abb.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x38 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x38 += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 x38 += einsum(x37, (0, 1, 2, 3), (1, 0, 3, 2)) - x39 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x39 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x39 += einsum(t2.abab, (0, 1, 2, 3), x38, (1, 4, 5, 3), (0, 4, 2, 5)) del x38 - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(t2.abab, (0, 1, 2, 3), x39, (4, 1, 5, 3), (0, 4, 2, 5)) * -1.0 del x39 - x41 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(v.aaa.xov, (0, 1, 2), x19, (1, 3, 0), (2, 3)) - x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x42 += einsum(x41, (0, 1), t2.aaaa, (2, 3, 4, 0), (2, 3, 4, 1)) * -4.0 - x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x43 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x36 x43 += einsum(x40, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -187,23 +188,23 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x43, (0, 1, 2, 3), (0, 1, 3, 2)) del x43 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(x44, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x44 x45 += einsum(x33, (0, 1, 2, 3), (1, 0, 2, 3)) t2new_aaaa += einsum(x45, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x45, (0, 1, 2, 3), (0, 1, 3, 2)) del x45 - x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x46 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x46 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x47 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x47 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x47 += einsum(v.aaa.xov, (0, 1, 2), x19, (3, 2, 0), (1, 3)) del x19 - x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x48 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x48 += einsum(x47, (0, 1), t2.aaaa, (2, 0, 3, 4), (2, 1, 3, 4)) * -4.0 - x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x49 += einsum(x46, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x46 x49 += einsum(x48, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -211,33 +212,33 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x49, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x49, (0, 1, 2, 3), (1, 0, 2, 3)) del x49 - x50 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x50 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x50 += einsum(t1.aa, (0, 1), v.aaa.xvv, (2, 3, 1), (0, 3, 2)) - x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x51 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x51 += einsum(v.aaa.xov, (0, 1, 2), x50, (3, 4, 0), (3, 1, 2, 4)) - x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x52 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x52 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) - x53 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x53 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x53 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x53 += einsum(x2, (0, 1, 2), (0, 1, 2)) - x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x54 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x54 += einsum(v.aaa.xov, (0, 1, 2), x53, (3, 4, 0), (1, 3, 2, 4)) del x53 - x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x55 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x55 += einsum(x52, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 x55 += einsum(x54, (0, 1, 2, 3), (0, 1, 2, 3)) del x54 - x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x56 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x56 += einsum(t2.aaaa, (0, 1, 2, 3), x55, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x55 - x57 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x57 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x57 += einsum(x0, (0, 1, 2), (0, 1, 2)) x57 += einsum(x2, (0, 1, 2), (0, 1, 2)) * -1.0 del x2 - x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x58 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x58 += einsum(v.aaa.xov, (0, 1, 2), x57, (3, 4, 0), (1, 3, 2, 4)) del x57 - x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x59 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x59 += einsum(x51, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x51 x59 += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) @@ -249,36 +250,36 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_aaaa += einsum(x59, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x59, (0, 1, 2, 3), (1, 0, 3, 2)) del x59 - x60 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x60 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x60 += einsum(v.aaa.xoo, (0, 1, 2), v.aaa.xoo, (0, 3, 4), (1, 3, 4, 2)) x60 += einsum(t2.aaaa, (0, 1, 2, 3), x33, (4, 5, 2, 3), (5, 0, 4, 1)) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x60, (0, 4, 1, 5), (4, 5, 2, 3)) * -2.0 del x60 - x61 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nvir[0], nvir[0], nvir[1], nvir[1]), dtype=types[float]) x61 += einsum(v.aaa.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x61, (4, 2, 5, 3), (0, 1, 4, 5)) del x61 - x62 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nvir[0], nvir[0]), dtype=types[float]) x62 += einsum(v.abb.xoo, (0, 1, 2), v.aaa.xvv, (0, 3, 4), (1, 2, 3, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x62, (4, 1, 5, 2), (0, 4, 5, 3)) * -1.0 del x62 - x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x63 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) - x64 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x64 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x64 += einsum(v.abb.xov, (0, 1, 2), (1, 2, 0)) x64 += einsum(x22, (0, 1, 2), (0, 1, 2)) x64 += einsum(x23, (0, 1, 2), (0, 1, 2)) * 2.0 - x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x63, (0, 1, 2, 3), (1, 0, 3, 2)) * -0.5 x65 += einsum(t2.bbbb, (0, 1, 2, 3), x37, (1, 4, 5, 3), (4, 0, 5, 2)) * -1.0 x65 += einsum(v.abb.xov, (0, 1, 2), x64, (3, 4, 0), (1, 3, 2, 4)) * 0.5 del x64 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x65, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x65 - x66 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x66 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x66 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x66 += einsum(x1, (0, 1, 2), (0, 1, 2)) * 2.0 - x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x67 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x67 += einsum(x52, (0, 1, 2, 3), (1, 0, 3, 2)) del x52 x67 += einsum(t2.aaaa, (0, 1, 2, 3), x33, (1, 4, 5, 3), (4, 0, 5, 2)) * 2.0 @@ -287,14 +288,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x66 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x67, (0, 4, 2, 5), (4, 1, 5, 3)) * -1.0 del x67 - x68 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x68 += einsum(v.aaa.xov, (0, 1, 2), v.abb.xov, (0, 3, 4), (1, 3, 2, 4)) - x69 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=np.float64) + x69 = np.zeros((nocc[0], nocc[0], nvir[1], nvir[1]), dtype=types[float]) x69 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 2, 3, 4)) x69 += einsum(t2.abab, (0, 1, 2, 3), x68, (4, 1, 2, 5), (4, 0, 5, 3)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x69, (0, 4, 3, 5), (4, 1, 2, 5)) * -1.0 del x69 - x70 = np.zeros((nocc[0], nvir[0], naux), dtype=np.float64) + x70 = np.zeros((nocc[0], nvir[0], naux), dtype=types[float]) x70 += einsum(v.aaa.xov, (0, 1, 2), (1, 2, 0)) x70 += einsum(x0, (0, 1, 2), (0, 1, 2)) * -1.0 del x0 @@ -304,56 +305,56 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non del x1 t2new_abab += einsum(v.abb.xov, (0, 1, 2), x70, (3, 4, 0), (3, 1, 4, 2)) del x70 - x71 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x71 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x71 += einsum(t1.bb, (0, 1), v.abb.xvv, (2, 3, 1), (0, 3, 2)) - x72 = np.zeros((nocc[1], nvir[1], naux), dtype=np.float64) + x72 = np.zeros((nocc[1], nvir[1], naux), dtype=types[float]) x72 += einsum(x21, (0, 1, 2), (0, 1, 2)) * -1.0 del x21 x72 += einsum(x71, (0, 1, 2), (0, 1, 2)) x72 += einsum(x23, (0, 1, 2), (0, 1, 2)) * 2.0 t2new_abab += einsum(v.aaa.xov, (0, 1, 2), x72, (3, 4, 0), (1, 3, 2, 4)) del x72 - x73 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(f.bb.vv, (0, 1), (0, 1)) * -0.5 x73 += einsum(v.abb.xov, (0, 1, 2), x29, (1, 3, 0), (2, 3)) * 0.5 t2new_abab += einsum(x73, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x73 - x74 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x74 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x74 += einsum(f.aa.vv, (0, 1), (0, 1)) * -0.5 x74 += einsum(x41, (0, 1), (0, 1)) del x41 t2new_abab += einsum(x74, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 del x74 - x75 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=np.float64) + x75 = np.zeros((nocc[0], nocc[0], nocc[1], nocc[1]), dtype=types[float]) x75 += einsum(v.aaa.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 2, 3, 4)) x75 += einsum(t2.abab, (0, 1, 2, 3), x68, (4, 5, 2, 3), (4, 0, 5, 1)) del x68 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x75, (0, 4, 1, 5), (4, 5, 2, 3)) del x75 - x76 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x76 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x76 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x76 += einsum(x47, (0, 1), (0, 1)) del x47 t2new_abab += einsum(x76, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 del x76 - x77 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=np.float64) + x77 = np.zeros((nvir[1], nvir[1], nvir[1], nvir[1]), dtype=types[float]) x77 += einsum(v.abb.xvv, (0, 1, 2), v.abb.xvv, (0, 3, 4), (1, 3, 4, 2)) - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x77, (4, 3, 5, 2), (0, 1, 4, 5)) * 2.0 del x77 - x78 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x78 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x78 += einsum(v.abb.xov, (0, 1, 2), x71, (3, 4, 0), (3, 1, 2, 4)) del x71 - x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x79 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x79 += einsum(t2.bbbb, (0, 1, 2, 3), x63, (4, 1, 5, 3), (0, 4, 2, 5)) del x63 - x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x80 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x80 += einsum(x22, (0, 1, 2), x23, (3, 4, 2), (0, 3, 1, 4)) del x23, x22 - x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x81 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x81 += einsum(v.abb.xov, (0, 1, 2), x24, (3, 4, 0), (1, 3, 2, 4)) * 2.0 del x24 - x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x82 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x82 += einsum(x78, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x78 x82 += einsum(x79, (0, 1, 2, 3), (0, 1, 2, 3)) * -2.0 @@ -367,12 +368,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x82, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x82, (0, 1, 2, 3), (1, 0, 3, 2)) del x82 - x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x83 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x83 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x84 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x84 += einsum(x30, (0, 1), t2.bbbb, (2, 0, 3, 4), (2, 1, 3, 4)) * -2.0 del x30 - x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x85 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x85 += einsum(x83, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x83 x85 += einsum(x84, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -380,22 +381,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x85, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x85, (0, 1, 2, 3), (1, 0, 2, 3)) del x85 - x86 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x86 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x86 += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) x86 += einsum(x37, (0, 1, 2, 3), (1, 0, 3, 2)) * -1.0 - x87 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x87 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x87 += einsum(t2.bbbb, (0, 1, 2, 3), x86, (1, 4, 3, 5), (0, 4, 2, 5)) del x86 - x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x88 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x88 += einsum(t2.bbbb, (0, 1, 2, 3), x87, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x87 - x89 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x89 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x89 += einsum(v.abb.xov, (0, 1, 2), x29, (1, 3, 0), (2, 3)) del x29 - x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x90 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x90 += einsum(x89, (0, 1), t2.bbbb, (2, 3, 4, 0), (2, 3, 4, 1)) * -2.0 del x89 - x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x91 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x91 += einsum(x88, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x88 x91 += einsum(x90, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -403,15 +404,15 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x91, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x91, (0, 1, 2, 3), (0, 1, 3, 2)) del x91 - x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x92 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x92 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x93 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + x93 = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) x93 += einsum(t2.abab, (0, 1, 2, 3), x34, (0, 4, 2, 5), (4, 1, 5, 3)) del x34 - x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x94 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x94 += einsum(t2.abab, (0, 1, 2, 3), x93, (0, 4, 2, 5), (1, 4, 3, 5)) * -1.0 del x93 - x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x95 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x95 += einsum(x92, (0, 1, 2, 3), (1, 0, 2, 3)) * -2.0 del x92 x95 += einsum(x37, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -420,7 +421,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, naux=None, t1=None, t2=Non t2new_bbbb += einsum(x95, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x95, (0, 1, 2, 3), (0, 1, 3, 2)) del x95 - x96 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x96 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x96 += einsum(v.abb.xoo, (0, 1, 2), v.abb.xoo, (0, 3, 4), (1, 3, 4, 2)) x96 += einsum(t2.bbbb, (0, 1, 2, 3), x37, (4, 5, 2, 3), (5, 0, 4, 1)) del x37 diff --git a/ebcc/codegen/UMP2.py b/ebcc/codegen/UMP2.py index f7e9d1cd..e278c5ca 100644 --- a/ebcc/codegen/UMP2.py +++ b/ebcc/codegen/UMP2.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy diff --git a/ebcc/codegen/UMP3.py b/ebcc/codegen/UMP3.py index 0448f076..fca384bb 100644 --- a/ebcc/codegen/UMP3.py +++ b/ebcc/codegen/UMP3.py @@ -2,29 +2,30 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, direct_sum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): # energy - x0 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x0 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x0 += einsum(t2.bbbb, (0, 1, 2, 3), t2.bbbb, (4, 5, 2, 3), (0, 4, 5, 1)) e_mp = 0 e_mp += einsum(v.bbbb.oooo, (0, 1, 2, 3), x0, (0, 1, 3, 2), ()) del x0 - x1 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x1 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x1 += einsum(t2.abab, (0, 1, 2, 3), t2.abab, (4, 5, 2, 3), (1, 5, 0, 4)) e_mp += einsum(v.aabb.oooo, (0, 1, 2, 3), x1, (3, 2, 0, 1), ()) del x1 - x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(t2.aaaa, (0, 1, 2, 3), t2.aaaa, (4, 5, 2, 3), (0, 4, 5, 1)) e_mp += einsum(v.aaaa.oooo, (0, 1, 2, 3), x2, (1, 2, 0, 3), ()) * -1.0 del x2 - x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x3 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x3 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x4 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x4 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x4 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x5 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x5 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x5 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) * 4.0 x5 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvoo, (4, 2, 5, 1), (5, 3, 0, 4)) * -1.0 @@ -36,14 +37,14 @@ def energy(f=None, v=None, nocc=None, nvir=None, t2=None, **kwargs): x5 += einsum(t2.abab, (0, 1, 2, 3), x4, (0, 4, 2, 5), (1, 3, 4, 5)) * -1.0 e_mp += einsum(t2.abab, (0, 1, 2, 3), x5, (1, 3, 0, 2), ()) del x5 - x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x6 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x6 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x6 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -1.0 x6 += einsum(t2.aaaa, (0, 1, 2, 3), x4, (1, 4, 3, 5), (4, 0, 5, 2)) * -4.0 del x4 e_mp += einsum(t2.aaaa, (0, 1, 2, 3), x6, (1, 0, 2, 3), ()) * -1.0 del x6 - x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x7 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x7 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x7 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.oovv, (4, 1, 5, 3), (4, 0, 2, 5)) * 4.0 x7 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 5, 1, 3), (0, 4, 5, 2)) * -4.0 diff --git a/ebcc/codegen/UQCISD.py b/ebcc/codegen/UQCISD.py index ed2899b3..32cc7195 100644 --- a/ebcc/codegen/UQCISD.py +++ b/ebcc/codegen/UQCISD.py @@ -2,6 +2,7 @@ from ebcc import numpy as np from ebcc.util import pack_2e, einsum, Namespace +from ebcc.precision import types def energy(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs): # energy @@ -17,17 +18,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new = Namespace() # T amplitudes - t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + t1new_aa = np.zeros((nocc[0], nvir[0]), dtype=types[float]) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvov, (4, 2, 1, 3), (0, 4)) t1new_aa += einsum(f.aa.vv, (0, 1), t1.aa, (2, 1), (2, 0)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovvv, (1, 3, 4, 2), (0, 4)) * 2.0 - t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + t1new_bb = np.zeros((nocc[1], nvir[1]), dtype=types[float]) t1new_bb += einsum(f.bb.vv, (0, 1), t1.bb, (2, 1), (2, 0)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovvv, (0, 2, 4, 3), (1, 4)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovvv, (1, 2, 4, 3), (0, 4)) * -2.0 - t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + t2new_aaaa = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=np.float64) + t2new_abab = np.zeros((nocc[0], nocc[1], nvir[0], nvir[1]), dtype=types[float]) t2new_abab += einsum(t1.bb, (0, 1), v.aabb.ovvv, (2, 3, 4, 1), (2, 0, 3, 4)) t2new_abab += einsum(t1.aa, (0, 1), v.aabb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvvv, (4, 2, 5, 3), (0, 1, 4, 5)) @@ -35,30 +36,30 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_abab += einsum(t1.aa, (0, 1), v.aabb.vvov, (2, 1, 3, 4), (0, 3, 2, 4)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), v.aabb.vvoo, (4, 2, 5, 1), (0, 5, 4, 3)) * -1.0 t2new_abab += einsum(t1.bb, (0, 1), v.aabb.ovoo, (2, 3, 4, 0), (2, 4, 3, 1)) * -1.0 - t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + t2new_bbbb = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.vvvv, (4, 3, 5, 2), (0, 1, 4, 5)) * -2.0 - x0 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x0 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x0 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 0, 1), (2, 3)) t1new_aa += einsum(x0, (0, 1), (0, 1)) - x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=np.float64) + x1 = np.zeros((nocc[0], nocc[0], nocc[0], nvir[0]), dtype=types[float]) x1 += einsum(v.aaaa.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x1 += einsum(t1.aa, (0, 1), v.aaaa.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) t1new_aa += einsum(t2.aaaa, (0, 1, 2, 3), x1, (4, 0, 1, 3), (4, 2)) * 2.0 del x1 - x2 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x2 = np.zeros((nocc[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x2 += einsum(v.aabb.ooov, (0, 1, 2, 3), (2, 3, 0, 1)) x2 += einsum(t1.aa, (0, 1), v.aabb.ovov, (2, 1, 3, 4), (3, 4, 2, 0)) t1new_aa += einsum(t2.abab, (0, 1, 2, 3), x2, (1, 3, 0, 4), (4, 2)) * -1.0 del x2 - x3 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x3 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x3 += einsum(t1.aa, (0, 1), v.aabb.ovov, (0, 1, 2, 3), (2, 3)) t1new_bb += einsum(x3, (0, 1), (0, 1)) - x4 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x4 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x4 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x4 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x5 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x5 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x5 += einsum(t1.bb, (0, 1), x4, (0, 2, 3, 1), (2, 3)) - x6 = np.zeros((nocc[1], nvir[1]), dtype=np.float64) + x6 = np.zeros((nocc[1], nvir[1]), dtype=types[float]) x6 += einsum(f.bb.ov, (0, 1), (0, 1)) x6 += einsum(x3, (0, 1), (0, 1)) del x3 @@ -67,12 +68,12 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t1new_aa += einsum(x6, (0, 1), t2.abab, (2, 0, 3, 1), (2, 3)) t1new_bb += einsum(x6, (0, 1), t2.bbbb, (2, 0, 3, 1), (2, 3)) * 2.0 del x6 - x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x7 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x7 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) * -1.0 x7 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) - x8 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x8 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x8 += einsum(t1.aa, (0, 1), x7, (0, 2, 3, 1), (2, 3)) - x9 = np.zeros((nocc[0], nvir[0]), dtype=np.float64) + x9 = np.zeros((nocc[0], nvir[0]), dtype=types[float]) x9 += einsum(f.aa.ov, (0, 1), (0, 1)) x9 += einsum(x0, (0, 1), (0, 1)) del x0 @@ -81,64 +82,64 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t1new_aa += einsum(x9, (0, 1), t2.aaaa, (2, 0, 3, 1), (2, 3)) * 2.0 t1new_bb += einsum(x9, (0, 1), t2.abab, (0, 2, 1, 3), (2, 3)) del x9 - x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x10 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x10 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x10 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_aa += einsum(t1.aa, (0, 1), x10, (0, 2, 1, 3), (2, 3)) * -1.0 - x11 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x11 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x11 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 3), (0, 4)) - x12 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x12 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x12 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x13 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x13 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x13 += einsum(f.aa.oo, (0, 1), (0, 1)) * 0.5 x13 += einsum(x11, (0, 1), (1, 0)) * 0.5 x13 += einsum(x12, (0, 1), (1, 0)) t1new_aa += einsum(t1.aa, (0, 1), x13, (0, 2), (2, 1)) * -2.0 t2new_abab += einsum(x13, (0, 1), t2.abab, (0, 2, 3, 4), (1, 2, 3, 4)) * -2.0 del x13 - x14 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=np.float64) + x14 = np.zeros((nocc[1], nocc[1], nocc[1], nvir[1]), dtype=types[float]) x14 += einsum(v.bbbb.ooov, (0, 1, 2, 3), (0, 2, 1, 3)) x14 += einsum(t1.bb, (0, 1), v.bbbb.ovov, (2, 3, 4, 1), (0, 2, 4, 3)) t1new_bb += einsum(t2.bbbb, (0, 1, 2, 3), x14, (4, 1, 0, 3), (4, 2)) * -2.0 del x14 - x15 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=np.float64) + x15 = np.zeros((nocc[1], nocc[1], nocc[0], nvir[0]), dtype=types[float]) x15 += einsum(v.aabb.ovoo, (0, 1, 2, 3), (2, 3, 0, 1)) x15 += einsum(t1.bb, (0, 1), v.aabb.ovov, (2, 3, 4, 1), (4, 0, 2, 3)) t1new_bb += einsum(t2.abab, (0, 1, 2, 3), x15, (1, 4, 0, 2), (4, 3)) * -1.0 del x15 - x16 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x16 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x16 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x16 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 t1new_bb += einsum(t1.bb, (0, 1), x16, (0, 2, 1, 3), (2, 3)) * -1.0 del x16 - x17 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x17 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x17 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 1, 2), (0, 4)) * -1.0 - x18 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x18 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x18 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 3), (1, 4)) - x19 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x19 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x19 += einsum(f.bb.oo, (0, 1), (0, 1)) x19 += einsum(x17, (0, 1), (1, 0)) * 2.0 x19 += einsum(x18, (0, 1), (1, 0)) t1new_bb += einsum(t1.bb, (0, 1), x19, (0, 2), (2, 1)) * -1.0 t2new_abab += einsum(x19, (0, 1), t2.abab, (2, 0, 3, 4), (2, 1, 3, 4)) * -1.0 del x19 - x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x20 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x20 += einsum(t1.aa, (0, 1), v.aaaa.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x21 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x21 += einsum(t1.aa, (0, 1), v.aaaa.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x22 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x22 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x22 += einsum(t2.aaaa, (0, 1, 2, 3), v.aabb.ovov, (1, 3, 4, 5), (4, 5, 0, 2)) - x23 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x23 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x23 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) x23 += einsum(x22, (0, 1, 2, 3), (0, 1, 2, 3)) * 2.0 del x22 - x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x24 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x24 += einsum(t2.abab, (0, 1, 2, 3), x23, (1, 3, 4, 5), (0, 4, 2, 5)) del x23 - x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x25 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x25 += einsum(t2.aaaa, (0, 1, 2, 3), x10, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x10 - x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x26 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x26 += einsum(x20, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x20 x26 += einsum(x21, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -152,14 +153,14 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x26, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_aaaa += einsum(x26, (0, 1, 2, 3), (1, 0, 3, 2)) del x26 - x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x27 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x27 += einsum(f.aa.vv, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 0, 4)) - x28 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x28 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x28 += einsum(t2.abab, (0, 1, 2, 3), x4, (1, 4, 5, 3), (4, 5, 0, 2)) - x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x29 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x29 += einsum(t2.abab, (0, 1, 2, 3), x28, (1, 3, 4, 5), (0, 4, 2, 5)) * -1.0 del x28 - x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x30 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x30 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x30 += einsum(x27, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x27 @@ -168,17 +169,17 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x30, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_aaaa += einsum(x30, (0, 1, 2, 3), (0, 1, 2, 3)) del x30 - x31 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x31 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x31 += einsum(f.aa.oo, (0, 1), t2.aaaa, (2, 1, 3, 4), (0, 2, 3, 4)) - x32 = np.zeros((nocc[0], nocc[0]), dtype=np.float64) + x32 = np.zeros((nocc[0], nocc[0]), dtype=types[float]) x32 += einsum(x11, (0, 1), (0, 1)) del x11 x32 += einsum(x12, (0, 1), (0, 1)) * 2.0 del x12 - x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x33 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x33 += einsum(x32, (0, 1), t2.aaaa, (2, 1, 3, 4), (2, 0, 3, 4)) * -2.0 del x32 - x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x34 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x34 += einsum(x31, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x31 x34 += einsum(x33, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -186,22 +187,22 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x34, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x34, (0, 1, 2, 3), (1, 0, 2, 3)) del x34 - x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x35 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x35 += einsum(t2.aaaa, (0, 1, 2, 3), x7, (1, 4, 5, 3), (0, 4, 2, 5)) - x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x36 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x36 += einsum(t2.aaaa, (0, 1, 2, 3), x35, (4, 1, 5, 3), (0, 4, 2, 5)) * -4.0 del x35 - x37 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x37 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x37 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 4, 1, 3), (2, 4)) - x38 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x38 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x38 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (0, 3, 1, 4), (2, 4)) * -1.0 - x39 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x39 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x39 += einsum(x37, (0, 1), (0, 1)) x39 += einsum(x38, (0, 1), (0, 1)) * 2.0 - x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x40 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x40 += einsum(x39, (0, 1), t2.aaaa, (2, 3, 4, 1), (2, 3, 4, 0)) * -2.0 del x39 - x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x41 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x41 += einsum(x36, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x36 x41 += einsum(x40, (0, 1, 2, 3), (1, 0, 2, 3)) @@ -209,18 +210,18 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_aaaa += einsum(x41, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_aaaa += einsum(x41, (0, 1, 2, 3), (0, 1, 3, 2)) del x41 - x42 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=np.float64) + x42 = np.zeros((nocc[0], nocc[0], nocc[0], nocc[0]), dtype=types[float]) x42 += einsum(v.aaaa.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x42 += einsum(t2.aaaa, (0, 1, 2, 3), v.aaaa.ovov, (4, 3, 5, 2), (4, 0, 5, 1)) * -1.0 t2new_aaaa += einsum(t2.aaaa, (0, 1, 2, 3), x42, (0, 4, 1, 5), (4, 5, 2, 3)) * 2.0 del x42 - x43 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x43 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x43 += einsum(t2.bbbb, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (0, 2, 4, 5)) t2new_abab += einsum(x43, (0, 1, 2, 3), (2, 0, 3, 1)) * 2.0 - x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x44 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x44 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x44 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=np.float64) + x45 = np.zeros((nocc[0], nocc[0], nvir[0], nvir[0]), dtype=types[float]) x45 += einsum(v.aaaa.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x45 += einsum(v.aaaa.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x45 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 5, 1, 3), (4, 0, 5, 2)) @@ -228,38 +229,38 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x44 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x45, (0, 4, 2, 5), (4, 1, 5, 3)) del x45 - x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x46 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x46 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 3, 1)) x46 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 - x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x47 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x47 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) x47 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) * -1.0 x47 += einsum(t2.bbbb, (0, 1, 2, 3), x46, (1, 4, 5, 3), (4, 0, 5, 2)) * -2.0 del x46 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x47, (1, 4, 3, 5), (0, 4, 2, 5)) * -1.0 del x47 - x48 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=np.float64) + x48 = np.zeros((nvir[1], nvir[1], nocc[0], nocc[0]), dtype=types[float]) x48 += einsum(v.aabb.oovv, (0, 1, 2, 3), (2, 3, 0, 1)) x48 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 1, 5), (5, 3, 4, 0)) * -1.0 t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x48, (3, 4, 0, 5), (5, 1, 2, 4)) * -1.0 del x48 - x49 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x49 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x49 += einsum(v.aabb.ovov, (0, 1, 2, 3), (2, 3, 0, 1)) * 0.5 x49 += einsum(x43, (0, 1, 2, 3), (0, 1, 2, 3)) del x43 t2new_abab += einsum(t2.aaaa, (0, 1, 2, 3), x49, (4, 5, 1, 3), (0, 4, 2, 5)) * 4.0 del x49 - x50 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x50 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x50 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (0, 4, 1, 3), (2, 4)) - x51 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x51 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x51 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 1, 4), (3, 4)) - x52 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x52 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x52 += einsum(f.bb.vv, (0, 1), (0, 1)) * -1.0 x52 += einsum(x50, (0, 1), (1, 0)) * 2.0 x52 += einsum(x51, (0, 1), (1, 0)) t2new_abab += einsum(x52, (0, 1), t2.abab, (2, 3, 4, 0), (2, 3, 4, 1)) * -1.0 del x52 - x53 = np.zeros((nvir[0], nvir[0]), dtype=np.float64) + x53 = np.zeros((nvir[0], nvir[0]), dtype=types[float]) x53 += einsum(f.aa.vv, (0, 1), (0, 1)) * -0.5 x53 += einsum(x37, (0, 1), (1, 0)) * 0.5 del x37 @@ -267,25 +268,25 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs del x38 t2new_abab += einsum(x53, (0, 1), t2.abab, (2, 3, 0, 4), (2, 3, 1, 4)) * -2.0 del x53 - x54 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=np.float64) + x54 = np.zeros((nocc[1], nocc[1], nocc[0], nocc[0]), dtype=types[float]) x54 += einsum(v.aabb.oooo, (0, 1, 2, 3), (2, 3, 0, 1)) x54 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (4, 2, 5, 3), (5, 1, 4, 0)) t2new_abab += einsum(t2.abab, (0, 1, 2, 3), x54, (1, 4, 0, 5), (5, 4, 2, 3)) del x54 - x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x55 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x55 += einsum(t1.bb, (0, 1), v.bbbb.ooov, (2, 0, 3, 4), (2, 3, 1, 4)) - x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x56 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x56 += einsum(t1.bb, (0, 1), v.bbbb.ovvv, (2, 3, 4, 1), (0, 2, 3, 4)) - x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x57 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x57 += einsum(t2.abab, (0, 1, 2, 3), v.aabb.ovov, (0, 2, 4, 5), (1, 4, 3, 5)) - x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x58 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x58 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x58 += einsum(v.bbbb.oovv, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 x58 += einsum(x57, (0, 1, 2, 3), (1, 0, 3, 2)) - x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x59 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x59 += einsum(t2.bbbb, (0, 1, 2, 3), x58, (1, 4, 3, 5), (0, 4, 2, 5)) * 2.0 del x58 - x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x60 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x60 += einsum(x55, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x55 x60 += einsum(x56, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -299,26 +300,26 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x60, (0, 1, 2, 3), (1, 0, 2, 3)) * -1.0 t2new_bbbb += einsum(x60, (0, 1, 2, 3), (1, 0, 3, 2)) del x60 - x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x61 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x61 += einsum(f.bb.vv, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 0, 4)) - x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x62 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x62 += einsum(v.bbbb.ovov, (0, 1, 2, 3), (0, 2, 1, 3)) x62 += einsum(x61, (0, 1, 2, 3), (1, 0, 3, 2)) * -2.0 del x61 t2new_bbbb += einsum(x62, (0, 1, 2, 3), (0, 1, 3, 2)) * -1.0 t2new_bbbb += einsum(x62, (0, 1, 2, 3), (0, 1, 2, 3)) del x62 - x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x63 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x63 += einsum(f.bb.oo, (0, 1), t2.bbbb, (2, 1, 3, 4), (0, 2, 3, 4)) - x64 = np.zeros((nocc[1], nocc[1]), dtype=np.float64) + x64 = np.zeros((nocc[1], nocc[1]), dtype=types[float]) x64 += einsum(x17, (0, 1), (0, 1)) del x17 x64 += einsum(x18, (0, 1), (0, 1)) * 0.5 del x18 - x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x65 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x65 += einsum(x64, (0, 1), t2.bbbb, (2, 1, 3, 4), (2, 0, 3, 4)) * -4.0 del x64 - x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x66 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x66 += einsum(x63, (0, 1, 2, 3), (0, 1, 3, 2)) * 2.0 del x63 x66 += einsum(x65, (0, 1, 2, 3), (0, 1, 3, 2)) @@ -326,27 +327,27 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x66, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x66, (0, 1, 2, 3), (1, 0, 2, 3)) del x66 - x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x67 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x67 += einsum(t2.bbbb, (0, 1, 2, 3), x4, (1, 4, 5, 3), (4, 0, 5, 2)) del x4 - x68 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x68 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x68 += einsum(t2.bbbb, (0, 1, 2, 3), x67, (1, 4, 3, 5), (0, 4, 2, 5)) * -4.0 del x67 - x69 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=np.float64) + x69 = np.zeros((nocc[1], nvir[1], nocc[0], nvir[0]), dtype=types[float]) x69 += einsum(t2.abab, (0, 1, 2, 3), x7, (0, 4, 5, 2), (1, 3, 4, 5)) del x7 - x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x70 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x70 += einsum(t2.abab, (0, 1, 2, 3), x69, (4, 5, 0, 2), (1, 4, 3, 5)) * -1.0 del x69 - x71 = np.zeros((nvir[1], nvir[1]), dtype=np.float64) + x71 = np.zeros((nvir[1], nvir[1]), dtype=types[float]) x71 += einsum(x50, (0, 1), (0, 1)) del x50 x71 += einsum(x51, (0, 1), (0, 1)) * 0.5 del x51 - x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x72 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x72 += einsum(x71, (0, 1), t2.bbbb, (2, 3, 4, 1), (2, 3, 4, 0)) * -4.0 del x71 - x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=np.float64) + x73 = np.zeros((nocc[1], nocc[1], nvir[1], nvir[1]), dtype=types[float]) x73 += einsum(x68, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 del x68 x73 += einsum(x70, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 @@ -356,7 +357,7 @@ def update_amps(f=None, v=None, nocc=None, nvir=None, t1=None, t2=None, **kwargs t2new_bbbb += einsum(x73, (0, 1, 2, 3), (0, 1, 2, 3)) * -1.0 t2new_bbbb += einsum(x73, (0, 1, 2, 3), (0, 1, 3, 2)) del x73 - x74 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=np.float64) + x74 = np.zeros((nocc[1], nocc[1], nocc[1], nocc[1]), dtype=types[float]) x74 += einsum(v.bbbb.oooo, (0, 1, 2, 3), (0, 1, 2, 3)) x74 += einsum(t2.bbbb, (0, 1, 2, 3), v.bbbb.ovov, (4, 3, 5, 2), (4, 0, 1, 5)) * -1.0 t2new_bbbb += einsum(t2.bbbb, (0, 1, 2, 3), x74, (0, 4, 5, 1), (5, 4, 2, 3)) * -2.0 diff --git a/ebcc/eris.py b/ebcc/eris.py index a6de02fd..6105ea06 100644 --- a/ebcc/eris.py +++ b/ebcc/eris.py @@ -2,7 +2,9 @@ from pyscf import ao2mo +from ebcc import numpy as np from ebcc import util +from ebcc.precision import types class ERIs(util.Namespace): @@ -75,10 +77,14 @@ def __getattr__(self, key): if key not in self.__dict__.keys(): coeffs = [] for i, k in enumerate(key): - coeffs.append(self.mo_coeff[i][:, self.slices[i][k]]) - block = ao2mo.incore.general(self.mf._eri, coeffs, compact=False) + coeffs.append(self.mo_coeff[i][:, self.slices[i][k]].astype(np.float64)) + block = ao2mo.incore.general( + self.mf._eri, + coeffs, + compact=False, + ) block = block.reshape([c.shape[-1] for c in coeffs]) - self.__dict__[key] = block + self.__dict__[key] = block.astype(types[float]) return self.__dict__[key] else: slices = [] @@ -144,18 +150,25 @@ def __init__(self, ebcc, array=None, slices=None, mo_coeff=None): # Have spin-dependent coulomb interaction; precalculate # required arrays for simplicity. arrays_aabb = ao2mo.incore.general( - self.mf._eri[1], [self.mo_coeff[i] for i in (0, 0, 1, 1)], compact=False + self.mf._eri[1], + [self.mo_coeff[i].astype(np.float64) for i in (0, 0, 1, 1)], + compact=False, ) arrays = ( ao2mo.incore.general( - self.mf._eri[0], [self.mo_coeff[i] for i in (0, 0, 0, 0)], compact=False + self.mf._eri[0], + [self.mo_coeff[i].astype(np.float64) for i in (0, 0, 0, 0)], + compact=False, ), arrays_aabb, arrays_aabb.transpose(2, 3, 0, 1), ao2mo.incore.general( - self.mf._eri[2], [self.mo_coeff[i] for i in (1, 1, 1, 1)], compact=False + self.mf._eri[2], + [self.mo_coeff[i].astype(np.float64) for i in (1, 1, 1, 1)], + compact=False, ), ) + arrays = tuple(array.astype(types[float]) for array in arrays) else: arrays = (None, None, None, None) @@ -198,8 +211,8 @@ def __init__(self, ebcc, array=None, slices=None, mo_coeff=None): mo_coeff = [mo_coeff] * 4 if array is None: - mo_a = [mo[: ebcc.mf.mol.nao] for mo in mo_coeff] - mo_b = [mo[ebcc.mf.mol.nao :] for mo in mo_coeff] + mo_a = [mo[: ebcc.mf.mol.nao].astype(np.float64) for mo in mo_coeff] + mo_b = [mo[ebcc.mf.mol.nao :].astype(np.float64) for mo in mo_coeff] array = ao2mo.kernel(ebcc.mf._eri, mo_a) array += ao2mo.kernel(ebcc.mf._eri, mo_b) @@ -207,6 +220,7 @@ def __init__(self, ebcc, array=None, slices=None, mo_coeff=None): array += ao2mo.kernel(ebcc.mf._eri, mo_b[:2] + mo_a[2:]) array = ao2mo.addons.restore(1, array, ebcc.nmo) + array = array.astype(types[float]) array = array.reshape((ebcc.nmo,) * 4) array = array.transpose(0, 2, 1, 3) - array.transpose(0, 2, 3, 1) diff --git a/ebcc/fock.py b/ebcc/fock.py index 3f32e711..39e5856d 100644 --- a/ebcc/fock.py +++ b/ebcc/fock.py @@ -1,6 +1,8 @@ """Fock matrix containers.""" +from ebcc import numpy as np from ebcc import util +from ebcc.precision import types class Fock(util.Namespace): @@ -62,7 +64,7 @@ def __init__(self, ebcc, array=None, slices=None, mo_coeff=None, g=None): self.mo_coeff = [self.mo_coeff] * 2 if self.array is None: - fock_ao = self.mf.get_fock() + fock_ao = self.mf.get_fock().astype(types[float]) self.array = util.einsum("pq,pi,qj->ij", fock_ao, *self.mo_coeff) if self.slices is None: @@ -150,7 +152,7 @@ def __init__(self, ebcc, array=None, slices=None, mo_coeff=None): ] if self.array is None: - fock_ao = self.mf.get_fock() + fock_ao = np.asarray(self.mf.get_fock()).astype(types[float]) self.array = ( util.einsum("pq,pi,qj->ij", fock_ao[0], self.mo_coeff[0], self.mo_coeff[0]), util.einsum("pq,pi,qj->ij", fock_ao[1], self.mo_coeff[1], self.mo_coeff[1]), diff --git a/ebcc/gebcc.py b/ebcc/gebcc.py index d27f5524..c7c4ef9f 100644 --- a/ebcc/gebcc.py +++ b/ebcc/gebcc.py @@ -1,12 +1,14 @@ """General electron-boson coupled cluster.""" -import numpy as np from pyscf import lib, scf -from ebcc import geom, uebcc, util +from ebcc import geom +from ebcc import numpy as np +from ebcc import uebcc, util from ebcc.brueckner import BruecknerGEBCC from ebcc.eris import GERIs from ebcc.fock import GFock +from ebcc.precision import types from ebcc.rebcc import REBCC from ebcc.space import Space @@ -99,7 +101,7 @@ def from_uebcc(cls, ucc): for name, key, n in ucc.ansatz.fermionic_cluster_ranks(spin_type=ucc.spin_type): shape = tuple(space.size(k) for k in key) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) for comb in util.generate_spin_combinations(n, unique=True): done = set() for lperm, lsign in util.permutations_with_signs(tuple(range(n))): @@ -126,7 +128,7 @@ def from_uebcc(cls, ucc): for name, key, nf, nb in ucc.ansatz.coupling_cluster_ranks(spin_type=ucc.spin_type): shape = (nbos,) * nb + tuple(space.size(k) for k in key[nb:]) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) for comb in util.generate_spin_combinations(nf): done = set() for lperm, lsign in util.permutations_with_signs(tuple(range(nf))): @@ -167,7 +169,7 @@ def from_uebcc(cls, ucc): for name, key, n in ucc.ansatz.fermionic_cluster_ranks(spin_type=ucc.spin_type): lname = name.replace("t", "l") shape = tuple(space.size(k) for k in key[n:] + key[:n]) - lambdas[lname] = np.zeros(shape) + lambdas[lname] = np.zeros(shape, dtype=types[float]) for comb in util.generate_spin_combinations(n, unique=True): done = set() for lperm, lsign in util.permutations_with_signs(tuple(range(n))): @@ -198,7 +200,7 @@ def from_uebcc(cls, ucc): shape = (nbos,) * nb + tuple( space.size(k) for k in key[nb + nf :] + key[nb : nb + nf] ) - lambdas[lname] = np.zeros(shape) + lambdas[lname] = np.zeros(shape, dtype=types[float]) for comb in util.generate_spin_combinations(nf, unique=True): done = set() for lperm, lsign in util.permutations_with_signs(tuple(range(nf))): @@ -272,7 +274,7 @@ def init_amps(self, eris=None): amplitudes[name] = getattr(eris, key) / self.energy_sum(key) else: shape = tuple(self.space.size(k) for k in key) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) if self.boson_ansatz: # Only true for real-valued couplings: @@ -285,7 +287,7 @@ def init_amps(self, eris=None): amplitudes[name] = -H / self.omega else: shape = (self.nbos,) * n - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) # Build U amplitudes: for name, key, nf, nb in self.ansatz.coupling_cluster_ranks(spin_type=self.spin_type): @@ -295,7 +297,7 @@ def init_amps(self, eris=None): amplitudes[name] = h[key] / self.energy_sum(key) else: shape = (self.nbos,) * nb + tuple(self.space.size(k) for k in key[nb:]) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) return amplitudes diff --git a/ebcc/precision.py b/ebcc/precision.py new file mode 100644 index 00000000..7b98aed2 --- /dev/null +++ b/ebcc/precision.py @@ -0,0 +1,54 @@ +"""Floating point precision control.""" + +from contextlib import contextmanager + +from ebcc import numpy as np + +types = { + float: np.float64, + complex: np.complex128, +} + + +def set_precision(**kwargs): + """Set the floating point type. + + Parameters + ---------- + float : type, optional + The floating point type to use. + complex : type, optional + The complex type to use. + """ + types[float] = kwargs.get("float", types[float]) + types[complex] = kwargs.get("complex", types[complex]) + + +@contextmanager +def precision(**kwargs): + """Context manager for setting the floating point precision. + + Parameters + ---------- + float : type, optional + The floating point type to use. + complex : type, optional + The complex type to use. + """ + old = { + "float": types[float], + "complex": types[complex], + } + set_precision(**kwargs) + yield + set_precision(**old) + + +@contextmanager +def single_precision(): + """ + Context manager for setting the floating point precision to single + precision. + """ + with precision(float=np.float32, complex=np.complex64): + yield diff --git a/ebcc/rebcc.py b/ebcc/rebcc.py index 9e5f0729..8eff7dc9 100644 --- a/ebcc/rebcc.py +++ b/ebcc/rebcc.py @@ -2,16 +2,18 @@ import dataclasses -import numpy as np from pyscf import lib -from ebcc import default_log, init_logging, reom, util +from ebcc import default_log, init_logging +from ebcc import numpy as np +from ebcc import reom, util from ebcc.ansatz import Ansatz from ebcc.brueckner import BruecknerREBCC from ebcc.cderis import RCDERIs from ebcc.dump import Dump from ebcc.eris import RERIs from ebcc.fock import RFock +from ebcc.precision import types from ebcc.space import Space @@ -264,8 +266,8 @@ def __init__( # Parameters: self.log = default_log if log is None else log self.mf = self._convert_mf(mf) - self._mo_coeff = mo_coeff - self._mo_occ = mo_occ + self._mo_coeff = np.asarray(mo_coeff).astype(types[float]) if mo_coeff is not None else None + self._mo_occ = np.asarray(mo_occ).astype(types[float]) if mo_occ is not None else None # Ansatz: if isinstance(ansatz, Ansatz): @@ -287,9 +289,9 @@ def __init__( raise ValueError( "Fermionic and bosonic coupling ranks must both be zero, or both non-zero." ) - self.omega = omega - self.bare_g = g - self.bare_G = G + self.omega = omega.astype(types[float]) if omega is not None else None + self.bare_g = g.astype(types[float]) if g is not None else None + self.bare_G = G.astype(types[float]) if G is not None else None if self.boson_ansatz != "": self.g = self.get_g(g) self.G = self.get_mean_field_G() @@ -678,7 +680,7 @@ def init_amps(self, eris=None): amplitudes[name] = eris[key_t].swapaxes(1, 2) / self.energy_sum(key) else: shape = tuple(self.space.size(k) for k in key) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) if self.boson_ansatz: # Only true for real-valued couplings: @@ -691,7 +693,7 @@ def init_amps(self, eris=None): amplitudes[name] = -H / self.omega else: shape = (self.nbos,) * n - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) # Build U amplitudes: for name, key, nf, nb in self.ansatz.coupling_cluster_ranks(spin_type=self.spin_type): @@ -701,7 +703,7 @@ def init_amps(self, eris=None): amplitudes[name] = h[key] / self.energy_sum(key) else: shape = (self.nbos,) * nb + tuple(self.space.size(k) for k in key[nb:]) - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) return amplitudes @@ -1967,7 +1969,7 @@ def bare_fock(self): The mean-field Fock matrix in the MO basis. """ - fock_ao = self.mf.get_fock() + fock_ao = self.mf.get_fock().astype(types[float]) mo_coeff = self.mo_coeff fock = util.einsum("pq,pi,qj->ij", fock_ao, mo_coeff, mo_coeff) @@ -1993,7 +1995,7 @@ def xi(self): if self.bare_G is not None: xi += self.bare_G / self.omega else: - xi = np.zeros_like(self.omega) + xi = np.zeros_like(self.omega, dtype=types[float]) return xi @@ -2053,7 +2055,7 @@ def mo_coeff(self): Molecular orbital coefficients. """ if self._mo_coeff is None: - return self.mf.mo_coeff + return np.asarray(self.mf.mo_coeff).astype(types[float]) return self._mo_coeff @property @@ -2067,7 +2069,7 @@ def mo_occ(self): Molecular orbital occupancies. """ if self._mo_occ is None: - return self.mf.mo_occ + return np.asarray(self.mf.mo_occ).astype(types[float]) return self._mo_occ @property @@ -2161,7 +2163,7 @@ def e_tot(self): e_tot : float Total energy. """ - return self.mf.e_tot + self.e_corr + return types[float](self.mf.e_tot) + self.e_corr @property def t1(self): diff --git a/ebcc/reom.py b/ebcc/reom.py index 87a41ae7..0d8c42f0 100644 --- a/ebcc/reom.py +++ b/ebcc/reom.py @@ -3,10 +3,11 @@ import dataclasses import warnings -import numpy as np from pyscf import lib +from ebcc import numpy as np from ebcc import util +from ebcc.precision import types class EOM: @@ -148,7 +149,7 @@ def get_guesses(self, diag=None): arg = self._argsort_guess(diag) nroots = min(self.options.nroots, diag.size) - guesses = np.zeros((nroots, diag.size)) + guesses = np.zeros((nroots, diag.size), dtype=diag.dtype) for root, guess in enumerate(arg[:nroots]): guesses[root, guess] = 1.0 @@ -226,7 +227,7 @@ def moments(self, nmom, eris=None, amplitudes=None, hermitise=True): bras = self.bras(eris=eris) kets = self.kets(eris=eris) - moments = np.zeros((nmom, self.nmo, self.nmo)) + moments = np.zeros((nmom, self.nmo, self.nmo), dtype=types[float]) for j in range(self.nmo): ket = kets[j] @@ -461,7 +462,7 @@ def moments(self, nmom, eris=None, amplitudes=None, hermitise=True, diagonal_onl bras = self.bras(eris=eris) kets = self.kets(eris=eris) - moments = np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo)) + moments = np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo), dtype=types[float]) for k in range(self.nmo): for l in [k] if diagonal_only else range(self.nmo): diff --git a/ebcc/space.py b/ebcc/space.py index b0219e99..bd68a0b0 100644 --- a/ebcc/space.py +++ b/ebcc/space.py @@ -1,6 +1,6 @@ """Space definition.""" -import numpy as np +from ebcc import numpy as np class Space: diff --git a/ebcc/uebcc.py b/ebcc/uebcc.py index 82572b3b..19b2f2d5 100644 --- a/ebcc/uebcc.py +++ b/ebcc/uebcc.py @@ -1,13 +1,14 @@ """Unrestricted electron-boson coupled cluster.""" -import numpy as np from pyscf import lib +from ebcc import numpy as np from ebcc import rebcc, ueom, util from ebcc.brueckner import BruecknerUEBCC from ebcc.cderis import UCDERIs from ebcc.eris import UERIs from ebcc.fock import UFock +from ebcc.precision import types from ebcc.space import Space @@ -154,7 +155,7 @@ def init_amps(self, eris=None): tn[comb] = 0.5 * (tn[comb] - tn[comb].swapaxes(0, 1)) else: shape = tuple(self.space["ab".index(s)].size(k) for s, k in zip(comb, key)) - tn[comb] = np.zeros(shape) + tn[comb] = np.zeros(shape, dtype=types[float]) amplitudes[name] = tn if self.boson_ansatz: @@ -168,7 +169,7 @@ def init_amps(self, eris=None): amplitudes[name] = -H / self.omega else: shape = (self.nbos,) * n - amplitudes[name] = np.zeros(shape) + amplitudes[name] = np.zeros(shape, dtype=types[float]) # Build U amplitudes: for name, key, nf, nb in self.ansatz.coupling_cluster_ranks(spin_type=self.spin_type): @@ -182,8 +183,14 @@ def init_amps(self, eris=None): amplitudes[name] = tn else: tn = util.Namespace( - aa=np.zeros((self.nbos,) * nb + tuple(self.space[0].size(k) for k in key[nb:])), - bb=np.zeros((self.nbos,) * nb + tuple(self.space[0].size(k) for k in key[nb:])), + aa=np.zeros( + (self.nbos,) * nb + tuple(self.space[0].size(k) for k in key[nb:]), + dtype=types[float], + ), + bb=np.zeros( + (self.nbos,) * nb + tuple(self.space[0].size(k) for k in key[nb:]), + dtype=types[float], + ), ) amplitudes[name] = tn @@ -436,7 +443,12 @@ def __getitem__(selffer, key): @property @util.has_docstring def bare_fock(self): - fock = lib.einsum("npq,npi,nqj->nij", self.mf.get_fock(), self.mo_coeff, self.mo_coeff) + fock = lib.einsum( + "npq,npi,nqj->nij", + self.mf.get_fock().astype(types[float]), + self.mo_coeff, + self.mo_coeff, + ) fock = util.Namespace(aa=fock[0], bb=fock[1]) return fock diff --git a/ebcc/ueom.py b/ebcc/ueom.py index c6be6c16..e67319cf 100644 --- a/ebcc/ueom.py +++ b/ebcc/ueom.py @@ -2,9 +2,9 @@ import warnings -import numpy as np - +from ebcc import numpy as np from ebcc import reom, util +from ebcc.precision import types class UEOM(reom.REOM, metaclass=util.InheritDocstrings): @@ -34,8 +34,8 @@ def moments(self, nmom, eris=None, amplitudes=None, hermitise=True): kets = self.kets(eris=eris) moments = util.Namespace( - aa=np.zeros((nmom, self.nmo, self.nmo)), - bb=np.zeros((nmom, self.nmo, self.nmo)), + aa=np.zeros((nmom, self.nmo, self.nmo), dtype=types[float]), + bb=np.zeros((nmom, self.nmo, self.nmo), dtype=types[float]), ) for spin in util.generate_spin_combinations(1): @@ -91,8 +91,20 @@ def bras(self, eris=None): shape = tuple(self.space["ab".index(s)].ncocc for s in spin[:n]) + tuple( self.space["ab".index(s)].ncvir for s in spin[n:] ) - setattr(amp_a, spin, getattr(bras_raw[m], "a" + spin, {i: np.zeros(shape)})[i]) - setattr(amp_b, spin, getattr(bras_raw[m], "b" + spin, {i: np.zeros(shape)})[i]) + setattr( + amp_a, + spin, + getattr(bras_raw[m], "a" + spin, {i: np.zeros(shape, dtype=types[float])})[ + i + ], + ) + setattr( + amp_b, + spin, + getattr(bras_raw[m], "b" + spin, {i: np.zeros(shape, dtype=types[float])})[ + i + ], + ) amps_a.append(amp_a) amps_b.append(amp_b) m += 1 @@ -129,8 +141,20 @@ def kets(self, eris=None): shape = tuple(self.space["ab".index(s)].ncocc for s in spin[:n]) + tuple( self.space["ab".index(s)].ncvir for s in spin[n:] ) - setattr(amp_a, spin, getattr(kets_raw[m], spin + "a", {j: np.zeros(shape)})[j]) - setattr(amp_b, spin, getattr(kets_raw[m], spin + "b", {j: np.zeros(shape)})[j]) + setattr( + amp_a, + spin, + getattr(kets_raw[m], spin + "a", {j: np.zeros(shape, dtype=types[float])})[ + j + ], + ) + setattr( + amp_b, + spin, + getattr(kets_raw[m], spin + "b", {j: np.zeros(shape, dtype=types[float])})[ + j + ], + ) amps_a.append(amp_a) amps_b.append(amp_b) m += 1 @@ -186,8 +210,20 @@ def bras(self, eris=None): shape = tuple(self.space["ab".index(s)].ncvir for s in spin[:n]) + tuple( self.space["ab".index(s)].ncocc for s in spin[n:] ) - setattr(amp_a, spin, getattr(bras_raw[m], "a" + spin, {i: np.zeros(shape)})[i]) - setattr(amp_b, spin, getattr(bras_raw[m], "b" + spin, {i: np.zeros(shape)})[i]) + setattr( + amp_a, + spin, + getattr(bras_raw[m], "a" + spin, {i: np.zeros(shape, dtype=types[float])})[ + i + ], + ) + setattr( + amp_b, + spin, + getattr(bras_raw[m], "b" + spin, {i: np.zeros(shape, dtype=types[float])})[ + i + ], + ) amps_a.append(amp_a) amps_b.append(amp_b) m += 1 @@ -224,8 +260,20 @@ def kets(self, eris=None): shape = tuple(self.space["ab".index(s)].ncvir for s in spin[:n]) + tuple( self.space["ab".index(s)].ncocc for s in spin[n:] ) - setattr(amp_a, spin, getattr(kets_raw[m], spin + "a", {j: np.zeros(shape)})[j]) - setattr(amp_b, spin, getattr(kets_raw[m], spin + "b", {j: np.zeros(shape)})[j]) + setattr( + amp_a, + spin, + getattr(kets_raw[m], spin + "a", {j: np.zeros(shape, dtype=types[float])})[ + j + ], + ) + setattr( + amp_b, + spin, + getattr(kets_raw[m], spin + "b", {j: np.zeros(shape, dtype=types[float])})[ + j + ], + ) amps_a.append(amp_a) amps_b.append(amp_b) m += 1 @@ -292,12 +340,20 @@ def bras(self, eris=None): # pragma: no cover setattr( amp_aa, spin, - getattr(bras_raw[m], "aa" + spin, {(i, j): np.zeros(shape)})[i, j], + getattr( + bras_raw[m], + "aa" + spin, + {(i, j): np.zeros(shape, dtype=types[float])}, + )[i, j], ) setattr( amp_bb, spin, - getattr(bras_raw[m], "bb" + spin, {(i, j): np.zeros(shape)})[i, j], + getattr( + bras_raw[m], + "bb" + spin, + {(i, j): np.zeros(shape, dtype=types[float])}, + )[i, j], ) amps_aa.append(amp_aa) amps_bb.append(amp_bb) @@ -349,12 +405,16 @@ def kets(self, eris=None): # pragma: no cover setattr( amp_aa, spin, - getattr(kets_raw[m], spin + "aa", {k: np.zeros(shape)})[k], + getattr( + kets_raw[m], spin + "aa", {k: np.zeros(shape, dtype=types[float])} + )[k], ) setattr( amp_bb, spin, - getattr(kets_raw[m], spin + "bb", {k: np.zeros(shape)})[k], + getattr( + kets_raw[m], spin + "bb", {k: np.zeros(shape, dtype=types[float])} + )[k], ) amps_aa.append(amp_aa) amps_bb.append(amp_bb) @@ -405,10 +465,10 @@ def moments( kets = self.kets(eris=eris) moments = util.Namespace( - aaaa=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo)), - aabb=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo)), - bbaa=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo)), - bbbb=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo)), + aaaa=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo), dtype=types[float]), + aabb=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo), dtype=types[float]), + bbaa=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo), dtype=types[float]), + bbbb=np.zeros((nmom, self.nmo, self.nmo, self.nmo, self.nmo), dtype=types[float]), ) for spin in util.generate_spin_combinations(2): diff --git a/ebcc/util.py b/ebcc/util.py index 4dad61b5..ddab1941 100644 --- a/ebcc/util.py +++ b/ebcc/util.py @@ -5,10 +5,11 @@ import itertools import time -import numpy as np from pyscf.lib import direct_sum, dot # noqa: F401 from pyscf.lib import einsum as pyscf_einsum +from ebcc import numpy as np + try: try: import tblis_einsum @@ -18,7 +19,6 @@ except ImportError: FOUND_TBLIS = False - NUMPY_EINSUM_SIZE = 2000 @@ -656,7 +656,7 @@ def decompress_axes( # Initialise decompressed array if out is None: - array = np.zeros(shape) + array = np.zeros(shape, dtype=array_flat.dtype) else: array = out out[:] = 0.0 @@ -1005,7 +1005,7 @@ def contract(subscript, *args, **kwargs): if buf is not None: return buf.reshape(shape_c) * beta if beta != 1.0 else buf.reshape(shape_c) else: - return np.zeros(shape_c) + return np.zeros(shape_c, dtype=np.result_type(a, b)) # Apply transposes at = a.transpose(order_a) @@ -1050,7 +1050,7 @@ def contract(subscript, *args, **kwargs): if buf is not None: return buf.reshape(shape_c) * beta else: - return np.zeros(shape_c) + return np.zeros(shape_c, dtype=dtype) # Get the output buffer if buf is None: diff --git a/examples/11-single_precision.py b/examples/11-single_precision.py new file mode 100644 index 00000000..85bbd178 --- /dev/null +++ b/examples/11-single_precision.py @@ -0,0 +1,30 @@ +""" +Example of single-precision calculations. +""" + +import numpy as np +from pyscf import gto, scf + +from ebcc import REBCC +from ebcc.precision import single_precision + +# Define the molecule using PySCF +mol = gto.Mole() +mol.atom = "N 0 0 0; N 0 0 1.1" +mol.basis = "cc-pvtz" +mol.build() + +# Run a Hartree-Fock calculation using PySCF +mf = scf.RHF(mol) +mf.kernel() + +# Run a CCSD calculation using EBCC at single precision +with single_precision(): + sp = REBCC(mf, ansatz="CCSD", e_tol=1e-6, t_tol=1e-4) + sp.kernel() + +# Use the amplitudes to finish convergence at double precision - +# the types should be promoted automatically +dp = REBCC(mf, ansatz="CCSD", e_tol=1e-8, t_tol=1e-6) +dp.amplitudes = sp.amplitudes +dp.kernel() diff --git a/tests/test_precision.py b/tests/test_precision.py new file mode 100644 index 00000000..ef7f95f8 --- /dev/null +++ b/tests/test_precision.py @@ -0,0 +1,79 @@ +"""Tests for precision control. +""" + +import unittest +import pytest + +import numpy as np +from pyscf import gto, scf + +from ebcc import REBCC, UEBCC, GEBCC, NullLogger + + +@pytest.mark.regression +class REBCC_Precision_Tests(unittest.TestCase): + """Test single-precision REBCC against double-precision results. + """ + + basis = "cc-pvdz" + EBCC = REBCC + + @classmethod + def setUpClass(cls): + mol = gto.Mole() + mol.atom = "Li 0 0 0; H 0 0 1.64" + mol.basis = cls.basis + mol.verbose = 0 + mol.build() + + mf = scf.RHF(mol) + mf.conv_tol = 1e-12 + mf.kernel() + + cls.mol, cls.mf = mol, mf + + @classmethod + def tearDownClass(cls): + del cls.mol, cls.mf + + def test_ansatzes(self): + for ansatz in [ + "CC2", + "CCSD", + "CC3", + "QCISD", + ]: + sp = self.EBCC(self.mf, ansatz=ansatz, log=NullLogger()) + sp.e_tol = 1e-7 + sp.t_tol = 1e-4 + sp.kernel() + + dp = self.EBCC(self.mf, ansatz=ansatz, log=NullLogger()) + dp.e_tol = 1e-8 + dp.t_tol = 1e-5 + dp.kernel() + + self.assertAlmostEqual(sp.e_tot, dp.e_tot, 6) + + +@pytest.mark.regression +class UEBCC_Precision_Tests(REBCC_Precision_Tests): + """Test single-precision UEBCC against double-precision results. + """ + + basis = "cc-pvdz" + EBCC = UEBCC + + +@pytest.mark.regression +class GEBCC_Precision_Tests(REBCC_Precision_Tests): + """Test single-precision GEBCC against double-precision results. + """ + + basis = "sto3g" + EBCC = GEBCC + + +if __name__ == "__main__": + print("Tests for precision") + unittest.main()