-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: master
Are you sure you want to change the base?
Dissipative TEBD #270
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
op(sites::Vector{<:Index}, O⃗::Tuple{AbstractString,Vararg}...) = | ||
reduce(*, [op(sites, O) for O in O⃗]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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 |
sites::Vector{<:Index}, | ||
f::Function, | ||
O⃗::Tuple{AbstractString,Vararg}...; | ||
kwargs... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
sites::Vector{<:Index}, | |
f::Function, | |
O⃗::Tuple{AbstractString,Vararg}...; | |
kwargs... | |
sites::Vector{<:Index}, f::Function, O⃗::Tuple{AbstractString,Vararg}...; kwargs... |
op(sites::Vector{<:Index}, | ||
fO⃗::Tuple{Function,<:Tuple}) = | ||
op(sites, first(fO⃗), last(fO⃗)...) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
display(∑) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
display(∑) | |
display(∑) |
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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) |
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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) |
|
||
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶
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... | |
) |
No description provided.