Commit f74bf0c3 authored by mgassner's avatar mgassner
Browse files

minor changes

parent 76f71a54
......@@ -55,10 +55,11 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
spin_inversion = None
params = np.linspace(param_range[0], param_range[1], int(param_range[2]))
sub_dim = 1
first_trace_spin = 1
sub_dim = 4
first_trace_spin = 4
MIs = []
Entropies = []
Entropies4 = []
print('Number Spins: ', number_spins)
print('Sub Dimension is ', sub_dim)
......@@ -76,6 +77,8 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
MIs.append(MI)
rho_half = reduced_dm(number_spins // 2, number_spins, hamming_weight, gs, basis_states)
Entropies.append(compute_entropy(rho_half))
rho_4spin = reduced_dm(4, number_spins, hamming_weight, gs, basis_states)
Entropies4.append(compute_entropy(rho_4spin))
del model
data = {
......@@ -85,7 +88,8 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
'Hamming_weight': hamming_weight,
'Sub_dim': sub_dim,
'Delta or h over J': params,
'Entropies': Entropies,
'Entropies half chain': Entropies,
'Entropies 4 spin': Entropies4,
'Mutual Informations': MIs
}
......@@ -98,6 +102,7 @@ def MI_vs_Entropy(model_name, number_spins, param_range):
plt.figure(figsize=(12,12))
plt.title('MI: ' + model_name + ' ' + str(number_spins) + ' ' + str(periodic))
plt.plot(params, Entropies, label='Half-chain Entropy')
plt.plot(params, Entropies4, label='4 spin entropy')
plt.plot(params, MIs, label='Mutual Information')
plt.grid(True)
plt.legend()
......@@ -167,5 +172,5 @@ if __name__ == "__main__":
number_spins = args.number_spins
spin_range = args.spin_range
param = args.param
#MI_vs_Entropy(model_name, number_spins, param_range)
MutInf(model_name, param, spin_range)
\ No newline at end of file
MI_vs_Entropy(model_name, number_spins, param_range)
#MutInf(model_name, param, spin_range)
\ No newline at end of file
Supports Markdown
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