Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/shareloqs/MPSDynamics
Browse files Browse the repository at this point in the history
  • Loading branch information
angelariva committed May 16, 2024
2 parents 3e82e6c + 31a4040 commit 61bba8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/fundamentals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ end
Matrix{Float64}: This matrix is the operator `oper` transformed back from the chain
representation to the representation corresponding to the extended bath. The resulting
operator represents quantities like mode occupations or other properties in the basis
of environmental modes associated with specific frequencies omega_i .
of environmental modes associated with specific frequencies ``\\omega_i``.
### Description
Expand Down
1 change: 0 additions & 1 deletion src/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,6 @@ end
* `chainparams::Array{Real,1}`: chain parameters for the bath chain. The chain parameters are given in the standard form: `chainparams` ``=[[ϵ_0,ϵ_1,...],[t_0,t_1,...],c_0]``.
* `tree::Bool`: if true, return a `TreeNetwork` object, otherwise return a vector of MPO tensors
"""

function puredephasingmpo(ΔE, dchain, Nchain, chainparams; tree=false)
u = unitmat(2)

Expand Down
15 changes: 10 additions & 5 deletions src/treeTDVP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ function mpsrightnorm!(net::TreeNetwork, id::Int)
IC=collect(1:nc+2)
IA=collect(1:nc+2)
IC[i+1]=-1
#net[id] = tensorcontract(net[id], IA, C, [i+1,-1], IC) #Old tensoroperation version
net[id] = tensorcontract(IC,net[id], IA, C, [i+1,-1])

net[id] = tensorcontract(net[id], IA, C, [i+1,-1], IC)
end
end

Expand Down Expand Up @@ -405,7 +406,8 @@ function tdvp1sweep_lc!(dt, A::TreeNetwork, M::TreeNetwork, lc::TreeLightCone, F
IA = collect(1:ngc+2)
IB = collect(1:ngc+2)
IA[1] = -1
A[child] = tensorcontract(A[child], IA, C, [1,-1], IB)
#A[child] = tensorcontract(A[child], IA, C, [1,-1], IB) #old tensoroperations
A[child] = tensorcontract(IB, A[child], IA, C, [1,-1])
#(OC is now on child)

#evolve child forward one full time step
Expand All @@ -427,7 +429,8 @@ function tdvp1sweep_lc!(dt, A::TreeNetwork, M::TreeNetwork, lc::TreeLightCone, F
IA = collect(1:nc+2)
IB = collect(1:nc+2)
IA[i+1] = -1
AC = tensorcontract(AL, IA, C, [i+1,-1], IB)
#AC = tensorcontract(AL, IA, C, [i+1,-1], IB) #old tensoroperations
AC = tensorcontract(IB, AL, IA, C, [i+1,-1])
#(OC is now on headnode)
end

Expand Down Expand Up @@ -496,7 +499,8 @@ function tdvp1sweep_lc!(dt, A::TreeNetwork, M::TreeNetwork, lc::TreeLightCone, F
IA = collect(1:ngc+2)
IB = collect(1:ngc+2)
IA[1] = -1
A[child] = tensorcontract(A[child], IA, C, [1,-1], IB)
#A[child] = tensorcontract(A[child], IA, C, [1,-1], IB)
A[child] = tensorcontract(IB, A[child], IA, C, [1,-1])
#(OC is now on child)

#evolve child forward one full time step
Expand All @@ -518,7 +522,8 @@ function tdvp1sweep_lc!(dt, A::TreeNetwork, M::TreeNetwork, lc::TreeLightCone, F
IA = collect(1:nc+2)
IB = collect(1:nc+2)
IA[i+1] = -1
AC = tensorcontract(AL, IA, C, [i+1,-1], IB)
#AC = tensorcontract(AL, IA, C, [i+1,-1], IB)
AC = tensorcontract(IB, AL, IA, C, [i+1,-1])
#(OC is now on node)
end

Expand Down

0 comments on commit 61bba8b

Please sign in to comment.