Skip to content

Commit

Permalink
Fix code formatting to match upstream conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
cerisola committed Nov 28, 2024
1 parent fbdde3c commit f416315
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
16 changes: 8 additions & 8 deletions src/bath_correlation_functions/boson/Underdamped.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ Construct an underdamped bosonic bath with Matsubara expansion
- `bath::BosonBath` : a bosonic bath object with describes the interaction between system and bosonic bath
"""
function Boson_Underdamped_Matsubara(op, λ::Real, Γ::Real, ω0::Real, kT::Real, N::Int)
Ω = sqrt(ω0^2 -/2)^2)
ν = 2π*kT*(1:N)
Ω = sqrt(ω0^2 - / 2)^2)
ν = 2π * kT * (1:N)

η_real = ComplexF64[(λ^2/(4*Ω))*coth((Ω + im*Γ/2)/(2*kT)), (λ^2/(4*Ω))*coth((Ω - im*Γ/2)/(2*kT))]
γ_real = ComplexF64[Γ/2 - im*Ω, Γ/2 + im*Ω]
η_imag = ComplexF64[(λ^2/(4*Ω))*im, -^2/(4*Ω))*im]
γ_imag = ComplexF64[Γ/2 - im*Ω, Γ/2 + im*Ω]
η_real = ComplexF64[(λ^2/(4*Ω))*coth((Ω + im * Γ / 2) / (2 * kT)), (λ^2/(4*Ω))*coth((Ω - im * Γ / 2) / (2 * kT))]
γ_real = ComplexF64[Γ/2-im*Ω, Γ/2+im*Ω]
η_imag = ComplexF64[(λ^2/(4*Ω))*im, -^2 / (4 * Ω))*im]
γ_imag = ComplexF64[Γ/2-im*Ω, Γ/2+im*Ω]

if N > 0
for l in 1:N
append!(η_real, -2*λ^2*Γ*kT*ν[l]/(((Ω + im*Γ/2)^2 + ν[l]^2)*((Ω - im*Γ/2)^2 + ν[l]^2)))
append!(η_real, -2 * λ^2 * Γ * kT * ν[l] / (((Ω + im * Γ / 2)^2 + ν[l]^2) * ((Ω - im * Γ / 2)^2 + ν[l]^2)))
append!(γ_real, ν[l])
end
end

return BosonBath(op, η_real, γ_real, η_imag, γ_imag)
end
end
9 changes: 1 addition & 8 deletions test/bath_corr_func.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,7 @@
0.3232 - 0.8171018602353075im,
0.3232 + 0.8171018602353075im,
]
types = [
"bR",
"bR",
"bR",
"bR",
"bRI",
"bRI",
]
types = ["bR", "bR", "bR", "bR", "bRI", "bRI"]
@test length(b) == 6
for (i, e) in enumerate(b)
@test e.η η[i] atol = 1.0e-10
Expand Down

0 comments on commit f416315

Please sign in to comment.