Closed ngraymon closed 2 years ago
There was some kind of pattern in that whenever you took a line ending in dz
and had the same line ending in z[#]
then the z
line was multipled by X
like so
Also explored the use of code modification inside the function collect_z_contributions
but it seems a hell of a mess so lets abandon
# h^0_0 with zero order Taylor series contributions
for z_order, z_dict in h_dict.items():
if z_dict is {}: continue; # skip if empty
# exception case for z_order == 0 which has no if statement
tab_adjust = nof_tabs if z_order == 0 else nof_tabs + 1
temp_z_list = [] # if not empty
"""
possibly entry point for using X/X2/X3 shorthand for
X = np.einsum('k,k->', T_conj[1], dT[1])
and so forth
"""
fast_dthing = {
't_conj[(0, 1)], dT[(1, 0)], ': 'X',
't_conj[(0, 1)], t_conj[(0, 1)], dT[(1, 0)], ': 'X2',
't_conj[(0, 1)], t_conj[(0, 1)], t_conj[(0, 1)], dT[(1, 0)], ': 'X3'
}
for prefactor, string_list in z_dict.items():
if string_list == []: continue; # skip if empty
print(f"{string_list =}")
for string in string_list:
print(f"{string =}")
for k in fast_dthing.keys():
if k in string:
print(f"{k =}")
print(f"{string =}")
new_string = string.replace(k, '')
print(f"{new_string =}")
print(f"{prefactor =}")
import pdb; pdb.set_trace()
import pdb; pdb.set_trace()
terms such as
where
although maybe X2 doesn't even make sense? so maybe just abandon this whole thing