|
| 1 | +using Markdown |
| 2 | +md""" |
| 3 | +# The Ising CFT spectrum |
| 4 | +
|
| 5 | +This tutorial is meant to show the finite size CFT spectrum for the quantum Ising model. We |
| 6 | +do this by first employing an exact diagonalization technique, and then extending the |
| 7 | +analysis to larger system sizes through the use of MPS techniques. |
| 8 | +""" |
| 9 | + |
| 10 | +using MPSKit, MPSKitModels, TensorKit, Plots, KrylovKit |
| 11 | +using LinearAlgebra: eigvals, diagm, Hermitian |
| 12 | +using CUDA, cuTENSOR, Adapt |
| 13 | + |
| 14 | +md""" |
| 15 | +The Hamiltonian is defined on a finite lattice with periodic boundary conditions, |
| 16 | +which can be implemented as follows: |
| 17 | +""" |
| 18 | + |
| 19 | +L = 12 |
| 20 | +H = periodic_boundary_conditions(transverse_field_ising(), L) |
| 21 | + |
| 22 | +md""" |
| 23 | +## Exact diagonalisation |
| 24 | +
|
| 25 | +In MPSKit, there is support for exact diagonalisation by leveraging the fact that applying |
| 26 | +the Hamiltonian to an untruncated MPS will result in an effective Hamiltonian on the center |
| 27 | +site which implements the action of the entire Hamiltonian. Thus, optimizing the middle |
| 28 | +tensor is equivalent to optimixing a state in the entire Hilbert space, as all other tensors |
| 29 | +are just unitary matrices that mix the basis. |
| 30 | +""" |
| 31 | + |
| 32 | +energies, states = exact_diagonalization(H; num = 18, alg = Lanczos(; krylovdim = 200)); |
| 33 | +plot( |
| 34 | + real.(energies); |
| 35 | + seriestype = :scatter, legend = false, ylabel = "energy", xlabel = "#eigenvalue" |
| 36 | +) |
| 37 | +cu_states = map(state -> adapt(CuArray, state), states) |
| 38 | + |
| 39 | +md""" |
| 40 | +!!! note "Krylov dimension" |
| 41 | + Note that we have specified a large Krylov dimension as degenerate eigenvalues are |
| 42 | + notoriously difficult for iterative methods. |
| 43 | +""" |
| 44 | + |
| 45 | +md""" |
| 46 | +## Extracting momentum |
| 47 | +
|
| 48 | +Given a state, it is possible to assign a momentum label |
| 49 | +through the use of the translation operator. This operator can be defined in MPO language |
| 50 | +either diagramatically as |
| 51 | +
|
| 52 | +```@raw html |
| 53 | +<img src="translation_mpo.svg" alt="translation operator" class="color-invertible" width="50%"/> |
| 54 | +``` |
| 55 | +
|
| 56 | +or in the code as: |
| 57 | +""" |
| 58 | + |
| 59 | +function O_shift(L) |
| 60 | + I = id(ComplexF64, ℂ^2) |
| 61 | + @tensor O[W S; N E] := I[W; N] * I[S; E] |
| 62 | + return adapt(CuArray, periodic_boundary_conditions(InfiniteMPO([O]), L)) |
| 63 | +end |
| 64 | + |
| 65 | +md""" |
| 66 | +We can then calculate the momentum of the ground state as the expectation value of this |
| 67 | +operator. However, there is a subtlety because of the degeneracies in the energy |
| 68 | +eigenvalues. The eigensolver will find an orthonormal basis within each energy subspace, but |
| 69 | +this basis is not necessarily a basis of eigenstates of the translation operator. In order |
| 70 | +to fix this, we diagonalize the translation operator within each energy subspace. |
| 71 | +The resulting energy levels have one-to-one correspondence to the operators in CFT, where |
| 72 | +the momentum is related to their conformal spin as $P_n = \frac{2\pi}{L}S_n$. |
| 73 | +""" |
| 74 | + |
| 75 | +function fix_degeneracies(basis) |
| 76 | + L = length(basis[1]) |
| 77 | + M = zeros(ComplexF64, length(basis), length(basis)) |
| 78 | + T = O_shift(L) |
| 79 | + for j in eachindex(basis), i in eachindex(basis) |
| 80 | + M[i, j] = dot(basis[i], T, basis[j]) |
| 81 | + end |
| 82 | + |
| 83 | + vals = eigvals(M) |
| 84 | + return angle.(vals) |
| 85 | +end |
| 86 | + |
| 87 | +momenta = Float64[] |
| 88 | +append!(momenta, fix_degeneracies(cu_states[1:1])) |
| 89 | +append!(momenta, fix_degeneracies(cu_states[2:2])) |
| 90 | +append!(momenta, fix_degeneracies(cu_states[3:3])) |
| 91 | +append!(momenta, fix_degeneracies(cu_states[4:5])) |
| 92 | +append!(momenta, fix_degeneracies(cu_states[6:9])) |
| 93 | +append!(momenta, fix_degeneracies(cu_states[10:11])) |
| 94 | +append!(momenta, fix_degeneracies(cu_states[12:12])) |
| 95 | +append!(momenta, fix_degeneracies(cu_states[13:16])) |
| 96 | +append!(momenta, fix_degeneracies(cu_states[17:18])) |
| 97 | + |
| 98 | +md""" |
| 99 | +We can compute the scaling dimensions $\Delta_n$ of the operators in the CFT from the |
| 100 | +energy gap of the corresponding excitations as $E_n - E_0 = \frac{2\pi v}{L} \Delta_n$, |
| 101 | +where $v = 2$. If we plot these scaling dimensions against the conformal spin $S_n$ from |
| 102 | +above, we retrieve the familiar spectrum of the Ising CFT. |
| 103 | +""" |
| 104 | + |
| 105 | +v = 2.0 |
| 106 | +Δ = real.(energies[1:18] .- energies[1]) ./ (2π * v / L) |
| 107 | +S = momenta ./ (2π / L) |
| 108 | + |
| 109 | +p = plot( |
| 110 | + S, real.(Δ); |
| 111 | + seriestype = :scatter, xlabel = "conformal spin (S)", ylabel = "scaling dimension (Δ)", |
| 112 | + legend = false |
| 113 | +) |
| 114 | +vline!(p, -3:3; color = "gray", linestyle = :dash) |
| 115 | +hline!(p, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color = "gray", linestyle = :dash) |
| 116 | +p |
| 117 | + |
| 118 | +md""" |
| 119 | +## Finite bond dimension |
| 120 | +
|
| 121 | +If we limit the maximum bond dimension of the MPS, we get an approximate solution, but we |
| 122 | +can reach higher system sizes. |
| 123 | +""" |
| 124 | + |
| 125 | +L_mps = 20 |
| 126 | +H_mps = adapt(CuArray, periodic_boundary_conditions(transverse_field_ising(), L_mps)) |
| 127 | +D = 64 |
| 128 | + |
| 129 | +ψ, envs, δ = find_groundstate(adapt(CuArray, FiniteMPS(L_mps, ℂ^2, ℂ^D)), H_mps, DMRG()); |
| 130 | + |
| 131 | +md""" |
| 132 | +Excitations on top of the ground state can be found through the use of the quasiparticle |
| 133 | +ansatz. This returns quasiparticle states, which can be converted to regular `FiniteMPS` |
| 134 | +objects. |
| 135 | +""" |
| 136 | + |
| 137 | +E_ex, qps = excitations(H_mps, QuasiparticleAnsatz(), ψ, envs; num = 18) |
| 138 | +states_mps = vcat(ψ, map(qp -> convert(FiniteMPS, qp), qps)) |
| 139 | +energies_mps = map(x -> expectation_value(x, H_mps), states_mps) |
| 140 | + |
| 141 | +momenta_mps = Float64[] |
| 142 | +append!(momenta_mps, fix_degeneracies(states_mps[1:1])) |
| 143 | +append!(momenta_mps, fix_degeneracies(states_mps[2:2])) |
| 144 | +append!(momenta_mps, fix_degeneracies(states_mps[3:3])) |
| 145 | +append!(momenta_mps, fix_degeneracies(states_mps[4:5])) |
| 146 | +append!(momenta_mps, fix_degeneracies(states_mps[6:9])) |
| 147 | +append!(momenta_mps, fix_degeneracies(states_mps[10:11])) |
| 148 | +append!(momenta_mps, fix_degeneracies(states_mps[12:12])) |
| 149 | +append!(momenta_mps, fix_degeneracies(states_mps[13:16])) |
| 150 | +append!(momenta_mps, fix_degeneracies(states_mps[17:18])) |
| 151 | + |
| 152 | +v = 2.0 |
| 153 | +Δ_mps = real.(energies_mps[1:18] .- energies_mps[1]) ./ (2π * v / L_mps) |
| 154 | +S_mps = momenta_mps ./ (2π / L_mps) |
| 155 | + |
| 156 | +p_mps = plot( |
| 157 | + S_mps, real.(Δ_mps); |
| 158 | + seriestype = :scatter, xlabel = "conformal spin (S)", |
| 159 | + ylabel = "scaling dimension (Δ)", legend = false |
| 160 | +) |
| 161 | +vline!(p_mps, -3:3; color = "gray", linestyle = :dash) |
| 162 | +hline!(p_mps, [0, 1 / 8, 1, 9 / 8, 2, 17 / 8]; color = "gray", linestyle = :dash) |
| 163 | +p_mps |
0 commit comments