To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 27be2231 authored by mgassner's avatar mgassner
Browse files

changed benefit state below -1 for xxz model

parent 0eddf85f
......@@ -19,7 +19,7 @@ def create_2spin_matrix(model_name, param):
#return (0.5 * (np.kron(sigma_p, sigma_m) + np.kron(sigma_m, sigma_p)) +
# param * np.kron(sigma_z, sigma_z)).astype('float64').tolist()
return (0.5 * (np.kron(sigma_p, sigma_m) + np.kron(sigma_m, sigma_p)) +
param * np.kron(sigma_z, sigma_z) + 0*1e-6 *(np.kron(sigma_z, sigma_0) + np.kron(sigma_0, sigma_z))).astype('float64')
param * np.kron(sigma_z, sigma_z) + 1e-10 *(np.kron(sigma_z, sigma_0) + np.kron(sigma_0, sigma_z))).astype('float64')
elif model_name == 'tfim':
return ( np.kron(sigma_z, sigma_z) - 0.5*param*(np.kron(sigma_x, sigma_0) + np.kron(sigma_0, sigma_x))).astype('float64').tolist()
#in the plus minus basis
......@@ -117,4 +117,4 @@ class spin_model:
new_states = idxs_rearrangement(self.basis.states, rearrangement)
self.basis.build(representatives=new_states)
self.hamiltonian = ls.Operator(self.basis, [ls.Interaction(self.__matrix, self.edges)])
"""
\ No newline at end of file
"""
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment