Scipy 1.3.3 breaking things
This is a vague issue. Scipy 1.3.3 sometimes breaks things. Scipy.linalg sometimes returns the error "SVD did not converge" when trying to create a qsymm.hamiltonian_generator.hamiltonian_from_family() instance. However, when running this on 100 engines on the cluster, this 'sometimes' leads to at least one error, stopping everything. The Hamiltonian in question that trips the error doesn't seem to have anything special about it, but I'll list it here for completeness. It requires the nonhermitian branch of qsymm to work.
def make_ham_from_fam_8x8_fp3():
#start from power 3 for k and whittle it down.
#the coupled Hamiltonian with maximum k power = 3 and j=3/2 part set to 0
S = qsymm.groups.spin_matrices(1/2)
rot = qsymm.ContinuousGroupGenerator(R=2 * S[1], U=scipy.linalg.block_diag(3 * S[2], S[2], S[2], S[2]))
PH = qsymm.PointGroupElement(-np.eye(2), True, True, scipy.linalg.block_diag(2 * S[0], 2 * S[0], 2 * S[0], 2 * S[0]))
herm = qsymm.PointGroupElement(-np.eye(2), True, False, np.eye(8), True)
sym = [rot, PH, herm]
family = qsymm.continuum_hamiltonian(sym, dim=2, total_power=3, hermitian=False, prettify=True)
coeffs_hop=['t2','t21',0,0,'t22',0,'t23',0,0,0,
'td1b','td2a','td3a','t11b','to1b','to2b','t12b','to3b','t13b','td1a',
'td2b','td3b','t11a','to1a','to2a','t12a','to3a','t13a',0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,'t1b',0,0,0,0,0,
0,0,0,0,'t1a',0,0,0,0,0,
0,0,0,0
]
coeffs_onsite=['mu','mu1','muoff1','muoff2','mu2','muoff3','mu3','lambda1','lambda2','lambda3',
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0
]
hopping=Symbol('r')*qsymm.hamiltonian_generator.hamiltonian_from_family(family, coeffs=coeffs_hop, tosympy=True)
onsite=Symbol('os')*qsymm.hamiltonian_generator.hamiltonian_from_family(family, coeffs=coeffs_onsite, tosympy=True)
return onsite+hopping
Other similar hamiltonians that also rely on the nonhermitian branch of qsymm don't raise the error. Most importantly, the error doesn't occur for Scipy 1.3.1, so presumably they did something unfortunate in between versions. What that is and how it enters here is the mystery.