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

Update correlations.jl #10

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/correlations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ function _spectrum(H::QuantumObject{<:AbstractArray{T1},HOpType},

# Get the steady state and update the corresponding vector
ss_idx = argmin(abs2.(rates))
ρss = vec2mat(@view(vecs[:,ss_idx]))
ρss2 = (ρss + ρss') / 2
ρss2 ./= tr(ρss2)
ρss .= ρss2

# ρss = vec2mat(@view(vecs[:,ss_idx]))
# ρss2 = (ρss + ρss') / 2
# ρss2 ./= tr(ρss2)
# ρss .= ρss2
ρss = steadystate(L).data

ρ0 = B.data * ρss
v = vecs \ mat2vec(ρ0)

Expand All @@ -191,4 +192,4 @@ function _spectrum(H::QuantumObject{<:AbstractArray{T1},HOpType},
spec = map(ω->2*real(sum(@. amps * (1 / (1im * ω - rates)))), ω_l)

return ω_l, spec
end
end
Loading