Mult done good?

parent 1cf56d69
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function antsym(a::SU3{T}) where T <: AbstractFloat function antsym(a::SU3{T}) where T <: AbstractFloat
t1 = 2.0*imag(a.u11) t1 = 2.0*imag(a.u11)
t2 = 2.0*imag(a.u22) t2 = 2.0*imag(a.u22)
t3 = -2.0*imag(a.u12*a.u21 - a.u11*a.u22) t3 = 2.0*imag(a.u12*a.u21 - a.u11*a.u22)
t4 = a.u12 - conj(a.u21) t4 = a.u12 - conj(a.u21)
t5 = a.u13 - (a.u12*a.u23 - a.u13*a.u22) t5 = a.u13 - (a.u12*a.u23 - a.u13*a.u22)
t6 = a.u23 - (a.u13*a.u21 - a.u11*a.u23) t6 = a.u23 - (a.u13*a.u21 - a.u11*a.u23)
...@@ -22,9 +22,9 @@ function antsym(a::SU3{T}) where T <: AbstractFloat ...@@ -22,9 +22,9 @@ function antsym(a::SU3{T}) where T <: AbstractFloat
end end
Base.:*(a::U3alg{T},b::SU3fund{T}) where T <: AbstractFloat = SU3fund{T}(a.u11*b.t1 + a.u12*b.t4 + a.u13*b.t5, Base.:*(a::U3alg{T},b::SU3fund{T}) where T <: AbstractFloat = SU3fund{T}(im*a.u11*b.t1 + a.u12*b.t4 + a.u13*b.t3,
-a.u12*b.t4 + a.u22*b.t2 + a.u23*b.t6, -conj(a.u12)*b.t1 + im*a.u22*b.t2 + a.u23*b.t3,
-a.u13*b.t5 - a.u23*b.t6 + a.u33*b.t3) -conj(a.u13)*b.t1 - conj(a.u23)*b.t2 + im*a.u33*b.t3)
Base.:+(a::U3alg{T},b::U3alg{T}) where T <: AbstractFloat = U3alg{T}(a.u11 + b.u11, a.u22 + b.u22, a.u33 + b.u33, a.u12 + b.u12, a.u13 + b.u13, a.u23 + b.u23) Base.:+(a::U3alg{T},b::U3alg{T}) where T <: AbstractFloat = U3alg{T}(a.u11 + b.u11, a.u22 + b.u22, a.u33 + b.u33, a.u12 + b.u12, a.u13 + b.u13, a.u23 + b.u23)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment