forked from naezzell/topological-spin-transport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomputing_physical_specctrum.jl
46 lines (40 loc) · 1 KB
/
computing_physical_specctrum.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
using OpenQuantumTools, OrdinaryDiffEq, Plots, LaTeXStrings
using OpenQuantumBase, Optim
include("helperFuncs.jl")
#
##
nt = 1;
adj_mat = build_triangular_chain_adjacency_matrix(nt);
J = 1;
Γ = 0.1;
x_part, z_part = form_static_ham_ops(adj_mat, J, Γ);
##
##
nt = 1;
adj_mat = build_triangular_chain_adjacency_matrix(nt);
J = 1;
Γ = 0.1;
x_part, z_part = form_static_ham_ops(adj_mat, J, Γ);
H = DenseHamiltonian([(s)-> s, (s) -> (1-s)], [-x_part, z_part], unit=:h)
plot(H, 0:0.01:1, 8, linewidth=2, legend=:left)
##
##
nt = 1;
adj_mat = build_triangular_chain_adjacency_matrix(nt);
J = 1;
##
##
Γ = 1;
function compute_spectrum(Γ)
x_part, z_part = form_static_ham_ops(adj_mat, J, Γ);
H = DenseHamiltonian([(s)-> s, (s) -> (1-s)], [-x_part, z_part], unit=:ħ)
z_decomp = eigen_decomp(H, 0, lvl=8)
Egs = minimum(z_decomp[1])
degen = sum(z_decomp[1] .== Egs)
println(degen)
x_decomp = eigen_decomp(H, 1, lvl=8)
Δ = x_decomp[1][degen + 1] - x_decomp[1][degen]
return Δ
end
##