|
| 1 | +""" |
| 2 | +Construct partition function tensor from nearest neighbor |
| 3 | +Trotter gate of (1 + 1)D quantum models with translation symmetry. |
| 4 | +``` |
| 5 | + 2 3 |
| 6 | + ↘ ↙ |
| 7 | + S4 |
| 8 | + 3 4 2 3 ↓ |
| 9 | + ↘︎ ↙︎ ↘ ↙ 1 |
| 10 | + gate = S1 ← 3 1 ← S3 or |
| 11 | + ↙︎ ↘︎ ↙ ↘ 3 |
| 12 | + 1 2 1 2 ↓ |
| 13 | + S2 |
| 14 | + ↙ ↘ |
| 15 | + 1 2 |
| 16 | +``` |
| 17 | +The partition function tensor is |
| 18 | +``` |
| 19 | + 3' |
| 20 | + ↓ |
| 21 | + S2 |
| 22 | + ↙ ↘ |
| 23 | + b c 3' |
| 24 | + ↙ ↘ ↓ |
| 25 | + 1'← S3 S1 ← 4' ---> 1'← T ← 4' |
| 26 | + ↘ ↙ ↓ |
| 27 | + a d 2' |
| 28 | + ↘ ↙ |
| 29 | + S4 |
| 30 | + ↓ |
| 31 | + 2' |
| 32 | +``` |
| 33 | +""" |
| 34 | +function gate_to_tensor( |
| 35 | + gate::AbstractTensorMap{E, S, 2, 2}; trunc = truncerror(; rtol = 1.0e-8) |
| 36 | + ) where {E, S} |
| 37 | + s1, s3 = SVD12(permute(gate, ((1, 3), (2, 4))), trunc) |
| 38 | + s2, s4 = SVD12(gate, trunc) |
| 39 | + @tensor T[-1 -2; -3 -4] := s3[-1 a b] * s4[-2 a d] * s2[b c -3] * s1[d c -4] |
| 40 | + return T |
| 41 | +end |
| 42 | + |
| 43 | +""" |
| 44 | +Exponentially stack `2^nfold` copies of `T` in vertical direction using HOTRG. |
| 45 | +""" |
| 46 | +function vertical_stack_exp( |
| 47 | + T::AbstractTensorMap{E, S, 2, 2}, nfold::Integer, trunc::TruncationStrategy |
| 48 | + ) where {E, S} |
| 49 | + @assert nfold >= 1 |
| 50 | + T2 = copy(T) |
| 51 | + for _ in 1:nfold |
| 52 | + Ux, = _get_hotrg_xproj(T2, T2, trunc) |
| 53 | + T2 = _step_hotrg_y(T2, T2, Ux) |
| 54 | + end |
| 55 | + return T2 |
| 56 | +end |
| 57 | + |
| 58 | +""" |
| 59 | +Linearly stack `n` copies of `T` in vertical direction using HOTRG. |
| 60 | +""" |
| 61 | +function vertical_stack_linear( |
| 62 | + T::AbstractTensorMap{E, S, 2, 2}, n::Integer, trunc::TruncationStrategy |
| 63 | + ) where {E, S} |
| 64 | + @assert n >= 1 |
| 65 | + T2 = copy(T) |
| 66 | + for _ in 1:(n - 1) |
| 67 | + Ux, = _get_hotrg_xproj(T, T2, trunc) |
| 68 | + T2 = _step_hotrg_y(T, T2, Ux) |
| 69 | + end |
| 70 | + return T2 |
| 71 | +end |
| 72 | + |
| 73 | +# Nearest neighbor (1+1)D quantum Hamiltonian gates |
| 74 | +# ================================================= |
| 75 | + |
| 76 | +""" |
| 77 | +Partition function tensor for 1D transverse field Ising chain |
| 78 | +``` |
| 79 | + H(PBC) = -J ∑_i (σz_i σz_{i+1} + g σx_i) |
| 80 | +``` |
| 81 | +Allowed `symm`: Trivial, Z2Irrep. |
| 82 | +""" |
| 83 | +function quantum_ising_chain( |
| 84 | + elt::Type{<:Number}, symm::Type{<:Sector}, dt::Float64; |
| 85 | + J::Float64 = 1.0, g::Float64 = 0.0 |
| 86 | + ) |
| 87 | + ZZ = 4 * SO.S_z_S_z(elt, symm) |
| 88 | + X = SO.σˣ(elt, symm) |
| 89 | + unit = TensorKit.id(codomain(X)) |
| 90 | + gate = ZZ + (g / 2) * (X ⊗ unit + unit ⊗ X) |
| 91 | + gate = exp(dt * J * gate) |
| 92 | + return gate_to_tensor(gate) |
| 93 | +end |
| 94 | +quantum_ising_chain(elt::Type{<:Number}, dt::Float64; kwargs...) = |
| 95 | + quantum_ising_chain(elt, Trivial, dt; kwargs...) |
| 96 | +quantum_ising_chain(symm::Type{<:Sector}, dt::Float64; kwargs...) = |
| 97 | + quantum_ising_chain(ComplexF64, symm, dt; kwargs...) |
0 commit comments