mirror of
https://igit.ific.uv.es/alramos/latticegpu.jl.git
synced 2025-05-15 11:43:42 +02:00
Added reunitarization after trajectory
This commit is contained in:
parent
23930e14cf
commit
860f725d99
5 changed files with 22 additions and 6 deletions
|
@ -24,11 +24,11 @@ tr(g::SU2{T}) where T <: AbstractFloat = complex(2.0*real(g.t1), 0.0)
|
|||
dev_one(g::SU2{T}) where T <: AbstractFloat = sqrt(( abs2(g.t1 - one(T)) + abs2(g.t2))/2)
|
||||
|
||||
"""
|
||||
function normalize(a::T) where {T <: Group}
|
||||
function unitarize(a::T) where {T <: Group}
|
||||
|
||||
Return a normalized element of the group.
|
||||
Return a unitarized element of the group.
|
||||
"""
|
||||
function normalize(a::SU2{T}) where T <: AbstractFloat
|
||||
function unitarize(a::SU2{T}) where T <: AbstractFloat
|
||||
dr = sqrt(abs2(a.t1) + abs2(a.t2))
|
||||
if (dr == 0.0)
|
||||
return SU2(0.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue