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

minor changes

parent d6245306
......@@ -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) + 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':
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()
else:
......
......@@ -73,7 +73,7 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
MI = compute_MI(sub_dim, number_spins, hamming_weight, gs, basis_states, spin_inversion=None, first_trace_spin=first_trace_spin)
MIs.append(MI)
del model
print(Entropies)
data = {
'Model': model_name,
'Number_spins': number_spins,
......@@ -81,9 +81,9 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
'Hamming_weight': hamming_weight,
'Sub_dim': sub_dim,
'Delta or h over J': params.tolist(),
'Entropies half chain': Entropies,
'Entropies 4 spin': Entropies4,
'Mutual Informations': MIs
'Entropies half chain': np.array(Entropies).tolist(),
'Entropies 4 spin': np.array(Entropies4).tolist(),
'Mutual Informations': np.array(MIs).tolist()
}
timestr = time.strftime("%Y%m%d-%H%M%S")
......@@ -139,8 +139,8 @@ def MutInf(model_name, param, spin_range):
'Hamming_weight': hamming_weight,
'Sub_dim': sub_dim,
'Delta or h over J': param,
'Entropies': Entropies,
'Mutual Informations': MIs
'Entropies': np.array(Entropies).tolist(),
'Mutual Informations': np.array(MIs).tolist()
}
timestr = time.strftime("%Y%m%d-%H%M%S")
......
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