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 1b7634dd authored by mgassner's avatar mgassner
Browse files

l

parent 08ab989a
...@@ -21,9 +21,9 @@ def create_2spin_matrix(model_name, param): ...@@ -21,9 +21,9 @@ def create_2spin_matrix(model_name, param):
return (0.5 * (np.kron(sigma_p, sigma_m) + np.kron(sigma_m, sigma_p)) + 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) + 0*1e-6 *(np.kron(sigma_z, sigma_0) + np.kron(sigma_0, sigma_z))).astype('float64')
elif model_name == 'tfim': 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() 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 #in the plus minus basis
return ( np.kron(sigma_x, sigma_x) - 0.5*param*(np.kron(sigma_z, sigma_0) + np.kron(sigma_0, sigma_z))).astype('float64').tolist() #return ( np.kron(sigma_x, sigma_x) - 0.5*param*(np.kron(sigma_z, sigma_0) + np.kron(sigma_0, sigma_z))).astype('float64').tolist()
else: else:
raise NameError raise NameError
......
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