Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dissipative TEBD #270

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Dissipative TEBD #270

wants to merge 10 commits into from

Conversation

GTorlai
Copy link
Owner

@GTorlai GTorlai commented Mar 28, 2022

No description provided.

@GTorlai GTorlai linked an issue Mar 28, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2022

Codecov Report

Merging #270 (3991c5a) into master (5c3a23e) will decrease coverage by 1.65%.
The diff coverage is 17.28%.

@@            Coverage Diff             @@
##           master     #270      +/-   ##
==========================================
- Coverage   87.51%   85.85%   -1.66%     
==========================================
  Files          22       22              
  Lines        2298     2347      +49     
==========================================
+ Hits         2011     2015       +4     
- Misses        287      332      +45     
Impacted Files Coverage Δ
src/itensor.jl 42.10% <0.00%> (-7.90%) ⬇️
src/circuits/trottersuzuki.jl 28.18% <25.92%> (-10.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c3a23e...3991c5a. Read the comment docs.

src/circuits/trottersuzuki.jl Outdated Show resolved Hide resolved
src/circuits/trottersuzuki.jl Show resolved Hide resolved
src/circuits/trottersuzuki.jl Outdated Show resolved Hide resolved
src/circuits/trottersuzuki.jl Show resolved Hide resolved
src/circuits/trottersuzuki.jl Show resolved Hide resolved
src/itensor.jl Outdated Show resolved Hide resolved
src/itensor.jl Outdated Show resolved Hide resolved
src/itensor.jl Outdated Show resolved Hide resolved
src/itensor.jl Outdated Show resolved Hide resolved
src/itensor.jl Outdated Show resolved Hide resolved
Comment on lines +41 to +42
op(sites::Vector{<:Index}, O⃗::Tuple{AbstractString,Vararg}...) =
reduce(*, [op(sites, O) for O in O⃗])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
op(sites::Vector{<:Index}, O⃗::Tuple{AbstractString,Vararg}...) =
reduce(*, [op(sites, O) for O in O⃗])
function op(sites::Vector{<:Index}, O⃗::Tuple{AbstractString,Vararg}...)
return reduce(*, [op(sites, O) for O in O⃗])
end

Comment on lines +45 to +48
sites::Vector{<:Index},
f::Function,
O⃗::Tuple{AbstractString,Vararg}...;
kwargs...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
sites::Vector{<:Index},
f::Function,
O⃗::Tuple{AbstractString,Vararg}...;
kwargs...
sites::Vector{<:Index}, f::Function, O⃗::Tuple{AbstractString,Vararg}...; kwargs...

Comment on lines +54 to +57
op(sites::Vector{<:Index},
fO⃗::Tuple{Function,<:Tuple}) =
op(sites, first(fO⃗), last(fO⃗)...)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
op(sites::Vector{<:Index},
fO⃗::Tuple{Function,<:Tuple}) =
op(sites, first(fO⃗), last(fO⃗)...)
function op(sites::Vector{<:Index}, fO⃗::Tuple{Function,<:Tuple})
return op(sites, first(fO⃗), last(fO⃗)...)
end

layer = Tuple[]
for k in 1:length(H)
length(H[k]) > 3 &&
error("Only the format (coupling, opname, support) currently allowed")
coupling, Hdata... = H[k]
layer = vcat(layer, [(x -> exp(-δτ * coupling * x), Hdata...)])
opname = first(Hdata)
layer = vcat(layer, [(x -> exp(-δτ * coupling * x), Hdata)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
layer = vcat(layer, [(x -> exp(-δτ * coupling * x), Hdata)])
layer = vcat(layer, [(x -> exp(-δτ * coupling * x), Hdata)])

rate, opname, site = lindblad
!(site isa Int) && error("Only single-body lindblad operators allowed")
s = hilbert[site]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

Comment on lines +85 to +87
display(∑)


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
display(∑)
display(∑)

Comment on lines +138 to +140
function _trottercircuit(H::Vector{<:Vector{Tuple}}, τs::Vector; layered::Bool = true, lindbladians = [], kwargs...)
!isempty(lindbladians) && error("Trotter simulation with Lindblad operators requires a set of indices")
@assert length(H) == (length(τs) -1) || length(H) == length(τs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _trottercircuit(H::Vector{<:Vector{Tuple}}, τs::Vector; layered::Bool = true, lindbladians = [], kwargs...)
!isempty(lindbladians) && error("Trotter simulation with Lindblad operators requires a set of indices")
@assert length(H) == (length(τs) -1) || length(H) == length(τs)
function _trottercircuit(
H::Vector{<:Vector{Tuple}}, τs::Vector; layered::Bool=true, lindbladians=[], kwargs...
)
!isempty(lindbladians) &&
error("Trotter simulation with Lindblad operators requires a set of indices")
@assert length(H) == (length(τs) - 1) || length(H) == length(τs)

Comment on lines +147 to +148
function _trottercircuit(hilbert::Vector{<:Index}, H::Vector{<:Vector{Tuple}}, τs::Vector; layered::Bool = true, kwargs...)
@assert length(H) == (length(τs) -1) || length(H) == length(τs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _trottercircuit(hilbert::Vector{<:Index}, H::Vector{<:Vector{Tuple}}, τs::Vector; layered::Bool = true, kwargs...)
@assert length(H) == (length(τs) -1) || length(H) == length(τs)
function _trottercircuit(
hilbert::Vector{<:Index},
H::Vector{<:Vector{Tuple}},
τs::Vector;
layered::Bool=true,
kwargs...,
)
@assert length(H) == (length(τs) - 1) || length(H) == length(τs)

Comment on lines +154 to +156

function _trottercircuit(H::Vector{<:Tuple}, τs::Vector; layered::Bool = true, lindbladians = [], kwargs...)
!isempty(lindbladians) && error("Trotter simulation with Lindblad operators requires a set of indices")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _trottercircuit(H::Vector{<:Tuple}, τs::Vector; layered::Bool = true, lindbladians = [], kwargs...)
!isempty(lindbladians) && error("Trotter simulation with Lindblad operators requires a set of indices")
function _trottercircuit(
H::Vector{<:Tuple}, τs::Vector; layered::Bool=true, lindbladians=[], kwargs...
)
!isempty(lindbladians) &&
error("Trotter simulation with Lindblad operators requires a set of indices")

return reduce(vcat, [layer for _ in 1:nlayers])
end

function _trottercircuit(hilbert::Vector{<:Index}, H::Vector{<:Tuple}, τs::Vector; layered::Bool = true, kwargs...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function _trottercircuit(hilbert::Vector{<:Index}, H::Vector{<:Tuple}, τs::Vector; layered::Bool = true, kwargs...)
function _trottercircuit(
hilbert::Vector{<:Index}, H::Vector{<:Tuple}, τs::Vector; layered::Bool=true, kwargs...
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Noisy Trotterized dynamics using superoperators
3 participants